Package org.silverpeas.components.classifieds.servlets

# Class FunctionHandler

java.lang.Object
org.silverpeas.components.classifieds.servlets.FunctionHandler

Direct Known Subclasses:
  `ClassifiedCreationFormHandler`, `ClassifiedCreationHandler`, `ClassifiedDeleteHandler`, `ClassifiedOwnerNotificationHandler`, `ClassifiedUpdateFormHandler`, `ClassifiedUpdateHandler`, `ClassifiedValidationHandler`, `DefaultHandler`, `DraftInHandler`, `DraftOutHandler`, `ListToValidateHandler`, `MyClassifiedsHandler`, `NextHandler`, `PaginationHandler`, `PreviousHandler`, `SearchHandler`, `SearchResultsHandler`, `SubscriptionCreateFormHandler`, `SubscriptionCreateHandler`, `SubscriptionDeleteHandler`, `SubscriptionListHandler`, `ViewClassifiedHandler`

public abstract class FunctionHandler extends Object
A function handler is associated to a peas function and is called by the request router when this function has to be processed.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final String`
  `ROOT_DESTINATION`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FunctionHandler()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `computeDestination(ClassifiedsSessionController session, org.silverpeas.core.web.http.HttpRequest request)`
  `abstract String`
  `getDestination(ClassifiedsSessionController session, org.silverpeas.core.web.http.HttpRequest request)`
  Process the request and returns the response url.
  `protected org.silverpeas.core.contribution.template.publication.PublicationTemplate`
  `getPublicationTemplate(ClassifiedsSessionController classifiedsSC)`
  Gets the template of the publication based on the classified XML form.
  `protected List<SubscriptionField>`
  `getSubscriptionFields(org.silverpeas.core.contribution.template.publication.PublicationTemplate template, String language)`
  `protected boolean`
  `isAnonymousAccess(org.silverpeas.core.web.http.HttpRequest request)`
  `protected static void`
  `setDataRecord(ClassifiedsSessionController classifiedsSC, org.silverpeas.core.contribution.template.publication.PublicationTemplate pubTemplate, String classifiedId, List<org.silverpeas.core.util.file.FileItem> items)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### ROOT_DESTINATION

    protected static final String ROOT_DESTINATION
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### FunctionHandler

    public FunctionHandler()

- ## Method Details

  - ### computeDestination

    public String computeDestination(ClassifiedsSessionController session, org.silverpeas.core.web.http.HttpRequest request)

  - ### getDestination

    public abstract String getDestination(ClassifiedsSessionController session, org.silverpeas.core.web.http.HttpRequest request) throws Exception
    Process the request and returns the response url.
    Parameters:
      `session` - the user request context
      `request` - the user request params
    Throws:
      `Exception`

  - ### getPublicationTemplate

    protected org.silverpeas.core.contribution.template.publication.PublicationTemplate getPublicationTemplate(ClassifiedsSessionController classifiedsSC) throws org.silverpeas.core.contribution.template.publication.PublicationTemplateException
    Gets the template of the publication based on the classified XML form.
    Parameters:
      `classifiedsSC` - the session controller.
    Returns:
      the publication template for classifieds.
    Throws:
      `org.silverpeas.core.contribution.template.publication.PublicationTemplateException` - if an error occurs while getting the publication template.

  - ### getSubscriptionFields

    protected List<SubscriptionField> getSubscriptionFields(org.silverpeas.core.contribution.template.publication.PublicationTemplate template, String language) throws org.silverpeas.core.contribution.template.publication.PublicationTemplateException, org.silverpeas.core.contribution.content.form.FormException
    Throws:
      `org.silverpeas.core.contribution.template.publication.PublicationTemplateException`
      `org.silverpeas.core.contribution.content.form.FormException`

  - ### setDataRecord

    protected static void setDataRecord(ClassifiedsSessionController classifiedsSC, org.silverpeas.core.contribution.template.publication.PublicationTemplate pubTemplate, String classifiedId, List<org.silverpeas.core.util.file.FileItem> items) throws org.silverpeas.core.contribution.template.publication.PublicationTemplateException, org.silverpeas.core.contribution.content.form.FormException
    Throws:
      `org.silverpeas.core.contribution.template.publication.PublicationTemplateException`
      `org.silverpeas.core.contribution.content.form.FormException`

  - ### isAnonymousAccess

    protected boolean isAnonymousAccess(org.silverpeas.core.web.http.HttpRequest request)