Interface CookbookHierarchyDesignSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session manages a hierarchy of cookbooks. Cookbooks may be
organized into a hierarchy for organizing or federating. A parent
Cookbook includes all of the procedures of its children such that a
single root node contains all of the procedures of the federation.
Like all OsidSessions, CookbookHierarchyDesignSessions
are dedicated to single processing threads and a single authenticated
user.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddChildCookbook(Id cookbookId, Id childId) Adds a child to a cookbook.voidaddRootCookbook(Id cookbookId) Adds a root cookbook.booleanTests if this user can change the hierarchy.Gets the hierarchy associated with this session.Gets the hierarchyIdassociated with this session.voidremoveChildCookbook(Id cookbookId, Id childId) Removes a child from a cookbook.voidremoveChildCookbooks(Id cookbookId) Removes all children from a cookbook.voidremoveRootCookbook(Id cookbookId) Removes a root cookbook.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatTypes, getLocales, isAuthenticated, startTransaction, supportsTransactions
-
Method Details
-
getCookbookHierarchyId
Id getCookbookHierarchyId()Gets the hierarchyIdassociated with this session.- Returns:
- the hierarchy
Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCookbookHierarchy
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.
-
canModifyCookbookHierarchy
boolean canModifyCookbookHierarchy()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.
-
addRootCookbook
void addRootCookbook(Id cookbookId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds a root cookbook.- Parameters:
cookbookId- theIdof a cookbook- Throws:
AlreadyExistsException-cookbookIdis already in hierarchyNotFoundException-cookbookIdis not foundNullArgumentException-cookbookIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeRootCookbook
void removeRootCookbook(Id cookbookId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes a root cookbook.- Parameters:
cookbookId- theIdof a cookbook- Throws:
NotFoundException-cookbookIdis not a rootNullArgumentException-cookbookIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
addChildCookbook
void addChildCookbook(Id cookbookId, Id childId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds a child to a cookbook.- Parameters:
cookbookId- theIdof a cookbookchildId- theIdof the new child- Throws:
AlreadyExistsException-cookbookIdis already a parent ofchildIdNotFoundException-cookbookIdorchildIdnot foundNullArgumentException-cookbookIdorchildIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeChildCookbook
void removeChildCookbook(Id cookbookId, Id childId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes a child from a cookbook.- Parameters:
cookbookId- theIdof a cookbookchildId- theIdof the new child- Throws:
NotFoundException-cookbookIdnot a parent ofchildIdNullArgumentException-cookbookIdorchildIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeChildCookbooks
void removeChildCookbooks(Id cookbookId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes all children from a cookbook.- Parameters:
cookbookId- theIdof a cookbook- Throws:
NotFoundException-cookbookIdnot foundNullArgumentException-cookbookIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-