Merged 5.1.N (5.1.1) to HEAD (5.1)

118424 cturlica: Merged 5.0.N (5.0.4) to 5.1.N (5.1.1)
      118394 amukha: Merged 5.0.1 (5.0.1.14) to 5.0.N (5.0.4)
         117907 abalmus: MNT-14631 : REST Processes and Tasks API for parameters/variables allowed MATCHES operator, operator is not case-insensitive
            - Fix on Alfresco side, test and updated pom.xml to use new Activiti jar


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@123593 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-03-11 17:30:06 +00:00
parent 0e0e903b61
commit 021911fad0
2 changed files with 40 additions and 1 deletions

View File

@@ -377,7 +377,15 @@ public class ProcessesImpl extends WorkflowRestImpl implements Processes
{
throw new InvalidArgumentException("the matches operator can only be used with a String value for property " + queryVariableHolder.getPropertyName());
}
query.variableValueLike(queryVariableHolder.getPropertyName(), (String) queryVariableHolder.getPropertyValue());
if (((String) queryVariableHolder.getPropertyValue()).startsWith("(?i)"))
{
query.variableValueLikeIgnoreCase(queryVariableHolder.getPropertyName(), ((String) queryVariableHolder.getPropertyValue()).substring("(?i)".length()).toLowerCase());
}
else
{
query.variableValueLike(queryVariableHolder.getPropertyName(), (String) queryVariableHolder.getPropertyValue());
}
}
else if (queryVariableHolder.getOperator() == WhereClauseParser.NEGATION)
{