Package org.apache.lenya.cms.publication

Examples of org.apache.lenya.cms.publication.DocumentTypeBuilder


        // create new document
        // implementation note: since blog does not have a hierarchy,
        // document id (full path) and document id-name (this leaf's id)
        // are the same
        DocumentManager documentManager = null;
        DocumentTypeBuilder documentTypeBuilder = null;
        try {
            documentTypeBuilder = (DocumentTypeBuilder) this.manager
                    .lookup(DocumentTypeBuilder.ROLE);

            DocumentType documentType = documentTypeBuilder
                    .buildDocumentType(getDocumentTypeName(), getSourceDocument().getPublication());

            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);

            DocumentIdentityMap map = (DocumentIdentityMap) getUnitOfWork().getIdentityMap();
View Full Code Here


    protected void doExecute() throws Exception {
        super.doExecute();

        // create new document
        DocumentManager documentManager = null;
        DocumentTypeBuilder documentTypeBuilder = null;
        try {

            documentTypeBuilder = (DocumentTypeBuilder) this.manager
                    .lookup(DocumentTypeBuilder.ROLE);

            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);

            DocumentIdentityMap map = (DocumentIdentityMap) getUnitOfWork().getIdentityMap();
            Document document = map.get(getPublication(),
                    getArea(),
                    getNewDocumentId(),
                    getParameterAsString(LANGUAGE));

            Document initialDocument = getInitialDocument();
            if (initialDocument == null) {
                DocumentType documentType = documentTypeBuilder
                        .buildDocumentType(getDocumentTypeName(), getPublication());
                documentManager.add(document,
                        documentType,
                        getParameterAsString(DublinCore.ELEMENT_TITLE),
                        null);
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.publication.DocumentTypeBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.