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)
Deprecated.
since 7.2, use
IOUtils.toByteArray(java.io.InputStream) instead |
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.
|
@Deprecated public static byte[] getBytesFromFile(File file) throws IOException
IOUtils.toByteArray(java.io.InputStream)
insteadIOException
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)
public static DocumentModel getExistingDocByTitle(CoreSession documentManager, String path, String title)
public static DocumentModel getExistingDocByPropertyName(CoreSession documentManager, String path, String value, String propertyName)
Copyright © 2015 Nuxeo SA. All rights reserved.