public interface RelationshipFamilyAssignmentSession extends OsidSession
This session provides methods to re-assign Relationships
to Family
objects A Relationship
may appear
in multiple Family
objects and removing the last reference
to a Relationship
is the equivalent of deleting it. Each
Family
may have its own authorizations governing who is
allowed to operate on it.
Moving or adding a reference of a Relationship
to
another Family
is not a copy operation (eg: does not change
its Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignRelationshipToFamily(Id relationshipId,
Id familyId)
Adds an existing
Relationship to a Family. |
boolean |
canAssignRelationships()
Tests if this user can alter relationship/family mappings.
|
boolean |
canAssignRelationshipsToFamily(Id familyId)
Tests if this user can alter relationship/family mappings.
|
IdList |
getAssignableFamilyIds(Id familyId)
Gets a list of families including and under the given family node in
which any relationship can be assigned.
|
IdList |
getAssignableFamilyIdsForRelationship(Id familyId,
Id relationshipId)
Gets a list of families including and under the given family node in
which a specific relationship can be assigned.
|
void |
reassignRelationshipToFamily(Id relationshipId,
Id fromFamilyId,
Id toFamilyId)
Moves a
Relationship from one Family to
another. |
void |
unassignRelationshipFromFamily(Id relationshipId,
Id familyId)
Removes a
Relationship from a Family. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignRelationships()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignRelationshipsToFamily(Id familyId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.familyId
- the Id
of the Family
false
if mapping is not authorized, true
otherwiseNullArgumentException
- familyId
is
null
mandatory
- This method must be implemented. IdList getAssignableFamilyIds(Id familyId) throws OperationFailedException
familyId
- the Id
of the Family
Ids
NullArgumentException
- familyId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableFamilyIdsForRelationship(Id familyId, Id relationshipId) throws OperationFailedException
familyId
- the Id
of the Family
relationshipId
- the Id
of the
Relationship
Ids
NullArgumentException
- familyId
or
relationshipId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignRelationshipToFamily(Id relationshipId, Id familyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Relationship
to a Family.
relationshipId
- the Id
of the
Relationship
familyId
- the Id
of the Family
AlreadyExistsException
- relationshipId
is already assigned to familyId
NotFoundException
- relationshipId
or
familyId
not foundNullArgumentException
- relationshipId
or familyId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignRelationshipFromFamily(Id relationshipId, Id familyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Relationship
from a Family.
relationshipId
- the Id
of the
Relationship
familyId
- the Id
of the Family
NotFoundException
- relationshipId
or
familyId
not found or relationshipId
not assigned to familyId
NullArgumentException
- relationshipId
or familyId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignRelationshipToFamily(Id relationshipId, Id fromFamilyId, Id toFamilyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Relationship
from one Family
to
another. Mappings to other Families
are unaffected.relationshipId
- the Id
of the
Relationship
fromFamilyId
- the Id
of the current
Family
toFamilyId
- the Id
of the destination
Family
NotFoundException
- relationshipId,
fromFamilyId,
or toFamilyId
not found
or relationshipId
not mapped to
fromFamilyId
NullArgumentException
- relationshipId,
fromFamilyId,
or toFamilyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.