mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added LIST constraint
- An optionally case-insensitive list of supported values - Supports any types that can be converted to String by our type-converter. Simple parameter values for constraints must not be in a <value> element, just like Spring properties (sorry) Constraint parameters of type java.util.List are now supported: <list> <value> <value> </list> git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2660 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
*/
|
||||
package org.alfresco.repo.dictionary;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Definition of a named value that can be used for property injection.
|
||||
*
|
||||
@@ -24,8 +26,8 @@ package org.alfresco.repo.dictionary;
|
||||
public class M2NamedValue
|
||||
{
|
||||
private String name;
|
||||
private String value;
|
||||
|
||||
private String simpleValue;
|
||||
private List<String> listValue;
|
||||
|
||||
/*package*/ M2NamedValue()
|
||||
{
|
||||
@@ -35,7 +37,7 @@ public class M2NamedValue
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return (name + "=" + value);
|
||||
return (name + "=" + (simpleValue == null ? listValue : simpleValue));
|
||||
}
|
||||
|
||||
public String getName()
|
||||
@@ -46,8 +48,16 @@ public class M2NamedValue
|
||||
/**
|
||||
* @return Returns the raw, unconverted value
|
||||
*/
|
||||
public String getValue()
|
||||
public String getSimpleValue()
|
||||
{
|
||||
return value;
|
||||
return simpleValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the list of raw, unconverted values
|
||||
*/
|
||||
public List<String> getListValue()
|
||||
{
|
||||
return listValue;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user