Interface CompositionQuerySession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
- All Known Subinterfaces:
CompositionSearchSession
This session provides methods for searching among Composition
objects. The search query is constructed using the
CompositionQuery .
This session defines views that offer differing behaviors when searching.
- federated repository view: searches include compositions in repositories of which this repository is an ancestor in the repository hierarchy
- isolated repository view: searches are restricted to subjects in this repository
- sequestered composition viiew: All composition methods suppress sequestered compositions.
- unsequestered composition view: All composition methods return all compositions.
Compositions may have a query record indicated by their respective
record types. The query record is accessed via the
CompositionQuery .
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performCompositionsearches.Gets a composition query.getCompositionsByQuery(CompositionQuery compositionQuery) Gets a list ofCompositionsmatching the given composition query.Gets theRepositoryassociated with this session.Gets theRepositoryIdassociated with this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidThe methods in this session omit sequestered compositions.voidThe methods in this session return all compositions, including sequestered compositions.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
-
getRepositoryId
Id getRepositoryId()Gets theRepositoryIdassociated with this session.- Returns:
- the
Repository Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getRepository
Gets theRepositoryassociated with this session.- Returns:
- the
Repositoryassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canSearchCompositions
boolean canSearchCompositions()Tests if this user can performCompositionsearches. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer search operations to unauthorized users.- Returns:
falseif search methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useFederatedRepositoryView
void useFederatedRepositoryView()Federates the view for methods in this session. A federated view will include compositions in repositories which are children of this repository in the repository hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedRepositoryView
void useIsolatedRepositoryView()Isolates the view for methods in this session. An isolated view restricts lookups to this repository only.- Compliance:
mandatory- This method is must be implemented.
-
useSequesteredCompositionView
void useSequesteredCompositionView()The methods in this session omit sequestered compositions.- Compliance:
mandatory- This method is must be implemented.
-
useUnsequesteredCompositionView
void useUnsequesteredCompositionView()The methods in this session return all compositions, including sequestered compositions.- Compliance:
mandatory- This method is must be implemented.
-
getCompositionQuery
CompositionQuery getCompositionQuery()Gets a composition query.- Returns:
- the composition query
- Compliance:
mandatory- This method must be implemented.
-
getCompositionsByQuery
CompositionList getCompositionsByQuery(CompositionQuery compositionQuery) throws OperationFailedException, PermissionDeniedException Gets a list ofCompositionsmatching the given composition query.- Parameters:
compositionQuery- the composition query- Returns:
- the returned
CompositionList - Throws:
NullArgumentException-compositionQueryisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-compositionQueryis not of this service- Compliance:
mandatory- This method must be implemented.
-