| org.apache.lenya.cms.publication.DocumentFactoryImpl
DocumentFactoryImpl | public class DocumentFactoryImpl extends AbstractLogEnabled implements DocumentFactory(Code) | | A DocumentIdentityMap avoids the multiple instanciation of a document object.
version: $Id: DocumentIdentityMap.java 264153 2005-08-29 15:11:14Z andreas $ |
Field Summary | |
protected ServiceManager | manager |
Method Summary | |
protected Document | buildDocument(DocumentFactory map, DocumentIdentifier identifier, int revision, DocumentBuilder builder) | public RepositoryItem | buildItem(Session session, String key) | protected DocumentImpl | createDocument(DocumentFactory map, DocumentIdentifier identifier, int revision, DocumentBuilder builder) Creates a new document object. | public boolean | existsPublication(String id) | public Document | get(Publication publication, String area, String uuid, String language) Returns a document.
Parameters: publication - The publication. Parameters: area - The area. Parameters: uuid - The document UUID. Parameters: language - The language. | public Document | get(Publication publication, String area, String uuid, String language, int revision) | public Document | get(Publication publication, String area, String documentId) Builds a document for the default language.
Parameters: publication - The publication. Parameters: area - The area. Parameters: documentId - The document ID. | public Document | get(DocumentIdentifier identifier) | public Document | get(DocumentLocator locator) | public Document | getAreaVersion(Document document, String area) Builds a clone of a document for another area.
Parameters: document - The document to clone. Parameters: area - The area of the target document. | public Document | getFromURL(String webappUrl) Returns the document identified by a certain web application URL.
Parameters: webappUrl - The web application URL. | public String | getItemType() | public String | getKey(Publication publication, String area, String uuid, String language, int revision) Builds a document key. | public String | getKey(String webappUrl) Builds a document key.
Parameters: webappUrl - The web application URL. | public Document | getLanguageVersion(Document document, String language) Builds a clone of a document for another language.
Parameters: document - The document to clone. Parameters: language - The language of the target document. | protected DocumentLocator | getLocator(String webappUrl) | protected PublicationManager | getPubManager() | public Publication | getPublication(String id) | public Publication[] | getPublications() | public Session | getSession() | public boolean | isDocument(String webappUrl) Checks if a webapp URL represents a document.
Parameters: webappUrl - A web application URL. | public boolean | isValidDocumentId(String id) Checks if a string represents a valid document ID.
Parameters: id - The string. |
manager | protected ServiceManager manager(Code) | | |
DocumentFactoryImpl | public DocumentFactoryImpl(Session session, ServiceManager manager, Logger logger)(Code) | | Ctor.
Parameters: session - The session to use. Parameters: manager - The service manager. Parameters: logger - The logger to use. |
createDocument | protected DocumentImpl createDocument(DocumentFactory map, DocumentIdentifier identifier, int revision, DocumentBuilder builder) throws DocumentBuildException(Code) | | Creates a new document object. Override this method to create specific document objects,
e.g., for different document IDs.
Parameters: map - The identity map. Parameters: identifier - The identifier. Parameters: revision - The revision or -1 for the latest revision. Parameters: builder - The document builder. A document. throws: DocumentBuildException - when something went wrong. |
existsPublication | public boolean existsPublication(String id)(Code) | | |
getKey | public String getKey(Publication publication, String area, String uuid, String language, int revision)(Code) | | Builds a document key.
Parameters: publication - The publication. Parameters: area - The area. Parameters: uuid - The document UUID. Parameters: language - The language. Parameters: revision - A key. |
getKey | public String getKey(String webappUrl)(Code) | | Builds a document key.
Parameters: webappUrl - The web application URL. A key. |
isValidDocumentId | public boolean isValidDocumentId(String id)(Code) | | Checks if a string represents a valid document ID.
Parameters: id - The string. A boolean value. |
|
|