Interface ProfileEntryProfileAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ProfileEntryProfileAssignmentSession extends OsidSession

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

Moving or adding a reference of a ProfileEntry to another Profile is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignProfileEntries

      boolean canAssignProfileEntries()
      Tests if this user can alter profile entry/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 assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignProfileEntriesToProfile

      boolean canAssignProfileEntriesToProfile(Id profileId)
      Tests if this user can alter profile entry/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 assignment 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 profile including and under the given profile node in which any profile entry 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.
    • getAssignableProfileIdsForProfileEntry

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

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

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

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