Package org.apache.jackrabbit.ocm.manager.collectionconverter

Examples of org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableCollection


        continue;
      }

      CollectionConverter collectionConverter = this.getCollectionConverter(session, collectionDescriptor);
      Object collection = ReflectionUtils.getNestedProperty(object, collectionDescriptor.getFieldName());
      ManageableCollection manageableCollection = ManageableCollectionUtil.getManageableCollection(collection);

      collectionConverter.updateCollection(session, objectNode, collectionDescriptor, manageableCollection);
    }
  }
View Full Code Here


    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;
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableCollection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.