mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
MOB-29: Content Storage Lifecycle Management
- Some collapsing of common code in Constraint hierarchy. - Added aspect 'cm:storeSelector' with property 'cm:storeName'. - Defined a new, unused content store 'storeSelectorContentStore' (see content-services-context.xml). If this store is used, then setting the 'cm:storeName' property will force content to be stored in one of the named stores. A LIST constraint is indirectly enforced for the 'cm:storeName' property. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14329 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -53,9 +53,6 @@ public class NumericRangeConstraint extends AbstractConstraint
|
||||
private double minValue = Double.MIN_VALUE;
|
||||
private double maxValue = Double.MAX_VALUE;
|
||||
|
||||
/*
|
||||
* @see org.alfresco.service.cmr.dictionary.Constraint#getType()
|
||||
*/
|
||||
@Override
|
||||
public String getType()
|
||||
{
|
||||
@@ -118,17 +115,18 @@ public class NumericRangeConstraint extends AbstractConstraint
|
||||
}
|
||||
this.maxValue = maxValue;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.alfresco.service.cmr.dictionary.Constraint#initialize()
|
||||
*/
|
||||
public void initialize()
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.alfresco.repo.dictionary.constraint.AbstractConstraint#evaluateSingleValue(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> getParameters()
|
||||
{
|
||||
Map<String, Object> params = new HashMap<String, Object>(2);
|
||||
|
||||
params.put("minValue", this.minValue);
|
||||
params.put("maxValue", this.maxValue);
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
protected void evaluateSingleValue(Object value)
|
||||
{
|
||||
// ensure that the value can be converted to a double
|
||||
@@ -154,17 +152,4 @@ public class NumericRangeConstraint extends AbstractConstraint
|
||||
throw new ConstraintException(ERR_OUT_OF_RANGE, checkValue, minValue, maxValue);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.alfresco.service.cmr.dictionary.Constraint#getParameters()
|
||||
*/
|
||||
public Map<String, Object> getParameters()
|
||||
{
|
||||
Map<String, Object> params = new HashMap<String, Object>(2);
|
||||
|
||||
params.put("minValue", this.minValue);
|
||||
params.put("maxValue", this.maxValue);
|
||||
|
||||
return params;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user