public interface JobLookupSession extends OsidSession
This session provides methods for retrieving Job
objects.
This session defines views that offer differing behaviors when retrieving multiple objects.
Jobs
with the JobAdminSession.
Generally, the comparative view should be used for most applications
as it permits operation even if there is data that cannot be accessed. The
methods useFederatedFoundryView()
and
useIsolatedFoundryView()
behave as a radio group and one should be
selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupJobs()
Tests if this user can perform
Job lookups. |
Foundry |
getFoundry()
Gets the
Foundry associated with this session. |
Id |
getFoundryId()
Gets the
Foundry Id associated with this
session. |
Job |
getJob(Id jobId)
Gets the
Job specified by its Id. |
JobList |
getJobs()
Gets all
Jobs. |
JobList |
getJobsByGenusType(Type jobGenusType)
Gets a
JobList corresponding to the given job genus
Type which does not include jobs of genus types derived
from the specified Type. |
JobList |
getJobsByIds(IdList jobIds)
Gets a
JobList corresponding to the given
IdList. |
JobList |
getJobsByParentGenusType(Type jobGenusType)
Gets a
JobList corresponding to the given job genus
Type and include any additional jobs with genus types
derived from the specified Type. |
JobList |
getJobsByProvider(Id resourceId)
Gets a
JobList from the given provider. |
JobList |
getJobsByRecordType(Type jobRecordType)
Gets a
JobList containing the given job record
Type. |
void |
useActiveJobView()
Only active jobs are returned by methods in this session.
|
void |
useAnyStatusJobView()
All active and inactive authorization enablers are returned by methods
in this session.
|
void |
useComparativeJobView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
useFederatedFoundryView()
Federates the view for methods in this session.
|
void |
useIsolatedFoundryView()
Isolates the view for methods in this session.
|
void |
usePlenaryJobView()
A complete view of the
Job returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id 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 canLookupJobs()
Job
lookups. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known all methods in this session will result in
a PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer lookup operations to
unauthorized users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeJobView()
mandatory
- This method is must be implemented. void usePlenaryJobView()
Job
returns is desired. Methods
will return what is requested or result in an error. This view is used
when greater precision is desired at the expense of interoperability.mandatory
- This method is must be implemented. void useFederatedFoundryView()
mandatory
- This method is must be implemented. void useIsolatedFoundryView()
mandatory
- This method is must be implemented. void useActiveJobView()
mandatory
- This method is must be implemented. void useAnyStatusJobView()
mandatory
- This method is must be implemented. Job getJob(Id jobId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Job
specified by its Id.
In plenary mode, the exact Id
is found
or a NOT_FOUND
results. Otherwise, the returned
Job
may have a different Id
than requested,
such as the case where a duplicate Id
was assigned to a
Job
and retained for compatibility.
In active mode, jobs are returned that are currently active. In any
status mode, active and inactive jobs are returned.jobId
- Id
of the Job
NotFoundException
- jobId
not foundNullArgumentException
- jobId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. JobList getJobsByIds(IdList jobIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
JobList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
jobs specified in the Id
list, in the order of the
list, including duplicates, or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible Jobs
may be omitted from the list and may
present the elements in any order including returning a unique set.
In active mode, jobs are returned that are currently active. In any
status mode, active and inactive jobs are returned.jobIds
- the list of Ids
to retrieve Job
listNotFoundException
- an Id
was not foundNullArgumentException
- jobIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. JobList getJobsByGenusType(Type jobGenusType) throws OperationFailedException, PermissionDeniedException
JobList
corresponding to the given job genus
Type
which does not include jobs of genus types derived
from the specified Type.
In plenary mode, the returned list contains all known
jobs or an error results. Otherwise, the returned list may contain
only those jobs that are accessible through this session.
In active mode, jobs are returned that are currently active. In any
status mode, active and inactive jobs are returned.jobGenusType
- a job genus type Job
listNullArgumentException
- jobGenusType
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. JobList getJobsByParentGenusType(Type jobGenusType) throws OperationFailedException, PermissionDeniedException
JobList
corresponding to the given job genus
Type
and include any additional jobs with genus types
derived from the specified Type.
In plenary mode, the returned list contains all known
jobs or an error results. Otherwise, the returned list may contain
only those jobs that are accessible through this session.
In active mode, jobs are returned that are currently active. In any
status mode, active and inactive jobs are returned.jobGenusType
- a job genus type Job
listNullArgumentException
- jobGenusType
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. JobList getJobsByRecordType(Type jobRecordType) throws OperationFailedException, PermissionDeniedException
JobList
containing the given job record
Type.
In plenary mode, the returned list contains all known
jobs or an error results. Otherwise, the returned list may contain
only those jobs that are accessible through this session.
In active mode, jobs are returned that are currently active. In any
status mode, active and inactive jobs are returned.jobRecordType
- a job record type Job
listNullArgumentException
- jobRecordType
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. JobList getJobsByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
JobList
from the given provider.
In plenary mode, the returned list contains all known
jobs or an error results. Otherwise, the returned list may contain
only those jobs that are accessible through this session.
In active mode, jobs are returned that are currently active. In any
status mode, active and inactive jobs are returned.resourceId
- a resource Id
Job
listNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. JobList getJobs() throws OperationFailedException, PermissionDeniedException
Jobs.
In plenary mode, the returned list contains all known
jobs or an error results. Otherwise, the returned list may contain
only those jobs that are accessible through this session.
In active mode, jobs are returned that are currently active. In any
status mode, active and inactive jobs are returned. Jobs
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.