Interface JobProcessorAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes job processors. The data for create
and update is provided via the JobProcessorForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasJobProcessor(Id jobProcessorId, Id aliasId) Adds anIdto aJobProcessorfor the purpose of creating compatibility.booleanTests if this user can create job processors.booleancanCreateJobProcessorWithRecordTypes(Type[] jobProcessorRecordTypes) Tests if this user can create a singleJobProcessorusing the desired record types.booleanTests if this user can delete job processors.booleanTests if this user can manageIdaliases for job processors.booleanTests if this user can update job processors.createJobProcessor(JobProcessorForm jobProcessorForm) Creates a newJobProcessor.voiddeleteJobProcessor(Id jobProcessorId) Deletes aJobProcessor.Gets theFoundryassociated with this session.Gets theFoundryIdassociated with this session.getJobProcessorFormForCreate(Type[] jobProcessorRecordTypes) Gets the job processor form for creating new job processors.getJobProcessorFormForUpdate(Id jobProcessorId) Gets the job processor form for updating an existing job processor.voidupdateJobProcessor(JobProcessorForm jobProcessorForm) Updates an existing job processor.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.
-
canCreateJobProcessor
boolean canCreateJobProcessor()Tests if this user can create job processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aJobProcessorwill 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:
falseifJobProcessorcreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateJobProcessorWithRecordTypes
Tests if this user can create a singleJobProcessorusing the desired record types. WhileResourcingRulesManager.getJobProcessorRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificJobProcessor. Providing an empty array tests if aJobProcessorcan be created with no records.- Parameters:
jobProcessorRecordTypes- array of job processor record types- Returns:
trueifJobProcessorcreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-jobProcessorRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getJobProcessorFormForCreate
JobProcessorForm getJobProcessorFormForCreate(Type[] jobProcessorRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the job processor form for creating new job processors. A new form should be requested for each create transaction.- Parameters:
jobProcessorRecordTypes- array of job processor record types- Returns:
- the job processor form
- Throws:
NullArgumentException-jobProcessorRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form with requested record types- Compliance:
mandatory- This method must be implemented.
-
createJobProcessor
JobProcessor createJobProcessor(JobProcessorForm jobProcessorForm) throws OperationFailedException, PermissionDeniedException Creates a newJobProcessor.- Parameters:
jobProcessorForm- the form for thisJobProcessor- Returns:
- the new
JobProcessor - Throws:
IllegalStateException-jobProcessorFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-jobProcessorFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-jobProcessorFormdid not originate fromgetJobProcessorFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateJobProcessors
boolean canUpdateJobProcessors()Tests if this user can update job processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aJobProcessorwill 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:
falseifJobProcessormodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getJobProcessorFormForUpdate
JobProcessorForm getJobProcessorFormForUpdate(Id jobProcessorId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the job processor form for updating an existing job processor. A new job processor form should be requested for each update transaction.- Parameters:
jobProcessorId- theIdof theJobProcessor- Returns:
- the job processor form
- Throws:
NotFoundException-jobProcessorIdis not foundNullArgumentException-jobProcessorIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateJobProcessor
void updateJobProcessor(JobProcessorForm jobProcessorForm) throws OperationFailedException, PermissionDeniedException Updates an existing job processor.- Parameters:
jobProcessorForm- the form containing the elements to be updated- Throws:
IllegalStateException-jobProcessorFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-jobProcessorFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-jobProcessorFormdid not originate fromgetJobProcessorFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteJobProcessors
boolean canDeleteJobProcessors()Tests if this user can delete job processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aJobProcessorwill 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:
falseifJobProcessordeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteJobProcessor
void deleteJobProcessor(Id jobProcessorId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aJobProcessor.- Parameters:
jobProcessorId- theIdof theJobProcessorto remove- Throws:
NotFoundException-jobProcessorIdnot foundNullArgumentException-jobProcessorIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageJobProcessorAliases
boolean canManageJobProcessorAliases()Tests if this user can manageIdaliases for job processors. 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:
falseifJobProcessoraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasJobProcessor
void aliasJobProcessor(Id jobProcessorId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aJobProcessorfor the purpose of creating compatibility. The primaryIdof theJobProcessoris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another job processor. it is reassigned to the given job processorId.- Parameters:
jobProcessorId- theIdof aJobProcessoraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-jobProcessorIdnot foundNullArgumentException-jobProcessorIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-