public interface AntimatroidAdminSession extends OsidSession
This session creates, updates, and deletes Antimatroids.
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 an
Antimatroid, an AntimatroidForm is requested
using getAntimatroidFormForCreate() specifying the desired
record Types or none if no record Types are
needed. The returned AntimatroidForm 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 AntimatroidForm
is submiited to a create operation, it cannot be reused with
another create operation unless the first operation was unsuccessful. Each
AntimatroidForm corresponds to an attempted transinput.
For updates, AntimatroidForms are requested to the
Antimatroid Id that is to be updated using
getAntimatroidFormForUpdate(). Similarly, the
AntimatroidForm has metadata about the data that can be updated
and it can perform validation before submitting the update. The
AntimatroidForm can only be used once for a successful update and
cannot be reused.
The delete operations delete Antimatroids.
This session includes an Id aliasing mechanism to
assign an external Id to an internally assigned Id.
| Modifier and Type | Method and Description |
|---|---|
void |
aliasAntimatroid(Id antimatroidId,
Id aliasId)
Adds an
Id to an Antimatroid for the
purpose of creating compatibility. |
boolean |
canCreateAntimatroids()
Tests if this user can create
Antimatroids. |
boolean |
canCreateAntimatroidWithRecordTypes(Type[] antimatroidRecordTypes)
Tests if this user can create a single
Antimatroid
using the desired record types. |
boolean |
canDeleteAntimatroids()
Tests if this user can delete
Antimatroids. |
boolean |
canManageAntimatroidAliases()
Tests if this user can manage
Id aliases for
Antimatroids. |
boolean |
canUpdateAntimatroids()
Tests if this user can update
Antimatroids. |
Antimatroid |
createAntimatroid(AntimatroidForm antimatroidForm)
Creates a new
Antimatroid. |
void |
deleteAntimatroid(Id antimatroidId)
Deletes an
Antimatroid. |
AntimatroidForm |
getAntimatroidFormForCreate(Type[] antimatroidRecordTypes)
Gets the antimatroid form for creating new antimatroids.
|
AntimatroidForm |
getAntimatroidFormForUpdate(Id antimatroidId)
Gets the antimatroid form for updating an existing antimatroid.
|
void |
updateAntimatroid(AntimatroidForm antimatroidForm)
Updates an existing antimatroid
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canCreateAntimatroids()
Antimatroids. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known creating an Antimatroid.
will result in a PERMISSION_DENIED. This is intended as
a hint to an application that may not wish to offer create operations
to unauthorized users. false if Antimatroid creation is
not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateAntimatroidWithRecordTypes(Type[] antimatroidRecordTypes)
Antimatroid
using the desired record types. While
SequencingManager.getAntimatroidRecordTypes() can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific Antimatroid.
Providing an empty array tests if an Antimatroid can be
created with no records.antimatroidRecordTypes - array of antimatroid record types true if Antimatroid creation
using the specified record Types is supported,
false otherwiseNullArgumentException - antimatroidRecordTypes
is null mandatory - This method must be implemented. AntimatroidForm getAntimatroidFormForCreate(Type[] antimatroidRecordTypes) throws OperationFailedException, PermissionDeniedException
antimatroidRecordTypes - array of antimatroid record typesNullArgumentException - antimatroidRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. Antimatroid createAntimatroid(AntimatroidForm antimatroidForm) throws OperationFailedException, PermissionDeniedException
Antimatroid. antimatroidForm - the form for this Antimatroid Antimatroid IllegalStateException - antimatroidForm
already used in a create transinputInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - antimatroidForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - antimatroidForm
did not originate from getAntimatroidFormForCreate()
mandatory - This method must be implemented. boolean canUpdateAntimatroids()
Antimatroids. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known updating an Antimatroid will
result in a PERMISSION_DENIED. This is intended as a
hint to an application that may not wish to offer update operations to
unauthorized users. false if Antimatroid
modification is not authorized, true otherwisemandatory - This method must be implemented. AntimatroidForm getAntimatroidFormForUpdate(Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException
antimatroidId - the Id of the Antimatroid
NotFoundException - antimatroidId is not
foundNullArgumentException - antimatroidId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateAntimatroid(AntimatroidForm antimatroidForm) throws OperationFailedException, PermissionDeniedException
antimatroidForm - the form containing the elements to be updatedIllegalStateException - antimatroidForm
already used in an update transinputInvalidArgumentException - the form contains an invalid
valueNullArgumentException - antimatroidForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - antimatroidForm
did not originate from getAntimatroidFormForUpdate()
mandatory - This method must be implemented. boolean canDeleteAntimatroids()
Antimatroids. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known deleting an Antimatroid will
result in a PERMISSION_DENIED. This is intended as a
hint to an application that may not wish to offer delete operations to
unauthorized users. false if Antimatroid deletion is
not authorized, true otherwisemandatory - This method must be implemented. void deleteAntimatroid(Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Antimatroid. antimatroidId - the Id of the Antimatroid
to removeNotFoundException - antimatroidId not
foundNullArgumentException - antimatroidId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageAntimatroidAliases()
Id aliases for
Antimatroids. 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 Antimatroid aliasing is
not authorized, true otherwisemandatory - This method must be implemented. void aliasAntimatroid(Id antimatroidId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to an Antimatroid for the
purpose of creating compatibility. The primary Id of
the Antimatroid is determined by the provider. The new
Id performs as an alias to the primary Id.
antimatroidId - the Id of an Antimatroid
aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - antimatroidId not
foundNullArgumentException - antimatroidId or
aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.