public abstract class AbstractPreviewLinkServlet
extends javax.servlet.http.HttpServlet
Link service for Workbench Preview functionality. This service constructs a link to the page that is being previewed; it is also used for auditing content items.
This is the input to the service, as specified by request parameters:
ServletRequest.getParameter(String)
is single encoded.ServletRequest.getParameter(String) is single
encoded.__contentUri=%2Fpages%2Fbrowse%2525&__link=N%3D101012&__jsonp=Ext.data.JsonP.callback3&_dc=1338310267465.
| Constructor and Description |
|---|
AbstractPreviewLinkServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Creates and returns a link to the page specified using request
parameters.
|
protected abstract ContentSource |
getContentSource()
A method to retrieve a
ContentSource to use for
creating links. |
protected abstract NavigationStateBuilder |
getNavigationStateBuilder()
A method to retrieve a
NavigationStateBuilder to use for
creating links. |
protected String |
getSiteIdParamForAction(NavigationAction action)
Returns the site id parameter and parameter value to append to the preview URL.
|
protected abstract SiteManager |
getSiteManager()
A method to retrieve a
SiteManager to use for
creating links. |
protected String |
getUrlForAction(NavigationAction action)
Constructs and returns a URL representing the given
NavigationAction. |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, serviceprotected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
AbstractPreviewLinkServlet.doGet in class javax.servlet.http.HttpServletrequest - The request the client has made of the servletresponse - The response the servlet sends to the clientIOException - If an input or output error is detected when
the servlet handles the GET requestjavax.servlet.ServletException - If the GET request could not be handledprotected abstract NavigationStateBuilder getNavigationStateBuilder()
NavigationStateBuilder to use for
creating links. Subclasses must override this method to provide a
specific means of acquiring the state builder.protected abstract ContentSource getContentSource()
ContentSource to use for
creating links. Subclasses must override this method to provide a
specific means of acquiring the content source.protected abstract SiteManager getSiteManager()
SiteManager to use for
creating links. Subclasses must override this method to provide a
specific means of acquiring the site manager.protected String getUrlForAction(NavigationAction action) throws javax.servlet.ServletException
NavigationAction.
The default implementation simply concatenates
Action.getContentPath()
and NavigationAction.getNavigationState()
and appends a 'siteId' parameter with the site of the page we are previewing
Applications with more complicated ways of constructing URLs can extend
this method to provide their own implementation.action - The input actionjavax.servlet.ServletExceptionprotected String getSiteIdParamForAction(NavigationAction action) throws javax.servlet.ServletException
action - The input actionjavax.servlet.ServletExceptionCopyright © 2014, Oracle and/or its affiliates. All rights reserved.