|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.forum.proxy.PollManagerProxy
public class PollManagerProxy
A protection proxy for the PollManager. A proxy has a set of permissions that are specified at creation time of the proxy. Subsequently, those permissions are use to restrict access to protected methods. If a user does not have the right to execute a particular method, an UnauthorizedException is thrown.
PollManager,
Permissions,
UnauthorizedException| Constructor Summary | |
|---|---|
PollManagerProxy(PollManager manager,
AuthToken authToken,
Permissions permissions)
Creates a new PollManagerProxy object. |
|
| Method Summary | |
|---|---|
Poll |
createPoll(int objectType,
long objectID,
User user,
java.lang.String name)
Create a new Poll. |
void |
deletePoll(Poll poll)
Deletes a poll. |
int |
getActivePollCount()
Returns a count of all active polls in the system. |
int |
getActivePollCount(int objectType,
long objectID)
Returns a count of all active polls of a given type and object ID. |
java.util.Iterator |
getActivePolls()
Returns an iterator of active polls in the system. |
java.util.Iterator |
getActivePolls(int objectType,
long objectID)
Returns an iterator of active polls associated with the object specified by the objectType and objectID. |
int |
getLivePollCount()
Returns a count of all live polls in the system. |
int |
getLivePollCount(int objectType,
long objectID)
Returns a count of all live polls of a given type and object ID. |
java.util.Iterator |
getLivePolls()
Returns an iterator of live polls in the system. |
java.util.Iterator |
getLivePolls(int objectType,
long objectID)
Returns an iterator of live polls associated with the object specified by the objectType and objectID. |
Poll |
getPoll(long pollID)
Returns the Poll specified by the poll ID. |
int |
getPollCount()
Returns a count of all polls, both active and inactive. |
int |
getPollCount(int objectType,
long objectID)
Returns an count of polls, both active and inactive, associated with the object specified by the objectType and objectID. |
java.util.Iterator |
getPolls()
Returns an iterator of all polls, both active and inactive. |
java.util.Iterator |
getPolls(int objectType,
long objectID)
Returns an iterator of polls, both active and inactive, associated with the object specified by the objectType and objectID. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PollManagerProxy(PollManager manager,
AuthToken authToken,
Permissions permissions)
manager - the poll to protect by proxyauthToken - the authToken to use with this proxy| Method Detail |
|---|
public Poll createPoll(int objectType,
long objectID,
User user,
java.lang.String name)
throws UnauthorizedException
PollManagerJiveConstants class, and the objectID should be
a valid ID for the given object type.
createPoll in interface PollManagerobjectType - the object type of the object the poll is associated with.objectID - the objectID of the object the poll is associated with.user - the user creating the poll or null if is an anonymous user.name - the name of the new poll.
UnauthorizedException - if no permissions to create a poll.
public void deletePoll(Poll poll)
throws UnauthorizedException,
PollException
PollManager
deletePoll in interface PollManagerpoll - the poll to delete
UnauthorizedException - if no permissions to delete the poll.
PollExceptionpublic int getPollCount()
PollManager
getPollCount in interface PollManagerpublic java.util.Iterator getPolls()
PollManager
getPolls in interface PollManager
public int getPollCount(int objectType,
long objectID)
throws UnauthorizedException
PollManager
getPollCount in interface PollManagerobjectType - the object type of the object the poll is associated with.objectID - the objectID of the object the poll is associated with.
UnauthorizedException - if no permissions to view polls for the specified
objectType and objectID.
public java.util.Iterator getPolls(int objectType,
long objectID)
throws UnauthorizedException
PollManager
getPolls in interface PollManagerobjectType - the object type of the object the poll is associated with.objectID - the objectID of the object the poll is associated with.
UnauthorizedException - if no permissions to view polls for the specified
objectType and objectID.public java.util.Iterator getActivePolls()
PollManager
getActivePolls in interface PollManagerpublic int getActivePollCount()
PollManager
getActivePollCount in interface PollManager
public java.util.Iterator getActivePolls(int objectType,
long objectID)
throws UnauthorizedException
PollManager
getActivePolls in interface PollManagerobjectType - the object type of the object the poll is associated with.objectID - the objectID of the object the poll is associated with.
UnauthorizedException - if no permissions to view polls for the specified
objectType and objectID.
public int getActivePollCount(int objectType,
long objectID)
PollManager
getActivePollCount in interface PollManagerobjectType - the type of object we're looking at (defined in the
JiveConstants class.objectID - the ID of the object we're looking at.
public java.util.Iterator getLivePolls()
PollManager
getLivePolls in interface PollManagerpublic int getLivePollCount()
PollManager
getLivePollCount in interface PollManager
public java.util.Iterator getLivePolls(int objectType,
long objectID)
throws UnauthorizedException
PollManager
getLivePolls in interface PollManagerobjectType - the object type of the object the poll is associated with.objectID - the objectID of the object the poll is associated with.
UnauthorizedException - if no permissions to view polls for the specified
objectType and objectID.
public int getLivePollCount(int objectType,
long objectID)
PollManager
getLivePollCount in interface PollManagerobjectType - the type of object we're looking at (defined in the
JiveConstants class.objectID - the ID of the object we're looking at.
public Poll getPoll(long pollID)
throws UnauthorizedException,
NotFoundException
PollManager
getPoll in interface PollManagerpollID - the id of the poll to return.
UnauthorizedException - if no permissions to view the poll.
NotFoundException - if the poll of the given ID was not found.
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||