| org.apache.lenya.cms.publication.DocumentManager
All known Subclasses: org.apache.lenya.cms.publication.DocumentManagerImpl,
DocumentManager | public interface DocumentManager (Code) | | Helper to manage documents. It takes care of attachments etc.
version: $Id: DocumentManager.java 527520 2007-04-11 15:22:11Z andreas $ |
Field Summary | |
String | ROLE The Avalon component role. |
Method Summary | |
Document | add(Document sourceDocument, String area, String path, String language, String extension, String navigationTitle, boolean visibleInNav) | Document | add(DocumentFactory factory, ResourceType resourceType, String contentSourceUri, Publication pub, String area, String path, String language, String extension, String navigationTitle, boolean visibleInNav) Creates a new document with the given parameters:
Parameters: factory - The document factory. Parameters: resourceType - the document type (aka resource type) of the new document Parameters: contentSourceUri - The URI to read the content from. Parameters: pub - The publication. Parameters: area - The area. Parameters: path - The path. Parameters: language - The language. Parameters: extension - The extension to use for the document source, without the leading dot. Parameters: navigationTitle - The navigation title. Parameters: visibleInNav - The navigation visibility. | Document | add(DocumentFactory factory, ResourceType resourceType, String contentSourceUri, Publication pub, String area, String language, String extension) Creates a new document without adding it to the site structure.
Parameters: factory - The document factory. Parameters: resourceType - the document type (aka resource type) of the new document Parameters: contentSourceUri - The URI to read the content from. Parameters: pub - The publication. Parameters: area - The area. Parameters: language - The language. Parameters: extension - The extension to use for the document source, without the leading dot. | Document | addVersion(Document sourceDocument, String area, String language) Adds a new version of a document with a different language and / or in a different area.
Parameters: sourceDocument - The document to initialize the contents and meta data from. Parameters: area - The area. Parameters: language - The language of the new document. | Document | addVersion(Document sourceDocument, String area, String language, boolean addToSite) Adds a new version of a document with a different language and / or in a different area.
Parameters: sourceDocument - The document to initialize the contents and meta data from. Parameters: area - The area. Parameters: language - The language of the new document. Parameters: addToSite - If the new version should be added to the site structure. | void | copy(Document sourceDocument, DocumentLocator destination) Copies a document from one location to another location. | void | copy(DocumentSet sources, DocumentSet destinations) Copies a document set from one location to another. | void | copyAll(Area sourceArea, String sourcePath, Area targetArea, String targetPath) Copies a document to another location, incl. | void | copyAllLanguageVersions(Area sourceArea, String sourcePath, Area targetArea, String targetPath) Copies all language versions of a document to another location. | void | copyToArea(Document sourceDocument, String destinationArea) Copies a document to another area. | void | copyToArea(DocumentSet documentSet, String destinationArea) Copies a document set to another area. | void | delete(Document document) Deletes a document from the content repository and from the site structure. | void | delete(DocumentSet documents) Deletes a set of documents. | void | deleteAll(Document document) Deletes a document, incl. | void | deleteAllLanguageVersions(Document document) Deletes all language versions of a document. | boolean | exists(DocumentFactory factory, Publication pub, String area, String uuid, String language) Checks if a document exists.
Parameters: factory - The document factory. Parameters: pub - The publication. Parameters: area - The area. Parameters: uuid - The UUID. Parameters: language - The language. | void | move(Document sourceDocument, DocumentLocator destination) Moves a document from one location to another. | void | move(DocumentSet sources, DocumentSet destinations) Moves a document set from one location to another. | void | moveAll(Area sourceArea, String sourcePath, Area targetArea, String targetPath) Moves a document to another location, incl. | void | moveAllLanguageVersions(Area sourceArea, String sourcePath, Area targetArea, String targetPath) Moves all language versions of a document to another location. |
add | Document add(Document sourceDocument, String area, String path, String language, String extension, String navigationTitle, boolean visibleInNav) throws DocumentBuildException, PublicationException(Code) | | Creates a new document in the same publication the parentDocument belongs to
with the given parameters:
Parameters: sourceDocument - The document to initialize the contents and meta data from. Parameters: area - The target area. Parameters: path - The target path. Parameters: language - The target language. Parameters: extension - The extension to use for the document source. Parameters: navigationTitle - navigation title Parameters: visibleInNav - determines the visibility of a node in the navigation The added document. throws: DocumentBuildException - if the document can not be created throws: PublicationException - if the document is already contained. |
add | Document add(DocumentFactory factory, ResourceType resourceType, String contentSourceUri, Publication pub, String area, String path, String language, String extension, String navigationTitle, boolean visibleInNav) throws DocumentBuildException, PublicationException(Code) | | Creates a new document with the given parameters:
Parameters: factory - The document factory. Parameters: resourceType - the document type (aka resource type) of the new document Parameters: contentSourceUri - The URI to read the content from. Parameters: pub - The publication. Parameters: area - The area. Parameters: path - The path. Parameters: language - The language. Parameters: extension - The extension to use for the document source, without the leading dot. Parameters: navigationTitle - The navigation title. Parameters: visibleInNav - The navigation visibility. The added document. throws: DocumentBuildException - if the document can not be created throws: PublicationException - if the document is already contained. |
add | Document add(DocumentFactory factory, ResourceType resourceType, String contentSourceUri, Publication pub, String area, String language, String extension) throws DocumentBuildException, PublicationException(Code) | | Creates a new document without adding it to the site structure.
Parameters: factory - The document factory. Parameters: resourceType - the document type (aka resource type) of the new document Parameters: contentSourceUri - The URI to read the content from. Parameters: pub - The publication. Parameters: area - The area. Parameters: language - The language. Parameters: extension - The extension to use for the document source, without the leading dot. The added document. throws: DocumentBuildException - if the document can not be created throws: PublicationException - if the document is already contained. |
addVersion | Document addVersion(Document sourceDocument, String area, String language, boolean addToSite) throws DocumentBuildException, PublicationException(Code) | | Adds a new version of a document with a different language and / or in a different area.
Parameters: sourceDocument - The document to initialize the contents and meta data from. Parameters: area - The area. Parameters: language - The language of the new document. Parameters: addToSite - If the new version should be added to the site structure. The added document. throws: DocumentBuildException - if the document can not be created throws: PublicationException - if the document is already contained. |
copy | void copy(Document sourceDocument, DocumentLocator destination) throws PublicationException(Code) | | Copies a document from one location to another location.
Parameters: sourceDocument - The document to copy. Parameters: destination - The destination document. throws: PublicationException - if a document which destinationDocument depends on does notexist. |
copy | void copy(DocumentSet sources, DocumentSet destinations) throws PublicationException(Code) | | Copies a document set from one location to another. A source is copied to the destination of
the same position in the set.
Parameters: sources - The source documents. Parameters: destinations - The destination documents. throws: PublicationException - if a document which the destination document depends on does notexist. |
copyAll | void copyAll(Area sourceArea, String sourcePath, Area targetArea, String targetPath) throws PublicationException(Code) | | Copies a document to another location, incl. all requiring documents. If a sitetree is used,
this means that the whole subtree is copied.
Parameters: sourceArea - The source area. Parameters: sourcePath - The source path. Parameters: targetArea - The target area. Parameters: targetPath - The target path. throws: PublicationException - if an error occurs. |
copyAllLanguageVersions | void copyAllLanguageVersions(Area sourceArea, String sourcePath, Area targetArea, String targetPath) throws PublicationException(Code) | | Copies all language versions of a document to another location.
Parameters: sourceArea - The source area. Parameters: sourcePath - The source path. Parameters: targetArea - The target area. Parameters: targetPath - The target path. throws: PublicationException - if the documents could not be copied. |
copyToArea | void copyToArea(Document sourceDocument, String destinationArea) throws PublicationException(Code) | | Copies a document to another area.
Parameters: sourceDocument - The document to copy. Parameters: destinationArea - The destination area. throws: PublicationException - if a document which the destination document depends on does notexist. |
copyToArea | void copyToArea(DocumentSet documentSet, String destinationArea) throws PublicationException(Code) | | Copies a document set to another area.
Parameters: documentSet - The document set to copy. Parameters: destinationArea - The destination area. throws: PublicationException - if a document which one of the destination documents depends ondoes not exist. |
deleteAll | void deleteAll(Document document) throws PublicationException(Code) | | Deletes a document, incl. all requiring documents. If a sitetree is used, this means that the
whole subtree is deleted.
Parameters: document - The document. throws: PublicationException - if an error occurs. |
move | void move(Document sourceDocument, DocumentLocator destination) throws PublicationException(Code) | | Moves a document from one location to another.
Parameters: sourceDocument - The source document. Parameters: destination - The destination document. throws: PublicationException - if a document which the destination document depends on does notexist. |
move | void move(DocumentSet sources, DocumentSet destinations) throws PublicationException(Code) | | Moves a document set from one location to another. A source is moved to the destination of
the same position in the set.
Parameters: sources - The source documents. Parameters: destinations - The destination documents. throws: PublicationException - if a document which the destination document depends on does notexist. |
moveAll | void moveAll(Area sourceArea, String sourcePath, Area targetArea, String targetPath) throws PublicationException(Code) | | Moves a document to another location, incl. all requiring documents. If a sitetree is used,
this means that the whole subtree is moved.
Parameters: sourceArea - The source area. Parameters: sourcePath - The source path. Parameters: targetArea - The target area. Parameters: targetPath - The target path. throws: PublicationException - if an error occurs. |
moveAllLanguageVersions | void moveAllLanguageVersions(Area sourceArea, String sourcePath, Area targetArea, String targetPath) throws PublicationException(Code) | | Moves all language versions of a document to another location.
Parameters: sourceArea - The source area. Parameters: sourcePath - The source path. Parameters: targetArea - The target area. Parameters: targetPath - The target path. throws: PublicationException - if the documents could not be moved. |
|
|