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


Constructor Summary
IdentityDocumentIdToPathMapper()
           
 
Method Summary
 java.io.File getDirectory(Publication publication, java.lang.String area, java.lang.String documentId)
          Deprecated. because language is missing (non-Javadoc)
 java.io.File getDirectory(Publication publication, java.lang.String area, java.lang.String documentId, java.lang.String language)
          (non-Javadoc)
 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-id 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-id.
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-id and language

Specified by:
getFile in interface DocumentIdToPathMapper
Parameters:
publication - the publication of the document
area - the area of the document
documentId - the document-id 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)

getDirectory

public java.io.File getDirectory(Publication publication,
                                 java.lang.String area,
                                 java.lang.String documentId,
                                 java.lang.String language)
(non-Javadoc)

Specified by:
getDirectory in interface DocumentIdToPathMapper
Parameters:
publication - The publication.
area - The area.
documentId - The document id.
language - The language of the document.
Returns:
The directory where all the files with the same document-id are located
See Also:
DocumentIdToPathMapper.getDirectory(org.apache.lenya.cms.publication.Publication, java.lang.String, java.lang.String)

getDirectory

public java.io.File getDirectory(Publication publication,
                                 java.lang.String area,
                                 java.lang.String documentId)
Deprecated. because language is missing (non-Javadoc)

Specified by:
getDirectory in interface DocumentIdToPathMapper
Parameters:
publication - The publication.
area - The area.
documentId - The document id.
Returns:
The directory where all the files with the same document-id are located
See Also:
DocumentIdToPathMapper.getDirectory(org.apache.lenya.cms.publication.Publication, 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-id. The file separator is the slash (/).

Specified by:
getPath in interface DocumentIdToPathMapper
Parameters:
documentId - the document-id 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-2005 Apache Software Foundation. All Rights Reserved.