public interface JobConstrainerAdminSession extends OsidSession
This session creates and removes job constrainers. The data for create
and update is provided via the JobConstrainerForm.
| Modifier and Type | Method and Description |
|---|---|
void |
aliasJobConstrainer(Id jobConstrainerId,
Id aliasId)
Adds an
Id to a JobConstrainer for the
purpose of creating compatibility. |
boolean |
canCreateJobConstrainer()
Tests if this user can create job constrainers.
|
boolean |
canCreateJobConstrainerWithRecordTypes(Type[] jobConstrainerRecordTypes)
Tests if this user can create a single
JobConstrainer
using the desired record types. |
boolean |
canDeleteJobConstrainers()
Tests if this user can delete job constrainers.
|
boolean |
canManageJobConstrainerAliases()
Tests if this user can manage
Id aliases for job
constrainers. |
boolean |
canUpdateJobConstrainers()
Tests if this user can update job constrainers.
|
JobConstrainer |
createJobConstrainer(JobConstrainerForm jobConstrainerForm)
Creates a new
JobConstrainer. |
void |
deleteJobConstrainer(Id jobConstrainerId)
Deletes a
JobConstrainer. |
Foundry |
getFoundry()
Gets the
Foundry associated with this session. |
Id |
getFoundryId()
Gets the
Foundry Id associated with this
session. |
JobConstrainerForm |
getJobConstrainerFormForCreate(Type[] jobConstrainerRecordTypes)
Gets the job constrainer form for creating new job constrainers.
|
JobConstrainerForm |
getJobConstrainerFormForUpdate(Id jobConstrainerId)
Gets the job constrainer form for updating an existing job
constrainer.
|
void |
updateJobConstrainer(JobConstrainerForm jobConstrainerForm)
Updates an existing job constrainer.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getFoundryId()
Foundry Id associated with this
session. Foundry Id associated with this sessionmandatory - This method must be implemented. Foundry getFoundry() throws OperationFailedException, PermissionDeniedException
Foundry associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateJobConstrainer()
JobConstrainer will result
in a PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer create operations to an
unauthorized user. false if JobConstrainer creation
is not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateJobConstrainerWithRecordTypes(Type[] jobConstrainerRecordTypes)
JobConstrainer
using the desired record types. While
ResourcingRulesManager.getJobConstrainerRecordTypes() can be
used to examine which records are supported, this method tests which
record(s) are required for creating a specific JobConstrainer.
Providing an empty array tests if a JobConstrainer
can be created with no records.jobConstrainerRecordTypes - array of job constrainer record
types true if JobConstrainer creation
using the specified record Types is supported,
false otherwiseNullArgumentException -
jobConstrainerRecordTypes is null mandatory - This method must be implemented. JobConstrainerForm getJobConstrainerFormForCreate(Type[] jobConstrainerRecordTypes) throws OperationFailedException, PermissionDeniedException
jobConstrainerRecordTypes - array of job constrainer record
typesNullArgumentException -
jobConstrainerRecordTypes is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form with
requested record typesmandatory - This method must be implemented. JobConstrainer createJobConstrainer(JobConstrainerForm jobConstrainerForm) throws OperationFailedException, PermissionDeniedException
JobConstrainer. jobConstrainerForm - the form for this JobConstrainer
JobConstrainer IllegalStateException - jobConstrainerForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - jobConstrainerForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - jobConstrainerForm
did not originate from
getJobConstrainerFormForCreate() mandatory - This method must be implemented. boolean canUpdateJobConstrainers()
JobConstrainer will result
in a PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer update operations to an
unauthorized user. false if JobConstrainer
modification is not authorized, true otherwisemandatory - This method must be implemented. JobConstrainerForm getJobConstrainerFormForUpdate(Id jobConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
jobConstrainerId - the Id of the
JobConstrainer NotFoundException - jobConstrainerId is
not foundNullArgumentException - jobConstrainerId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateJobConstrainer(JobConstrainerForm jobConstrainerForm) throws OperationFailedException, PermissionDeniedException
jobConstrainerForm - the form containing the elements to be
updatedIllegalStateException - jobConstrainerForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - jobConstrainerForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - jobConstrainerForm
did not originate from
getJobConstrainerFormForUpdate() mandatory - This method must be implemented. boolean canDeleteJobConstrainers()
JobConstrainer will result
in a PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer delete operations to an
unauthorized user. false if JobConstrainer deletion
is not authorized, true otherwisemandatory - This method must be implemented. void deleteJobConstrainer(Id jobConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
JobConstrainer. jobConstrainerId - the Id of the
JobConstrainer to removeNotFoundException - jobConstrainerId not
foundNullArgumentException - jobConstrainerId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageJobConstrainerAliases()
Id aliases 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 a PERMISSION_DENIED. This is
intended as a hint to an application that may opt not to offer alias
operations to an unauthorized user. false if JobConstrainer aliasing
is not authorized, true otherwisemandatory - This method must be implemented. void aliasJobConstrainer(Id jobConstrainerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a JobConstrainer for the
purpose of creating compatibility. The primary Id of
the JobConstrainer is determined by the provider. The
new Id performs as an alias to the primary Id
. If the alias is a pointer to another job constrainer. it is
reassigned to the given job constrainer Id. jobConstrainerId - the Id of a
JobConstrainer aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - jobConstrainerId not
foundNullArgumentException - jobConstrainerId
or aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.