|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DocumentManager
Helper to manage documents. It takes care of attachments etc.
Field Summary | |
---|---|
static java.lang.String |
ROLE
The Avalon component role. |
Method Summary | |
---|---|
Document |
add(DocumentFactory factory,
ResourceType resourceType,
java.lang.String contentSourceUri,
Publication pub,
java.lang.String area,
java.lang.String language,
java.lang.String extension)
Creates a new document without adding it to the site structure. |
Document |
add(DocumentFactory factory,
ResourceType resourceType,
java.lang.String contentSourceUri,
Publication pub,
java.lang.String area,
java.lang.String path,
java.lang.String language,
java.lang.String extension,
java.lang.String navigationTitle,
boolean visibleInNav)
Creates a new document with the given parameters: |
Document |
add(Document sourceDocument,
java.lang.String area,
java.lang.String path,
java.lang.String language,
java.lang.String extension,
java.lang.String navigationTitle,
boolean visibleInNav)
Creates a new document in the same publication the parentDocument belongs to
with the given parameters: |
Document |
addVersion(Document sourceDocument,
java.lang.String area,
java.lang.String language)
Adds a new version of a document with a different language and / or in a different area. |
Document |
addVersion(Document sourceDocument,
java.lang.String area,
java.lang.String language,
boolean addToSite)
Adds a new version of a document with a different language and / or in a different area. |
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,
java.lang.String sourcePath,
Area targetArea,
java.lang.String targetPath)
Copies a document to another location, incl. all requiring documents. |
void |
copyAllLanguageVersions(Area sourceArea,
java.lang.String sourcePath,
Area targetArea,
java.lang.String targetPath)
Copies all language versions of a document to another location. |
void |
copyToArea(DocumentSet documentSet,
java.lang.String destinationArea)
Copies a document set to another area. |
void |
copyToArea(Document sourceDocument,
java.lang.String destinationArea)
Copies a document 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. all requiring documents. |
void |
deleteAllLanguageVersions(Document document)
Deletes all language versions of a document. |
boolean |
exists(DocumentFactory factory,
Publication pub,
java.lang.String area,
java.lang.String uuid,
java.lang.String language)
Checks if a document exists. |
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,
java.lang.String sourcePath,
Area targetArea,
java.lang.String targetPath)
Moves a document to another location, incl. all requiring documents. |
void |
moveAllLanguageVersions(Area sourceArea,
java.lang.String sourcePath,
Area targetArea,
java.lang.String targetPath)
Moves all language versions of a document to another location. |
Field Detail |
---|
static final java.lang.String ROLE
Method Detail |
---|
boolean exists(DocumentFactory factory, Publication pub, java.lang.String area, java.lang.String uuid, java.lang.String language) throws PublicationException
factory
- The document factory.pub
- The publication.area
- The area.uuid
- The UUID.language
- The language.
PublicationException
- if an error occurs.void copy(Document sourceDocument, DocumentLocator destination) throws PublicationException
sourceDocument
- The document to copy.destination
- The destination document.
PublicationException
- if a document which destinationDocument depends on does not
exist.void copyToArea(Document sourceDocument, java.lang.String destinationArea) throws PublicationException
sourceDocument
- The document to copy.destinationArea
- The destination area.
PublicationException
- if a document which the destination document depends on does not
exist.void copyToArea(DocumentSet documentSet, java.lang.String destinationArea) throws PublicationException
documentSet
- The document set to copy.destinationArea
- The destination area.
PublicationException
- if a document which one of the destination documents depends on
does not exist.Document add(Document sourceDocument, java.lang.String area, java.lang.String path, java.lang.String language, java.lang.String extension, java.lang.String navigationTitle, boolean visibleInNav) throws DocumentBuildException, PublicationException
parentDocument
belongs to
with the given parameters:
sourceDocument
- The document to initialize the contents and meta data from.area
- The target area.path
- The target path.language
- The target language.extension
- The extension to use for the document source.navigationTitle
- navigation titlevisibleInNav
- determines the visibility of a node in the navigation
DocumentBuildException
- if the document can not be created
PublicationException
- if the document is already contained.Document add(DocumentFactory factory, ResourceType resourceType, java.lang.String contentSourceUri, Publication pub, java.lang.String area, java.lang.String path, java.lang.String language, java.lang.String extension, java.lang.String navigationTitle, boolean visibleInNav) throws DocumentBuildException, PublicationException
factory
- The document factory.resourceType
- the document type (aka resource type) of the new documentcontentSourceUri
- The URI to read the content from.pub
- The publication.area
- The area.path
- The path.language
- The language.extension
- The extension to use for the document source, without the leading dot.navigationTitle
- The navigation title.visibleInNav
- The navigation visibility.
DocumentBuildException
- if the document can not be created
PublicationException
- if the document is already contained.Document add(DocumentFactory factory, ResourceType resourceType, java.lang.String contentSourceUri, Publication pub, java.lang.String area, java.lang.String language, java.lang.String extension) throws DocumentBuildException, PublicationException
factory
- The document factory.resourceType
- the document type (aka resource type) of the new documentcontentSourceUri
- The URI to read the content from.pub
- The publication.area
- The area.language
- The language.extension
- The extension to use for the document source, without the leading dot.
DocumentBuildException
- if the document can not be created
PublicationException
- if the document is already contained.Document addVersion(Document sourceDocument, java.lang.String area, java.lang.String language) throws DocumentBuildException, PublicationException
sourceDocument
- The document to initialize the contents and meta data from.area
- The area.language
- The language of the new document.
DocumentBuildException
- if the document can not be created
PublicationException
- if the document is already contained.Document addVersion(Document sourceDocument, java.lang.String area, java.lang.String language, boolean addToSite) throws DocumentBuildException, PublicationException
sourceDocument
- The document to initialize the contents and meta data from.area
- The area.language
- The language of the new document.addToSite
- If the new version should be added to the site structure.
DocumentBuildException
- if the document can not be created
PublicationException
- if the document is already contained.void delete(Document document) throws PublicationException
document
- The document to delete.
PublicationException
- when something went wrong.void move(Document sourceDocument, DocumentLocator destination) throws PublicationException
sourceDocument
- The source document.destination
- The destination document.
PublicationException
- if a document which the destination document depends on does not
exist.void move(DocumentSet sources, DocumentSet destinations) throws PublicationException
sources
- The source documents.destinations
- The destination documents.
PublicationException
- if a document which the destination document depends on does not
exist.void copy(DocumentSet sources, DocumentSet destinations) throws PublicationException
sources
- The source documents.destinations
- The destination documents.
PublicationException
- if a document which the destination document depends on does not
exist.void moveAll(Area sourceArea, java.lang.String sourcePath, Area targetArea, java.lang.String targetPath) throws PublicationException
sourceArea
- The source area.sourcePath
- The source path.targetArea
- The target area.targetPath
- The target path.
PublicationException
- if an error occurs.void moveAllLanguageVersions(Area sourceArea, java.lang.String sourcePath, Area targetArea, java.lang.String targetPath) throws PublicationException
sourceArea
- The source area.sourcePath
- The source path.targetArea
- The target area.targetPath
- The target path.
PublicationException
- if the documents could not be moved.void copyAll(Area sourceArea, java.lang.String sourcePath, Area targetArea, java.lang.String targetPath) throws PublicationException
sourceArea
- The source area.sourcePath
- The source path.targetArea
- The target area.targetPath
- The target path.
PublicationException
- if an error occurs.void copyAllLanguageVersions(Area sourceArea, java.lang.String sourcePath, Area targetArea, java.lang.String targetPath) throws PublicationException
sourceArea
- The source area.sourcePath
- The source path.targetArea
- The target area.targetPath
- The target path.
PublicationException
- if the documents could not be copied.void deleteAll(Document document) throws PublicationException
document
- The document.
PublicationException
- if an error occurs.void deleteAllLanguageVersions(Document document) throws PublicationException
document
- The document.
PublicationException
- if the documents could not be copied.void delete(DocumentSet documents) throws PublicationException
documents
- The documents.
PublicationException
- if an error occurs.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |