use of org.alfresco.opencmis.dictionary.CMISPropertyAccessor in project alfresco-repository by Alfresco.
the class CMISConnector method getAssocProperties.
public Properties getAssocProperties(CMISNodeInfo info, String filter) {
PropertiesImpl result = new PropertiesImpl();
Set<String> filterSet = splitFilter(filter);
for (PropertyDefinitionWrapper propDefWrap : info.getType().getProperties()) {
PropertyDefinition<?> propDef = propDefWrap.getPropertyDefinition();
if ((filterSet != null) && (!filterSet.contains(propDef.getQueryName()))) {
// skip properties that are not in the filter
continue;
}
CMISPropertyAccessor cmisPropertyAccessor = propDefWrap.getPropertyAccessor();
Serializable value = cmisPropertyAccessor.getValue(info);
PropertyType propType = propDef.getPropertyType();
PropertyData<?> propertyData = getProperty(propType, propDefWrap, value);
result.addProperty(propertyData);
}
return result;
}
Aggregations