mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged CMM to HEAD
109799: SHA-1234: Modified boolean property with enhanced indexing option to not set the facetable attribute. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@109926 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -115,6 +115,7 @@ public class CustomModelsImpl implements CustomModels
|
|||||||
protected ValueDataTypeValidator valueDataTypeValidator;
|
protected ValueDataTypeValidator valueDataTypeValidator;
|
||||||
|
|
||||||
private static final String DEFAULT_DATA_TYPE = "d:text";
|
private static final String DEFAULT_DATA_TYPE = "d:text";
|
||||||
|
private static final String BOOLEAN_DATA_TYPE = "d:boolean";
|
||||||
private static final String SELECT_ALL = "all";
|
private static final String SELECT_ALL = "all";
|
||||||
private static final String SELECT_STATUS = "status";
|
private static final String SELECT_STATUS = "status";
|
||||||
private static final String SELECT_PROPS = "props";
|
private static final String SELECT_PROPS = "props";
|
||||||
@@ -954,17 +955,6 @@ public class CustomModelsImpl implements CustomModels
|
|||||||
m2Property.setMandatory(prop.isMandatory());
|
m2Property.setMandatory(prop.isMandatory());
|
||||||
m2Property.setMandatoryEnforced(prop.isMandatoryEnforced());
|
m2Property.setMandatoryEnforced(prop.isMandatoryEnforced());
|
||||||
m2Property.setMultiValued(prop.isMultiValued());
|
m2Property.setMultiValued(prop.isMultiValued());
|
||||||
// Set indexing options
|
|
||||||
m2Property.setIndexed(prop.isIndexed());
|
|
||||||
if (Facetable.TRUE == prop.getFacetable())
|
|
||||||
{
|
|
||||||
m2Property.setFacetable(true);
|
|
||||||
}
|
|
||||||
else if (Facetable.FALSE == prop.getFacetable())
|
|
||||||
{
|
|
||||||
m2Property.setFacetable(false);
|
|
||||||
}
|
|
||||||
m2Property.setIndexTokenisationMode(prop.getIndexTokenisationMode());
|
|
||||||
|
|
||||||
String dataType = prop.getDataType();
|
String dataType = prop.getDataType();
|
||||||
// Default type is d:text
|
// Default type is d:text
|
||||||
@@ -991,6 +981,24 @@ public class CustomModelsImpl implements CustomModels
|
|||||||
}
|
}
|
||||||
m2Property.setType(dataType);
|
m2Property.setType(dataType);
|
||||||
m2Property.setDefaultValue(prop.getDefaultValue());
|
m2Property.setDefaultValue(prop.getDefaultValue());
|
||||||
|
|
||||||
|
// Set indexing options
|
||||||
|
m2Property.setIndexed(prop.isIndexed());
|
||||||
|
// SHA-1234
|
||||||
|
// This 'if' statement can be removed when we fix the Solr schema
|
||||||
|
// so it can support boolean data type.
|
||||||
|
if (!BOOLEAN_DATA_TYPE.equals(dataType))
|
||||||
|
{
|
||||||
|
if (Facetable.TRUE == prop.getFacetable())
|
||||||
|
{
|
||||||
|
m2Property.setFacetable(true);
|
||||||
|
}
|
||||||
|
else if (Facetable.FALSE == prop.getFacetable())
|
||||||
|
{
|
||||||
|
m2Property.setFacetable(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m2Property.setIndexTokenisationMode(prop.getIndexTokenisationMode());
|
||||||
|
|
||||||
// Check for constraints
|
// Check for constraints
|
||||||
List<String> constraintRefs = prop.getConstraintRefs();
|
List<String> constraintRefs = prop.getConstraintRefs();
|
||||||
|
Reference in New Issue
Block a user