Merge pull request #1348 from Alfresco/feature/APPS-852

APPS-852: Allow lowercase operation type
This commit is contained in:
Elena Hardon
2021-03-05 14:29:14 +02:00
committed by GitHub

View File

@@ -38,5 +38,20 @@ import org.alfresco.api.AlfrescoPublicApi;
public enum UpdateActionType
{
ADD,
REMOVE
REMOVE;
public static UpdateActionType valueOfIgnoreCase(String name)
{
UpdateActionType actionType;
try
{
actionType = UpdateActionType.valueOf(name.toUpperCase());
}
catch (Exception e)
{
throw new IllegalArgumentException("Could not find enum with name '" + name + "'. Not one of the values accepted for Enum class: [ADD, REMOVE]");
}
return actionType;
}
}