Interface SignalEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes signal enablers. The data for create
and update is provided via the SignalEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasSignalEnabler(Id signalEnablerId, Id aliasId) Adds anIdto aSignalEnablerfor the purpose of creating compatibility.booleanTests if this user can create signal enablers.booleancanCreateSignalEnablerWithRecordTypes(Type[] signalEnablerRecordTypes) Tests if this user can create a singleSignalEnablerusing the desired record types.booleanTests if this user can delete signal enablers.booleanTests if this user can manageIdaliases for signal enablers.booleanTests if this user can update signal enablers.createSignalEnabler(SignalEnablerForm signalEnablerForm) Creates a newSignalEnabler.voiddeleteSignalEnabler(Id signalEnablerId) Deletes aSignalEnabler.getMap()Gets theMapassociated with this session.getMapId()Gets theMapIdassociated with this session.getSignalEnablerFormForCreate(Type[] signalEnablerRecordTypes) Gets the signal enabler form for creating new signal enablers.getSignalEnablerFormForUpdate(Id signalEnablerId) Gets the signal enabler form for updating an existing signal enabler.voidupdateSignalEnabler(SignalEnablerForm signalEnablerForm) Updates an existing signal enabler.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getMapId
Id getMapId()Gets theMapIdassociated with this session.- Returns:
- the
Map Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getMap
Gets theMapassociated with this session.- Returns:
- the map
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateSignalEnabler
boolean canCreateSignalEnabler()Tests if this user can create signal enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aSignalEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseifSignalEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateSignalEnablerWithRecordTypes
Tests if this user can create a singleSignalEnablerusing the desired record types. WhileMappingPathRulesManager.getSignalEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificSignalEnabler. Providing an empty array tests if aSignalEnablercan be created with no records.- Parameters:
signalEnablerRecordTypes- array of signal enabler record types- Returns:
trueifSignalEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-signalEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getSignalEnablerFormForCreate
SignalEnablerForm getSignalEnablerFormForCreate(Type[] signalEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the signal enabler form for creating new signal enablers. A new form should be requested for each create transaction.- Parameters:
signalEnablerRecordTypes- array of signal enabler record types- Returns:
- the signal enabler form
- Throws:
NullArgumentException-signalEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createSignalEnabler
SignalEnabler createSignalEnabler(SignalEnablerForm signalEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newSignalEnabler.- Parameters:
signalEnablerForm- the form for thisSignalEnabler- Returns:
- the new
SignalEnabler - Throws:
IllegalStateException-signalEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-signalEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-signalEnablerFormdid not originate fromgetSignalEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateSignalEnablers
boolean canUpdateSignalEnablers()Tests if this user can update signal enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aSignalEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseifSignalEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getSignalEnablerFormForUpdate
SignalEnablerForm getSignalEnablerFormForUpdate(Id signalEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the signal enabler form for updating an existing signal enabler. A new signal enabler form should be requested for each update transaction.- Parameters:
signalEnablerId- theIdof theSignalEnabler- Returns:
- the signal enabler form
- Throws:
NotFoundException-signalEnablerIdis not foundNullArgumentException-signalEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateSignalEnabler
void updateSignalEnabler(SignalEnablerForm signalEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing signal enabler.- Parameters:
signalEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-signalEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-signalEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-signalEnablerFormdid not originate fromgetSignalEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteSignalEnablers
boolean canDeleteSignalEnablers()Tests if this user can delete signal enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aSignalEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseifSignalEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteSignalEnabler
void deleteSignalEnabler(Id signalEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aSignalEnabler.- Parameters:
signalEnablerId- theIdof theSignalEnablerto remove- Throws:
NotFoundException-signalEnablerIdnot foundNullArgumentException-signalEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageSignalEnablerAliases
boolean canManageSignalEnablerAliases()Tests if this user can manageIdaliases for signal 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifSignalEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasSignalEnabler
void aliasSignalEnabler(Id signalEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aSignalEnablerfor the purpose of creating compatibility. The primaryIdof theSignalEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another signal enabler. it is reassigned to the given signal enablerId.- Parameters:
signalEnablerId- theIdof aSignalEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-signalEnablerIdnot foundNullArgumentException-signalEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-