public interface ActivityBusinessAssignmentSession extends OsidSession
This session provides methods to re-assign Activities
to
Business
objects An Activity
may appear in
multiple Business
objects and removing the last reference
to an Activity
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 an Activity
to another
Business
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignActivityToBusiness(Id activityId,
Id businessId)
Adds an existing
Activity to a Business. |
boolean |
canAssignActivities()
Tests if this user can alter activity/business mappings.
|
boolean |
canAssignActivitiesToBusiness(Id businessId)
Tests if this user can alter activity/business mappings.
|
IdList |
getAssignableBusinessIds(Id businessId)
Gets a list of businesses including and under the given business node
in which any activity can be assigned.
|
IdList |
getAssignableBusinessIdsForActivity(Id businessId,
Id activityId)
Gets a list of businesses including and under the given business node
in which a specific activity can be assigned.
|
void |
unassignActivityFromBusiness(Id activityId,
Id businessId)
Removes an
Activity from a Business. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignActivities()
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 canAssignActivitiesToBusiness(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 getAssignableBusinessIdsForActivity(Id businessId, Id activityId) throws OperationFailedException
businessId
- the Id
of the Business
activityId
- the Id
of the Activity
Ids
NullArgumentException
- businessId
or
activityId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignActivityToBusiness(Id activityId, Id businessId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Activity
to a Business.
activityId
- the Id
of the Activity
businessId
- the Id
of the Business
AlreadyExistsException
- activityId
is
already assigned to businessId
NotFoundException
- activityId
or
businessId
not foundNullArgumentException
- activityId
or
businessId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignActivityFromBusiness(Id activityId, Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Activity
from a Business.
activityId
- the Id
of the Activity
businessId
- the Id
of the Business
NotFoundException
- activityId
or
businessId
not found or activityId
not
assigned to businessId
NullArgumentException
- activityId
or
businessId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.