com.day.cq.opensocial.gadgets.servlet
Class CQUserPreferenceServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by org.apache.sling.api.servlets.SlingSafeMethodsServlet
          extended by org.apache.sling.api.servlets.SlingAllMethodsServlet
              extended by com.day.cq.opensocial.gadgets.servlet.CQUserPreferenceServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

@Service(serviceFactory=true,
         value=javax.servlet.Servlet.class)
@Properties(value={@Property(name="service.description",value="CQ OpenSocial User Preference Servlet"),@Property(name="sling.servlet.selectors",value="userprefs"),@Property(name="sling.servlet.extensions",value="json"),@Property(name="sling.servlet.resourceTypes",value="sling/servlet/default"),@Property(name="sling.servlet.methods",value={"GET","POST"})})
public class CQUserPreferenceServlet
extends SlingAllMethodsServlet

The CQUserPreferenceServlet stores and reads user profile specific gadget configuration(s).

Resolves the configuration Node and forwards the request to the Default JSON Renderer

See Also:
Serialized Form

Constructor Summary
CQUserPreferenceServlet()
           
 
Method Summary
protected  void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)
          Get user preferences from $HOME/personalization/gadgets/node-identifier if exist
protected  void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response)
          Post user preferences to $HOME/personalization/gadgets/node-identifier
 
Methods inherited from class org.apache.sling.api.servlets.SlingAllMethodsServlet
doDelete, doPut, getAllowedRequestMethods, isMethodValid, mayService
 
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
doGeneric, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CQUserPreferenceServlet

public CQUserPreferenceServlet()
Method Detail

doGet

protected void doGet(SlingHttpServletRequest request,
                     SlingHttpServletResponse response)
              throws ServletException,
                     IOException
Get user preferences from $HOME/personalization/gadgets/node-identifier if exist

Overrides:
doGet in class SlingSafeMethodsServlet
Parameters:
request - The HTTP request
response - The HTTP response
Throws:
ServletException - Not thrown by this implementation.
IOException - If the error status cannot be reported back to the client.

doPost

protected void doPost(SlingHttpServletRequest request,
                      SlingHttpServletResponse response)
               throws ServletException,
                      IOException
Post user preferences to $HOME/personalization/gadgets/node-identifier

Overrides:
doPost in class SlingAllMethodsServlet
Parameters:
request - The HTTP request
response - The HTTP response
Throws:
ServletException - Not thrown by this implementation.
IOException - If the error status cannot be reported back to the client.


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.