<?xml version="1.0" encoding="UTF-8" ?>
    <prefix>
      <prefix>profile</prefix>
      <describeURL>/direct/profile/describe</describeURL>
      <summary>Represents a user's profile. Because of the privacy settings that a user can set for individual parts of their profile, the information in the profile that is returned for a given user will be tailored based on the person requesting it.</summary>
      <showURL>/profile/:ID:</showURL>
      <showDescription>(GET) Gets a user's profile. Response will be tailored to the person making the request according to the profile owners privacy settings (/profile/USER.xml).</showDescription>
      <customActions>
        <customAction>
          <action>removeFriend</action>
          <url>/direct/profile/:ID:/removeFriend</url>
          <method>GET</method>
          <viewKey>show</viewKey>
        </customAction>
      </customActions>
      <customActions>
        <customAction>
          <action>image</action>
          <url>/direct/profile/:ID:/image</url>
          <method>GET</method>
          <viewKey>show</viewKey>
          <description>Retrieve the profile image for a user. Append /thumb to get the thumbnail (/profile/USER/image/thumb) if there is one. If there is no thumbnail, the main image will be returned. Append /avatar to get the avatar (/profile/USER/image/avatar) if there is one. If there is no avatar, the main image will be returned. Append /official to get the official image (/profile/USER/image/official) if there is one. If there is no official image, the default image will be returned. Optionally add the siteId URL param to allow site permissions to be checked (/profile/USER/image?siteId={siteid} or /profile/USER/image/thumb?siteId={siteid}) Returns binary of the image. Returns default image if no image exists or not allowed. Return 404 if user (or optional siteId) is invalid. Will always return an image if one exists, either by being uploaded or being a url (depending on how the system has been configured - see Profile2 sakai.properties). You can use it directly in an img tag &lt;img src="/profile/USER/image[/thumb]" /&gt;, it should always return something. DO NOT specify any return format, ie .xml. </description>
        </customAction>
      </customActions>
      <customActions>
        <customAction>
          <action>friendStatus</action>
          <url>/direct/profile/:ID:/friendStatus</url>
          <method>GET</method>
          <viewKey>show</viewKey>
        </customAction>
      </customActions>
      <customActions>
        <customAction>
          <action>pronunciation</action>
          <url>/direct/profile/:ID:/pronunciation</url>
          <method>GET</method>
          <viewKey>show</viewKey>
        </customAction>
      </customActions>
      <customActions>
        <customAction>
          <action>confirmFriendRequest</action>
          <url>/direct/profile/:ID:/confirmFriendRequest</url>
          <method>GET</method>
          <viewKey>show</viewKey>
        </customAction>
      </customActions>
      <customActions>
        <customAction>
          <action>formatted</action>
          <url>/direct/profile/:ID:/formatted</url>
          <method>GET</method>
          <viewKey>show</viewKey>
        </customAction>
      </customActions>
      <customActions>
        <customAction>
          <action>unreadMessagesCount</action>
          <url>/direct/profile/:ID:/unreadMessagesCount</url>
          <method>GET</method>
          <viewKey>show</viewKey>
          <description>Return the number of unread messages for a user. Returns a failure (404) if you do not have access to view the count of the user's messages.</description>
        </customAction>
      </customActions>
      <customActions>
        <customAction>
          <action>incomingConnectionRequests</action>
          <url>/direct/profile/:ID:/incomingConnectionRequests</url>
          <method>GET</method>
          <viewKey>show</viewKey>
          <description>Return a list of connection requests to a user. Returns an empty list if none and a failure (404) if you do not have access to view the user's connection requests, or the user is invalid.</description>
        </customAction>
      </customActions>
      <customActions>
        <customAction>
          <action>requestFriend</action>
          <url>/direct/profile/:ID:/requestFriend</url>
          <method>GET</method>
          <viewKey>show</viewKey>
        </customAction>
      </customActions>
      <customActions>
        <customAction>
          <action>outgoingConnectionRequests</action>
          <url>/direct/profile/:ID:/outgoingConnectionRequests</url>
          <method>GET</method>
          <viewKey>show</viewKey>
        </customAction>
      </customActions>
      <customActions>
        <customAction>
          <action>ignoreFriendRequest</action>
          <url>/direct/profile/:ID:/ignoreFriendRequest</url>
          <method>GET</method>
          <viewKey>show</viewKey>
        </customAction>
      </customActions>
      <customActions>
        <customAction>
          <action>connections</action>
          <url>/direct/profile/:ID:/connections</url>
          <method>GET</method>
          <viewKey>show</viewKey>
          <description>Return a list of connections for a user. Returns an empty list if none and a failure (404) if you do not have access to view the user's connections, or the user is invalid.</description>
        </customAction>
      </customActions>
      <outputFormats>
        <format>html</format>
        <format>xml</format>
        <format>json</format>
       </outputFormats>
      <inputFormats>
       </inputFormats>
      <entityClass>
        <class>org.sakaiproject.profile2.model.UserProfile</class>
        <type>bean</type>
        <fields>
          <field>
            <name>academicProfileUrl</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>birthday</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>birthdayDisplay</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>businessBiography</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>companyProfiles</name>
            <type>java.util.List</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>course</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>dateOfBirth</name>
            <type>java.util.Date</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>department</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>displayName</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>email</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>facsimile</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>favouriteBooks</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>favouriteMovies</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>favouriteQuotes</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>favouriteTvShows</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>formattedBirthday</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>homepage</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>homephone</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>imageThumbUrl</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>imageUrl</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>locked</name>
            <type>boolean</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>mobilephone</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>nickname</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>personalSummary</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>phoneticPronunciation</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>position</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>props</name>
            <type>java.util.Map</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>publications</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>room</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>school</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>socialInfo</name>
            <type>org.sakaiproject.profile2.model.SocialNetworkingInfo</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>staffProfile</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>status</name>
            <type>org.sakaiproject.profile2.model.ProfileStatus</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>subjects</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>universityProfileUrl</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>userUuid</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>workphone</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
        </fields>
      </entityClass>
      <redirects>
        <redirect>
          <template>/{prefix}/{id}/account</template>
          <methodName>redirectUserAccount</methodName>
          <description>Allows for retrieval of a user's account details by redirecting to the user entity provider</description>
          <controllable>false</controllable>
          <order>0</order>
        </redirect>
      </redirects>
      <capabilities>
        <capability>
          <name>CoreEntityProvider</name>
          <type>org.sakaiproject.entitybroker.entityprovider.CoreEntityProvider</type>
        </capability>
        <capability>
          <name>EntityProvider</name>
          <type>org.sakaiproject.entitybroker.entityprovider.EntityProvider</type>
        </capability>
        <capability>
          <name>ActionsExecutable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.ActionsExecutable</type>
        </capability>
        <capability>
          <name>AutoRegisterEntityProvider</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.AutoRegisterEntityProvider</type>
        </capability>
        <capability>
          <name>Describeable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Describeable</type>
        </capability>
        <capability>
          <name>Outputable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Outputable</type>
        </capability>
        <capability>
          <name>Redirectable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Redirectable</type>
        </capability>
        <capability>
          <name>RequestAware</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.RequestAware</type>
        </capability>
        <capability>
          <name>Resolvable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Resolvable</type>
        </capability>
        <capability>
          <name>Sampleable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Sampleable</type>
        </capability>
      </capabilities>
    </prefix>
