Class ParameterCheck
- java.lang.Object
-
- org.alfresco.rest.rm.community.util.ParameterCheck
-
public class ParameterCheck extends Object
Utility class for checking parameters- Since:
- 2.6
- Author:
- Tuna Aksoy
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmandatoryObject(String paramName, Object object)Checks if a givenObjectis null or notstatic voidmandatoryString(String paramName, String paramValue)Checks if a givenStringis blank or not, i.e.
-
-
-
Method Detail
-
mandatoryString
public static void mandatoryString(String paramName, String paramValue) throws IllegalArgumentException
Checks if a givenStringis blank or not, i.e. notnull, "" or " ".- Parameters:
paramName- The name of the parameter to checkparamValue- The value of the parameter to check- Throws:
IllegalArgumentException- Throws an exception if the given value is blank
-
mandatoryObject
public static void mandatoryObject(String paramName, Object object) throws IllegalArgumentException
Checks if a givenObjectis null or not- Parameters:
paramName- The name of the parameter to checkobject- The value of the parameter to check- Throws:
IllegalArgumentException- Throws an exception if the given value is null
-
-