Package org.nuxeo.ecm.platform.url.codec.api

Examples of org.nuxeo.ecm.platform.url.codec.api.DocumentViewCodec


    }

    @Override
    public DocumentView getDocumentViewFromUrl(String url) {
        Pattern pattern = Pattern.compile(getPrefix() + ID_URL_PATTERN);
        DocumentViewCodec codec = null;
        Matcher m = pattern.matcher(url);
        if (m.matches()) {
            codec = new DocumentIdCodec();
        } else {
            pattern = Pattern.compile(getPrefix() + PATH_URL_PATTERN);
            m = pattern.matcher(url);
            if (m.matches()) {
                codec = new DocumentPathCodec();
            }
        }
        if (codec != null) {
            codec.setPrefix(getPrefix());
            DocumentView docView = codec.getDocumentViewFromUrl(url);
            updateDocumentView(docView);
            return docView;
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.nuxeo.ecm.platform.url.codec.api.DocumentViewCodec

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.