public class HandlerUtils extends Object
BaseHandler.| Constructor and Description |
|---|
HandlerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static File |
checkAndReturnParent(String filename) |
static void |
checkFilenameDoesNotExist(String filename) |
static void |
checkFilenameExists(String filename) |
static void |
checkFilenameIsAbsolute(String filename) |
static void |
checkFilenameIsADirectory(String filename) |
static void |
checkFilenameIsAFile(String filename) |
static void |
checkFilenameIsNotEmpty(String filename) |
static void |
checkFilenameIsReadable(String filename) |
static void |
checkFilenameIsWriteable(String filename) |
static void |
checkIsSet(String parameterName,
Object parameterValue)
Utility method to verify a parameter value has been set and is not empty.
|
static char |
convertDigit(int value) |
static String |
encode(byte[] bytes) |
static String |
formatPath(String path)
Formats a path for display to the user.
|
public static void checkIsSet(String parameterName, Object parameterValue) throws ActionHandlerException
parameterName - name of the parameter being checkedparameterValue - actual value being testedActionHandlerException - if the value is null or an empty stringpublic static String formatPath(String path)
path - in a format used by the pluginpublic static String encode(byte[] bytes)
public static char convertDigit(int value)
public static void checkFilenameIsWriteable(String filename) throws ActionHandlerException
ActionHandlerExceptionpublic static void checkFilenameIsReadable(String filename) throws ActionHandlerException
ActionHandlerExceptionpublic static void checkFilenameIsAbsolute(String filename) throws ActionHandlerException
ActionHandlerExceptionpublic static void checkFilenameIsADirectory(String filename) throws ActionHandlerException
ActionHandlerExceptionpublic static void checkFilenameIsAFile(String filename) throws ActionHandlerException
ActionHandlerExceptionpublic static void checkFilenameExists(String filename) throws ActionHandlerException
ActionHandlerExceptionpublic static void checkFilenameIsNotEmpty(String filename) throws ActionHandlerException
ActionHandlerExceptionpublic static void checkFilenameDoesNotExist(String filename) throws ActionHandlerException
ActionHandlerExceptionpublic static File checkAndReturnParent(String filename) throws ActionHandlerException
ActionHandlerExceptionCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.