Examples of DocumentFactory


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

            Map wrapperParameters = wrapper.getParameters();
            map.putAll(wrapperParameters);

            NamespaceMap schedulerParameters = new NamespaceMap(LoadQuartzServlet.PREFIX);

            DocumentFactory identityMap = DocumentUtil.createDocumentIdentityMap(null, null);
            String url = ServletHelper.getWebappURI(ObjectModelHelper.getRequest(this.objectModel));
            Publication pub = null;

            schedulerParameters.put(ServletJob.PARAMETER_DOCUMENT_URL,identityMap.getFromURL(url)
                    .getCanonicalWebappURL());
            schedulerParameters.put(LoadQuartzServlet.PARAMETER_PUBLICATION_ID, pub.getId());
            map.putAll(schedulerParameters.getPrefixedMap());
        } catch (final Exception e) {
            throw new ProcessingException(e);
View Full Code Here

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

    public void doExecute() throws Exception {
        String url = getSourceURL();
        URLInformation info = new URLInformation(url);
        String pubId = info.getPublicationId();

        DocumentFactory factory = getDocumentFactory();
        Publication pub = factory.getPublication(pubId);
        Area area = pub.getArea(info.getArea());

        Document[] docs = area.getDocuments();

        IndexUpdater updater = null;
View Full Code Here

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

        }

        Source source = null;
        try {
            Session session = RepositoryUtil.getSession(this.manager, request);
            DocumentFactory factory = DocumentUtil.createDocumentFactory(this.manager, session);
            String pubId = null;
            if (par.isParameter(PARAM_PUB)) {
                pubId = par.getParameter(PARAM_PUB);
            } else {
                String webappUrl = ServletHelper.getWebappURI(request);
                URLInformation info = new URLInformation(webappUrl);
                pubId = info.getPublicationId();
            }
            Publication pub = factory.getPublication(pubId);
            this.site = pub.getArea(area).getSite();

            if (this.path == null) {
                if (site.containsByUuid(uuid, language)) {
                    Link link = site.getByUuid(uuid, language);
View Full Code Here

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

        ServiceSelector selector = null;
        SiteManager siteManager = null;
        try {           
            Session session = RepositoryUtil.getSession(this.manager, request);
            DocumentFactory map = DocumentUtil.createDocumentFactory(this.manager, session);
            Publication publication = PublicationUtil.getPublication(
                    this.manager, request);
           
           
            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE
View Full Code Here

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

        ServiceSelector selector = null;
        SiteManager siteManager = null;
        try {
            Request request = ObjectModelHelper.getRequest(this.objectModel);
            Session session = RepositoryUtil.getSession(this.manager, request);
            DocumentFactory map = DocumentUtil.createDocumentFactory(this.manager, session);
            Publication publication = PublicationUtil.getPublication(this.manager, request);

            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
            siteManager = (SiteManager) selector.select(publication.getSiteManagerHint());
View Full Code Here

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

            selector = (ServiceSelector) this.manager.lookup(ResourceType.ROLE + "Selector");
            resourceType = (ResourceType) selector.select(getDocumentTypeName());

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

            DocumentFactory map = getDocumentFactory();

            String documentId = getDocumentID();
           
            String sampleName = resourceType.getSampleNames()[0];
            String sampleUri = resourceType.getSample(sampleName).getUri();
View Full Code Here

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

                    selector = (ServiceSelector) this.manager
                            .lookup(ResourceType.ROLE + "Selector");

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

                    DocumentFactory map = getDocumentFactory();
                    String path = doc.getPath();
                    // lookupResourceType(extension)
                    resourceType = lookUpExtension(extension, selector);
                    ResourceType.Sample sample = resourceType.getSample(resourceType.getSampleNames()[0]);
                    doc = documentManager.add(map, resourceType, sample.getUri(), getPublication(), doc
View Full Code Here

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

        Assert.notNull("language", lang);
        Assert.notNull("label", label);
        if (this.language2link.containsKey(lang)) {
            throw new RuntimeException("The language [" + lang + "] is already contained.");
        }
        DocumentFactory factory = getTree().getPublication().getFactory();
        Link link = new SiteTreeLink(factory, this, label, lang);
        this.language2link.put(lang, link);
        getTree().linkAdded(link);
        return link;
    }
View Full Code Here

Examples of org.dom4j.DocumentFactory

  // Implementation methods
  // -------------------------------------------------------------------------

  protected DocumentFactory getDocumentFactory() {
    DocumentFactory factory = getQName().getDocumentFactory();

    return (factory != null) ? factory : DOCUMENT_FACTORY;
  }
View Full Code Here

Examples of org.dom4j.DocumentFactory

   public void run()
   {
      processDir(jbossHome);
      try
      {
         DocumentFactory df = DocumentFactory.getInstance();
         Document doc = df.createDocument();
         Element root = doc.addElement("jar-versions");
         Iterator iter = jars.iterator();
         while( iter.hasNext() )
         {
            JarInfo info = (JarInfo) iter.next();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.