org.apache.lenya.cms.publication
Interface PathToDocumentIdMapper

All Known Implementing Classes:
DefaultDocumentIdToPathMapper

public interface PathToDocumentIdMapper

This interface is basically the reverse of DocumentIdToPathMapper.


Method Summary
 java.lang.String getDocumentId(Publication publication, java.lang.String area, java.io.File file)
          Compute the document-id for a given file.
 java.lang.String getLanguage(java.io.File file)
          Returns the language for a given file
 

Method Detail

getDocumentId

java.lang.String getDocumentId(Publication publication,
                               java.lang.String area,
                               java.io.File file)
                               throws DocumentDoesNotExistException
Compute the document-id for a given file.

Parameters:
publication - the publication where the file is.
area - the area where the file is.
file - the file that is associated with the document
Returns:
the document-id of the document associated with the given file.
Throws:
DocumentDoesNotExistException - if there is no document associated with this file.

getLanguage

java.lang.String getLanguage(java.io.File file)
Returns the language for a given file

Parameters:
file - the document file
Returns:
the language for the given document file or null if the file has no language.


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