Interface IssueConstrainerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes IssueConstraine rs.
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
IssueConstrain er, an IssueConstrainerF orm is requested
using getIssueConstraierFormForCreate() specifying the desired
record Types or none if no record Types are needed. The
returned IssueConstrainernF orm 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 IssueConstrainerF orm is
submiited to a create operation, it cannot be reused with another create
operation unless the first operation was unsuccessful. Each
IssueConstrainernF orm corresponds to an attempted transaction.
For updates, IssueConstrainernFo rms are requested to the
IssueConstrai ner Id that is to be updated using
getIssueConstrainerFormForUpdate (). Similarly, the
IssueConstrainerF orm has metadata about the data that can be updated and
it can perform validation before submitting the update. The
IssueConstrainerF orm can only be used once for a successful update and
cannot be reused.
The delete operations delete IssueConstraine rs. To unmap an
IssueConstrai ner from the current Oubliette , the
IssueConstrainerOublietteeAssignmentSess ion should be used. These delete
operations attempt to remove the IssueConstrai ner 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 TypeMethodDescriptionvoidaliasIssueConstrainer(Id issueConstrainerId, Id aliasId) Adds anIdto anIssueConstrainer for the purpose of creating compatibility.booleanTests if this user can createIssueConstrainers.booleancanCreateIssueConstrainerWithRecordTypes(Type[] issueConstrainerRecordTypes) Tests if this user can create a singleIssueConstrainer using the desired record types.booleanTests if this user can deleteIssueConstrainers.booleanTests if this user can manageIdaliases forIssueConstrainers A return of true does not guarantee successful authorization.booleanTests if this user can updateIssueConstrainers.createIssueConstrainer(IssueConstrainerForm issueConstrainerForm) Creates a newIssueConstrainer.voiddeleteIssueConstrainer(Id issueConstrainerId) Deletes anIssueConstrainer.getIssueConstrainerFormForCreate(Type[] issueConstrainerRecordTypes) Gets the issue constrainer form for creating new issue constrainers.getIssueConstrainerFormForUpdate(Id issueConstrainerId) Gets the issue constrainer form for updating an existing issue constrainer.Gets theOublietteassociated with this session.Gets theOublietteIdassociated with this session.voidupdateIssueConstrainer(IssueConstrainerForm issueConstrainerForm) Updates an existing issue 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
-
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.
-
canCreateIssueConstrainers
boolean canCreateIssueConstrainers()Tests if this user can createIssueConstrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anIssueConstrainer will 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:
falseifIssueConstrainercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateIssueConstrainerWithRecordTypes
Tests if this user can create a singleIssueConstrainer using the desired record types. WhileHold.rulesManager.getIssueConstrainerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificIssueConstrainer. Providing an empty array tests if anIssueConstrainercan be created with no records.- Parameters:
issueConstrainerRecordTypes- array of issue constrainer record types- Returns:
trueifIssueConstrainercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-issueConstrainerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getIssueConstrainerFormForCreate
IssueConstrainerForm getIssueConstrainerFormForCreate(Type[] issueConstrainerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the issue constrainer form for creating new issue constrainers. A new form should be requested for each create transaction.- Parameters:
issueConstrainerRecordTypes- array of issue constrainer record types- Returns:
- the issue constrainer form
- Throws:
NullArgumentException-issueConstrainerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createIssueConstrainer
IssueConstrainer createIssueConstrainer(IssueConstrainerForm issueConstrainerForm) throws OperationFailedException, PermissionDeniedException Creates a newIssueConstrainer.- Parameters:
issueConstrainerForm- the form for thisIssueConstrainer- Returns:
- the new
IssueConstrainer - Throws:
IllegalStateException-issueConstrainerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-issueConstrainerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-issueConstrainerFormdid not originate fromgetIssueConstrainerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateIssueConstrainers
boolean canUpdateIssueConstrainers()Tests if this user can updateIssueConstrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anIssueConstrainer will 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:
falseifIssueConstrainermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getIssueConstrainerFormForUpdate
IssueConstrainerForm getIssueConstrainerFormForUpdate(Id issueConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the issue constrainer form for updating an existing issue constrainer. A new issue constrainer form should be requested for each update transaction.- Parameters:
issueConstrainerId- theIdof theIssueConstrainer- Returns:
- the issue constrainer form
- Throws:
NotFoundException-issueConstrainerIdis not foundNullArgumentException-issueConstrainerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateIssueConstrainer
void updateIssueConstrainer(IssueConstrainerForm issueConstrainerForm) throws OperationFailedException, PermissionDeniedException Updates an existing issue constrainer.- Parameters:
issueConstrainerForm- the form containing the elements to be updated- Throws:
IllegalStateException-issueConstrainerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-issueConstrainerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-issueConstrainerFormdid not originate fromgetIssueConstrainerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteIssueConstrainers
boolean canDeleteIssueConstrainers()Tests if this user can deleteIssueConstrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anIssueConstrainer will 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:
falseifIssueConstrainerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteIssueConstrainer
void deleteIssueConstrainer(Id issueConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anIssueConstrainer.- Parameters:
issueConstrainerId- theIdof theIssueConstrainerto remove- Throws:
NotFoundException-issueConstrainerIdnot foundNullArgumentException-issueConstrainerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageIssueConstrainerAliases
boolean canManageIssueConstrainerAliases()Tests if this user can manageIdaliases forIssueConstrainers 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:
falseifIssueConstraineraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasIssueConstrainer
void aliasIssueConstrainer(Id issueConstrainerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anIssueConstrainer for the purpose of creating compatibility. The primaryIdof theIssueConstrainer is determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another issue constrainer, it is reassigned to the given issue constrainerId.- Parameters:
issueConstrainerId- theIdof anIssueConstraineraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-issueConstrainerIdnot foundNullArgumentException-issueConstrainerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-