public interface AgencyHierarchyDesignSession extends OsidSession
This session defines methods for managing a hierarchy of Agency
objects. Each node in the hierarchy is a unique Agency.
Modifier and Type | Method and Description |
---|---|
void |
addChildAgency(Id agencyId,
Id childId)
Adds a child to an agency.
|
void |
addRootAgency(Id agencyId)
Adds a root agency.
|
boolean |
canModifyAgencyHierarchy()
Tests if this user can change the hierarchy.
|
Hierarchy |
getAgencyHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getAgencyHierarchyId()
Gets the hierarchy
Id associated with this session. |
void |
removeChildAgencies(Id agencyId)
Removes all children from an agency.
|
void |
removeChildAgency(Id agencyId,
Id childId)
Removes a child from an agency.
|
void |
removeRootAgency(Id agencyId)
Removes a root agency from this hierarchy.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getAgencyHierarchyId()
Id
associated with this session. Id
associated with this sessionmandatory
- This method must be implemented. Hierarchy getAgencyHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canModifyAgencyHierarchy()
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 addRootAgency(Id agencyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
agencyId
- the Id
of an agencyAlreadyExistsException
- agencyId
is
already in hierarchyNotFoundException
- agency
not foundNullArgumentException
- agencyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeRootAgency(Id agencyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
agencyId
- the Id
of an agencyNotFoundException
- agencyId
not a
parent of childId
NullArgumentException
- agencyId
or
childId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void addChildAgency(Id agencyId, Id childId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
agencyId
- the Id
of an agencychildId
- the Id
of the new childAlreadyExistsException
- agencyId
already a parent of childId
NotFoundException
- agencyId
or
childId
not foundNullArgumentException
- agencyId
or
childId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeChildAgency(Id agencyId, Id childId) throws NotFoundException, OperationFailedException, PermissionDeniedException
agencyId
- the Id
of an agencychildId
- the Id
of the new childNotFoundException
- agencyId is
not a
parent of childId
NullArgumentException
- agencyId
or
childId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeChildAgencies(Id agencyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
agencyId
- the Id
of an agencyNotFoundException
- agencyId
is not in
hierarchyNullArgumentException
- agencyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.