Package org.apache.lenya.cms.linking

Examples of org.apache.lenya.cms.linking.LinkResolver


        return shallNotifySubmitter;
    }
   
    protected boolean hasBrokenLinks() {
        LinkManager linkMgr = null;
        LinkResolver resolver = null;
        try {
            linkMgr = (LinkManager) this.manager.lookup(LinkManager.ROLE);
            resolver = (LinkResolver) this.manager.lookup(LinkResolver.ROLE);
            org.apache.lenya.cms.linking.Link[] links = linkMgr.getLinksFrom(getSourceDocument());
            for (int i = 0; i < links.length; i++) {
                LinkTarget target = resolver.resolve(getSourceDocument(), links[i].getUri());
                if (!target.exists()) {
                    return true;
                }
            }
        } catch (Exception e) {
View Full Code Here


        }
       
        protected Document[] getUnpublishedLinks() {
            Set docs = new HashSet();
            LinkManager linkMgr = null;
            LinkResolver resolver = null;
            try {
                linkMgr = (LinkManager) this.manager.lookup(LinkManager.ROLE);
                resolver = (LinkResolver) this.manager.lookup(LinkResolver.ROLE);
                org.apache.lenya.cms.linking.Link[] links = linkMgr.getLinksFrom(this.document);
                for (int i = 0; i < links.length; i++) {
                    LinkTarget target = resolver.resolve(this.document, links[i].getUri());
                    if (target.exists()) {
                        Document doc = target.getDocument();
                        if (!doc.existsAreaVersion(Publication.LIVE_AREA)) {
                            docs.add(doc);
                        }
View Full Code Here

        return shallNotifySubmitter;
    }
   
    protected boolean hasBrokenLinks() {
        LinkManager linkMgr = null;
        LinkResolver resolver = null;
        try {
            linkMgr = (LinkManager) this.manager.lookup(LinkManager.ROLE);
            resolver = (LinkResolver) this.manager.lookup(LinkResolver.ROLE);
            org.apache.lenya.cms.linking.Link[] links = linkMgr.getLinksFrom(getSourceDocument());
            for (int i = 0; i < links.length; i++) {
                LinkTarget target = resolver.resolve(getSourceDocument(), links[i].getUri());
                if (!target.exists()) {
                    return true;
                }
            }
        } catch (Exception e) {
View Full Code Here

        }
       
        protected Document[] getUnpublishedLinks() {
            Set docs = new HashSet();
            LinkManager linkMgr = null;
            LinkResolver resolver = null;
            try {
                linkMgr = (LinkManager) this.manager.lookup(LinkManager.ROLE);
                resolver = (LinkResolver) this.manager.lookup(LinkResolver.ROLE);
                org.apache.lenya.cms.linking.Link[] links = linkMgr.getLinksFrom(this.document);
                for (int i = 0; i < links.length; i++) {
                    LinkTarget target = resolver.resolve(this.document, links[i].getUri());
                    if (target.exists()) {
                        Document doc = target.getDocument();
                        if (!doc.existsAreaVersion(Publication.LIVE_AREA)) {
                            docs.add(doc);
                        }
View Full Code Here

        String queryString = null;
        if (uriAndQuery.length > 1) {
            queryString = uriAndQuery[1];
        }

        LinkResolver resolver = null;
        try {
            if (this.sourceResolver == null) {
                this.sourceResolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            }

            resolver = (LinkResolver) this.manager.lookup(LinkResolver.ROLE);
            DocumentFactory factory = DocumentUtil.getDocumentFactory(this.manager, request);
            String webappUrl = ServletHelper.getWebappURI(request);
            LinkTarget target;
            if (factory.isDocument(webappUrl)) {
                Document currentDoc = factory.getFromURL(webappUrl);
                target = resolver.resolve(currentDoc, linkUri);
            }
            else {
                Link link = new Link(linkUri);
                contextualize(link, webappUrl);
                target = resolver.resolve(factory, link.getUri());
            }

            Document doc = target.getDocument();

            if (target.isRevisionSpecified()) {
View Full Code Here

       
    }
   
    protected boolean hasBrokenLinks() {
        LinkManager linkMgr = null;
        LinkResolver resolver = null;
        try {
            linkMgr = (LinkManager) this.manager.lookup(LinkManager.ROLE);
            resolver = (LinkResolver) this.manager.lookup(LinkResolver.ROLE);
            org.apache.lenya.cms.linking.Link[] links = linkMgr.getLinksFrom(getSourceDocument());
            for (int i = 0; i < links.length; i++) {
                LinkTarget target = resolver.resolve(getSourceDocument(), links[i].getUri());
                if (!target.exists()) {
                    return true;
                }
            }
        } catch (Exception e) {
View Full Code Here

        }
       
        protected Document[] getUnpublishedLinks() {
            Set docs = new HashSet();
            LinkManager linkMgr = null;
            LinkResolver resolver = null;
            try {
                linkMgr = (LinkManager) this.manager.lookup(LinkManager.ROLE);
                resolver = (LinkResolver) this.manager.lookup(LinkResolver.ROLE);
                org.apache.lenya.cms.linking.Link[] links = linkMgr.getLinksFrom(this.document);
                for (int i = 0; i < links.length; i++) {
                    LinkTarget target = resolver.resolve(this.document, links[i].getUri());
                    if (target.exists()) {
                        Document doc = target.getDocument();
                        if (!doc.existsAreaVersion(Publication.LIVE_AREA)) {
                            docs.add(doc);
                        }
View Full Code Here

    public Object getAttribute(String name, Configuration modeConf, Map objectModel)
            throws ConfigurationException {
        Request request = ObjectModelHelper.getRequest(objectModel);
        try {
            DocumentFactory factory = DocumentUtil.getDocumentFactory(this.manager, request);
            LinkResolver linkResolver = (LinkResolver) this.manager.lookup(LinkResolver.ROLE);
            String currentUrl = ServletHelper.getWebappURI(request);
           
            UuidToUrlRewriter rewriter = new UuidToUrlRewriter(currentUrl, linkResolver, factory);
            if (factory.isDocument(currentUrl)) {
                rewriter.setCurrentDocument(factory.getFromURL(currentUrl));
View Full Code Here

        return shallNotifySubmitter;
    }
   
    protected boolean hasBrokenLinks() {
        LinkManager linkMgr = null;
        LinkResolver resolver = null;
        try {
            linkMgr = (LinkManager) this.manager.lookup(LinkManager.ROLE);
            resolver = (LinkResolver) this.manager.lookup(LinkResolver.ROLE);
            org.apache.lenya.cms.linking.Link[] links = linkMgr.getLinksFrom(getSourceDocument());
            for (int i = 0; i < links.length; i++) {
                LinkTarget target = resolver.resolve(getSourceDocument(), links[i].getUri());
                if (!target.exists()) {
                    return true;
                }
            }
        } catch (Exception e) {
View Full Code Here

        }
       
        protected Document[] getUnpublishedLinks() {
            Set docs = new HashSet();
            LinkManager linkMgr = null;
            LinkResolver resolver = null;
            try {
                linkMgr = (LinkManager) this.manager.lookup(LinkManager.ROLE);
                resolver = (LinkResolver) this.manager.lookup(LinkResolver.ROLE);
                org.apache.lenya.cms.linking.Link[] links = linkMgr.getLinksFrom(this.document);
                for (int i = 0; i < links.length; i++) {
                    LinkTarget target = resolver.resolve(this.document, links[i].getUri());
                    if (target.exists()) {
                        Document doc = target.getDocument();
                        if (!doc.existsAreaVersion(Publication.LIVE_AREA)) {
                            docs.add(doc);
                        }
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.linking.LinkResolver

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.