Interface RelationshipEnablerFamilyAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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 Summary
Modifier and TypeMethodDescriptionvoidassignRelationshipEnablerToFamily(Id relationshipEnablerId, Id familyId) Adds an existingRelationshipEnablerto aFamily.booleanTests if this user can alter relationship enabler/family mappings.booleancanAssignRelationshipEnablersToFamily(Id familyId) Tests if this user can alter relationship enabler/family mappings.getAssignableFamilyIds(Id familyId) Gets a list of families including and under the given family node in which any family enabler can be assigned.getAssignableFamilyIdsForRelationshipEnabler(Id familyId, Id relationshipEnablerId) Gets a list of families including and under the given family node in which a specific family enabler can be assigned.voidreassignRelationshipEnablerToFamily(Id relationshipEnablerId, Id fromFamilyId, Id toFamilyId) Moves aRelationshipEnablerfrom oneFamilyto another.voidunassignRelationshipEnablerFromFamily(Id relationshipEnablerId, Id familyId) Removes aRelationshipEnablerfrom aFamily.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignRelationshipEnablersToFamily
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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Parameters:
familyId- theIdof theFamily- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-familyIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableFamilyIds
Gets a list of families including and under the given family node in which any family enabler can be assigned.- Parameters:
familyId- theIdof theFamily- Returns:
- list of assignable relationship
Ids - Throws:
NullArgumentException-familyIdisnullOperationFailedException- 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- theIdof theFamilyrelationshipEnablerId- theIdof theRelationshipEnabler- Returns:
- list of assignable family
Ids - Throws:
NullArgumentException-familyIdorrelationshipEnablerIdisnullOperationFailedException- 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 existingRelationshipEnablerto aFamily.- Parameters:
relationshipEnablerId- theIdof theRelationshipEnablerfamilyId- theIdof theFamily- Throws:
AlreadyExistsException-relationshipEnablerIdis already assigned tofamilyIdNotFoundException-relationshipEnablerIdorfamilyIdnot foundNullArgumentException-relationshipEnablerIdorfamilyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignRelationshipEnablerFromFamily
void unassignRelationshipEnablerFromFamily(Id relationshipEnablerId, Id familyId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aRelationshipEnablerfrom aFamily.- Parameters:
relationshipEnablerId- theIdof theRelationshipEnablerfamilyId- theIdof theFamily- Throws:
NotFoundException-relationshipEnablerIdorfamilyIdnot found orrelationshipEnablerIdis not assigned tofamilyIdNullArgumentException-relationshipEnablerIdorfamilyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignRelationshipEnablerToFamily
void reassignRelationshipEnablerToFamily(Id relationshipEnablerId, Id fromFamilyId, Id toFamilyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aRelationshipEnablerfrom oneFamilyto another. Mappings to otherFamiliesare unaffected.- Parameters:
relationshipEnablerId- theIdof theRelationshipEnablerfromFamilyId- theIdof the currentFamilytoFamilyId- theIdof the destinationFamily- Throws:
AlreadyExistsException-relationshipEnablerIdalready assigned totoFamilyIdNotFoundException-relationshipEnablerId, fromFamilyId, ortoFamilyIdnot found orrelationshipEnablerIdnot mapped tofromFamilyIdNullArgumentException-relationshipEnabelrId, fromFamilyId, ortoFamilyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-