public interface SystemAdminSession extends OsidSession
This session creates, updates, and deletes Systems. 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
System, a SystemForm is requested using
getSystemFormForCreate() specifying the desired record
Types or none if no record Types are needed. The
returned SystemForm 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 SystemForm is submiited to
a create operation, it cannot be reused with another create operation
unless the first operation was unsuccessful. Each SystemForm
corresponds to an attempted transaction.
For updates, SystemForms are requested to the
System Id that is to be updated using
getSystemFormForUpdate(). Similarly, the SystemForm
has metadata about the data that can be updated and it can perform
validation before submitting the update. The SystemForm can
only be used once for a successful update and cannot be reused.
The delete operations delete Systems.
This session includes an Id aliasing mechanism to
assign an external Id to an internally assigned Id.
| Modifier and Type | Method and Description |
|---|---|
void |
aliasSystem(Id systemId,
Id aliasId)
Adds an
Id to a System for the purpose
of creating compatibility. |
boolean |
canCreateSystems()
Tests if this user can create
Systems. |
boolean |
canCreateSystemWithRecordTypes(Type[] systemRecordTypes)
Tests if this user can create a single
System using the
desired record types. |
boolean |
canDeleteSystems()
Tests if this user can delete
Systems. |
boolean |
canManageSystemAliases()
Tests if this user can manage
Id aliases for
Systems. |
boolean |
canUpdateSystems()
Tests if this user can update
Systems. |
System |
createSystem(SystemForm systemForm)
Creates a new
System. |
void |
deleteSystem(Id systemId)
Deletes a
System. |
SystemForm |
getSystemFormForCreate(Type[] systemRecordTypes)
Gets the system form for creating new systems.
|
SystemForm |
getSystemFormForUpdate(Id systemId)
Gets the system form for updating an existing system.
|
void |
updateSystem(SystemForm systemForm)
Updates an existing system
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canCreateSystems()
Systems. A return of true
does not guarantee successful authorization. A return of false
indicates that it is known creating a System. 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 System creation is not
authorized, true otherwisemandatory - This method must be implemented. boolean canCreateSystemWithRecordTypes(Type[] systemRecordTypes)
System using the
desired record types. While
ControlManager.getSystemRecordTypes() can be used to examine
which records are supported, this method tests which record(s) are
required for creating a specific System. Providing an
empty array tests if a System can be created with no
records.systemRecordTypes - array of system record types true if System creation using
the specified record Types is supported,
false otherwiseNullArgumentException - systemRecordTypes
is null mandatory - This method must be implemented. SystemForm getSystemFormForCreate(Type[] systemRecordTypes) throws OperationFailedException, PermissionDeniedException
systemRecordTypes - array of system record typesNullArgumentException - systemRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. System createSystem(SystemForm systemForm) throws OperationFailedException, PermissionDeniedException
System. systemForm - the form for this System System IllegalStateException - systemForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - systemForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - systemForm did
not originate from getSystemFormForCreate() mandatory - This method must be implemented. boolean canUpdateSystems()
Systems. A return of true
does not guarantee successful authorization. A return of false
indicates that it is known updating a System 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 System modification is
not authorized, true otherwisemandatory - This method must be implemented. SystemForm getSystemFormForUpdate(Id systemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
systemId - the Id of the System NotFoundException - systemId is not
foundNullArgumentException - systemId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateSystem(SystemForm systemForm) throws OperationFailedException, PermissionDeniedException
systemForm - the form containing the elements to be updatedIllegalStateException - systemForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - systemForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - systemForm did
not originate from getSystemFormForUpdate() mandatory - This method must be implemented. boolean canDeleteSystems()
Systems. A return of true
does not guarantee successful authorization. A return of false
indicates that it is known deleting a System 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 System deletion is not
authorized, true otherwisemandatory - This method must be implemented. void deleteSystem(Id systemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
System. systemId - the Id of the System to
removeNotFoundException - systemId not foundNullArgumentException - systemId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageSystemAliases()
Id aliases for
Systems. 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 System aliasing is not
authorized, true otherwisemandatory - This method must be implemented. void aliasSystem(Id systemId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a System for the purpose
of creating compatibility. The primary Id of the
System is determined by the provider. The new Id
performs as an alias to the primary Id. systemId - the Id of a System aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - systemId not foundNullArgumentException - systemId or
aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.