Interface SequenceRuleEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes sequence rule enablers. The data for
create and update is provided via the SequenceRuleEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasSequenceRuleEnabler(Id sequenceRuleEnablerId, Id aliasId) Adds aIdto aSequenceRuleEnablerfor the purpose of creating compatibility.booleanTests if this user can create sequence rule enablers.booleancanCreateSequenceRuleEnablerWithRecordTypes(Type[] sequenceRuleEnablerRecordTypes) Tests if this user can create a singleSequenceRuleEnablerusing the desired record types.booleanTests if this user can delete sequence rule enablers.booleanTests if this user can manageIdaliases for sequence rule enablers.booleanTests if this user can update sequence rule enablers.createSequenceRuleEnabler(SequenceRuleEnablerForm sequenceRuleEnablerForm) Creates a newSequenceRuleEnabler.voiddeleteSequenceRuleEnabler(Id sequenceRuleEnablerId) Deletes aSequenceRuleEnabler.getBank()Gets theBankassociated with this session.Gets theBankIdassociated with this session.getSequenceRuleEnablerFormForCreate(Type[] sequenceRuleEnablerRecordTypes) Gets the sequence rule enabler form for creating new sequence rule enablers.getSequenceRuleEnablerFormForUpdate(Id sequenceRuleEnablerId) Gets the sequence rule enabler form for updating an existing sequence rule enabler.voidupdateSequenceRuleEnabler(SequenceRuleEnablerForm sequenceRuleEnablerForm) Updates an existing sequence rule 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
-
getBankId
Id getBankId()Gets theBankIdassociated with this session.- Returns:
- the
Bank Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getBank
Gets theBankassociated with this session.- Returns:
- the bank
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateSequenceRuleEnabler
boolean canCreateSequenceRuleEnabler()Tests if this user can create sequence rule enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aSequenceRuleEnablerwill 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:
falseifSequenceRuleEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateSequenceRuleEnablerWithRecordTypes
Tests if this user can create a singleSequenceRuleEnablerusing the desired record types. WhileAssessmentAuthoringManager.getSequenceRuleEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificSequenceRuleEnabler. Providing an empty array tests if aSequenceRuleEnablercan be created with no records.- Parameters:
sequenceRuleEnablerRecordTypes- array of sequence rule enabler record types- Returns:
trueifSequenceRuleEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-sequenceRuleEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getSequenceRuleEnablerFormForCreate
SequenceRuleEnablerForm getSequenceRuleEnablerFormForCreate(Type[] sequenceRuleEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the sequence rule enabler form for creating new sequence rule enablers. A new form should be requested for each create transaction.- Parameters:
sequenceRuleEnablerRecordTypes- array of sequence rule enabler record types- Returns:
- the sequence rule enabler form
- Throws:
NullArgumentException-sequenceRuleEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createSequenceRuleEnabler
SequenceRuleEnabler createSequenceRuleEnabler(SequenceRuleEnablerForm sequenceRuleEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newSequenceRuleEnabler.- Parameters:
sequenceRuleEnablerForm- the form for thisSequenceRuleEnabler- Returns:
- the new
SequenceRuleEnabler - Throws:
IllegalStateException-sequenceRuleEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-sequenceRuleEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-sequenceRuleEnablerFormdid not originate fromgetSequenceRuleEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateSequenceRuleEnablers
boolean canUpdateSequenceRuleEnablers()Tests if this user can update sequence rule enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aSequenceRuleEnablerwill 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:
falseifSequenceRuleEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getSequenceRuleEnablerFormForUpdate
SequenceRuleEnablerForm getSequenceRuleEnablerFormForUpdate(Id sequenceRuleEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the sequence rule enabler form for updating an existing sequence rule enabler. A new sequence rule enabler form should be requested for each update transaction.- Parameters:
sequenceRuleEnablerId- theIdof theSequenceRuleEnabler- Returns:
- the sequence rule enabler form
- Throws:
NotFoundException-sequenceRuleEnablerIdis not foundNullArgumentException-sequenceRuleEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateSequenceRuleEnabler
void updateSequenceRuleEnabler(SequenceRuleEnablerForm sequenceRuleEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing sequence rule enabler.- Parameters:
sequenceRuleEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-sequenceRuleEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-sequenceRuleEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-sequenceRuleEnablerFormdid not originate fromgetSequenceRuleEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteSequenceRuleEnablers
boolean canDeleteSequenceRuleEnablers()Tests if this user can delete sequence rule enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aSequenceRuleEnablerwill 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:
falseifSequenceRuleEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteSequenceRuleEnabler
void deleteSequenceRuleEnabler(Id sequenceRuleEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aSequenceRuleEnabler.- Parameters:
sequenceRuleEnablerId- theIdof theSequenceRuleEnablerto remove- Throws:
NotFoundException-sequenceRuleEnablerIdnot foundNullArgumentException-sequenceRuleEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageSequenceRuleEnablerAliases
boolean canManageSequenceRuleEnablerAliases()Tests if this user can manageIdaliases for sequence rule 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:
falseifSequenceRuleEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasSequenceRuleEnabler
void aliasSequenceRuleEnabler(Id sequenceRuleEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds aIdto aSequenceRuleEnablerfor the purpose of creating compatibility. The primaryIdof theSequenceRuleEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another sequence rule enabler. it is reassigned to the given sequence rule enablerId.- Parameters:
sequenceRuleEnablerId- theIdof aSequenceRuleEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-sequenceRuleEnablerIdnot foundNullArgumentException-sequenceRuleEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-