public class GeneratePageAction extends ServiceableAction implements ThreadSafe
| Modifier and Type | Field and Description | 
|---|---|
(package private) static String | 
__BACKOFFICE_JSESSION_ID  | 
private static Pattern | 
__COOKIE_PATH_PATTERN  | 
private CacheAccessManager | 
_cacheAccess  | 
private CacheAccessCounter | 
_cacheAccessCounter  | 
private RequestHeaderExtensionPoint | 
_requestHeaderEP  | 
managerEMPTY_MAP| Constructor and Description | 
|---|
GeneratePageAction()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
_copyHeaders(Request request,
            Response response,
            org.apache.http.HttpResponse cmsResponse,
            String[] names)
Copy some response headers from the back-office. 
 | 
private String | 
_encodeRequestedUrl(Request request)  | 
private void | 
_log(String message)  | 
private void | 
_redirect(org.apache.http.HttpResponse cmsResponse,
         Redirector redirector,
         String page,
         boolean permanent)  | 
protected void | 
_writePageOnDisk(String decodedPage,
                org.apache.http.HttpResponse cmsResponse)
Read the page from the back-office response and write it into the cache. 
 | 
Map | 
act(Redirector redirector,
   SourceResolver resolver,
   Map objectModel,
   String source,
   Parameters parameters)  | 
protected File | 
getFile(File root,
       String pagePath)
Get the cache file to write for the corresponding page. 
 | 
void | 
service(ServiceManager sManager)  | 
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerstatic final String __BACKOFFICE_JSESSION_ID
private static final Pattern __COOKIE_PATH_PATTERN
private CacheAccessManager _cacheAccess
private CacheAccessCounter _cacheAccessCounter
private RequestHeaderExtensionPoint _requestHeaderEP
public GeneratePageAction()
public void service(ServiceManager sManager) throws ServiceException
service in interface Serviceableservice in class ServiceableActionServiceExceptionpublic Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
private String _encodeRequestedUrl(Request request) throws UnsupportedEncodingException
UnsupportedEncodingExceptionprivate void _redirect(org.apache.http.HttpResponse cmsResponse, Redirector redirector, String page, boolean permanent) throws Exception
Exceptionprotected void _copyHeaders(Request request, Response response, org.apache.http.HttpResponse cmsResponse, String[] names)
request - the front-office client request.response - the front-office client response.cmsResponse - the response from the back-office.names - the header names.protected void _writePageOnDisk(String decodedPage, org.apache.http.HttpResponse cmsResponse) throws IOException
decodedPage - the page path.cmsResponse - the back-office response, containing the page.IOException - if an error occurs writing the page into the cache.