protected ManageableCollection doGetCollection(Session session,
Node parentNode,
CollectionDescriptor collectionDescriptor,
Class collectionFieldClass) throws RepositoryException {
ClassDescriptor elementClassDescriptor = mapper.getClassDescriptorByClass( ReflectionUtils.forName(collectionDescriptor.getElementClassName()));
ManageableCollection collection = ManageableCollectionUtil.getManageableCollection(collectionFieldClass);
NodeIterator nodes = this.getCollectionNodes(session, parentNode, elementClassDescriptor.getJcrType());
if (nodes == null || nodes.getSize() == 0)
{
return null;
}
while (nodes.hasNext()) {
Node itemNode = (Node) nodes.next();
log.debug("Collection node found : " + itemNode.getPath());
Object item = objectConverter.getObject(session, itemNode.getPath());
collection.addObject(item);
}
return collection;
}