Collaboration API Documentation

com.filenet.bso.api.collaboration
Interface Poll

All Superinterfaces:
CollaborationObject, PersistentBaseObject

public interface Poll
extends CollaborationObject, PersistentBaseObject

A class that implements the Poll interface represents a poll of teamspace members. A poll comprises a question, possible responses to the question, and a closing date for the poll. When a poll is created, PollResponse objects are created for participants.

See Also:
PollResponse, PollInfo

Field Summary
static java.lang.String CLOSINGDATE_SYMNAME
          Value of "PossibleResponses"; Content Engine property.
static java.lang.String COLLABORATION_TYPE_SYMNAME
          Value of "CollaborationType"; Content Engine property.
static java.lang.String MEMBERSHIPMANAGEDSECURITY_SYMNAME
           
static java.lang.String OWNERID_SYMNAME
          Value of "SecurityOwnerID"; Content Engine property.
static int POLL_POSSIBLERESPONSES_MAXLEN
          Value of the maximum length of the poll possible responses property string (4096)
static int POLL_TEXTSUMMARY_MAXLEN
          Value of the maximum length of the poll text summary property string (2048)
static java.lang.String POLL_TEXTSUMMARY_SYMNAME
          Value of "PollQuestion"; Content Engine property.
static java.lang.String POLLCLOSED_SYMNAME
          Value of "PollClosed"; Content Engine property.
static int POLLPRIORITY_HIGH
          Value of "1"; Poll priority is HIGH.
static int POLLPRIORITY_LOW
          Value of "3"; Poll priority is LOW.
static int POLLPRIORITY_NORMAL
          Value of "2"; Poll priority is NORMAL.
static java.lang.String POLLPRIORITY_SYMNAME
          Value of "PollClosed"; Content Engine property.
static java.lang.String POSSIBLERESPONSES_SYMNAME
          Value of "PossibleResponses"; Content Engine property.
static java.lang.String[] PROPERTIES
          String array of persistent properties.
static java.lang.String RESPONSESHIDDEN_SYMNAME
          Value of "ShowPollResponses"; Content Engine property.
static java.lang.String TEAMSPACE_SYMNAME
          Value of "TeamspaceID"; Content Engine property.
 
Method Summary
 boolean areResponsesHidden()
          Returns true if the poll is configured to display responses only to the poll owner.
 void bulkUpdate(java.util.Map pollData)
          Perform a bulk update of poll properties.
 void close()
          Close the poll and reset the closing date to the current date.
 java.util.Date getClosingDate()
          Returns the date the poll is closed to further responses.
 SubjectInfo getOwner()
          Returns a SubjectInfo object for the teamspace member who created the poll.
 java.lang.String[] getPossibleResponses()
          Returns all possible responses to the poll question.
 int getPriority()
          Returns priority value for this poll, POLLPRIORITY_HIGH, POLLPRIORITY_NORMAL or POLLPRIORITY_LOW.
 java.lang.String getQuestion()
          Returns the poll question.
 PollResponse getResponse(java.lang.String memberID)
          Returns the PollResponse object for the given member.
 java.util.Iterator getResponses()
          Returns an iterator over the PollResponse objects associated with this poll.
 java.lang.String getResponsesXML(java.lang.String[] propertyNames, OrderBy[] sortOrder)
          Returns an XML representation of the responses for this poll.
 Teamspace getTeamspace()
          Returns the target Teamspace object.
 boolean isClosed()
          Return true if the poll is closed.
 void respond(java.lang.String memberID, java.lang.Integer responseIndex, java.lang.String comments)
          Respond to the poll question.
 void updateClosingDate(java.util.Date closingDate)
          Update the closing date for a poll.
 void updateParticipants(java.lang.String[] addParticipantsIDs, java.lang.String[] removeParticipantsIDs)
          Adds and/or removes participants from a poll, which results in the addition and/or deletion of PollResponse objects.
 
Methods inherited from interface com.filenet.bso.api.collaboration.CollaborationObject
getSymbolicName, getType
 
Methods inherited from interface com.filenet.bso.api.collaboration.PersistentBaseObject
getBaseObject, getID, getObjectStore, getProperties, isMembershipManagedSecurity, isOwner, refresh, setProperties
 

Field Detail

TEAMSPACE_SYMNAME

public static final java.lang.String TEAMSPACE_SYMNAME
Value of "TeamspaceID"; Content Engine property.

POLL_TEXTSUMMARY_SYMNAME

public static final java.lang.String POLL_TEXTSUMMARY_SYMNAME
Value of "PollQuestion"; Content Engine property.

POLL_TEXTSUMMARY_MAXLEN

public static final int POLL_TEXTSUMMARY_MAXLEN
Value of the maximum length of the poll text summary property string (2048)

POLL_POSSIBLERESPONSES_MAXLEN

public static final int POLL_POSSIBLERESPONSES_MAXLEN
Value of the maximum length of the poll possible responses property string (4096)

POSSIBLERESPONSES_SYMNAME

public static final java.lang.String POSSIBLERESPONSES_SYMNAME
Value of "PossibleResponses"; Content Engine property.

CLOSINGDATE_SYMNAME

public static final java.lang.String CLOSINGDATE_SYMNAME
Value of "PossibleResponses"; Content Engine property.

POLLCLOSED_SYMNAME

public static final java.lang.String POLLCLOSED_SYMNAME
Value of "PollClosed"; Content Engine property.

POLLPRIORITY_SYMNAME

public static final java.lang.String POLLPRIORITY_SYMNAME
Value of "PollClosed"; Content Engine property.

RESPONSESHIDDEN_SYMNAME

public static final java.lang.String RESPONSESHIDDEN_SYMNAME
Value of "ShowPollResponses"; Content Engine property.

MEMBERSHIPMANAGEDSECURITY_SYMNAME

public static final java.lang.String MEMBERSHIPMANAGEDSECURITY_SYMNAME

OWNERID_SYMNAME

public static final java.lang.String OWNERID_SYMNAME
Value of "SecurityOwnerID"; Content Engine property.

COLLABORATION_TYPE_SYMNAME

public static final java.lang.String COLLABORATION_TYPE_SYMNAME
Value of "CollaborationType"; Content Engine property.

POLLPRIORITY_HIGH

public static final int POLLPRIORITY_HIGH
Value of "1"; Poll priority is HIGH.

POLLPRIORITY_NORMAL

public static final int POLLPRIORITY_NORMAL
Value of "2"; Poll priority is NORMAL.

POLLPRIORITY_LOW

public static final int POLLPRIORITY_LOW
Value of "3"; Poll priority is LOW.

PROPERTIES

public static final java.lang.String[] PROPERTIES
String array of persistent properties.
Method Detail

close

public void close()
           throws PollClosedException,
                  NonTeamspaceMemberException
Close the poll and reset the closing date to the current date.

Throws:
NonTeamspaceMemberException - if the update is attempted by a non-teamspace member.

getTeamspace

public Teamspace getTeamspace()
Returns the target Teamspace object.

Returns:
A Teamspace object.

getOwner

public SubjectInfo getOwner()
Returns a SubjectInfo object for the teamspace member who created the poll.

Returns:
A SubjectInfo object containing information about the poll creator.

getClosingDate

public java.util.Date getClosingDate()
Returns the date the poll is closed to further responses.

Returns:
A Date value representing the poll closing date.

getQuestion

public java.lang.String getQuestion()
Returns the poll question.

Returns:
A String representing the poll question.

getPriority

public int getPriority()
Returns priority value for this poll, POLLPRIORITY_HIGH, POLLPRIORITY_NORMAL or POLLPRIORITY_LOW.

Returns:
An integer representing the poll priority (1=high, 2=normal, 3=low).

getPossibleResponses

public java.lang.String[] getPossibleResponses()
Returns all possible responses to the poll question.

Returns:
An array of String objects containing the possible responses to the poll.

getResponses

public java.util.Iterator getResponses()
Returns an iterator over the PollResponse objects associated with this poll.

Returns:
An Iterator of the collection of poll response objects.

getResponse

public PollResponse getResponse(java.lang.String memberID)
Returns the PollResponse object for the given member.

Returns:
A PollResponse for the given member, may return null if the member is not a participant of the poll.

areResponsesHidden

public boolean areResponsesHidden()
Returns true if the poll is configured to display responses only to the poll owner.

Returns:
A boolean value that specifies whether poll responses are displayed to all users or only to the poll owner.

getResponsesXML

public java.lang.String getResponsesXML(java.lang.String[] propertyNames,
                                        OrderBy[] sortOrder)
Returns an XML representation of the responses for this poll.

Parameters:
propertyNames - A String array containing the property names to include in the XML.

sortOrder - An OrderBy array that contains the property name and sort order (ASCENDING_SORT or DESCENDING_SORT) for each property value selected to sort on. Optional; may be null.

Returns:
An XML String representing poll responses.

isClosed

public boolean isClosed()
Return true if the poll is closed.

respond

public void respond(java.lang.String memberID,
                    java.lang.Integer responseIndex,
                    java.lang.String comments)
             throws PollClosedException,
                    NonTeamspaceMemberException
Respond to the poll question.

Parameters:
memberID - The ID of the responding member.

responseIndex - An integer representing the user response, indexed to an array of possible responses.

comments - Member comments. May be null.

Throws:
PollClosedException - if the poll is closed and updates are not allowed.
NonTeamspaceMemberException - if the update is attempted by a non-teamspace member.

updateClosingDate

public void updateClosingDate(java.util.Date closingDate)
                       throws PollClosedException,
                              NonTeamspaceMemberException,
                              ValidationException
Update the closing date for a poll.

Parameters:
closingDate - Date on which to close the poll.

Throws:
PollClosedException - if the poll is already closed and updates are not allowed.
NonTeamspaceMemberException - if the update is attempted by a non-teamspace member.

updateParticipants

public void updateParticipants(java.lang.String[] addParticipantsIDs,
                               java.lang.String[] removeParticipantsIDs)
                        throws PollClosedException,
                               NonTeamspaceMemberException,
                               NonExistentMemberException,
                               DuplicateMemberException
Adds and/or removes participants from a poll, which results in the addition and/or deletion of PollResponse objects.

Parameters:
addParticipantsIDs - An array of member IDs to add to the poll.

removeParticipantsIDs - An array of member IDs to remove from the poll.

Throws:
PollClosedException - if the poll is closed and updates are not allowed.
NonTeamspaceMemberException - if an update is attempted by non-teamspace member.
NonExistentMemberException - on an attempt to remove a member who is not a participant in the poll.
DuplicateMemberException - if attempting to an ID for a member who is already a participant in the poll.

bulkUpdate

public void bulkUpdate(java.util.Map pollData)
                throws PollClosedException,
                       NonTeamspaceMemberException,
                       InvalidTargetDateException,
                       ValidationException
Perform a bulk update of poll properties. The Map parameter contains the new property values keyed by property name. Task properties that may be updated by this method include (by property name, type):

CLOSINGDATE_SYMNAME (String)

POLLPRIORITY_SYMNAME (int)

SHOWPOLLRESPONSES_SYMNAME (Boolean)

Parameters:
pollData - Map containing poll property data.

Throws:
PollClosedException - if the poll is closed and updates are not allowed.
NonTeamspaceMemberException - if an update is attempted by a non-teamspace member.
InvalidTargetDateException - if the poll closing date is equal to or earlier than current date and time.

Collaboration API Documentation

Copyright © 2002 - 2004 FileNet Corporation. All rights reserved.