<?xml version="1.0" encoding="UTF-8" ?>
    <prefix>
      <prefix>user</prefix>
      <describeURL>/direct/user/describe</describeURL>
      <summary>Represents a user in the system, user data is effectively immutable and removing users cannot override externally provided users</summary>
      <collectionURL>/user</collectionURL>
      <collectionDescription>Gets a list of all users in the system (can be limited by search but always max of 50 results), normally this only works for admin users, but can be enabled for all users with config setting 'entity.users.viewall=true'</collectionDescription>
      <createURL>/user/new</createURL>
      <createDescription>Creates a user, eid is the only required field, all others are optional, id may be specified as well but one will be generated for you if you leave this out</createDescription>
      <showURL>/user/:ID:</showURL>
      <showDescription>Get a single user by eid (default) or id by prefixing it with "id=" (e.g. /user/id=ERW434YIY88)</showDescription>
      <updateURL>/user/:ID:/edit</updateURL>
      <deleteURL>/user/:ID:/delete</deleteURL>
      <customActions>
        <customAction>
          <action>current</action>
          <url>/direct/user/current</url>
          <method>GET</method>
          <viewKey>list</viewKey>
          <description>Get the current user if there is one</description>
        </customAction>
      </customActions>
      <customActions>
        <customAction>
          <action>validatePassword</action>
          <url>/direct/user/validatePassword</url>
          <method>POST</method>
          <viewKey>new</viewKey>
          <description>Check if a password is valid for a user, params: 'password' (required) the password to check, 'username' (optional) the username of the user</description>
        </customAction>
      </customActions>
      <customActions>
        <customAction>
          <action>exists</action>
          <url>/direct/user/:ID:/exists</url>
          <method>GET</method>
          <viewKey>show</viewKey>
          <description>Check if a userId exists (will check by eid and then id unless 'id=userId' is used), return 200 if exists and some failure code like 400 if not</description>
        </customAction>
      </customActions>
      <outputFormats>
        <format>xml</format>
        <format>json</format>
        <format>form</format>
       </outputFormats>
      <inputFormats>
        <format>html</format>
        <format>xml</format>
        <format>json</format>
       </inputFormats>
      <entityClass>
        <class>org.sakaiproject.entitybroker.providers.model.EntityUser</class>
        <type>bean</type>
        <fields>
          <field>
            <name>createdDate</name>
            <type>java.util.Date</type>
            <readable>true</readable>
            <writeable>false</writeable>
          </field>
          <field>
            <name>displayId</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>false</writeable>
          </field>
          <field>
            <name>displayName</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>eid</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>firstName</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>id</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>lastModified</name>
            <type>long</type>
            <readable>true</readable>
            <writeable>false</writeable>
          </field>
          <field>
            <name>lastName</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>modifiedDate</name>
            <type>java.util.Date</type>
            <readable>true</readable>
            <writeable>false</writeable>
          </field>
          <field>
            <name>owner</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>false</writeable>
          </field>
          <field>
            <name>password</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>reference</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>false</writeable>
          </field>
          <field>
            <name>sortName</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>false</writeable>
          </field>
          <field>
            <name>type</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>true</writeable>
          </field>
          <field>
            <name>url</name>
            <type>java.lang.String</type>
            <readable>true</readable>
            <writeable>false</writeable>
          </field>
        </fields>
      </entityClass>
      <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>CRUDable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.CRUDable</type>
        </capability>
        <capability>
          <name>CollectionResolvable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.CollectionResolvable</type>
        </capability>
        <capability>
          <name>Createable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Createable</type>
        </capability>
        <capability>
          <name>Deleteable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Deleteable</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>RESTful</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.RESTful</type>
        </capability>
        <capability>
          <name>Redirectable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Redirectable</type>
        </capability>
        <capability>
          <name>Resolvable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Resolvable</type>
          <description>The user identifier by default is the eid (e.g. /user/aaronz), lookups can also happen using the id by prefixing it with "id=" (e.g. /user/id=ERW434YIY88)</description>
        </capability>
        <capability>
          <name>Sampleable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Sampleable</type>
        </capability>
        <capability>
          <name>Saveable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Saveable</type>
        </capability>
        <capability>
          <name>Updateable</name>
          <type>org.sakaiproject.entitybroker.entityprovider.capabilities.Updateable</type>
        </capability>
      </capabilities>
    </prefix>
