Interface IPrincipalAttributeMechanics

All Superinterfaces:
IComponent, IInitializable, IMechanics, ISystemHandler, IViewableMechanics

public interface IPrincipalAttributeMechanics extends IViewableMechanics
Date: Sep 7, 2004
  • Method Details

    • getAllAttributes

      Map<String,Object> getAllAttributes(IURI principalURI) throws PortalException
      Get all of the available attributes from all of the principal attribute providers
      Parameters:
      principalURI -
      Returns:
      a map of name-value string-object pairs
      Throws:
      PortalException
    • getAttributes

      Map<String,Object> getAttributes(IURI principalURI, IThingID principalAttributeProviderID) throws PortalException
      Get all of the attributes managed by this principal provider
      Parameters:
      principalURI -
      principalAttributeProviderID - (null means the default for the service)
      Returns:
      a map of name-value string-object pairs
      Throws:
      PortalException
    • getAttribute

      Object getAttribute(IURI principalURI, IThingID principalAttributeProviderID, String attrName) throws PortalException
      Retrieves an attribute
      Parameters:
      principalURI -
      principalAttributeProviderID - (null means the default for the service)
      attrName -
      Throws:
      PortalException
    • getTypedAttributes

      Map<String,TypedAttribute> getTypedAttributes(IURI principalURI, IThingID principalAttributeProviderID) throws PortalException
      Get all of the attributes managed by this principal provider as TypedAttribute objects
      Parameters:
      principalURI -
      principalAttributeProviderID - (null means the default for the service)
      Returns:
      a map of name/TypedAttribute pairs
      Throws:
      PortalException
    • getTypedAttribute

      Object getTypedAttribute(IURI principalURI, IThingID principalAttributeProviderID, String attrName) throws PortalException
      Retrieves an attribute
      Parameters:
      principalURI -
      principalAttributeProviderID - (null means the default for the service)
      attrName -
      Returns:
      a TypedAttribute object for the given attribute name
      Throws:
      PortalException
    • getAttributeNames

      List<String> getAttributeNames(IURI principalURI, IThingID principalAttributeProviderID) throws PortalException
      The attribute names
      Parameters:
      principalURI -
      principalAttributeProviderID - (null means the default for the service)
      Returns:
      a list of strings
      Throws:
      PortalException
    • getAttributeTitles

      List<String> getAttributeTitles(IURI principalURI, IThingID principalAttributeProviderID, Locale currentLocale) throws PortalException
      The attribute titles
      Parameters:
      principalURI -
      principalAttributeProviderID - (null means the default for the service)
      currentLocale - (not currently used)
      Returns:
      a list of titles
      Throws:
      PortalException
    • canModifyPrincipal

      boolean canModifyPrincipal(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID) throws PortalException, PortalAccessException
      Determines if the given user has rights to modify the specified principal
      Parameters:
      userID - the user permissions to check
      principalURI - the URI to the principal object that is to be modified
      principalAttributeProviderID - (null means the default for the service)
      Throws:
      PortalException
      PortalAccessException - if the user does not have access
    • checkModifyPrincipal

      void checkModifyPrincipal(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID) throws PortalException, PortalAccessException
      Determines if the given user has rights to modify the specified principal
      Parameters:
      userID - the user permissions to check
      principalURI - the URI to the principal object that is to be modified
      principalAttributeProviderID - (null means the default for the service)
      Throws:
      PortalException
      PortalAccessException - if the user does not have access
    • modifyPrincipal

      void modifyPrincipal(IURI principalURI, String attrName, Object attrValue, IThingID principalAttributeProviderID) throws PortalException
      Modifies an attribute managed by the principal attribute provider
      Parameters:
      principalURI -
      attrName -
      attrValue -
      principalAttributeProviderID - the principal's attribute provider (null means the default for the service)
      Throws:
      PortalException
    • modifyPrincipalEx

      void modifyPrincipalEx(IURI principalURI, Map<String,?> attrMap, IThingID principalAttributeProviderID) throws PortalException
      Modifies a set of attributes managed by the principal attribute provider
      Parameters:
      principalURI -
      attrMap - a Map of key/value pairs representing attributes
      principalAttributeProviderID - the principal's attribute provider (null means the default for the service)
      Throws:
      PortalException
    • fireModifyPrincipalEvent

      void fireModifyPrincipalEvent(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID, String propName, Object propValue) throws PortalException
      Fire an event that the principal has been modified.
      Parameters:
      userID - the current user ID
      principalURI - the principal that was modified
      principalAttributeProviderID - (null means the default for the service)
      Throws:
      PortalException
    • fireModifyPrincipalEvent

      default void fireModifyPrincipalEvent(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID, String propName, Object propValue, Object oldValue) throws PortalException
      Throws:
      PortalException
    • fireModifyPrincipalEvent

      default void fireModifyPrincipalEvent(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID, DifferenceMap differenceMap) throws PortalException
      Fire an event containing the difference map of the changed principal attributes
      Parameters:
      userID - the current user ID
      principalURI - the principal that was modified
      principalAttributeProviderID - the principal's attribute provider (null means the default for the service)
      differenceMap - difference map of the attributes that have been changed
      Throws:
      PortalException
    • hasAccess

      boolean hasAccess(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID) throws PortalException
      whether this user can access this principal
      Parameters:
      userID -
      principalURI -
      Returns:
      whether this user has access to modify a user
      Throws:
      PortalAccessException
      PortalException
    • checkAccess

      void checkAccess(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID) throws PortalException, PortalAccessException
      whether this user can access this principal
      Parameters:
      userID -
      principalURI -
      Throws:
      PortalAccessException
      PortalException
    • deletePrincipal

      void deletePrincipal(IURI principalURI) throws PortalException
      Deletes the attribute storage object for a given principal and attribute provider
      Parameters:
      principalURI -
      Throws:
      PortalException