|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.cms.publishToFile.PublishToFile
Methods for writing content (as static pages) to the file system when an item is published, and removing the files when the item is unpublished.
Field Summary | |
static int |
DEFAULT_TIMEOUT
|
Constructor Summary | |
PublishToFile()
|
|
PublishToFile(com.arsdigita.cms.publishToFile.PublishedHTMLProvider provider)
|
Method Summary | |
boolean |
doTask(QueueEntry qe)
Called by the queue manager for each task. |
static com.arsdigita.cms.publishToFile.DestinationStub |
getDestination(com.arsdigita.persistence.metadata.ObjectType type)
Gets the destination stub for an object type. |
static com.arsdigita.cms.publishToFile.DestinationStub |
getDestination(String objectType)
Gets the destination stub for an object type. |
static URL |
getSource(String path)
Gets the source URL for retrieving the item with the specified path. |
protected String |
getTargetURL(ContentItem target)
Return the URL of target on the destination live server. |
protected boolean |
isLocal(ContentItem asset)
Determine if asset is local, and should therefore be
written to the file system as part of writing the item that contains
it. |
protected boolean |
move(QueueEntry qe)
Process move task (for moving an item or folder to another folder). |
protected boolean |
publish(QueueEntry qe)
Publish the page in the QueueEntry to the file system. |
protected boolean |
publishPageAtDocRoot(com.arsdigita.cms.publishToFile.RetrievedFile rf,
Folder parent,
ContentItem item,
String media,
com.arsdigita.web.Host host)
Publish a page at a document root. |
protected boolean |
republish(QueueEntry qe)
Republish (unpublish then publish) the page in the QueueEntry to the file system. |
static void |
setRequestTimeout(int timeout)
Set the timeout for requests fetching content |
void |
transactionEnd()
Called just after processing of one block of queue entries has finished. |
void |
transactionStart()
Called just before processing of one block of queue entries starts. |
protected boolean |
unpublish(QueueEntry qe)
Unpublish item. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_TIMEOUT
Constructor Detail |
public PublishToFile()
public PublishToFile(com.arsdigita.cms.publishToFile.PublishedHTMLProvider provider)
Method Detail |
public static void setRequestTimeout(int timeout)
timeout
- the timeout in secondspublic static com.arsdigita.cms.publishToFile.DestinationStub getDestination(String objectType)
objectType
- the object type to find a destination stub for
public static com.arsdigita.cms.publishToFile.DestinationStub getDestination(com.arsdigita.persistence.metadata.ObjectType type)
type
- the object type to find a destination stub for
public static URL getSource(String path)
path
- the item path, relative to the servlet root (ie, no /ccm)
public final boolean doTask(QueueEntry qe) throws PublishToFileException
publish
, unpublish
,
republish
, and move
to be notified of
the particular task to be performed.
doTask
in interface PublishToFileListener
qe
- QueueEntry describing the task that should be performed
PublishToFileException
public void transactionStart()
transactionStart
in interface PublishToFileListener
public void transactionEnd()
transactionEnd
in interface PublishToFileListener
protected boolean move(QueueEntry qe)
qe
- QueueEntry for move task.protected boolean publish(QueueEntry qe)
qe
- QueueEntry for item to publish.protected boolean republish(QueueEntry qe)
qe
- QueueEntry for item to publish.protected boolean unpublish(QueueEntry qe)
qe
- The QueueEntry of the item to unpublish.protected boolean publishPageAtDocRoot(com.arsdigita.cms.publishToFile.RetrievedFile rf, Folder parent, ContentItem item, String media, com.arsdigita.web.Host host)
rf
- - Retrieved File Informationparent
- Folder where Item must be publisheditem
- ContentItem, which will be published
used when transforming page.protected String getTargetURL(ContentItem target)
target
on the destination live server.
target
- the item whose URL should be returned
protected boolean isLocal(ContentItem asset)
asset
is local, and should therefore be
written to the file system as part of writing the item that contains
it. If this method returns false, the asset is not written. Such
assets need to be scheduled separately into the queue.
asset
- an asset found during processing an item
true
if the asset is local and should be written
to the file system
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |