Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.url.codec
Class DocumentPathCodec

java.lang.Object
  extended by org.nuxeo.ecm.platform.url.service.AbstractDocumentViewCodec
      extended by org.nuxeo.ecm.platform.url.codec.DocumentPathCodec
All Implemented Interfaces:
DocumentViewCodec

public class DocumentPathCodec
extends AbstractDocumentViewCodec

Codec handling a document repository, path, view and additional request parameters.

Author:
Anahide Tchertchian

Field Summary
static java.lang.String PREFIX
           
static int URL_MAX_LENGTH
           
static java.lang.String URL_PATTERN
           
 
Constructor Summary
DocumentPathCodec()
           
DocumentPathCodec(java.lang.String prefix)
           
 
Method Summary
 DocumentView getDocumentViewFromUrl(java.lang.String url)
          Extracts document location from a Zope-like URL, eg: server/path_or_docId/view_id/tab_id .
 java.lang.String getPrefix()
           
 java.lang.String getUrlFromDocumentView(DocumentView docView)
          Builds an url from the given document view.
 
Methods inherited from class org.nuxeo.ecm.platform.url.service.AbstractDocumentViewCodec
handleDocumentView, handleUrl, setPrefix
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URL_MAX_LENGTH

public static int URL_MAX_LENGTH

PREFIX

public static final java.lang.String PREFIX
See Also:
Constant Field Values

URL_PATTERN

public static final java.lang.String URL_PATTERN
See Also:
Constant Field Values
Constructor Detail

DocumentPathCodec

public DocumentPathCodec()

DocumentPathCodec

public DocumentPathCodec(java.lang.String prefix)
Method Detail

getPrefix

public java.lang.String getPrefix()
Specified by:
getPrefix in interface DocumentViewCodec
Overrides:
getPrefix in class AbstractDocumentViewCodec

getUrlFromDocumentView

public java.lang.String getUrlFromDocumentView(DocumentView docView)
Description copied from interface: DocumentViewCodec
Builds an url from the given document view.

The url should be partial: it should not hold the context path information (server:port/nuxeo).

Returns:

getDocumentViewFromUrl

public DocumentView getDocumentViewFromUrl(java.lang.String url)
Extracts document location from a Zope-like URL, eg: server/path_or_docId/view_id/tab_id .

Parameters:
url - the partial url to redirect to.
Returns:
a document view instance.

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.