Interface JobConstrainerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes job constrainers. The data for create
and update is provided via the JobConstrainerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasJobConstrainer(Id jobConstrainerId, Id aliasId) Adds anIdto aJobConstrainerfor the purpose of creating compatibility.booleanTests if this user can create job constrainers.booleancanCreateJobConstrainerWithRecordTypes(Type[] jobConstrainerRecordTypes) Tests if this user can create a singleJobConstrainerusing the desired record types.booleanTests if this user can delete job constrainers.booleanTests if this user can manageIdaliases for job constrainers.booleanTests if this user can update job constrainers.createJobConstrainer(JobConstrainerForm jobConstrainerForm) Creates a newJobConstrainer.voiddeleteJobConstrainer(Id jobConstrainerId) Deletes aJobConstrainer.Gets theFoundryassociated with this session.Gets theFoundryIdassociated with this session.getJobConstrainerFormForCreate(Type[] jobConstrainerRecordTypes) Gets the job constrainer form for creating new job constrainers.getJobConstrainerFormForUpdate(Id jobConstrainerId) Gets the job constrainer form for updating an existing job constrainer.voidupdateJobConstrainer(JobConstrainerForm jobConstrainerForm) Updates an existing job 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
-
getFoundryId
Id getFoundryId()Gets theFoundryIdassociated with this session.- Returns:
- the
Foundry Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getFoundry
Gets theFoundryassociated with this session.- Returns:
- the foundry
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateJobConstrainer
boolean canCreateJobConstrainer()Tests if this user can create job constrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aJobConstrainerwill 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:
falseifJobConstrainercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateJobConstrainerWithRecordTypes
Tests if this user can create a singleJobConstrainerusing the desired record types. WhileResourcingRulesManager.getJobConstrainerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificJobConstrainer. Providing an empty array tests if aJobConstrainercan be created with no records.- Parameters:
jobConstrainerRecordTypes- array of job constrainer record types- Returns:
trueifJobConstrainercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-jobConstrainerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getJobConstrainerFormForCreate
JobConstrainerForm getJobConstrainerFormForCreate(Type[] jobConstrainerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the job constrainer form for creating new job constrainers. A new form should be requested for each create transaction.- Parameters:
jobConstrainerRecordTypes- array of job constrainer record types- Returns:
- the job constrainer form
- Throws:
NullArgumentException-jobConstrainerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form with requested record types- Compliance:
mandatory- This method must be implemented.
-
createJobConstrainer
JobConstrainer createJobConstrainer(JobConstrainerForm jobConstrainerForm) throws OperationFailedException, PermissionDeniedException Creates a newJobConstrainer.- Parameters:
jobConstrainerForm- the form for thisJobConstrainer- Returns:
- the new
JobConstrainer - Throws:
IllegalStateException-jobConstrainerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-jobConstrainerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-jobConstrainerFormdid not originate fromgetJobConstrainerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateJobConstrainers
boolean canUpdateJobConstrainers()Tests if this user can update job constrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aJobConstrainerwill 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:
falseifJobConstrainermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getJobConstrainerFormForUpdate
JobConstrainerForm getJobConstrainerFormForUpdate(Id jobConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the job constrainer form for updating an existing job constrainer. A new job constrainer form should be requested for each update transaction.- Parameters:
jobConstrainerId- theIdof theJobConstrainer- Returns:
- the job constrainer form
- Throws:
NotFoundException-jobConstrainerIdis not foundNullArgumentException-jobConstrainerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateJobConstrainer
void updateJobConstrainer(JobConstrainerForm jobConstrainerForm) throws OperationFailedException, PermissionDeniedException Updates an existing job constrainer.- Parameters:
jobConstrainerForm- the form containing the elements to be updated- Throws:
IllegalStateException-jobConstrainerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-jobConstrainerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-jobConstrainerFormdid not originate fromgetJobConstrainerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteJobConstrainers
boolean canDeleteJobConstrainers()Tests if this user can delete job constrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aJobConstrainerwill 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:
falseifJobConstrainerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteJobConstrainer
void deleteJobConstrainer(Id jobConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aJobConstrainer.- Parameters:
jobConstrainerId- theIdof theJobConstrainerto remove- Throws:
NotFoundException-jobConstrainerIdnot foundNullArgumentException-jobConstrainerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageJobConstrainerAliases
boolean canManageJobConstrainerAliases()Tests if this user can manageIdaliases for job constrainers. 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:
falseifJobConstraineraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasJobConstrainer
void aliasJobConstrainer(Id jobConstrainerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aJobConstrainerfor the purpose of creating compatibility. The primaryIdof theJobConstraineris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another job constrainer. it is reassigned to the given job constrainerId.- Parameters:
jobConstrainerId- theIdof aJobConstraineraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-jobConstrainerIdnot foundNullArgumentException-jobConstrainerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-