Interface PollsHierarchyDesignSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for managing a hierarchy of Polls
objects. Each node in the hierarchy is a unique Polls.
Like all OsidSessions, PollsHierarchyDesignSessions
are dedicated to single processing threads and a single authenticated
user.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddChildPolls(Id pollsId, Id childId) Adds a child to a polls.voidaddRootPolls(Id pollsId) Adds a root polls.booleanTests if this user can change the hierarchy.Gets the hierarchy associated with this session.Gets the hierarchyIdassociated with this session.voidremoveChildPolls(Id pollsId) Removes all children from a polls.voidremoveChildPolls(Id pollsId, Id childId) Removes a child from a polls.voidremoveRootPolls(Id pollsId) Removes a root polls.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatTypes, getLocales, isAuthenticated, startTransaction, supportsTransactions
-
Method Details
-
getPollsHierarchyId
Id getPollsHierarchyId()Gets the hierarchyIdassociated with this session.- Returns:
- the hierarchy
Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getPollsHierarchy
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.
-
canModifyPollsHierarchy
boolean canModifyPollsHierarchy()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.
-
addRootPolls
void addRootPolls(Id pollsId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds a root polls.- Parameters:
pollsId- theIdof a polls- Throws:
AlreadyExistsException-pollsIdis already in hierarchyNotFoundException-pollsIdnot foundNullArgumentException-pollsIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeRootPolls
void removeRootPolls(Id pollsId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes a root polls.- Parameters:
pollsId- theIdof a polls- Throws:
NotFoundException-pollsIdnot a rootNullArgumentException-pollsIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
addChildPolls
void addChildPolls(Id pollsId, Id childId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds a child to a polls.- Parameters:
pollsId- theIdof a pollschildId- theIdof the new child- Throws:
AlreadyExistsException-pollsIdis already a parent ofchildIdNotFoundException-pollsIdorchildIdnot foundNullArgumentException-pollsIdorchildIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeChildPolls
void removeChildPolls(Id pollsId, Id childId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes a child from a polls.- Parameters:
pollsId- theIdof a pollschildId- theIdof the new child- Throws:
NotFoundException-pollsIdnot a parent ofchildIdNullArgumentException-pollsIdorchildIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeChildPolls
void removeChildPolls(Id pollsId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes all children from a polls.- Parameters:
pollsId- theIdof a polls- Throws:
NotFoundException-pollsIdnot in hierarchyNullArgumentException-pollsIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-