public interface SignalAdminSession extends OsidSession
This session creates, updates, and deletes Signals. 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
Signal, a SignalForm is requested using
getSignalFormForCreate() specifying the desired record
Types or none if no record Types are needed. The
returned SignalForm 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 SignalForm is submiited to
a create operation, it cannot be reused with another create operation
unless the first operation was unsuccessful. Each SignalForm
corresponds to an attempted transaction.
For updates, SignalForms are requested to the
Signal Id that is to be updated using
getSignalFormForUpdate(). Similarly, the SignalForm
has metadata about the data that can be updated and it can perform
validation before submitting the update. The SignalForm can
only be used once for a successful update and cannot be reused.
The delete operations delete Signals. To unmap a
Signal from the current Map, the
SignalMapAssignmentSession should be used. These delete operations
attempt to remove the Signal itself thus removing it from
all known Map 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 |
aliasSignal(Id signalId,
Id aliasId)
Adds an
Id to a Signal for the purpose
of creating compatibility. |
boolean |
canCreateSignals()
Tests if this user can create
Signals. |
boolean |
canCreateSignalWithRecordTypes(Type[] signalRecordTypes)
Tests if this user can create a single
Signal using the
desired record types. |
boolean |
canDeleteSignals()
Tests if this user can delete
Signals. |
boolean |
canManageSignalAliases()
Tests if this user can manage
Id aliases for
Signals. |
boolean |
canUpdateSignals()
Tests if this user can update
Signals. |
Signal |
createSignal(SignalForm signalForm)
Creates a new
Signal. |
void |
deleteSignal(Id signalId)
Deletes a
Signal. |
Map |
getMap()
Gets the
Map associated with this session. |
Id |
getMapId()
Gets the
Map Id associated with this
session. |
SignalForm |
getSignalFormForCreate(Id pathId,
Type[] signalRecordTypes)
Gets the signal form for creating new signals.
|
SignalForm |
getSignalFormForUpdate(Id signalId)
Gets the signal form for updating an existing signal.
|
void |
updateSignal(SignalForm signalForm)
Updates an existing signal.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getMapId()
Map Id associated with this
session. Map Id associated with this sessionmandatory - This method must be implemented. Map getMap() throws OperationFailedException, PermissionDeniedException
Map associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateSignals()
Signals. A return of true
does not guarantee successful authorization. A return of false
indicates that it is known creating a Signal 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 Signal creation is not
authorized, true otherwisemandatory - This method must be implemented. boolean canCreateSignalWithRecordTypes(Type[] signalRecordTypes)
Signal using the
desired record types. While
MappingPathManager.getSignalRecordTypes() can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific Signal. Providing
an empty array tests if a Signal can be created with no
records.signalRecordTypes - array of signal record types true if Signal creation using
the specified record Types is supported,
false otherwiseNullArgumentException - signalRecordTypes
is null mandatory - This method must be implemented. SignalForm getSignalFormForCreate(Id pathId, Type[] signalRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
pathId - Id of the pathsignalRecordTypes - array of signal record typesNotFoundException - pathId is not foundNullArgumentException - pathId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form with given
record typesmandatory - This method must be implemented. Signal createSignal(SignalForm signalForm) throws OperationFailedException, PermissionDeniedException
Signal. signalForm - the form for this Signal Signal IllegalStateException - signalForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - signalForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - signalForm did
not originate from getSignalFormForCreate() mandatory - This method must be implemented. boolean canUpdateSignals()
Signals. A return of true
does not guarantee successful authorization. A return of false
indicates that it is known updating a Signal 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 Signal modification is
not authorized, true otherwisemandatory - This method must be implemented. SignalForm getSignalFormForUpdate(Id signalId) throws NotFoundException, OperationFailedException, PermissionDeniedException
signalId - the Id of the Signal NotFoundException - signalId is not
foundNullArgumentException - signalId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateSignal(SignalForm signalForm) throws OperationFailedException, PermissionDeniedException
signalForm - the form containing the elements to be updatedIllegalStateException - signalForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - signalId or
signalForm is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - signalForm did
not originate from getSignalFormForUpdate() mandatory - This method must be implemented. boolean canDeleteSignals()
Signals. A return of true
does not guarantee successful authorization. A return of false
indicates that it is known deleting a Signal 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 Signal deletion is not
authorized, true otherwisemandatory - This method must be implemented. void deleteSignal(Id signalId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Signal. signalId - the Id of the Signal to
removeNotFoundException - signalId not foundNullArgumentException - signalId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageSignalAliases()
Id aliases for
Signals. 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 Signal aliasing is not
authorized, true otherwisemandatory - This method must be implemented. void aliasSignal(Id signalId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a Signal for the purpose
of creating compatibility. The primary Id of the
Signal is determined by the provider. The new Id
performs as an alias to the primary Id . If the
alias is a pointer to another signal, it is reassigned to the given
signal Id. signalId - the Id of a Signal aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - signalId not foundNullArgumentException - signalId or
aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.