restgroupsServer
Class GroupMembershipResource

java.lang.Object
  extended by org.restlet.resource.UniformResource
      extended by org.restlet.resource.ServerResource
          extended by restgroupsServer.BaseResource
              extended by restgroupsServer.GroupMembershipResource

public class GroupMembershipResource
extends BaseResource

This class handles operations executed on the "/groups/{groupName}/members/{privateGroupName}" resource. Using methods PUT or DELETE the client, whose private group name is {privateGroupName}, can join or leave the {groupName} group.

Author:
tkob

Field Summary
 
Fields inherited from class restgroupsServer.BaseResource
mySession
 
Constructor Summary
GroupMembershipResource()
           
 
Method Summary
 void joinGroup(org.restlet.representation.Representation entity)
          Calling this PUT method allows user to join, specified in {groupName} part of the URI, group.
 void leaveGroup(org.restlet.representation.Representation entity)
          Calling this DELETE method allows user to leave, specified in {groupName} part of the URI, group.
 
Methods inherited from class restgroupsServer.BaseResource
doInit, getFactory, getProfileEntities, getProfileEntitiesThreadIDs, getProfilesPilotEntities, getRequestSessionId, printProfileEntities, printProfilesPilotEntities, setResponseSessionId
 
Methods inherited from class org.restlet.resource.ServerResource
delete, delete, describeVariants, doConditionalHandle, doHandle, doHandle, doNegotiatedHandle, get, get, getConverterService, getInfo, getInfo, getMetadataService, getPreferredVariant, getVariants, handle, head, head, isAnnotated, isConditional, isExisting, isInRole, isNegotiated, options, options, post, post, put, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setChallengeRequests, setConditional, setCookieSettings, setDimensions, setExisting, setLocationRef, setLocationRef, setNegotiated, setServerInfo, setStatus, setStatus, setStatus, setStatus, updateAllowedMethods, updateDimensions
 
Methods inherited from class org.restlet.resource.UniformResource
doCatch, doRelease, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getContext, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMethod, getOriginalRef, getProtocol, getQuery, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestEntity, getResponse, getResponseAttributes, getResponseEntity, getRootRef, getServerInfo, getStatus, init, isConfidential, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupMembershipResource

public GroupMembershipResource()
Method Detail

joinGroup

@Put
public void joinGroup(org.restlet.representation.Representation entity)
Calling this PUT method allows user to join, specified in {groupName} part of the URI, group. To do this the client has to be already registered in the RestGroups, otherwise "noActiveSession" error will be returned.

Parameters:
entity - input representation, unused

leaveGroup

@Delete
public void leaveGroup(org.restlet.representation.Representation entity)
Calling this DELETE method allows user to leave, specified in {groupName} part of the URI, group. To do this the client has to be already registered in the RestGroups, otherwise "noActiveSession" error is returned. If the client is not a member of specified group "invalidRequestBody" error is returned.

Parameters:
entity - input representation, unused