Interface RelationshipEnablerFamilyAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RelationshipEnablerFamilyAssignmentSession extends OsidSession

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

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

  • Method Details

    • canAssignRelationshipEnablers

      boolean canAssignRelationshipEnablers()
      Tests if this user can alter relationship enabler/family 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.
    • canAssignRelationshipEnablersToFamily

      boolean canAssignRelationshipEnablersToFamily(Id familyId)
      Tests if this user can alter relationship enabler/family 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:
      familyId - the Id of the Family
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - familyId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableFamilyIds

      IdList getAssignableFamilyIds(Id familyId) throws OperationFailedException
      Gets a list of families including and under the given family node in which any family enabler can be assigned.
      Parameters:
      familyId - the Id of the Family
      Returns:
      list of assignable relationship Ids
      Throws:
      NullArgumentException - familyId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableFamilyIdsForRelationshipEnabler

      IdList getAssignableFamilyIdsForRelationshipEnabler(Id familyId, Id relationshipEnablerId) throws OperationFailedException
      Gets a list of families including and under the given family node in which a specific family enabler can be assigned.
      Parameters:
      familyId - the Id of the Family
      relationshipEnablerId - the Id of the RelationshipEnabler
      Returns:
      list of assignable family Ids
      Throws:
      NullArgumentException - familyId or relationshipEnablerId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignRelationshipEnablerToFamily

      void assignRelationshipEnablerToFamily(Id relationshipEnablerId, Id familyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing RelationshipEnabler to a Family .
      Parameters:
      relationshipEnablerId - the Id of the RelationshipEnabler
      familyId - the Id of the Family
      Throws:
      AlreadyExistsException - relationshipEnablerId is already assigned to familyId
      NotFoundException - relationshipEnablerId or familyId not found
      NullArgumentException - relationshipEnablerId or familyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignRelationshipEnablerFromFamily

      void unassignRelationshipEnablerFromFamily(Id relationshipEnablerId, Id familyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a RelationshipEnabler from a Family .
      Parameters:
      relationshipEnablerId - the Id of the RelationshipEnabler
      familyId - the Id of the Family
      Throws:
      NotFoundException - relationshipEnablerId or familyId not found or relationshipEnablerId is not assigned to familyId
      NullArgumentException - relationshipEnablerId or familyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignRelationshipEnablerToFamily

      void reassignRelationshipEnablerToFamily(Id relationshipEnablerId, Id fromFamilyId, Id toFamilyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a RelationshipEnabler from one Family to another. Mappings to other Families are unaffected.
      Parameters:
      relationshipEnablerId - the Id of the RelationshipEnabler
      fromFamilyId - the Id of the current Family
      toFamilyId - the Id of the destination Family
      Throws:
      AlreadyExistsException - relationshipEnablerId already assigned to toFamilyId
      NotFoundException - relationshipEnablerId, fromFamilyId , or toFamilyId not found or relationshipEnablerId not mapped to fromFamilyId
      NullArgumentException - relationshipEnabelrId, fromFamilyId , or toFamilyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.