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

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


                return null;
            }
            Property property = parentNode.getProperty(jcrName);
            Value[] values = property.getValues();

            ManageableObjects objects = ManageableObjectsUtil.getManageableObjects(collectionFieldClass);
            String elementClassName = collectionDescriptor.getElementClassName();
            Class elementClass = ReflectionUtils.forName(elementClassName);
            // For multi value collections, only Collections are supported
            if (! (objects instanceof ManageableCollection))
            {
View Full Code Here


            NodeIterator ni = parentNode.getNodes(jcrName);
            if (!ni.hasNext()) {
                return null;
            }

            ManageableObjects objects = ManageableObjectsUtil.getManageableObjects(collectionFieldClass);
            while (ni.hasNext()) {
                Node node = ni.nextNode();

                // ignore protected nodes here
                if (node.getDefinition().isProtected()) {
View Full Code Here

    protected ManageableObjects doGetCollection(Session session,
                                                   Node parentNode,
                                                   CollectionDescriptor collectionDescriptor,
                                                   Class collectionFieldClass) throws RepositoryException {
      ClassDescriptor elementClassDescriptor = mapper.getClassDescriptorByClass( ReflectionUtils.forName(collectionDescriptor.getElementClassName()));
        ManageableObjects objects = ManageableObjectsUtil.getManageableObjects(collectionFieldClass);

        NodeIterator nodes = this.getCollectionNodes(session, parentNode, elementClassDescriptor.getJcrType());

        if (nodes == null || nodes.getSize() == 0)
        {
View Full Code Here

        if (parentNode == null || !parentNode.hasNode(jcrName)) {
            return null;
        }

        ManageableObjects objects = ManageableObjectsUtil.getManageableObjects(collectionFieldClass);
        Node collectionNode = parentNode.getNode(jcrName);
        NodeIterator children = collectionNode.getNodes();
        Class elementClass = ReflectionUtils.forName(collectionDescriptor.getElementClassName());

        while (children.hasNext()) {
View Full Code Here

                return null;
            }
            Property property = parentNode.getProperty(jcrName);
            Value[] values = property.getValues();

            ManageableObjects objects = ManageableObjectsUtil.getManageableObjects(collectionFieldClass);
            for (int i = 0; i < values.length; i++) {

              if (objects instanceof ManageableCollection)
                    ((ManageableCollection)objects).addObject(values[i].getString());
              else
                throw new ObjectContentManagerException(
                    "Unsupported data type in ReferenceCollectionConverter : " + objects.getClass().getName());
            }

            return objects;
        }
        catch(ValueFormatException vfe) {
View Full Code Here

TOP

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

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.