|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.staticexport.A_CmsStaticExportHandler
org.opencms.staticexport.CmsAfterPublishStaticExportHandler
public class CmsAfterPublishStaticExportHandler
Implementation for the interface.I_CmsStaticExportHandler
This handler exports all changes immediately after something is published.
I_CmsStaticExportHandler| Field Summary |
|---|
| Fields inherited from class org.opencms.staticexport.A_CmsStaticExportHandler |
|---|
m_busy |
| Constructor Summary | |
|---|---|
CmsAfterPublishStaticExportHandler()
|
|
| Method Summary | |
|---|---|
void |
doExportAfterPublish(java.util.List<CmsPublishedResource> resources,
I_CmsReport report)
Does the actual static export. |
protected void |
exportAfterPublish(CmsUUID publishHistoryId,
I_CmsReport report)
Starts the static export on publish. |
protected boolean |
exportNonTemplateResources(CmsObject cms,
java.util.List<CmsPublishedResource> publishedResources,
I_CmsReport report)
Exports all non template resources found in a list of published resources. |
protected int |
exportTemplateResource(CmsStaticExportData data,
java.lang.StringBuffer cookies)
Exports a single (template) resource specified by its export data. |
protected void |
exportTemplateResources(CmsObject cms,
java.util.List<java.lang.String> publishedTemplateResources,
I_CmsReport report)
Exports all template resources found in a list of published resources. |
java.util.List<CmsPublishedResource> |
getAllResources(CmsObject cms)
Returns all resources within the current OpenCms site that are not marked as internal. |
protected java.util.List<java.io.File> |
getRelatedFilesToPurge(java.lang.String exportFileName,
java.lang.String vfsName)
Returns a list of related files to purge. |
protected java.util.List<CmsPublishedResource> |
getRelatedResources(CmsObject cms,
java.util.List<CmsPublishedResource> publishedResources)
Creates a list of objects containing all related resources of the VFS tree. |
protected java.util.Set<CmsPublishedResource> |
getSiblings(CmsObject cms,
CmsPublishedResource pubResource)
Returns all siblings of the published resource as list of CmsPublishedResource. |
void |
performEventPublishProject(CmsUUID publishHistoryId,
I_CmsReport report)
Scrubs files from the export folder that might have been changed. |
protected boolean |
readNonTemplateResourcesToExport(CmsObject cms,
java.util.List<CmsPublishedResource> publishedResources,
java.util.List<CmsStaticExportData> resourcesToExport)
Returns all non template resources found in a list of published resources. |
| Methods inherited from class org.opencms.staticexport.A_CmsStaticExportHandler |
|---|
addMovedLinkSources, getSiblingsList, isBusy, purgeFile, scrubExportFolders, scrubResource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CmsAfterPublishStaticExportHandler()
| Method Detail |
|---|
public void doExportAfterPublish(java.util.List<CmsPublishedResource> resources,
I_CmsReport report)
throws CmsException,
java.io.IOException,
javax.servlet.ServletException
resources - a list of CmsPublishedREsources to start the static export withreport - an I_CmsReport instance to print output message, or null to write messages to the log file
CmsException - in case of errors accessing the VFS
java.io.IOException - in case of errors writing to the export output stream
javax.servlet.ServletException - in case of errors accessing the servlet
public java.util.List<CmsPublishedResource> getAllResources(CmsObject cms)
throws CmsException
The result list contains objects of type CmsPublishedResource.
cms - the cms context
CmsException - if something goes wrong
public void performEventPublishProject(CmsUUID publishHistoryId,
I_CmsReport report)
I_CmsStaticExportHandler
performEventPublishProject in interface I_CmsStaticExportHandlerperformEventPublishProject in class A_CmsStaticExportHandlerpublishHistoryId - the CmsUUID of the published projectreport - an I_CmsReport instance to print output message,
or null to write messages to the log fileI_CmsStaticExportHandler.performEventPublishProject(org.opencms.util.CmsUUID, org.opencms.report.I_CmsReport)
protected void exportAfterPublish(CmsUUID publishHistoryId,
I_CmsReport report)
throws CmsException,
java.io.IOException,
javax.servlet.ServletException
Exports all modified resources after a publish process into the real FS.
publishHistoryId - the publichHistoryId of the published projectreport - an I_CmsReport instance to print output message, or null to write messages to the log file
CmsException - in case of errors accessing the VFS
java.io.IOException - in case of errors writing to the export output stream
javax.servlet.ServletException - in case of errors accessing the servlet
protected boolean exportNonTemplateResources(CmsObject cms,
java.util.List<CmsPublishedResource> publishedResources,
I_CmsReport report)
throws CmsException,
java.io.IOException,
javax.servlet.ServletException
cms - the current cms objectpublishedResources - the list of published resourcesreport - an I_CmsReport instance to print output message, or null to write messages to the log file
CmsException - in case of errors accessing the VFS
java.io.IOException - in case of errors writing to the export output stream
javax.servlet.ServletException - in case of errors accessing the servlet
protected int exportTemplateResource(CmsStaticExportData data,
java.lang.StringBuffer cookies)
throws java.io.IOException
data - the export datacookies - cookies to keep the session
java.io.IOException - if the http request fails
protected void exportTemplateResources(CmsObject cms,
java.util.List<java.lang.String> publishedTemplateResources,
I_CmsReport report)
cms - the cms context, in the root site as Export userpublishedTemplateResources - list of potential candidates to exportreport - an I_CmsReport instance to print output message, or null to write messages to the log file
protected java.util.List<java.io.File> getRelatedFilesToPurge(java.lang.String exportFileName,
java.lang.String vfsName)
A_CmsStaticExportHandler
getRelatedFilesToPurge in class A_CmsStaticExportHandlerexportFileName - the previous exported rfs filename (already purged)vfsName - the vfs name of the resource (to be used to compute more sofisticated sets of related files to purge
A_CmsStaticExportHandler.getRelatedFilesToPurge(java.lang.String, java.lang.String)
protected java.util.List<CmsPublishedResource> getRelatedResources(CmsObject cms,
java.util.List<CmsPublishedResource> publishedResources)
throws CmsException
CmsPublishedResource objects containing all related resources of the VFS tree.If the static export has been triggered by the OpenCms workplace, publishedResources is null and all resources in the VFS tree are returned.
If really an after publish static export is triggered, then only the related resources are returned.
cms - the current cms objectpublishedResources - the list of published resources
CmsException - in case of errors accessing the VFS
protected java.util.Set<CmsPublishedResource> getSiblings(CmsObject cms,
CmsPublishedResource pubResource)
throws CmsException
CmsPublishedResource.
cms - the cms objectpubResource - the published resource
CmsException - if something goes wrong
protected boolean readNonTemplateResourcesToExport(CmsObject cms,
java.util.List<CmsPublishedResource> publishedResources,
java.util.List<CmsStaticExportData> resourcesToExport)
throws CmsException
cms - the current cms objectpublishedResources - the list of published resourcesresourcesToExport - the list of non-template resources
true if some template resources were found while looping the list of published resources
CmsException - in case of errors accessing the VFS
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||