public interface DemographicBinAssignmentSession extends OsidSession
This session provides methods to re-assign Demographic
to Bin mappings. A Demographic may appear in
multiple Bin objects and removing the last reference to a
Demographic 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 Demographic to another
Bin is not a copy operation (eg: does not change its Id
).
| Modifier and Type | Method and Description |
|---|---|
void |
assignDemographicToBin(Id demographicId,
Id binId)
Adds an existing
Demographic to an Bin. |
boolean |
canAssignDemographics()
Tests if this user can alter demographic/bin mappings.
|
boolean |
canAssignDemographicsToBin(Id binId)
Tests if this user can alter demographic/bin mappings.
|
IdList |
getAssignableBinIds(Id binId)
Gets a list of bins including and under the given bin node in which
any demographic can be assigned.
|
IdList |
getAssignableBinIdsForDemographic(Id binId,
Id demographicId)
Gets a list of bins including and under the given bin node in which a
specific demographic can be assigned.
|
void |
unassignDemographicFromBin(Id demographicId,
Id binId)
Removes a
Demographic from a Bin. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignDemographics()
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users. false if mapping is not authorized, true
otherwisemandatory - This method must be implemented. boolean canAssignDemographicsToBin(Id binId)
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users.binId - the Id of the Bin false if mapping is not authorized, true
otherwiseNullArgumentException - binId is
null mandatory - This method must be implemented. IdList getAssignableBinIds(Id binId) throws OperationFailedException
binId - the Id of the Bin Ids NullArgumentException - binId is
null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignableBinIdsForDemographic(Id binId, Id demographicId) throws OperationFailedException
binId - the Id of the Bin demographicId - the Id of the Demographic
Ids NullArgumentException - binId or
demographicId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignDemographicToBin(Id demographicId, Id binId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Demographic to an Bin. demographicId - the Id of the Demographic
binId - the Id of the Bin AlreadyExistsException - demographicId
is not assigned to binId NotFoundException - demographicId or
binId not foundNullArgumentException - demographicId or
binId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignDemographicFromBin(Id demographicId, Id binId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Demographic from a Bin. demographicId - the Id of the Demographic
binId - the Id of the Bin NotFoundException - demographicId or
binId not found or demographicId
not assigned to binId NullArgumentException - demographicId or
binId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.