Interface AuditConstrainerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes AuditConstrainers .
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 an
AuditConstrainer , an AuditConstrainerForm is requested
using getAuditConstrainerFormForCreate() specifying the desired
record Types or none if no record Types are needed. The
returned AuditConstrainerForm 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 AuditConstrainerForm is submiited
to a create operation, it cannot be reused with another create operation
unless the first operation was unsuccessful. Each
AuditConstrainerForm corresponds to an attempted transaction.
For updates, AuditConstrainerForms are requested to the
AuditConstrainer Id that is to be updated using
getAuditConstrainerFormForUpdate() . Similarly, the
AuditConstrainerForm has metadata about the data that can be updated and
it can perform validation before submitting the update. The
AuditConstrainerForm can only be used once for a successful update and
cannot be reused.
The delete operations delete AuditConstrainers . To unmap an
AuditConstrainer from the current Inquest , the
AuditConstrainerInquestAssignmentSession should be used. These delete
operations attempt to remove the AuditConstrainer itself thus
removing it from all known Inquest catalogs.
This session includes an Id aliasing mechanism to assign an
external Id to an internally assigned Id .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasAuditConstrainer(Id auditConstrainerId, Id aliasId) Adds anIdto anAuditConstrainerfor the purpose of creating compatibility.booleanTests if this user can createAuditConstrainers.booleancanCreateAuditConstrainerWithRecordTypes(Type[] auditConstrainerRecordTypes) Tests if this user can create a singleAuditConstrainerusing the desired record types.booleanTests if this user can deleteAuditConstrainers.booleanTests if this user can manageIdaliases forAuditConstrainersA return of true does not guarantee successful authorization.booleanTests if this user can updateAuditConstrainers.createAuditConstrainer(AuditConstrainerForm auditConstrainerForm) Creates a newAuditConstrainer.voiddeleteAuditConstrainer(Id auditConstrainerId) Deletes anAuditConstrainer.getAuditConstrainerFormForCreate(Type[] auditConstrainerRecordTypes) Gets the audit constrainer form for creating new audit constrainers.getAuditConstrainerFormForUpdate(Id auditConstrainerId) Gets the audit constrainer form for updating an existing audit constrainer.Gets theInquestassociated with this session.Gets theInquestIdassociated with this session.voidupdateAuditConstrainer(AuditConstrainerForm auditConstrainerForm) Updates an existing audit constrainer.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.
-
canCreateAuditConstrainers
boolean canCreateAuditConstrainers()Tests if this user can createAuditConstrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anAuditConstrainerwill 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:
falseifAuditConstrainercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateAuditConstrainerWithRecordTypes
Tests if this user can create a singleAuditConstrainerusing the desired record types. WhileInquiryRulesManager.getAuditConstrainerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAuditConstrainer. Providing an empty array tests if anAuditConstrainer can be created with no records.- Parameters:
auditConstrainerRecordTypes- array of audit constrainer record types- Returns:
trueifAuditConstrainercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-auditConstrainerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getAuditConstrainerFormForCreate
AuditConstrainerForm getAuditConstrainerFormForCreate(Type[] auditConstrainerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the audit constrainer form for creating new audit constrainers. A new form should be requested for each create transaction.- Parameters:
auditConstrainerRecordTypes- array of audit constrainer record types- Returns:
- the audit constrainer form
- Throws:
NullArgumentException-auditConstrainerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createAuditConstrainer
AuditConstrainer createAuditConstrainer(AuditConstrainerForm auditConstrainerForm) throws OperationFailedException, PermissionDeniedException Creates a newAuditConstrainer.- Parameters:
auditConstrainerForm- the form for thisAuditConstrainer- Returns:
- the new
AuditConstrainer - Throws:
IllegalStateException-auditConstrainerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-auditConstrainerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-auditConstrainerFormdid not originate fromgetAuditConstrainerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateAuditConstrainers
boolean canUpdateAuditConstrainers()Tests if this user can updateAuditConstrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAuditConstrainerwill 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:
falseifAuditConstrainermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getAuditConstrainerFormForUpdate
AuditConstrainerForm getAuditConstrainerFormForUpdate(Id auditConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the audit constrainer form for updating an existing audit constrainer. A new audit constrainer form should be requested for each update transaction.- Parameters:
auditConstrainerId- theIdof theAuditConstrainer- Returns:
- the audit form
- Throws:
NotFoundException-auditConstrainerIdis not foundNullArgumentException-auditConstrainerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateAuditConstrainer
void updateAuditConstrainer(AuditConstrainerForm auditConstrainerForm) throws OperationFailedException, PermissionDeniedException Updates an existing audit constrainer.- Parameters:
auditConstrainerForm- the form containing the elements to be updated- Throws:
IllegalStateException-auditConstrainerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-auditConstrainerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-auditConstrainerFormdid not originate fromgetAuditConstrainerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteAuditConstrainers
boolean canDeleteAuditConstrainers()Tests if this user can deleteAuditConstrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anAuditConstrainerwill 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:
falseifAuditConstrainerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteAuditConstrainer
void deleteAuditConstrainer(Id auditConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anAuditConstrainer.- Parameters:
auditConstrainerId- theIdof theAuditConstrainerto remove- Throws:
NotFoundException-auditConstrainerIdnot foundNullArgumentException-auditConstrainerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageAuditConstrainerAliases
boolean canManageAuditConstrainerAliases()Tests if this user can manageIdaliases forAuditConstrainersA 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:
falseifAuditConstraineraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasAuditConstrainer
void aliasAuditConstrainer(Id auditConstrainerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anAuditConstrainerfor the purpose of creating compatibility. The primaryIdof theAuditConstraineris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another audit constrainer, it is reassigned to the given audit constrainer Id.- Parameters:
auditConstrainerId- theIdof anAuditConstraineraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-auditConstrainerIdnot foundNullArgumentException-auditConstrainerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-