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

Examples of org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableCollection.addObject()


                if (collection instanceof Map) {
                    String name = prop.getName();
                    ((Map) collection).put(name, value);
                } else {
                    collection.addObject(value);
                }
            }

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


          
            for (int i = 0; i < values.length; i++) {
                String uuid = values[i].getString();
                String path = session.getNodeByUUID(uuid).getPath();         
          Object object = objectConverter.getObject(session, path);
                collection.addObject(object);
            }

            return collection;
        }
        catch(Exception e) {
View Full Code Here

        Class elementClass = ReflectionUtils.forName(collectionDescriptor.getElementClassName());
       
        while (children.hasNext()) {
            Node itemNode = children.nextNode();
            Object item = objectConverter.getObject(session, elementClass, itemNode.getPath());
            collection.addObject(item);
        }

        return collection;
    }
   
View Full Code Here

            Value[] values = property.getValues();

            ManageableCollection collection = ManageableCollectionUtil.getManageableCollection(collectionFieldClass);
            for (int i = 0; i < values.length; i++) {
               
                collection.addObject(values[i].getString());
            }

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

            String elementClassName = collectionDescriptor.getElementClassName();
            Class elementClass = ReflectionUtils.forName(elementClassName);
            for (int i = 0; i < values.length; i++) {
                AtomicTypeConverter atomicTypeConverter = (AtomicTypeConverter) atomicTypeConverters
                    .get(elementClass);
                collection.addObject(atomicTypeConverter.getObject(values[i]));
            }

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

                Object item = objectConverter.getObject(session, node.getPath());
                if (collection instanceof Map) {
                    String name = node.getName();
                    ((Map) collection).put(name, item);
                } else {
                    collection.addObject(item);
                }
            }

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

               
        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
Copyright © 2018 www.massapi.com. 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.