Interface DepotHierarchyDesignSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for managing a hierarchy of
Depots. Each node in the hierarchy is a unique Depot.
Like all OsidSessions, DepotHierarchyDesignSessions
are dedicated to single processing threads and a single authenticated
user.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddChildDepot(Id depotId, Id childId) Adds a child to a depot.voidaddRootDepot(Id depotId) Adds a root depot.booleanTests if this user can change the hierarchy.Gets the hierarchy associated with this session.Gets the hierarchyIdassociated with this session.voidremoveChildDepot(Id depotId, Id childId) Removes a child from a depot.voidremoveChildDepots(Id depotId) Removes all children from a depot.voidremoveRootDepot(Id depotId) Removes a root depot.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatTypes, getLocales, isAuthenticated, startTransaction, supportsTransactions
-
Method Details
-
getDepotHierarchyId
Id getDepotHierarchyId()Gets the hierarchyIdassociated with this session.- Returns:
- the hierarchy
Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getDepotHierarchy
Gets the hierarchy associated with this session.- Returns:
- the hierarchy associated with this session
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canModifyDepotHierarchy
boolean canModifyDepotHierarchy()Tests if this user can change the hierarchy. A return of true does not guarantee successful authorization. A return of false indicates that it is known performing any update will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer these operations to an unauthorized user.- Returns:
falseif changing this hierarchy is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
addRootDepot
void addRootDepot(Id depotId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds a root depot.- Parameters:
depotId- theIdof a depot- Throws:
AlreadyExistsException-depotIdis already in hierarchyNotFoundException-depotIdnot foundNullArgumentException-depotIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeRootDepot
void removeRootDepot(Id depotId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes a root depot.- Parameters:
depotId- theIdof a depot- Throws:
NotFoundException-depotIdis not a rootNullArgumentException-depotIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
addChildDepot
void addChildDepot(Id depotId, Id childId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds a child to a depot.- Parameters:
depotId- theIdof a depotchildId- theIdof the new child- Throws:
AlreadyExistsException-depotIdis already a parent ofchildIdNotFoundException-depotIdorchildIdnot foundNullArgumentException-depotIdorchildIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeChildDepot
void removeChildDepot(Id depotId, Id childId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes a child from a depot.- Parameters:
depotId- theIdof a depotchildId- theIdof the new child- Throws:
NotFoundException-depotIdnot a parent ofchildIdNullArgumentException-depotIdorchildIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeChildDepots
void removeChildDepots(Id depotId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes all children from a depot.- Parameters:
depotId- theIdof a depot- Throws:
NotFoundException-depotIdnot foundNullArgumentException-depotIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-