public interface RelationshipEnablerAdminSession extends OsidSession
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.
Modifier and Type | Method and Description |
---|---|
void |
aliasRelationshipEnabler(Id relationshipEnablerId,
Id aliasId)
Adds an
Id to a RelationshipEnabler for
the purpose of creating compatibility. |
boolean |
canCreateRelationshipEnabler()
Tests if this user can create relationship enablers.
|
boolean |
canCreateRelationshipEnablerWithRecordTypes(Type[] relationshipEnablerRecordTypes)
Tests if this user can create a single
RelationshipEnabler
using the desired record types. |
boolean |
canDeleteRelationshipEnablers()
Tests if this user can delete relationship enablers.
|
boolean |
canManageRelationshipEnablerAliases()
Tests if this user can manage
Id aliases for
relationship enablers. |
boolean |
canUpdateRelationshipEnablers()
Tests if this user can update relationship enablers.
|
RelationshipEnabler |
createRelationshipEnabler(RelationshipEnablerForm relationshipEnablerForm)
Creates a new
RelationshipEnabler. |
void |
deleteRelationshipEnabler(Id relationshipEnablerId)
Deletes a
RelationshipEnabler. |
Family |
getFamily()
Gets the
Family associated with this session. |
Id |
getFamilyId()
Gets the
Family Id associated with this
session. |
RelationshipEnablerForm |
getRelationshipEnablerFormForCreate(Type[] relationshipEnablerRecordTypes)
Gets the relationship enabler form for creating new relationship
enablers.
|
RelationshipEnablerForm |
getRelationshipEnablerFormForUpdate(Id relationshipEnablerId)
Gets the relationship enabler form for updating an existing
relationship enabler.
|
void |
updateRelationshipEnabler(RelationshipEnablerForm relationshipEnablerForm)
Updates an existing relationship enabler.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getFamilyId()
Family
Id
associated with this
session. Family Id
associated with this sessionmandatory
- This method must be implemented. Family getFamily() throws OperationFailedException, PermissionDeniedException
Family
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateRelationshipEnabler()
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. false
if RelationshipEnabler
creation is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateRelationshipEnablerWithRecordTypes(Type[] relationshipEnablerRecordTypes)
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.relationshipEnablerRecordTypes
- array of relationship enabler
record types true
if RelationshipEnabler
creation using the specified record Types
is
supported, false
otherwiseNullArgumentException
-
relationshipEnablerRecordTypes
is null
mandatory
- This method must be implemented. RelationshipEnablerForm getRelationshipEnablerFormForCreate(Type[] relationshipEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
relationshipEnablerRecordTypes
- array of relationship enabler
record typesNullArgumentException
-
relationshipEnablerRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. RelationshipEnabler createRelationshipEnabler(RelationshipEnablerForm relationshipEnablerForm) throws OperationFailedException, PermissionDeniedException
RelationshipEnabler.
relationshipEnablerForm
- the form for this
RelationshipEnabler
RelationshipEnabler
IllegalStateException
- relationshipEnablerForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- relationshipEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- relationshipEnablerForm
did not originate from
getRelationshipEnablerFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateRelationshipEnablers()
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. false
if RelationshipEnabler
modification is not authorized, true
otherwisemandatory
- This method must be implemented. RelationshipEnablerForm getRelationshipEnablerFormForUpdate(Id relationshipEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
relationshipEnablerId
- the Id
of the
RelationshipEnabler
NotFoundException
- relationshipEnablerId
is not foundNullArgumentException
- relationshipEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateRelationshipEnabler(RelationshipEnablerForm relationshipEnablerForm) throws OperationFailedException, PermissionDeniedException
relationshipEnablerForm
- the form containing the elements to be
updatedIllegalStateException
- relationshipEnablerForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- relationshipEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- relationshipEnablerForm
did not originate from
getRelationshipEnablerFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteRelationshipEnablers()
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. false
if RelationshipEnabler
deletion is not authorized, true
otherwisemandatory
- This method must be implemented. void deleteRelationshipEnabler(Id relationshipEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
RelationshipEnabler.
relationshipEnablerId
- the Id
of the
RelationshipEnabler
to removeNotFoundException
- relationshipEnablerId
not foundNullArgumentException
- relationshipEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageRelationshipEnablerAliases()
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. false
if RelationshipEnabler
aliasing is not authorized, true
otherwisemandatory
- This method must be implemented. void aliasRelationshipEnabler(Id relationshipEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
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.
relationshipEnablerId
- the Id
of a
RelationshipEnabler
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- relationshipEnablerId
not foundNullArgumentException
- relationshipEnablerId
or aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.