Interface DemographicBuilderSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session applies resource search queries and search orders to
Demographics . Applying a search query to a demographic adds the
resources resulting from that query to the demographic.
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyResourceQuery(Id demographicId, ResourceQuery resourceQuery) Applies a resource query to a demographic.voidapplyResourceSequencing(Id demographicId, ResourceSearchOrder resourceSearchOrder) Applies a demographic search order to this bin.booleanTests if this user can build demographics.voidclearResourceQuery(Id demographicId) Clears the resource query effectively replacing it with a wildcard query.voidclearResourceSequencing(Id demographicId) Clears the resource sequencing.getBin()Gets theBinassociated with this session.getBinId()Gets theBinIdassociated with this session.Gets a resource query.getResourceQueryFromInspector(ResourceQueryInspector resourceQueryInspector) Gets a resource query from an inspector.Gets a resource search order.inspectResourceQuery(Id demographicId) Gets a resource query inspector for a demographic.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
-
getBinId
Id getBinId()Gets theBinIdassociated with this session.- Returns:
- the
Bin Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getBin
Gets theBinassociated with this session.- Returns:
- the bin
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canBuildDemographics
boolean canBuildDemographics()Tests if this user can build demographics. A return of true does not guarantee successful authorization. A return of false indicates that it is known methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer operations to unauthorized users.- Returns:
falseif smart bin management is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getResourceQuery
ResourceQuery getResourceQuery()Gets a resource query.- Returns:
- the resource query
- Compliance:
mandatory- This method must be implemented.
-
getResourceSearchOrder
ResourceSearchOrder getResourceSearchOrder()Gets a resource search order.- Returns:
- the resource search order
- Compliance:
mandatory- This method must be implemented.
-
applyResourceQuery
void applyResourceQuery(Id demographicId, ResourceQuery resourceQuery) throws NotFoundException, OperationFailedException, PermissionDeniedException Applies a resource query to a demographic. If a query is already applied, it is replaced with the new one.- Parameters:
demographicId- a demographicIdresourceQuery- the resource query- Throws:
NotFoundException-demographicIdis not foundNullArgumentException-demographicIdorresourceQueryisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurredUnsupportedException-resourceQuerydid not originate fromgetResourceQuery()- Compliance:
mandatory- This method must be implemented.
-
inspectResourceQuery
ResourceQueryInspector inspectResourceQuery(Id demographicId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets a resource query inspector for a demographic.- Parameters:
demographicId- a demographicId- Returns:
- the demographic query inspector
- Throws:
NotFoundException-demographicIdis not foundNullArgumentException-demographicIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
clearResourceQuery
void clearResourceQuery(Id demographicId) throws NotFoundException, OperationFailedException, PermissionDeniedException Clears the resource query effectively replacing it with a wildcard query.- Parameters:
demographicId- a demographicId- Throws:
NotFoundException-demographicIdis not foundNullArgumentException-demographicIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
applyResourceSequencing
void applyResourceSequencing(Id demographicId, ResourceSearchOrder resourceSearchOrder) throws NotFoundException, OperationFailedException, PermissionDeniedException Applies a demographic search order to this bin.- Parameters:
demographicId- a demographicIdresourceSearchOrder- the resource search order- Throws:
NotFoundException-demographicIdis not foundNullArgumentException-demographicIdorresourceSearchOrderisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurredUnsupportedException-resourceSearchOrderdid not originate fromgetResourceSearchOrder()- Compliance:
mandatory- This method must be implemented.
-
clearResourceSequencing
void clearResourceSequencing(Id demographicId) throws NotFoundException, OperationFailedException, PermissionDeniedException Clears the resource sequencing.- Parameters:
demographicId- a demographicId- Throws:
NotFoundException-demographicIdis not foundNullArgumentException-demographicIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
getResourceQueryFromInspector
Gets a resource query from an inspector.- Parameters:
resourceQueryInspector- a resource query inspector- Returns:
- the resource query
- Throws:
NullArgumentException-resourceQueryInspectorisnullUnsupportedException-resourceQueryInspectoris not of this service- Compliance:
mandatory- This method must be implemented.
-