Class FileManagerUtils
java.lang.Object
org.nuxeo.ecm.platform.filemanager.utils.FileManagerUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringfetchFileName(File file) Returns the fileName of a file.static StringfetchFileName(String fullName) Returns the fileName of an uploaded file.static StringfetchTitle(String filename) Returns the title.static DocumentModelgetExistingDocByFileName(CoreSession documentManager, String path, String filename) Looks if an existing Document with the same filename exists.static DocumentModelgetExistingDocByPropertyName(CoreSession documentManager, String path, String value, String propertyName) Looks if an existing Document has the same value for a given property.static DocumentModelgetExistingDocByTitle(CoreSession documentManager, String path, String title) Looks if an existing Document with the same title exists.
-
Method Details
-
fetchFileName
Returns the fileName of a file.- Throws:
MalformedURLException
-
fetchFileName
Returns the fileName of an uploaded file.- Parameters:
fullName- the full name that we need to parse- Returns:
- the FileName String
-
fetchTitle
Returns the title.- Parameters:
filename- the file name- Returns:
- the title
-
getExistingDocByFileName
public static DocumentModel getExistingDocByFileName(CoreSession documentManager, String path, String filename) Looks if an existing Document with the same filename exists. -
getExistingDocByTitle
public static DocumentModel getExistingDocByTitle(CoreSession documentManager, String path, String title) Looks if an existing Document with the same title exists. -
getExistingDocByPropertyName
public static DocumentModel getExistingDocByPropertyName(CoreSession documentManager, String path, String value, String propertyName) Looks if an existing Document has the same value for a given property.
-