public class PropertyCheck extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ERR_PROPERTY_NOT_SET |
Constructor and Description |
---|
PropertyCheck() |
Modifier and Type | Method and Description |
---|---|
static String |
getPropertyName(String value)
Dig out the property name from a placeholder-style property of form
${prop.name}, which will yield prop.name.
|
static boolean |
isValidPropertyString(String value)
Checks that the given string is not:
null
empty
a placeholder of form '${...}'
|
static void |
mandatory(Object target,
String propertyName,
Object value)
Checks that the property with the given name is not null.
|
public static final String ERR_PROPERTY_NOT_SET
public static void mandatory(Object target, String propertyName, 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(String value)
value
- the value to checkpublic static String getPropertyName(String value)
value
- The property with or without property placeholdersIllegalArgumentException
- if the value is nullCopyright © 2005–2016 Alfresco Software. All rights reserved.