Interface DemographicEnablerBinAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign DemographicEnabler
to Bin mappings. A DemographicEnabler may appear in
multiple Bin objects and removing the last reference to a
DemographicEnabler is the equivalent of deleting it. Each Bin may
have its own authorizations governing who is allowed to operate on it.
Adding a reference of a DemographicEnabler to another
Bin is not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignDemographicEnablerToBin(Id demographicEnablerId, Id binId) Adds an existingDemographicEnablerto anBin.booleanTests if this user can alter demographic enabler/bin mappings.booleanTests if this user can alter demographic enabler/bin mappings.getAssignableBinIds(Id binId) Gets a list of bins including and under the given bin node in which any demographic enabler can be assigned.getAssignableBinIdsForDemographicEnabler(Id binId, Id demographicEnablerId) Gets a list of bins including and under the given bin node in which a specific demographic enabler can be assigned.voidreassignDemographicEnablerToBin(Id demographicEnablerId, Id fromBinId, Id toBinId) Moves aDemographicEnablerfrom oneBinto another.voidunassignDemographicEnablerFromBin(Id demographicEnablerId, Id binId) Removes aDemographicEnablerfrom anBin.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
-
canAssignDemographicEnablers
boolean canAssignDemographicEnablers()Tests if this user can alter demographic enabler/bin mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignDemographicEnablersToBin
Tests if this user can alter demographic enabler/bin mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Parameters:
binId- theIdof theBin- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-binIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableBinIds
Gets a list of bins including and under the given bin node in which any demographic enabler can be assigned.- Parameters:
binId- theIdof theBin- Returns:
- list of assignable bin
Ids - Throws:
NullArgumentException-binIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableBinIdsForDemographicEnabler
IdList getAssignableBinIdsForDemographicEnabler(Id binId, Id demographicEnablerId) throws OperationFailedException Gets a list of bins including and under the given bin node in which a specific demographic enabler can be assigned.- Parameters:
binId- theIdof theBindemographicEnablerId- theIdof theDemographicEnabler- Returns:
- list of assignable bin
Ids - Throws:
NullArgumentException-binIdordemographicEnablerIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignDemographicEnablerToBin
void assignDemographicEnablerToBin(Id demographicEnablerId, Id binId) throws NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingDemographicEnablerto anBin.- Parameters:
demographicEnablerId- theIdof theDemographicEnablerbinId- theIdof theBin- Throws:
NotFoundException-demographicEnablerIdorbinIdnot foundNullArgumentException-demographicEnablerIdorbinIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignDemographicEnablerFromBin
void unassignDemographicEnablerFromBin(Id demographicEnablerId, Id binId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aDemographicEnablerfrom anBin.- Parameters:
demographicEnablerId- theIdof theDemographicEnablerbinId- theIdof theBin- Throws:
NotFoundException-demographicEnablerIdorbinIdnot foundNullArgumentException-demographicEnablerIdorbinIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignDemographicEnablerToBin
void reassignDemographicEnablerToBin(Id demographicEnablerId, Id fromBinId, Id toBinId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aDemographicEnablerfrom oneBinto another. Mappings to otherBinsare unaffected.- Parameters:
demographicEnablerId- theIdof theDemographicEnablerfromBinId- theIdof the currentBintoBinId- theIdof the destinationBin- Throws:
AlreadyExistsException-demographicEnablerIdalready assigned totoBinIdNotFoundException-demographicEnablerId, fromBinId, ortoBinIdnot found ordemographicEnablerIdnot mapped tofromBinIdNullArgumentException-demographicEnablerId, fromBinId, ortoBinIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-