Package org.apache.lenya.cms.publication

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


        try {
            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);

            xmlSource = (ModifiableSource) resolver.resolveURI(getSourceDocument().getSourceURI());
           
            DocumentType resourceType = getSourceDocument().getResourceType();
            String schemaUri = resourceType.getSchemaDefinitionSourceURI();
            schemaSource = resolver.resolveURI(schemaUri);
           
            unnumberTagsXslSource = resolver.resolveURI(unnumberTagsXslUri);
            numberTagsXslSource = resolver.resolveURI(numberTagsXslUri);
View Full Code Here


        String content = "<?xml version=\"1.0\" encoding=\"" + encoding + "\"?>\n"
                + addNamespaces(namespaces, getParameterAsString("content"));

        // Save file temporarily

        DocumentType resourceType = getSourceDocument().getResourceType();
        String schemaUri = resourceType.getSchemaDefinitionSourceURI();
        Source schemaSource = null;
        ModifiableSource xmlSource = null;
        SourceResolver resolver = null;
        try {
            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
View Full Code Here

                    value = StringUtils.join(document.getLanguages(), ',');
                } else if (name.equals(PageEnvelope.DOCUMENT_LASTMODIFIED)) {
                    Date date = document.getLastModified();
                    value = new SimpleDateFormat(DATE_FORMAT).format(date);
                } else if (name.equals(PageEnvelope.DOCUMENT_TYPE)) {
                    DocumentType resourceType = document.getResourceType();
                    if (resourceType == null) {
                        value = null;
                    }
                    else {
                        value = resourceType.getName();
                    }
                }
            }
        } catch (final DocumentException e) {
            throw new ConfigurationException("Getting attribute for name [" + name + "] failed: ",
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();

        DefaultSiteTree siteTree;

        try {
            siteTree = publication.getSiteTree(area);
View Full Code Here

        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

        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();

        DefaultSiteTree siteTree;

        try {
            siteTree = publication.getSiteTree(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

        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

        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

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.