org.apache.lenya.cms.publication
Class IdentityDocumentIdToPathMapper

java.lang.Object
  extended by org.apache.lenya.cms.publication.IdentityDocumentIdToPathMapper
All Implemented Interfaces:
DocumentIdToPathMapper
Direct Known Subclasses:
SingleLanguageIdentityMapper

public class IdentityDocumentIdToPathMapper
extends java.lang.Object
implements DocumentIdToPathMapper

Identity Document Id to path mapper


Constructor Summary
IdentityDocumentIdToPathMapper()
           
 
Method Summary
 java.io.File getFile(Publication publication, java.lang.String area, java.lang.String documentId, java.lang.String language)
          Compute the document-path for a given publication, area, document-uuid and language
 java.lang.String getPath(java.lang.String documentId, java.lang.String language)
          Compute the document-path for a given publication, area and document-uuid.
protected  java.lang.String getSuffix(java.lang.String language)
          Constructs the filename for a given language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityDocumentIdToPathMapper

public IdentityDocumentIdToPathMapper()
Method Detail

getFile

public java.io.File getFile(Publication publication,
                            java.lang.String area,
                            java.lang.String documentId,
                            java.lang.String language)
Description copied from interface: DocumentIdToPathMapper
Compute the document-path for a given publication, area, document-uuid and language

Specified by:
getFile in interface DocumentIdToPathMapper
Parameters:
publication - the publication of the document
area - the area of the document
documentId - the uuid of the document
language - the language of the document
Returns:
the path to the document
See Also:
DocumentIdToPathMapper.getFile(org.apache.lenya.cms.publication.Publication, java.lang.String, java.lang.String, java.lang.String)

getPath

public java.lang.String getPath(java.lang.String documentId,
                                java.lang.String language)
Description copied from interface: DocumentIdToPathMapper
Compute the document-path for a given publication, area and document-uuid. The file separator is the slash (/).

Specified by:
getPath in interface DocumentIdToPathMapper
Parameters:
documentId - the UUID of the document
language - the language of the document
Returns:
the path to the document, without publication ID and area
See Also:
DocumentIdToPathMapper.getPath(java.lang.String, java.lang.String)

getSuffix

protected java.lang.String getSuffix(java.lang.String language)
Constructs the filename for a given language.

Parameters:
language - The language.
Returns:
A string value.


Copyright © 1999-2006 Apache Software Foundation. All Rights Reserved.