| 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.cms.publication.DefaultDocumentIdToPathMapper
public class DefaultDocumentIdToPathMapper
| Field Summary | |
|---|---|
static java.lang.String | 
BASE_FILENAME_PREFIX
 | 
static java.lang.String | 
BASE_FILENAME_SUFFIX
 | 
| Constructor Summary | |
|---|---|
DefaultDocumentIdToPathMapper()
 | 
|
| 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.lang.String | 
getDocumentId(Publication publication,
              java.lang.String area,
              java.io.File file)
Returns the document ID for a certain file.  | 
 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  | 
protected  java.lang.String | 
getFilename(java.lang.String language)
Constructs the filename for a given language.  | 
 java.lang.String | 
getLanguage(java.io.File file)
Returns the language for a certain file  | 
 java.lang.String | 
getPath(java.lang.String documentId,
        java.lang.String language)
Compute the document-path for a given publication, area and document-id.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String BASE_FILENAME_PREFIX
public static final java.lang.String BASE_FILENAME_SUFFIX
| Constructor Detail | 
|---|
public DefaultDocumentIdToPathMapper()
| Method Detail | 
|---|
public java.io.File getFile(Publication publication,
                            java.lang.String area,
                            java.lang.String documentId,
                            java.lang.String language)
DocumentIdToPathMapper
getFile in interface DocumentIdToPathMapperpublication - the publication of the documentarea - the area of the documentdocumentId - the document-id of the documentlanguage - the language of the document
DocumentIdToPathMapper.getFile(org.apache.lenya.cms.publication.Publication,
      java.lang.String, java.lang.String, java.lang.String)
public java.io.File getDirectory(Publication publication,
                                 java.lang.String area,
                                 java.lang.String documentId,
                                 java.lang.String language)
getDirectory in interface DocumentIdToPathMapperpublication - The publication.area - The area.documentId - The document id.language - The language of the document.
DocumentIdToPathMapper.getDirectory(org.apache.lenya.cms.publication.Publication,
      java.lang.String, java.lang.String)
public java.io.File getDirectory(Publication publication,
                                 java.lang.String area,
                                 java.lang.String documentId)
getDirectory in interface DocumentIdToPathMapperpublication - The publication.area - The area.documentId - The document id.
DocumentIdToPathMapper.getDirectory(org.apache.lenya.cms.publication.Publication,
      java.lang.String, java.lang.String)
public java.lang.String getPath(java.lang.String documentId,
                                java.lang.String language)
DocumentIdToPathMapper
getPath in interface DocumentIdToPathMapperdocumentId - the document-id of the documentlanguage - the language of the document
DocumentIdToPathMapper.getPath(java.lang.String,
      java.lang.String)protected java.lang.String getFilename(java.lang.String language)
language - The language.
public java.lang.String getDocumentId(Publication publication,
                                      java.lang.String area,
                                      java.io.File file)
                               throws DocumentDoesNotExistException
getDocumentId in interface PathToDocumentIdMapperpublication - The publication.area - The area.file - The file representing the document.
DocumentDoesNotExistException - when the document
 referenced by the file does not exist.public java.lang.String getLanguage(java.io.File file)
getLanguage in interface PathToDocumentIdMapperfile - the document file
  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||