com.jboss.jbossnetwork.product.jbpm.handlers
Class HandlerUtils
java.lang.Object
com.jboss.jbossnetwork.product.jbpm.handlers.HandlerUtils
public class HandlerUtils
- extends Object
Utilities provided to handlers that are outside of the JBPM specific methods found in BaseHandler.
- Author:
- Jason Dobies
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HandlerUtils
public HandlerUtils()
checkIsSet
public static void checkIsSet(String parameterName,
Object parameterValue)
throws ActionHandlerException
- Utility method to verify a parameter value has been set and is not empty. This check will throw an exception if
these conditions are not met.
- Parameters:
parameterName - name of the parameter being checkedparameterValue - actual value being tested
- Throws:
ActionHandlerException - if the value is null or an empty string
formatPath
public static String formatPath(String path)
- Formats a path for display to the user.
- Parameters:
path - in a format used by the plugin
- Returns:
- user friendly path
encode
public static String encode(byte[] bytes)
convertDigit
public static char convertDigit(int value)
checkFilenameIsWriteable
public static void checkFilenameIsWriteable(String filename)
throws ActionHandlerException
- Throws:
ActionHandlerException
checkFilenameIsReadable
public static void checkFilenameIsReadable(String filename)
throws ActionHandlerException
- Throws:
ActionHandlerException
checkFilenameIsAbsolute
public static void checkFilenameIsAbsolute(String filename)
throws ActionHandlerException
- Throws:
ActionHandlerException
checkFilenameIsADirectory
public static void checkFilenameIsADirectory(String filename)
throws ActionHandlerException
- Throws:
ActionHandlerException
checkFilenameIsAFile
public static void checkFilenameIsAFile(String filename)
throws ActionHandlerException
- Throws:
ActionHandlerException
checkFilenameExists
public static void checkFilenameExists(String filename)
throws ActionHandlerException
- Throws:
ActionHandlerException
checkFilenameIsNotEmpty
public static void checkFilenameIsNotEmpty(String filename)
throws ActionHandlerException
- Throws:
ActionHandlerException
checkFilenameDoesNotExist
public static void checkFilenameDoesNotExist(String filename)
throws ActionHandlerException
- Throws:
ActionHandlerException
checkAndReturnParent
public static File checkAndReturnParent(String filename)
throws ActionHandlerException
- Throws:
ActionHandlerException
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.