public interface AccountHierarchyDesignSession extends OsidSession
This session defines methods for managing a hierarchy of Account
objects. Each node in the hierarchy is a unique Account.
Modifier and Type | Method and Description |
---|---|
void |
addChildAccount(Id accountId,
Id childId)
Adds a child to an account.
|
void |
addRootAccount(Id accountId)
Adds a root account.
|
boolean |
canModifyAccountHierarchy()
Tests if this user can change the hierarchy.
|
Hierarchy |
getAccountHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getAccountHierarchyId()
Gets the hierarchy
Id associated with this session. |
void |
removeChildAccount(Id accountId,
Id childId)
Removes a child from an account.
|
void |
removeChildAccounts(Id accountId)
Removes all children from an account.
|
void |
removeRootAccount(Id accountId)
Removes a root account.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getAccountHierarchyId()
Id
associated with this session. Id
associated with this sessionmandatory
- This method must be implemented. Hierarchy getAccountHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canModifyAccountHierarchy()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer these operations to an
unauthorized user. false
if changing this hierarchy is not
authorized, true
otherwisemandatory
- This method must be implemented. void addRootAccount(Id accountId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
accountId
- the Id
of an accountAlreadyExistsException
- accountId
is
already in hierarchyNotFoundException
- accountId
not foundNullArgumentException
- accountId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeRootAccount(Id accountId) throws NotFoundException, OperationFailedException, PermissionDeniedException
accountId
- the Id
of an accountNotFoundException
- accountId
not foundNullArgumentException
- accountId
is
null
OperationFailedException
- the root accountsPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void addChildAccount(Id accountId, Id childId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
accountId
- the Id
of an accountchildId
- the Id
of the new childAlreadyExistsException
- accountId
is
already a parent of childId
NotFoundException
- accountId
or
childId
not foundNullArgumentException
- accountId
or
childId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeChildAccount(Id accountId, Id childId) throws NotFoundException, OperationFailedException, PermissionDeniedException
accountId
- the Id
of an accountchildId
- the Id
of the new childNotFoundException
- accountId
not a
parent of childId
NullArgumentException
- accountId
or
childId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeChildAccounts(Id accountId) throws NotFoundException, OperationFailedException, PermissionDeniedException
accountId
- the Id
of an accountNotFoundException
- accountId
not foundNullArgumentException
- accountId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.