OSID Logo
OSID Specifications
relationship package
Version 3.0.0
Release Candidate Preview
Interfaceosid.relationship.RelationshipFamilyAssignmentSession
Implementsosid.OsidSession
Description

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 ).

MethodcanAssignRelationships
Description

Tests if this user can alter relationship/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 assignment operations to unauthorized users.

Returnboolean false if mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanAssignRelationshipsToFamily
Description

Tests if this user can alter relationship/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 assignment operations to unauthorized users.

Parametersosid.id.IdfamilyIdthe Id of the Family
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT familyId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableFamilyIds
Description

Gets a list of families including and under the given family node in which any relationship can be assigned.

Parametersosid.id.IdfamilyIdthe Id of the Family
Returnosid.id.IdListlist of assignable family Ids
ErrorsNULL_ARGUMENT familyId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableFamilyIdsForRelationship
Description

Gets a list of families including and under the given family node in which a specific relationship can be assigned.

Parametersosid.id.IdfamilyIdthe Id of the Family
osid.id.IdrelationshipIdthe Id of the Relationship
Returnosid.id.IdListlist of assignable family Ids
ErrorsNULL_ARGUMENT familyId or relationshipId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignRelationshipToFamily
Description

Adds an existing Relationship to a Family.

Parametersosid.id.IdrelationshipIdthe Id of the Relationship
osid.id.IdfamilyIdthe Id of the Family
ErrorsALREADY_EXISTS relationshipId is already assigned to familyId
NOT_FOUND relationshipId or familyId not found
NULL_ARGUMENT relationshipId or familyId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignRelationshipFromFamily
Description

Removes a Relationship from a Family.

Parametersosid.id.IdrelationshipIdthe Id of the Relationship
osid.id.IdfamilyIdthe Id of the Family
ErrorsNOT_FOUND relationshipId or familyId not found or relationshipId not assigned to familyId
NULL_ARGUMENT relationshipId or familyId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignRelationshipToFamily
Description

Moves a Relationship from one Family to another. Mappings to other Families are unaffected.

Parametersosid.id.IdrelationshipIdthe Id of the Relationship
osid.id.IdfromFamilyIdthe Id of the current Family
osid.id.IdtoFamilyIdthe Id of the destination Family
ErrorsNOT_FOUND relationshipId, fromFamilyId, or toFamilyId not found or relationshipId not mapped to fromFamilyId
NULL_ARGUMENT relationshipId, fromFamilyId, or toFamilyId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.