public final class FileManagerUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
fetchFileName(File file)
Returns the fileName of a file.
|
static String |
fetchFileName(String fullName)
Returns the fileName of an uploaded file.
|
static String |
fetchTitle(String filename)
Returns the title.
|
static byte[] |
getBytesFromFile(File file)
Returns the contents of the file in a byte array.
|
static DocumentModel |
getExistingDocByFileName(CoreSession documentManager,
String path,
String filename)
Looks if an existing Document with the same filename exists.
|
static DocumentModel |
getExistingDocByPropertyName(CoreSession documentManager,
String path,
String value,
String propertyName)
Looks if an existing Document has the same value for a given property.
|
static DocumentModel |
getExistingDocByTitle(CoreSession documentManager,
String path,
String title)
Looks if an existing Document with the same title exists.
|
public static byte[] getBytesFromFile(File file) throws IOException
IOException
public static String fetchFileName(File file) throws MalformedURLException
MalformedURLException
public static String fetchFileName(String fullName)
fullName
- the full name that we need to parsepublic static String fetchTitle(String filename)
filename
- the file namepublic static DocumentModel getExistingDocByFileName(CoreSession documentManager, String path, String filename) throws ClientException
ClientException
public static DocumentModel getExistingDocByTitle(CoreSession documentManager, String path, String title) throws ClientException
ClientException
public static DocumentModel getExistingDocByPropertyName(CoreSession documentManager, String path, String value, String propertyName) throws ClientException
ClientException
Copyright © 2011 Nuxeo SA. All Rights Reserved.