Interface ProfileEntryEnablerProfileAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ProfileEntryEnablerProfileAssignmentSession extends OsidSession

This session provides methods to re-assign ProfileEntryEnabler to Profile mappings. A ProfileEntryEnabler may appear in multiple Profile objects and removing the last reference to a ProfileEntryEnabler is the equivalent of deleting it. Each Profile may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a ProfileEntryEnabler to another Profile is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignProfileEntryEnablers

      boolean canAssignProfileEntryEnablers()
      Tests if this user can alter profile entry enabler/profile mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignProfileEntryEnablersToProfile

      boolean canAssignProfileEntryEnablersToProfile(Id profileId)
      Tests if this user can alter profile entry enabler/profile mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
      Parameters:
      profileId - the Id of the Profile
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - profileId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableProfileIds

      IdList getAssignableProfileIds(Id profileId) throws OperationFailedException
      Gets a list of profiles including and under the given profile node in which any profile entry enabler can be assigned.
      Parameters:
      profileId - the Id of the Profile
      Returns:
      list of assignable profile Ids
      Throws:
      NullArgumentException - profileId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableProfileIdsForProfileEntryEnabler

      IdList getAssignableProfileIdsForProfileEntryEnabler(Id profileId, Id profileEntryEnablerId) throws OperationFailedException
      Gets a list of profiles including and under the given profile node in which a specific profile entry enabler can be assigned.
      Parameters:
      profileId - the Id of the Profile
      profileEntryEnablerId - the Id of the ProfileEntryEnabler
      Returns:
      list of assignable profile Ids
      Throws:
      NullArgumentException - profileId or profileEntryEnablerId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignProfileEntryEnablerToProfile

      void assignProfileEntryEnablerToProfile(Id profileEntryEnablerId, Id profileId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing ProfileEntryEnabler to a Profile .
      Parameters:
      profileEntryEnablerId - the Id of the ProfileEntryEnabler
      profileId - the Id of the Profile
      Throws:
      AlreadyExistsException - profileEntryEnablerId is already assigned to profileId
      NotFoundException - profileEntryEnablerId or profileId not found
      NullArgumentException - profileEntryEnablerId or profileId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignProfileEntryEnablerFromProfile

      void unassignProfileEntryEnablerFromProfile(Id profileEntryEnablerId, Id profileId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a ProfileEntryEnabler from a Profile .
      Parameters:
      profileEntryEnablerId - the Id of the ProfileEntryEnabler
      profileId - the Id of the Profile
      Throws:
      NotFoundException - profileEntryEnablerId or profileId not found or profileEntryEnablerId not assigned to profileId
      NullArgumentException - profileEntryEnablerId or profileId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignProfileEntryEnablerToProfile

      void reassignProfileEntryEnablerToProfile(Id profileEntryEnablerId, Id fromProfileId, Id toProfileId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a ProfileEntryEnabler from one Profile to another. Mappings to other Profiles are unaffected.
      Parameters:
      profileEntryEnablerId - the Id of the ProfileEntryEnabler
      fromProfileId - the Id of the current Profile
      toProfileId - the Id of the destination Profile
      Throws:
      AlreadyExistsException - profileEntryEnablerId already assigned to toProfileId
      NotFoundException - profileEntryEnablerId, fromProfileId , or toProfileId not found or profileEntryEnablerId not mapped to fromProfileId
      NullArgumentException - profileEntryEnablerId, fromProfileId , or toProfileId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.