Interface TriggerEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes trigger enablers. The data for create
and update is provided via the TriggerEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasTriggerEnabler(Id triggerEnablerId, Id aliasId) Adds anIdto aTriggerEnablerfor the purpose of creating compatibility.booleanTests if this user can create trigger enablers.booleancanCreateTriggerEnablerWithRecordTypes(Type[] triggerEnablerRecordTypes) Tests if this user can create a singleTriggerEnablerusing the desired record types.booleanTests if this user can delete trigger enablers.booleanTests if this user can manageIdaliases for trigger enablers.booleanTests if this user can update trigger enablers.createTriggerEnabler(TriggerEnablerForm triggerEnablerForm) Creates a newTriggerEnabler.voiddeleteTriggerEnabler(Id triggerEnablerId) Deletes aTriggerEnabler.Gets theSystemassociated with this session.Gets theSystemIdassociated with this session.getTriggerEnablerFormForCreate(Type[] triggerEnablerRecordTypes) Gets the trigger enabler form for creating new trigger enablers.getTriggerEnablerFormForUpdate(Id triggerEnablerId) Gets the trigger enabler form for updating an existing trigger enabler.voidupdateTriggerEnabler(TriggerEnablerForm triggerEnablerForm) Updates an existing trigger 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
-
getSystemId
Id getSystemId()Gets theSystemIdassociated with this session.- Returns:
- the
System Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getSystem
Gets theSystemassociated with this session.- Returns:
- the system
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateTriggerEnabler
boolean canCreateTriggerEnabler()Tests if this user can create trigger enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aTriggerEnablerwill 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:
falseifTriggerEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateTriggerEnablerWithRecordTypes
Tests if this user can create a singleTriggerEnablerusing the desired record types. WhileOfferingRulesManager.getTriggerEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificTriggerEnabler. Providing an empty array tests if aTriggerEnablercan be created with no records.- Parameters:
triggerEnablerRecordTypes- array of trigger enabler record types- Returns:
trueifTriggerEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-triggerEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getTriggerEnablerFormForCreate
TriggerEnablerForm getTriggerEnablerFormForCreate(Type[] triggerEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the trigger enabler form for creating new trigger enablers. A new form should be requested for each create transaction.- Parameters:
triggerEnablerRecordTypes- array of trigger enabler record types- Returns:
- the trigger enabler form
- Throws:
NullArgumentException-triggerEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createTriggerEnabler
TriggerEnabler createTriggerEnabler(TriggerEnablerForm triggerEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newTriggerEnabler.- Parameters:
triggerEnablerForm- the form for thisTriggerEnabler- Returns:
- the new
TriggerEnabler - Throws:
IllegalStateException-triggerEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-triggerEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-triggerEnablerForm did not originate from getTriggerEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateTriggerEnablers
boolean canUpdateTriggerEnablers()Tests if this user can update trigger enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aTriggerEnablerwill 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:
falseifTriggerEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getTriggerEnablerFormForUpdate
TriggerEnablerForm getTriggerEnablerFormForUpdate(Id triggerEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the trigger enabler form for updating an existing trigger enabler. A new trigger enabler form should be requested for each update transaction.- Parameters:
triggerEnablerId- theIdof theTriggerEnabler- Returns:
- the trigger enabler form
- Throws:
NotFoundException-triggerEnablerIdis not foundNullArgumentException-triggerEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateTriggerEnabler
void updateTriggerEnabler(TriggerEnablerForm triggerEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing trigger enabler.- Parameters:
triggerEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-triggerEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-triggerEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-triggerEnablerFormdid not originate fromgetTriggerEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteTriggerEnablers
boolean canDeleteTriggerEnablers()Tests if this user can delete trigger enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aTriggerEnablerwill 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:
falseifTriggerEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteTriggerEnabler
void deleteTriggerEnabler(Id triggerEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aTriggerEnabler.- Parameters:
triggerEnablerId- theIdof theTriggerEnablerto remove- Throws:
NotFoundException-triggerEnablerIdnot foundNullArgumentException-triggerEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageTriggerEnablerAliases
boolean canManageTriggerEnablerAliases()Tests if this user can manageIdaliases for trigger 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:
falseifTriggerEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasTriggerEnabler
void aliasTriggerEnabler(Id triggerEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aTriggerEnablerfor the purpose of creating compatibility. The primaryIdof theTriggerEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another trigger enabler. it is reassigned to the given trigger enablerId.- Parameters:
triggerEnablerId- theIdof aTriggerEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-triggerEnablerIdnot foundNullArgumentException-triggerEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-