public interface DirectionLookupSession extends OsidSession
This session defines methods for retrieving directions.
This lookup session defines several views:
Directions
with the DirectionAdminSession.
The methods useFederatedCookbookView()
and
useIsolatedCookbookView()
behave as a radio group and one should
be selected before invoking any lookup methods.
Directions may have an additional records indicated by their
respective record types. The record may not be accessed through a cast of
the Directions.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupDirections()
Tests if this user can perform
Direction lookups. |
Cookbook |
getCookbook()
Gets the
Cookbook associated with this session. |
Id |
getCookbookId()
Gets the
Cookbook Id associated with
this session. |
Direction |
getDirection(Id directionId)
Gets the
Direction specified by its Id. |
DirectionList |
getDirections()
Gets all directions.
|
DirectionList |
getDirectionsByGenusType(Type directionGenusType)
Gets a
DirectionList corresponding to the given
direction genus Type which does not include directions
of types derived from the specified Type. |
DirectionList |
getDirectionsByIds(IdList directionIds)
Gets a
DirectionList corresponding to the given
IdList. |
DirectionList |
getDirectionsByParentGenusType(Type directionGenusType)
Gets a
DirectionList corresponding to the given
direction genus Type and include any additional
directions with genus types derived from the specified Type. |
DirectionList |
getDirectionsByRecordType(Type directionRecordType)
Gets a
DirectionList containing the given direction
record Type. |
DirectionList |
getDirectionsForRecipe(Id recipeId)
Gets a
DirectionList for the given recipe Id. |
void |
useComparativeDirectionView()
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 |
useFederatedCookbookView()
Federates the view for methods in this session.
|
void |
useIsolatedCookbookView()
Isolates the view for methods in this session.
|
void |
usePlenaryDirectionView()
A complete view of the
Direction returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getCookbookId()
Cookbook
Id
associated with
this session. Cookbook Id
associated with this sessionmandatory
- This method must be implemented. Cookbook getCookbook() throws OperationFailedException, PermissionDeniedException
Cookbook
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupDirections()
Direction
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 not offer lookup operations to
unauthorized users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeDirectionView()
mandatory
- This method is must be implemented. void usePlenaryDirectionView()
Direction
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 useFederatedCookbookView()
mandatory
- This method is must be implemented. void useIsolatedCookbookView()
mandatory
- This method is must be implemented. Direction getDirection(Id directionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Direction
specified by its Id.
In plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned Direction
may have a different Id
than requested, such as
the case where a duplicate Id
was assigned to a
Direction
and retained for compatibility.directionId
- the Id
of the Direction
to retrieve Direction
NotFoundException
- no Direction
found
with the given Id
NullArgumentException
- directionId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DirectionList getDirectionsByIds(IdList directionIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
DirectionList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
directions 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 Directions
may be omitted from the list
and may present the elements in any order including returning a unique
set.directionIds
- the list of Ids
to retrieve Direction
listNotFoundException
- an Id was
not foundNullArgumentException
- directionIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DirectionList getDirectionsByGenusType(Type directionGenusType) throws OperationFailedException, PermissionDeniedException
DirectionList
corresponding to the given
direction genus Type
which does not include directions
of types derived from the specified Type.
In plenary
mode, the returned list contains all known directions or an error
results. Otherwise, the returned list may contain only those
directions that are accessible through this session.directionGenusType
- a direction genus type Direction
listNullArgumentException
- directionGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DirectionList getDirectionsByParentGenusType(Type directionGenusType) throws OperationFailedException, PermissionDeniedException
DirectionList
corresponding to the given
direction genus Type
and include any additional
directions with genus types derived from the specified Type.
In plenary mode, the returned list contains all known
directions or an error results. Otherwise, the returned list may
contain only those directions that are accessible through this
session.directionGenusType
- a direction genus type Direction
listNullArgumentException
- directionGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DirectionList getDirectionsByRecordType(Type directionRecordType) throws OperationFailedException, PermissionDeniedException
DirectionList
containing the given direction
record Type.
In plenary mode, the returned list
contains all known directions or an error results. Otherwise, the
returned list may contain only those directions that are accessible
through this session.directionRecordType
- a direction record type Direction
listNullArgumentException
- directionRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DirectionList getDirectionsForRecipe(Id recipeId) throws OperationFailedException, PermissionDeniedException
DirectionList
for the given recipe Id.
In plenary mode, the returned list contains all known
directions or an error results. Otherwise, the returned list may
contain only those directions that are accessible through this
session.recipeId
- a recipe Id
Direction
listNullArgumentException
- recipeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DirectionList getDirections() throws OperationFailedException, PermissionDeniedException
In plenary mode, the returned list
contains all of the directions, including duplicates, or an error
results if an Id
in the supplied list is not found or
inaccessible. Otherwise, inaccessible Directions
may be
omitted from the list and may present the elements in any order
including returning a unique set. Direction
listOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.