com.day.cq.wcm.newsletter.impl
Class SendNewsletterCommandServlet

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.commons.servlets.AbstractPredicateServlet
                  extended by com.day.cq.commons.servlets.AbstractCommandServlet
                      extended by com.day.cq.wcm.newsletter.impl.SendNewsletterCommandServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class SendNewsletterCommandServlet
extends AbstractCommandServlet

Sends a newsletter using the NewsletterService

See Also:
Serialized Form

Field Summary
static String NEWSLETTER_PAGE_EXTENSION
           
static String RP_STATUS
          Status param
static String STATUS_VALUE_BROWSER
          Browser status specifier
static String SUBJECT_PARAM
           
 
Fields inherited from class com.day.cq.commons.servlets.AbstractCommandServlet
ACTION_PARAM, PATH_PARAM
 
Fields inherited from class com.day.cq.commons.servlets.AbstractPredicateServlet
FILTER_PARAM, PREDICATE_PARAM
 
Constructor Summary
SendNewsletterCommandServlet()
           
 
Method Summary
protected  void activate(org.osgi.service.component.ComponentContext componentContext)
           
protected  String getPageUrl(org.apache.sling.api.SlingHttpServletRequest request, String contentPath)
          Build URL that must be used to retrieve page, given a content path
protected  boolean hasCommand(org.apache.sling.api.SlingHttpServletRequest request)
          Checks if the command in the request is supported.
protected  void performCommand(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)
          Perform the command of the current request.
 
Methods inherited from class com.day.cq.commons.servlets.AbstractCommandServlet
doPost, requireParameter
 
Methods inherited from class com.day.cq.commons.servlets.AbstractPredicateServlet
doGet, doGet, getPredicate, selectorPredicateStart
 
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
 

Field Detail

RP_STATUS

public static final String RP_STATUS
Status param

See Also:
Constant Field Values

STATUS_VALUE_BROWSER

public static final String STATUS_VALUE_BROWSER
Browser status specifier

See Also:
Constant Field Values

SUBJECT_PARAM

public static final String SUBJECT_PARAM
See Also:
Constant Field Values

NEWSLETTER_PAGE_EXTENSION

public static final String NEWSLETTER_PAGE_EXTENSION
See Also:
Constant Field Values
Constructor Detail

SendNewsletterCommandServlet

public SendNewsletterCommandServlet()
Method Detail

hasCommand

protected boolean hasCommand(org.apache.sling.api.SlingHttpServletRequest request)
                      throws javax.servlet.ServletException
Description copied from class: AbstractCommandServlet
Checks if the command in the request is supported. Returns false by default.

Overrides:
hasCommand in class AbstractCommandServlet
Parameters:
request - servlet request
Returns:
true if the command is supported.
Throws:
javax.servlet.ServletException - if a servlet error occurs

performCommand

protected void performCommand(org.apache.sling.api.SlingHttpServletRequest request,
                              org.apache.sling.api.SlingHttpServletResponse response)
                       throws javax.servlet.ServletException,
                              IOException
Description copied from class: AbstractCommandServlet
Perform the command of the current request. This method is invoked if AbstractCommandServlet.hasCommand(SlingHttpServletRequest) returns true for a POST request.

Specified by:
performCommand in class AbstractCommandServlet
Parameters:
request - servlet request
response - servlet response
Throws:
javax.servlet.ServletException - if an error occurs.
IOException - if an I/O error occurs.

getPageUrl

protected String getPageUrl(org.apache.sling.api.SlingHttpServletRequest request,
                            String contentPath)
Build URL that must be used to retrieve page, given a content path


activate

protected void activate(org.osgi.service.component.ComponentContext componentContext)
                 throws Exception
Throws:
Exception


Copyright © 2008 Day Management AG. All Rights Reserved.