expressionsByGroup.add(grouping, expression);
final ExpressionPropertyMetaData[] properties = expression.getPropertyDescriptions();
for (int j = 0; j < properties.length; j++)
{
final ExpressionPropertyMetaData propertyMetaData = properties[j];
final String name = propertyMetaData.getName();
if (StringUtils.isEmpty(name))
{
logger.warn("Expression '" + expression.getExpressionType() + ": Property without a name");
}
final String propertyDisplayName = propertyMetaData.getDisplayName(locale);
if (isValid(propertyDisplayName, name) == false)
{
logger.warn("Expression '" + expression.getExpressionType() + ": Property " + propertyMetaData.getName() + ": No DisplayName");
}
final String propertyGrouping = propertyMetaData.getGrouping(locale);
if (isValid(propertyGrouping, "Group") == false)
{
logger.warn("Expression '" + expression.getExpressionType() + ": Property " + propertyMetaData.getName() + ": Grouping is not valid");
}
final int groupingOrdinal = propertyMetaData.getGroupingOrdinal(locale);
if (groupingOrdinal == Integer.MAX_VALUE)
{
if (propertyMetaData instanceof DefaultExpressionMetaData)
{
final DefaultExpressionPropertyMetaData demd = (DefaultExpressionPropertyMetaData) propertyMetaData;
missingProperties.add(demd.getKeyPrefix() + "grouping.ordinal=1000");
}
logger.warn("Expression '" + expression.getExpressionType() + ": Property " + propertyMetaData.getName() + ": Grouping ordinal is not valid");
}
final int ordinal = propertyMetaData.getItemOrdinal(locale);
if (groupingOrdinal == Integer.MAX_VALUE)
{
if (propertyMetaData instanceof DefaultExpressionMetaData)
{
final DefaultExpressionPropertyMetaData demd = (DefaultExpressionPropertyMetaData) propertyMetaData;
missingProperties.add(demd.getKeyPrefix() + "ordinal=1000");
}
logger.warn("Expression '" + expression.getExpressionType() + ": Property " + propertyMetaData.getName() + ": Ordinal is not valid");
}
final String propertyDescription = propertyMetaData.getDescription(locale);
if (isValid(propertyDescription, "") == false)
{
logger.warn("Expression '" + expression.getExpressionType() + ": Property " + propertyMetaData.getName() + ": Description is not valid");
}
final String propertyDeprecated = propertyMetaData.getDeprecationMessage(locale);
if (isValid(propertyDeprecated, "") == false)
{
logger.warn("Expression '" + expression.getExpressionType() + ": Property " + propertyMetaData.getName() + ": Deprecation is not valid");
}
final String role = propertyMetaData.getPropertyRole();
if (isValid(role, "Value") == false)
{
logger.warn("Expression '" + expression.getExpressionType() + ": Property " + propertyMetaData.getName() + ": Role is not valid");
}
final Class propertyType = propertyMetaData.getPropertyType();
if (propertyType == null)
{
logger.warn("Expression '" + expression.getExpressionType() + ": Property " + propertyMetaData.getName() + ": Property Type is not valid");
}
// should not crash!
final PropertyDescriptor propertyDescriptor = propertyMetaData.getBeanDescriptor();
if (propertyMetaData.isDeprecated())
{
final String deprecateMessage = propertyMetaData.getDeprecationMessage(locale);
if (isValid(deprecateMessage, "Deprecated") == false)
{
logger.warn("Expression '" + expression.getExpressionType() + ": Property " + propertyMetaData.getName() + ": No valid deprecate message");
}
}
}