public interface QualifierAdminSession extends OsidSession
This session creates, updates, and deletes Qualifiers.
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
Qualifier, a QualifierForm is requested using
getQualifierFormForCreate() specifying the desired
relationship peers and record Types or none if no record
Types are needed. The returned QualifierForm
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
QualifierForm is submiited to a create operation, it cannot
be reused with another create operation unless the first operation was
unsuccessful. Each QualifierForm corresponds to an
attempted transaction.
For updates, QualifierForms are requested to the
Qualifier Id that is to be updated using
getQualifierFormForUpdate(). Similarly, the QualifierForm
has metadata about the data that can be updated and it can perform
validation before submitting the update. The QualifierForm
can only be used once for a successful update and cannot be reused.
The delete operations delete Qualifiers. To unmap a
Qualifier from the current Vault, the
QualifierVaultAssignmentSession should be used. These delete
operations attempt to remove the Qualifier itself thus
removing it from all known Vault 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 |
aliasQualifier(Id qualifierId,
Id aliasId)
Adds an
Id to a Qualifier for the
purpose of creating compatibility. |
boolean |
canCreateQualifiers()
Tests if this user can create
Qualifiers. |
boolean |
canCreateQualifierWithRecordTypes(Type[] qualifierRecordTypes)
Tests if this user can create a single
Qualifier using
the desired record types. |
boolean |
canDeleteQualifiers()
Tests if this user can delete
Qualifiers. |
boolean |
canManageQualifierAliases()
Tests if this user can manage
Id aliases for
Qualifiers. |
boolean |
canUpdateQualifiers()
Tests if this user can update
Qualifiers. |
Qualifier |
createQualifier(QualifierForm qualifierForm)
Creates a new
Qualifier. |
void |
deleteQualifier(Id qualifierId)
Deletes a
Qualifier. |
QualifierForm |
getQualifierFormForCreate(Type[] qualifierRecordTypes)
Gets the qualifier form for creating new qualifiers.
|
QualifierForm |
getQualifierFormForUpdate(Id qualifierId)
Gets the qualifier form for updating an existing qualifier.
|
Vault |
getVault()
Gets the
Vault associated with this session. |
Id |
getVaultId()
Gets the
Vault Id associated with this
session. |
void |
updateQualifier(QualifierForm qualifierForm)
Updates an existing qualifier.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getVaultId()
Vault Id associated with this
session. Vault Id associated with this sessionmandatory - This method must be implemented. Vault getVault() throws OperationFailedException, PermissionDeniedException
Vault associated with this session. Vault associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateQualifiers()
Qualifiers. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known creating a Qualifier 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 Qualifier creation is
not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateQualifierWithRecordTypes(Type[] qualifierRecordTypes)
Qualifier using
the desired record types. While
AuthorizationManager.getQualifierRecordTypes() can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific Qualifier.
Providing an empty array tests if a Qualifier can be
created with no records.qualifierRecordTypes - array of qualifier record types true if Qualifier creation using
the specified Types is supported, false
otherwiseNullArgumentException - qualifierRecordTypes
is null mandatory - This method must be implemented. QualifierForm getQualifierFormForCreate(Type[] qualifierRecordTypes) throws OperationFailedException, PermissionDeniedException
qualifierRecordTypes - array of qualifier record typesNullArgumentException - qualifierRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form with
requested record typesmandatory - This method must be implemented. Qualifier createQualifier(QualifierForm qualifierForm) throws OperationFailedException, PermissionDeniedException
Qualifier. qualifierForm - the form for this Qualifier Qualifier IllegalStateException - qualifierForm
already used for a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - qualifierForms
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - qualifierForm did
not originate from getQualifierFormForCreate() mandatory - This method must be implemented. boolean canUpdateQualifiers()
Qualifiers. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known updating a Qualifier 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 Qualifier modification
is not authorized, true otherwisemandatory - This method must be implemented. QualifierForm getQualifierFormForUpdate(Id qualifierId) throws NotFoundException, OperationFailedException, PermissionDeniedException
qualifierId - the Id of the Qualifier
NotFoundException - qualifierId is not
foundNullArgumentException - qualifierId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateQualifier(QualifierForm qualifierForm) throws OperationFailedException, PermissionDeniedException
qualifierForm - the form containing the elements to be updatedIllegalStateException - qualifierForm
already used for an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - qualifierForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - qualifierForm did
not originate from getQualifierFormForUpdate() mandatory - This method must be implemented. boolean canDeleteQualifiers()
Qualifiers. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known deleting a Qualifier 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 Qualifier deletion is
not authorized, true otherwisemandatory - This method must be implemented. void deleteQualifier(Id qualifierId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Qualifier. qualifierId - the Id of the Qualifier
to removeNotFoundException - qualifierId not
foundNullArgumentException - qualifierId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageQualifierAliases()
Id aliases for
Qualifiers. 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 Qualifier aliasing is
not authorized, true otherwisemandatory - This method must be implemented. void aliasQualifier(Id qualifierId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a Qualifier for the
purpose of creating compatibility. The primary Id of
the Qualifier is determined by the provider. The new
Id performs as an alias to the primary Id.
If the alias is a pointer to another qualifier, it is
reassigned to the given qualifier Id. qualifierId - the Id of a Qualifier
aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - qualifierId not
foundNullArgumentException - qualifierId or
aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.