public class WorkspaceUtil extends Object
| Constructor and Description |
|---|
WorkspaceUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
cleanName(String name)
Clean the given name from invalid chars.
|
static FolderItem |
createExternalFile(WorkspaceFolder destinationFolder,
String name,
String description,
String mimeType,
InputStream is)
Create a external file in the specified folder.
|
static String |
getUniqueName(String initialName,
WorkspaceFolder folder)
Retrieve an unique name for the specified folder.
|
public static String getUniqueName(String initialName, WorkspaceFolder folder) throws InternalErrorException
initialName - the initial name.folder - the item folder.InternalErrorException - if an error occurs.public static String cleanName(String name) throws InternalErrorException
name - the name to clean.InternalErrorException - if an error occurs.public static FolderItem createExternalFile(WorkspaceFolder destinationFolder, String name, String description, String mimeType, InputStream is) throws InsufficientPrivilegesException, InternalErrorException, ItemAlreadyExistException
destinationFolder - the destination folder.name - the external file name.description - the external file description.mimeType - the external file mimetype.is - the external file data.InsufficientPrivilegesException - if an error occurs.InternalErrorException - if an error occurs.ItemAlreadyExistException - if an error occurs.Copyright © 2014. All Rights Reserved.