Package org.apache.lenya.cms.publication

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


        try {
            String[] roles = new String[0];
            Situation situation =
                WorkflowFactory.newInstance().buildSituation(roles, getUserId(), getMachineIp());
            DocumentType type =
                DocumentTypeBuilder.buildDocumentType(getDocumentType(), getPublication());
            WorkflowFactory.initHistory(document, type.getWorkflowFileName(), situation);
        } catch (Exception e) {
            throw new BuildException(e);
        }
    }
View Full Code Here


            documentTypeName)) {
            throw new CreatorException("Exception: Validation of parameters failed");
        }

        // Get creator
        DocumentType type;

        try {
            type =
                DocumentTypeBuilder.buildDocumentType(
                    documentTypeName,
                    publication);
        } catch (DocumentTypeBuildException e) {
            throw new CreatorException(e);
        }

        ParentChildCreatorInterface creator = type.getCreator();

        SiteTree siteTree;

        try {
            log.debug("Get sitetree of area: " + area);
View Full Code Here

        File configDir = new File(publication.getDirectory(), FileItemManager.PATH);
        assertTrue(configDir.exists());

        Policy policy = getPolicyManager().getPolicy(getAccreditableManager(), url);

        DocumentType type = DocumentTypeBuilder.buildDocumentType(documentTypeName, publication);
        String workflowId = type.getWorkflowFileName();

        WorkflowFactory factory = WorkflowFactory.newInstance();

        String[] emptyRoles = {
        };
View Full Code Here

            documentTypeName)) {
            throw new CreatorException("Exception: Validation of parameters failed");
        }

        // Get creator
        DocumentType type;

        try {
            type =
                DocumentTypeBuilder.buildDocumentType(
                    documentTypeName,
                    publication);
        } catch (DocumentTypeBuildException e) {
            throw new CreatorException(e);
        }

        ParentChildCreatorInterface creator = type.getCreator();

        SiteTree siteTree;

        try {
            log.debug("Get sitetree of area: " + area);
View Full Code Here

        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

     * @see Create#getDocumentTypeName()
     */
    protected String getDocumentTypeName() {
        if (this.documentTypeName == null) {
            try {
                DocumentType type = getSourceDocument().getResourceType();
                this.documentTypeName = type.getName();

                List nonExistingLanguages = getNonExistingLanguages();
                setParameter(LANGUAGES, nonExistingLanguages
                        .toArray(new String[nonExistingLanguages.size()]));

View Full Code Here

            Document document = envelope.getDocument();
            if (document == null) {
                setHasWorkflow(false);
            } else {
                DocumentType doctype = document.getResourceType();
                if (document.getPublication().getWorkflowSchema(doctype) != null) {
                    setHasWorkflow(true);
                    workflowManager = (WorkflowManager) this.manager.lookup(WorkflowManager.ROLE);
                } else {
                    setHasWorkflow(false);
View Full Code Here

                    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

     * @return The name of the workflow schema.
     */
    protected String getWorkflowSchema() {
        String workflowName = null;
        try {
            DocumentType doctype = document.getResourceType();
            if (doctype != null) {
                workflowName = document.getPublication().getWorkflowSchema(doctype);
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
View Full Code Here

                        getLogger().debug("Rewriting links in document [" + examinedDocument + "]");
                    }

                    boolean linksRewritten = false;

                    DocumentType doctype = examinedDocument.getResourceType();
                    String[] xPaths = doctype.getLinkAttributeXPaths();

                    try {

                        org.w3c.dom.Document xmlDocument = SourceUtil.readDOM(examinedDocument.getSourceURI(), this.manager);
View Full Code Here

TOP

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

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.