mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge pull request #1348 from Alfresco/feature/APPS-852
APPS-852: Allow lowercase operation type
This commit is contained in:
@@ -38,5 +38,20 @@ import org.alfresco.api.AlfrescoPublicApi;
|
|||||||
public enum UpdateActionType
|
public enum UpdateActionType
|
||||||
{
|
{
|
||||||
ADD,
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user