Package org.silverpeas.components.classifieds.servlets

## Class FunctionHandler

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

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

      public abstract class FunctionHandler
      extends Object

  A functio 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 String` | `ROOT_DESTINATION` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FunctionHandler()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    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 boolean` | `isAnonymousAccess​(org.silverpeas.core.web.http.HttpRequest request)` |

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

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

- - ### Field Detail

    - #### ROOT_DESTINATION

          protected static final String ROOT_DESTINATION

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### FunctionHandler

          public FunctionHandler()

  - ### Method Detail

    - #### 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:
        `request` - the user request params
        `session` - the user request context
      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.

    - #### isAnonymousAccess

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