Interface AuditEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes audit enablers. The data for create
and update is provided via the AuditEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasAuditEnabler(Id auditEnablerId, Id aliasId) Adds anIdto anAuditEnablerfor the purpose of creating compatibility.booleanTests if this user can create audit enablers.booleancanCreateAuditEnablerWithRecordTypes(Type[] auditEnablerRecordTypes) Tests if this user can create a singleAuditEnablerusing the desired record types.booleanTests if this user can delete audit enablers.booleanTests if this user can manageIdaliases for audit enablers.booleanTests if this user can update audit enablers.createAuditEnabler(AuditEnablerForm auditEnablerForm) Creates a newAuditEnabler.voiddeleteAuditEnabler(Id auditEnablerId) Deletes anAuditEnabler.getAuditEnablerFormForCreate(Type[] auditEnablerRecordTypes) Gets the audit enabler form for creating new audit enablers.getAuditEnablerFormForUpdate(Id auditEnablerId) Gets the audit enabler form for updating an existing audit enabler.Gets theInquestassociated with this session.Gets theInquestIdassociated with this session.voidupdateAuditEnabler(AuditEnablerForm auditEnablerForm) Updates an existing audit 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
-
getInquestId
Id getInquestId()Gets theInquestIdassociated with this session.- Returns:
- the
Inquest Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getInquest
Gets theInquestassociated with this session.- Returns:
- the inquest
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateAuditEnabler
boolean canCreateAuditEnabler()Tests if this user can create audit enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anAuditEnablerwill 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:
falseifAuditEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateAuditEnablerWithRecordTypes
Tests if this user can create a singleAuditEnablerusing the desired record types. WhileInquiryRulesManager.getAuditEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAuditEnabler. Providing an empty array tests if anAuditEnablercan be created with no records.- Parameters:
auditEnablerRecordTypes- array of audit enabler record types- Returns:
trueifAuditEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-auditEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getAuditEnablerFormForCreate
AuditEnablerForm getAuditEnablerFormForCreate(Type[] auditEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the audit enabler form for creating new audit enablers. A new form should be requested for each create transinquiry.- Parameters:
auditEnablerRecordTypes- array of audit enabler record types- Returns:
- the audit enabler form
- Throws:
NullArgumentException-auditEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createAuditEnabler
AuditEnabler createAuditEnabler(AuditEnablerForm auditEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newAuditEnabler.- Parameters:
auditEnablerForm- the form for thisAuditEnabler- Returns:
- the new
AuditEnabler - Throws:
IllegalStateException-auditEnablerFormalready used in a create transinquiryInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-auditEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-auditEnablerForm did not originate from getAuditEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateAuditEnablers
boolean canUpdateAuditEnablers()Tests if this user can update audit enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAuditEnablerwill 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:
falseifAuditEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getAuditEnablerFormForUpdate
AuditEnablerForm getAuditEnablerFormForUpdate(Id auditEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the audit enabler form for updating an existing audit enabler. A new audit enabler form should be requested for each update transinquiry.- Parameters:
auditEnablerId- theIdof theAuditEnabler- Returns:
- the audit enabler form
- Throws:
NotFoundException-auditEnablerIdis not foundNullArgumentException-auditEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateAuditEnabler
void updateAuditEnabler(AuditEnablerForm auditEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing audit enabler.- Parameters:
auditEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-auditEnablerFormalready used in an update transinquiryInvalidArgumentException- the form contains an invalid valueNullArgumentException-auditEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-auditEnablerFormdid not originate fromgetAuditEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteAuditEnablers
boolean canDeleteAuditEnablers()Tests if this user can delete audit enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anAuditEnablerwill 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:
falseifAuditEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteAuditEnabler
void deleteAuditEnabler(Id auditEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anAuditEnabler.- Parameters:
auditEnablerId- theIdof theAuditEnablerto remove- Throws:
NotFoundException-auditEnablerIdnot foundNullArgumentException-auditEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageAuditEnablerAliases
boolean canManageAuditEnablerAliases()Tests if this user can manageIdaliases for audit 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:
falseifAuditEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasAuditEnabler
void aliasAuditEnabler(Id auditEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anAuditEnablerfor the purpose of creating compatibility. The primaryIdof theAuditEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another audit enabler. it is reassigned to the given audit enablerId.- Parameters:
auditEnablerId- theIdof anAuditEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-auditEnablerIdnot foundNullArgumentException-auditEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-