Package org.apache.lenya.cms.publication

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


     * @return The documents in the trash area.
     * @throws PublicationException if an error occurs.
     * @throws SiteException if an error occurs.
     */
    protected Document[] getTrashDocuments() throws PublicationException, SiteException {
        PublicationFactory factory = PublicationFactory.getInstance(getLogger());
        Publication publication = factory.getPublication(this.manager, getSourceURL());
        DocumentIdentityMap identityMap = getDocumentIdentityMap();
        Document[] documents;
       
        ServiceSelector selector = null;
        SiteManager siteManager = null;
View Full Code Here


            URLInformation info = new URLInformation(webappUrl);
            String publicationId = info.getPublicationId();

            File contextDir = getContext();
            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
            try {
                publication = factory.getPublication(webappUrl, contextDir);
            } catch (PublicationException e) {
                throw new AccessControlException(e);
            }
            if (publication.exists()) {
                getLogger().debug("Publication [" + publicationId + "] exists.");
View Full Code Here

            resolver = (SourceResolver) this.serviceManager.lookup(SourceResolver.ROLE);
            source = resolver.resolveURI("context:///");
            File servletContext = SourceUtil.getFile(source);
            getLogger().debug("    Webapp URL:      [" + url + "]");
            getLogger().debug("    Serlvet context: [" + servletContext.getAbsolutePath() + "]");
            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
            publication = factory.getPublication(url, servletContext);
        } catch (Exception e) {
            throw new AccessControlException(e);
        } finally {
            if (resolver != null) {
                if (source != null) {
View Full Code Here

     *
     * @return the publication in which the use-case is being executed
     */
    protected Publication getPublication() {
        if (this.publication == null) {
            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
            try {
                this.publication = factory.getPublication(this.manager, getSourceURL());
            } catch (PublicationException e) {
                throw new RuntimeException(e);
            }
        }
        return this.publication;
View Full Code Here

     * @param jobGroup A job group.
     * @return A publication.
     * @throws PublicationException when the publication does not exist.
     */
    protected Publication getPublication(String jobGroup) throws PublicationException {
        PublicationFactory factory = PublicationFactory.getInstance(new ConsoleLogger());
        return factory.getPublication(jobGroup, getServletContextPath());
    }
View Full Code Here

     *
     * @return the publication in which the use-case is being executed
     */
    protected Publication getPublication() {
        if (this.publication == null) {
            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
            try {
                this.publication = factory.getPublication(this.manager, getSourceURL());
            } catch (PublicationException e) {
                throw new RuntimeException(e);
            }
        }
        return this.publication;
View Full Code Here

                String _configurationUri;
                if (getConfigurationURI() != null) {
                    _configurationUri = getConfigurationURI();
                } else {
                    PublicationFactory factory = PublicationFactory.getInstance(getLogger());
                    Publication publication = factory.getPublication(resolver, request);
                    _configurationUri = getConfigurationURI(publication);
                }

                Role[] roles = PolicyAuthorizer.getRoles(request);
                authorized = authorizeUsecase(usecase, roles, _configurationUri);
View Full Code Here

     */
    final public Publication getPublication() throws PublicationException {
        String publicationId = "default";
        String servletContextPath = "/home/egli/build/jakarta-tomcat-4.1.21-LE-jdk14/webapps/lenya/";

        PublicationFactory factory = PublicationFactory.getInstance(getLogger());
        return factory.getPublication(publicationId, servletContextPath);
    }
View Full Code Here

        log.debug("=========================================");

        for (int i = 0; i < publicationDirectories.length; i++) {
            File directory = publicationDirectories[i];
            String publicationId = directory.getName();
            PublicationFactory factory = PublicationFactory.getInstance(new ConsoleLogger());
            Publication publication;
            try {
                publication = factory.getPublication(publicationId, getServletContextDirectory());
            } catch (PublicationException e) {
                throw new SchedulerException(e);
            }
            if (publication.exists()) {
                getScheduler().restoreJobs(publicationId);
View Full Code Here

     */
    public static String[] extractPublicationArguments(String[] args) {
        String servletContextPath = args[0];
        String publicationId = args[1];
        try {
            PublicationFactory factory = PublicationFactory.getInstance(new ConsoleLogger());
            publication = factory.getPublication(publicationId, servletContextPath);
        } catch (PublicationException e) {
            e.printStackTrace();
        }

        List subList = Arrays.asList(args).subList(2, args.length);
View Full Code Here

TOP

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

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.