public interface PostBusinessAssignmentSession extends OsidSession
This session provides methods to re-assign Posts to
Business objects A Post may appear in
multiple Business objects and removing the last reference
to a Post is the equivalent of deleting it. Each
Business may have its own authorizations governing who is allowed
to operate on it.
Adding a reference of a Post to another Business
is not a copy operation (eg: does not change its Id
).
| Modifier and Type | Method and Description |
|---|---|
void |
assignPostToBusiness(Id postId,
Id businessId)
Adds an existing
Post to a Business. |
boolean |
canAssignPosts()
Tests if this user can alter post/business mappings.
|
boolean |
canAssignPostToBusiness(Id businessId)
Tests if this user can alter post/business mappings.
|
IdList |
getAssignableBusinessIds(Id businessId)
Gets a list of businesses including and under the given business node
in which any post can be assigned.
|
IdList |
getAssignableBusinessIdsForPost(Id businessId,
Id postId)
Gets a list of businesses including and under the given business node
in which a specific post can be assigned.
|
void |
unassignPostFromBusiness(Id postId,
Id businessId)
Removes a
Post from a Business. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignPosts()
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false if mapping is not authorized, true
otherwisemandatory - This method must be implemented. boolean canAssignPostToBusiness(Id businessId)
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users.businessId - the Id of the Business
false if mapping is not authorized, true
otherwiseNullArgumentException - businessId is
null mandatory - This method must be implemented. IdList getAssignableBusinessIds(Id businessId) throws OperationFailedException
businessId - the Id of the Business
Ids NullArgumentException - businessId is
null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignableBusinessIdsForPost(Id businessId, Id postId) throws OperationFailedException
businessId - the Id of the Business
postId - the Id of the Post Ids NullArgumentException - businessId or
postId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignPostToBusiness(Id postId, Id businessId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Post to a Business. postId - the Id of the Post businessId - the Id of the Business
AlreadyExistsException - postId is
already assigned to businessId NotFoundException - postId or
businessId not foundNullArgumentException - postId or
businessId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignPostFromBusiness(Id postId, Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Post from a Business. postId - the Id of the Post businessId - the Id of the Business
NotFoundException - postId or
businessId not found or postId not
assigned to businessId NullArgumentException - postId or
businessId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.