org.exoplatform.poll.service.ws
Class PollWebservice

java.lang.Object
  extended by org.exoplatform.poll.service.ws.PollWebservice
All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer

public class PollWebservice
extends Object
implements org.exoplatform.services.rest.resource.ResourceContainer

Url template: {rest_context_name}/ks/poll
GET: /{rest_context_name}/ks/poll/viewpoll/{resourceid}


Field Summary
static String APP_TYPE
           
 
Constructor Summary
PollWebservice()
           
 
Method Summary
 javax.ws.rs.core.Response viewPoll(String pollId, javax.ws.rs.core.SecurityContext sc, javax.ws.rs.core.UriInfo uriInfo)
          Views poll by id.
 javax.ws.rs.core.Response votePoll(String pollId, String indexVote, javax.ws.rs.core.SecurityContext sc, javax.ws.rs.core.UriInfo uriInfo)
          Votes poll by id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APP_TYPE

public static final String APP_TYPE
Constructor Detail

PollWebservice

public PollWebservice()
Method Detail

viewPoll

public javax.ws.rs.core.Response viewPoll(String pollId,
                                          @Context
                                          javax.ws.rs.core.SecurityContext sc,
                                          @Context
                                          javax.ws.rs.core.UriInfo uriInfo)
                                   throws Exception
Views poll by id.

Parameters:
pollId - id of poll to view.
sc - security context.
uriInfo - The request information
Returns:
the response is json-data
Throws:
Exception

votePoll

public javax.ws.rs.core.Response votePoll(String pollId,
                                          String indexVote,
                                          @Context
                                          javax.ws.rs.core.SecurityContext sc,
                                          @Context
                                          javax.ws.rs.core.UriInfo uriInfo)
                                   throws Exception
Votes poll by id.

Parameters:
pollId - id of poll to view.
indexVote -
sc - security context.
uriInfo - The request information
Returns:
the response is json-data
Throws:
Exception


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.