Last active
August 29, 2015 14:17
-
-
Save kylefernandadams/76e5eee8df9bae3b08d8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boolean includePropertyDefintions = true; | |
// Get Type Children for cmis:secondary types | |
ItemIterable<ObjectType> secondaryTypeIterable = session.getTypeChildren("cmis:secondary", includePropertyDefintions); | |
System.out.println("Total Aspect Count: " + secondaryTypeIterable.getTotalNumItems()); | |
// Loop through secondary types | |
for(ObjectType secondaryObjectType : secondaryTypeIterable){ | |
// Check if type id's contain my:customAspect | |
if(secondaryObjectType.getId().contains("my:customAspect")){ | |
System.out.println("Found secondary type: " + secondaryObjectType.getDisplayName()); | |
// Get Property Definition Map | |
Map<String, PropertyDefinition<?>> propertyDefinitionMap = secondaryObjectType.getPropertyDefinitions(); | |
// Loop through Property Definition Map | |
for(Map.Entry<String, PropertyDefinition<?>> propertyDefinitionEntry : propertyDefinitionMap.entrySet()){ | |
if(propertyDefinitionEntry.getKey().contains("my")){ | |
// Check if the properties from the custom aspect | |
System.out.println("Property Definition Key: " + propertyDefinitionEntry.getKey()); | |
System.out.println("Property Definition Value: " + propertyDefinitionEntry.getValue()); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment