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