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

This session creates, updates, and deletes RelationshipEnablers. The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create a RelationshipEnabler, a RelationshipEnablerForm is requested using getRelationshipEnablerFormForCreate() specifying desired record Types or none if no record Types are needed. The returned RelationshipEnablerForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the RelationshipEnablerForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each RelationshipEnablerForm corresponds to an attempted transaction.

For updates, RelationshipEnablerForms are requested to the RelationshipEnabler Id that is to be updated using getRelationshipEnablerFormForUpdate(). Similarly, the RelationshipEnablerForm has metadata about the data that can be updated and it can perform validation before submitting the update. The RelationshipEnablerForm can only be used once for a successful update and cannot be reused.

The delete operations delete RelationshipEnablers. To unmap a RelationshipEnabler from the current Family, the RelationshipEnablerFamilyAssignmentSession should be used. These delete operations attempt to remove the Node itself thus removing it from all known Family catalogs.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodgetFamilyId
Description

Gets the Family Id associated with this session.

Returnosid.id.Idthe Family Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetFamily
Description

Gets the Family associated with this session.

Returnosid.relationship.Familythe family
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateRelationshipEnabler
Description

Tests if this user can create relationship enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a RelationshipEnabler will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if RelationshipEnabler creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateRelationshipEnablerWithRecordTypes
Description

Tests if this user can create a single RelationshipEnabler using the desired record types. While RelationshipRulesManager.getRelationshipEnablerRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific RelationshipEnabler. Providing an empty array tests if a RelationshipEnabler can be created with no records.

Parametersosid.type.Type[]relationshipEnablerRecordTypesarray of relationship enabler record types
Returnboolean true if RelationshipEnabler creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT relationshipEnablerRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetRelationshipEnablerFormForCreate
Description

Gets the relationship enabler form for creating new relationship enablers. A new form should be requested for each create transaction.

Parametersosid.type.Type[]relationshipEnablerRecordTypesarray of relationship enabler record types
Returnosid.relationship.rules.RelationshipEnablerFormthe relationship enabler form
ErrorsNULL_ARGUMENT relationshipEnablerRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateRelationshipEnabler
Description

Creates a new RelationshipEnabler.

Parametersosid.relationship.rules.RelationshipEnablerFormrelationshipEnablerFormthe form for this RelationshipEnabler
Returnosid.relationship.rules.RelationshipEnablerthe new RelationshipEnabler
ErrorsILLEGAL_STATE relationshipEnablerForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT relationshipEnablerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED relationshipEnablerForm did not originate from getRelationshipEnablerFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateRelationshipEnablers
Description

Tests if this user can update relationship enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a RelationshipEnabler will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if RelationshipEnabler modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetRelationshipEnablerFormForUpdate
Description

Gets the relationship enabler form for updating an existing relationship enabler. A new relationship enabler form should be requested for each update transaction.

Parametersosid.id.IdrelationshipEnablerIdthe Id of the RelationshipEnabler
Returnosid.relationship.rules.RelationshipEnablerFormthe relationship enabler form
ErrorsNOT_FOUND relationshipEnablerId is not found
NULL_ARGUMENT relationshipEnablerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateRelationshipEnabler
Description

Updates an existing relationship enabler.

Parametersosid.relationship.rules.RelationshipEnablerFormrelationshipEnablerFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE relationshipEnablerForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT relationshipEnablerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED relationshipEnablerForm did not originate from getRelationshipEnablerFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteRelationshipEnablers
Description

Tests if this user can delete relationship enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a RelationshipEnabler will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if RelationshipEnabler deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteRelationshipEnabler
Description

Deletes a RelationshipEnabler.

Parametersosid.id.IdrelationshipEnablerIdthe Id of the RelationshipEnabler to remove
ErrorsNOT_FOUND relationshipEnablerId not found
NULL_ARGUMENT relationshipEnablerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageRelationshipEnablerAliases
Description

Tests if this user can manage Id aliases for relationship enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if RelationshipEnabler aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasRelationshipEnabler
Description

Adds an Id to a RelationshipEnabler for the purpose of creating compatibility. The primary Id of the RelationshipEnabler is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another relationship enabler. it is reassigned to the given relationship enabler Id.

Parametersosid.id.IdrelationshipEnablerIdthe Id of a RelationshipEnabler
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND relationshipEnablerId not found
NULL_ARGUMENT relationshipEnablerId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.