public class PropertyCheck
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ERR_PROPERTY_NOT_SET |
| Constructor and Description |
|---|
PropertyCheck() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getPropertyName(java.lang.String value)
Dig out the property name from a placeholder-style property of form
${prop.name}, which will yield prop.name.
|
static boolean |
isValidPropertyString(java.lang.String value)
Checks that the given string is not:
null
empty
a placeholder of form '${...}'
|
static void |
mandatory(java.lang.Object target,
java.lang.String propertyName,
java.lang.Object value)
Checks that the property with the given name is not null.
|
public static final java.lang.String ERR_PROPERTY_NOT_SET
public static void mandatory(java.lang.Object target,
java.lang.String propertyName,
java.lang.Object value)
target - the object on which the property must have been setpropertyName - the name of the propertyvalue - of the property valuepublic static boolean isValidPropertyString(java.lang.String value)
value - the value to checkpublic static java.lang.String getPropertyName(java.lang.String value)
value - The property with or without property placeholdersjava.lang.IllegalArgumentException - if the value is nullCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.