Interface IssueEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes IssueEnablers . 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
IssueEnabler , an IssueEnablerForm is requested using
getIssueEnablerFormForCreate() specifying the desired record
Types or none if no record Types are needed. The returned
IssueEnablernForm 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 IssueEnablerForm is submiited to a create
operation, it cannot be reused with another create operation unless the
first operation was unsuccessful. Each IssueEnablernForm
corresponds to an attempted transaction.
For updates, IssueEnablernForms are requested to the
IssueEnabler Id that is to be updated using
getIssueEnablerFormForUpdate() . Similarly, the IssueEnablerForm
has metadata about the data that can be updated and it can perform
validation before submitting the update. The IssueEnablerForm can
only be used once for a successful update and cannot be reused.
The delete operations delete IssueEnablers . To unmap an
IssueEnabler from the current Oubliette , the
IssueEnablerOublietteeAssignmentSession should be used. These delete
operations attempt to remove the IssueEnabler itself thus removing
it from all known Oubliette catalogs.
This session includes an Id aliasing mechanism to assign an
external Id to an internally assigned Id .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasIssueEnabler(Id issueEnablerId, Id aliasId) Adds anIdto anIssueEnablerfor the purpose of creating compatibility.booleanTests if this user can createIssueEnablers.booleancanCreateIssueEnablerWithRecordTypes(Type[] issueEnablerRecordTypes) Tests if this user can create a singleIssueEnablerusing the desired record types.booleanTests if this user can deleteIssueEnablers.booleanTests if this user can manageIdaliases forIssueEnablersA return of true does not guarantee successful authorization.booleanTests if this user can updateIssueEnablers.createIssueEnabler(IssueEnablerForm issueEnablerForm) Creates a newIssueEnabler.voiddeleteIssueEnabler(Id issueEnablerId) Deletes anIssueEnabler.getIssueEnablerFormForCreate(Type[] issueEnablerRecordTypes) Gets the issue enabler form for creating new issue enablers.getIssueEnablerFormForUpdate(Id issueEnablerId) Gets the issue enabler form for updating an existing issue enabler.Gets theOublietteassociated with this session.Gets theOublietteIdassociated with this session.voidupdateIssueEnabler(IssueEnablerForm issueEnablerForm) Updates an existing issue 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
-
getOublietteId
Id getOublietteId()Gets theOublietteIdassociated with this session.- Returns:
- the
Oubliette Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getOubliette
Gets theOublietteassociated with this session.- Returns:
- the oubliette
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateIssueEnablers
boolean canCreateIssueEnablers()Tests if this user can createIssueEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anIssueEnablerwill 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:
falseifIssueEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateIssueEnablerWithRecordTypes
Tests if this user can create a singleIssueEnablerusing the desired record types. WhileHold.rulesManager.getIssueEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificIssueEnabler. Providing an empty array tests if anIssueEnablercan be created with no records.- Parameters:
issueEnablerRecordTypes- array of issue enabler record types- Returns:
trueifIssueEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-issueEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getIssueEnablerFormForCreate
IssueEnablerForm getIssueEnablerFormForCreate(Type[] issueEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the issue enabler form for creating new issue enablers. A new form should be requested for each create transaction.- Parameters:
issueEnablerRecordTypes- array of issue enabler record types- Returns:
- the issue enabler form
- Throws:
NullArgumentException-issueEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createIssueEnabler
IssueEnabler createIssueEnabler(IssueEnablerForm issueEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newIssueEnabler.- Parameters:
issueEnablerForm- the form for thisIssueEnabler- Returns:
- the new
IssueEnabler - Throws:
IllegalStateException-issueEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-issueEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-issueEnablerFormdid not originate fromgetIssueEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateIssueEnablers
boolean canUpdateIssueEnablers()Tests if this user can updateIssueEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anIssueEnablerwill 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:
falseifIssueEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getIssueEnablerFormForUpdate
IssueEnablerForm getIssueEnablerFormForUpdate(Id issueEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the issue enabler form for updating an existing issue enabler. A new issue enabler form should be requested for each update transaction.- Parameters:
issueEnablerId- theIdof theIssueEnabler- Returns:
- the issue enabler form
- Throws:
NotFoundException-issueEnablerIdis not foundNullArgumentException-issueEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateIssueEnabler
void updateIssueEnabler(IssueEnablerForm issueEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing issue enabler.- Parameters:
issueEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-issueEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-issueEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-issueEnablerFormdid not originate fromgetIssueEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteIssueEnablers
boolean canDeleteIssueEnablers()Tests if this user can deleteIssueEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anIssueEnablerwill 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:
falseifIssueEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteIssueEnabler
void deleteIssueEnabler(Id issueEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anIssueEnabler.- Parameters:
issueEnablerId- theIdof theIssueEnablerto remove- Throws:
NotFoundException-issueEnablerIdnot foundNullArgumentException-issueEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageIssueEnablerAliases
boolean canManageIssueEnablerAliases()Tests if this user can manageIdaliases forIssueEnablersA 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:
falseifIssueEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasIssueEnabler
void aliasIssueEnabler(Id issueEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anIssueEnablerfor the purpose of creating compatibility. The primaryIdof theIssueEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another issue enabler, it is reassigned to the given issue enablerId.- Parameters:
issueEnablerId- theIdof anIssueEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-issueEnablerIdnot foundNullArgumentException-issueEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-