Package org.apache.lenya.cms.publication.templating

Examples of org.apache.lenya.cms.publication.templating.Instantiator


    protected void createMockPublication(String pubId, String area, String proxyUrl)
            throws PublicationException, ServiceException, Exception {
        if (!existsPublication(pubId)) {

            Publication defaultPub = getPublication("default");
            Instantiator instantiator = null;
            ServiceSelector selector = null;
            try {
                selector = (ServiceSelector) getManager().lookup(Instantiator.ROLE + "Selector");
                instantiator = (Instantiator) selector.select(defaultPub.getInstantiatorHint());
                instantiator.instantiate(defaultPub, pubId, "Mock");
                configureProxy(area, proxyUrl);
            } finally {
                if (selector != null) {
                    if (instantiator != null) {
                        selector.release(instantiator);
View Full Code Here


        super.doExecute();

        String templateId = getParameterAsString(TEMPLATE);

        ServiceSelector selector = null;
        Instantiator instantiator = null;

        try {

            Publication template = getDocumentFactory().getPublication(templateId);
            String name = getParameterAsString(PUBLICATION_NAME);

            selector = (ServiceSelector) this.manager.lookup(Instantiator.ROLE + "Selector");
            instantiator = (Instantiator) selector.select(template.getInstantiatorHint());

            instantiator.instantiate(template, getParameterAsString(PUBLICATION_ID), name);

        } finally {
            if (selector != null) {
                if (instantiator != null) {
                    selector.release(instantiator);
View Full Code Here

        super.doExecute();

        String templateId = getParameterAsString(TEMPLATE);

        ServiceSelector selector = null;
        Instantiator instantiator = null;

        try {

            Publication template = getDocumentFactory().getPublication(templateId);
            String name = getParameterAsString(PUBLICATION_NAME);

            selector = (ServiceSelector) this.manager.lookup(Instantiator.ROLE + "Selector");
            instantiator = (Instantiator) selector.select(template.getInstantiatorHint());

            instantiator.instantiate(template, getParameterAsString(PUBLICATION_ID), name);
           
        } finally {
            if (selector != null) {
                if (instantiator != null) {
                    selector.release(instantiator);
View Full Code Here

    protected void createMockPublication(String pubId, String area, String proxyUrl)
            throws PublicationException, ServiceException, Exception {
        if (!getFactory().existsPublication(pubId)) {

            Publication defaultPub = getPublication("default");
            Instantiator instantiator = null;
            ServiceSelector selector = null;
            try {
                selector = (ServiceSelector) getManager().lookup(Instantiator.ROLE + "Selector");
                instantiator = (Instantiator) selector.select(defaultPub.getInstantiatorHint());
                instantiator.instantiate(defaultPub, pubId, "Mock");
            } finally {
                if (selector != null) {
                    if (instantiator != null) {
                        selector.release(instantiator);
                    }
View Full Code Here

        String templateId = getParameterAsString(TEMPLATE);

        SourceResolver resolver = null;
        Source contextSource = null;
        ServiceSelector selector = null;
        Instantiator instantiator = null;

        try {
            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            Source context = resolver.resolveURI("context://");
            String contextPath = SourceUtil.getFile(context).getAbsolutePath();
            PublicationFactory factory = PublicationFactory.getInstance(getLogger());

            Publication template = factory.getPublication(templateId, contextPath);
            String name = getParameterAsString(PUBLICATION_NAME);

            selector = (ServiceSelector) this.manager.lookup(Instantiator.ROLE + "Selector");
            instantiator = (Instantiator) selector.select(template.getInstantiatorHint());

            instantiator.instantiate(template, getParameterAsString(PUBLICATION_ID), name);

        } finally {
            if (selector != null) {
                if (instantiator != null) {
                    selector.release(instantiator);
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.publication.templating.Instantiator

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.