<?xml version="1.0" encoding="UTF-8" ?>
    <prefix>
      <prefix>portal-chat</prefix>
      <describeURL>/direct/portal-chat/describe</describeURL>
      <summary>Presents an HTTP interface onto Sakai's portal chat system.</summary>
      <createURL>/portal-chat/new</createURL>
      <createDescription>The URL format is "/direct/portal-chat/new" <br/> Send a message to another user. Takes two parameters, 'to' (a Sakai user id) and 'message'.</createDescription>
      <customActions>
        <customAction>
          <action>servers</action>
          <url>/direct/portal-chat/:ID:/servers</url>
          <method>GET</method>
          <viewKey>show</viewKey>
        </customAction>
      </customActions>
      <customActions>
        <customAction>
          <action>latestData</action>
          <url>/direct/portal-chat/:ID:/latestData</url>
          <method>GET</method>
          <viewKey>show</viewKey>
          <description>The URL format is "/direct/portal-chat/ANYTHING/latestData.json?online=true&siteId=SITEID". <br/> Grabs all the latest data for the currently logged in user. This operation will also optionally set the heartbeat for the current user.<br/> If you don't want to show up in chattable lists, pass false for online and you'll be hidden from others. The latestData operation retrieves your connections, your messages, and, if you specify a siteId parameter, the list of users currently in that site.</description>
        </customAction>
      </customActions>
      <customActions>
        <customAction>
          <action>ping</action>
          <url>/direct/portal-chat/:ID:/ping</url>
          <method>GET</method>
          <viewKey>show</viewKey>
          <description>The URL format is "/direct/portal-chat/USERTOPING/ping" where USERTOPING is a Sakai user id. <br/> Returns the string "success" if an email is successfully sent to the user.</description>
        </customAction>
      </customActions>
      <outputFormats>
        <format>txt</format>
        <format>json</format>
       </outputFormats>
      <inputFormats>
        <format>html</format>
       </inputFormats>
      <entityClass>
        <class>org.sakaiproject.portal.chat.entity.PCServiceEntityProvider$UserMessage</class>
        <type>bean</type>
        <fields>
          <field>
            <name>clear</name>
            <type>boolean</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>content</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>from</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>fromConnection</name>
            <type>boolean</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>siteId</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>timestamp</name>
            <type>long</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>to</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>video</name>
            <type>boolean</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
        </fields>
      </entityClass>
      <capabilities>
        <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>Createable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Createable</type>
        </capability>
        <capability>
          <name>Describeable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Describeable</type>
        </capability>
        <capability>
          <name>Inputable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Inputable</type>
        </capability>
        <capability>
          <name>Outputable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Outputable</type>
        </capability>
        <capability>
          <name>Sampleable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Sampleable</type>
        </capability>
      </capabilities>
    </prefix>
