Nuxeo Enterprise Platform 5.1

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

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

public class DocumentFileCodec
extends AbstractDocumentViewCodec
implements DocumentViewCodec


Field Summary
static String FILE_PROPERTY_PATH_KEY
           
static String FILENAME_KEY
           
static String FILENAME_PROPERTY_PATH_KEY
          Deprecated. soon will be part of the file property, passed as parameter for now
static String PREFIX
           
static String URLPattern
           
 
Fields inherited from class org.nuxeo.ecm.platform.url.service.AbstractDocumentViewCodec
prefix
 
Constructor Summary
DocumentFileCodec()
           
DocumentFileCodec(String prefix)
           
 
Method Summary
static Blob getBlob(DocumentModel doc, DocumentView docView)
           
static String getBlobPropertyName(DocumentView docView)
           
 DocumentView getDocumentViewFromUrl(String url)
          Extracts document location from a Zope-like URL ie : server/path_or_docId/view_id/tab_id .
static String getFilename(DocumentModel doc, DocumentView docView)
           
static String getFilenamePropertyName(DocumentView docView)
           
 String getPrefix()
           
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.platform.url.codec.api.DocumentViewCodec
handleDocumentView, handleUrl, setPrefix
 

Field Detail

PREFIX

public static final String PREFIX
See Also:
Constant Field Values

FILE_PROPERTY_PATH_KEY

public static final String FILE_PROPERTY_PATH_KEY
See Also:
Constant Field Values

FILENAME_PROPERTY_PATH_KEY

@Deprecated
public static final String FILENAME_PROPERTY_PATH_KEY
Deprecated. soon will be part of the file property, passed as parameter for now
See Also:
Constant Field Values

FILENAME_KEY

public static final String FILENAME_KEY
See Also:
Constant Field Values

URLPattern

public static final String URLPattern
See Also:
Constant Field Values
Constructor Detail

DocumentFileCodec

public DocumentFileCodec()

DocumentFileCodec

public DocumentFileCodec(String prefix)
Method Detail

getPrefix

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

getUrlFromDocumentView

public 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).

Specified by:
getUrlFromDocumentView in interface DocumentViewCodec
Returns:

getDocumentViewFromUrl

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

Specified by:
getDocumentViewFromUrl in interface DocumentViewCodec
Parameters:
url - the partial url to redirect to.
Returns:
a document view instance.

getBlobPropertyName

public static String getBlobPropertyName(DocumentView docView)

getBlob

public static Blob getBlob(DocumentModel doc,
                           DocumentView docView)

getFilenamePropertyName

public static String getFilenamePropertyName(DocumentView docView)

getFilename

public static String getFilename(DocumentModel doc,
                                 DocumentView docView)

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.