private NodeInfoBuilder addProperties(NodeInfoBuilder builder, int count) throws RepositoryException { for (int k = 0; k < count; k++) { PropertyInfoBuilder pBuilder = builder.createPropertyInfo("property_" + k, "Just some string value " + k); pBuilder.build(); propertyPaths.add(toJCRPath(pBuilder.getPropertyInfo().getPath())); } return builder; }
@Override protected void initInfosStore(NodeInfoBuilder builder) throws RepositoryException { // build up a hierarchy of items builder .createNodeInfo("node1") .createNodeInfo("node11").build() .createNodeInfo("node12").build() .createNodeInfo("node13").build() .createPropertyInfo("property11", "value11").build() .createPropertyInfo("property12", "value12").build() .build() .createNodeInfo("node2") .createNodeInfo("node21") .createNodeInfo("node211") .createNodeInfo("node2111") .createNodeInfo("node21111") .createNodeInfo("node211111") .createNodeInfo("node2111111").build() .build() .build() .build() .build() .build() .build() .createNodeInfo("node3").build() .build(); }
/** * Create a new child {@link PropertyInfo} with a given <code>localName</code> and a given * <code>value</code> of type <code>String</code> on this {@link NodeInfo}. * * @param localName * @param value * @return <code>this</code> * @throws RepositoryException */ public PropertyInfoBuilder createPropertyInfo(String localName, String value) throws RepositoryException { PropertyInfoBuilder pBuilder = new PropertyInfoBuilder(this, localName, listener); pBuilder.addValue(value); return pBuilder; }
/** * Create a new child {@link PropertyInfo} with a given <code>localName</code> and a given * <code>value</code> of type <code>String</code> on this {@link NodeInfo}. * * @param localName * @param value * @return <code>this</code> * @throws RepositoryException */ public PropertyInfoBuilder createPropertyInfo(String localName, String value) throws RepositoryException { PropertyInfoBuilder pBuilder = new PropertyInfoBuilder(this, localName, listener); pBuilder.addValue(value); return pBuilder; }
/** * Add a {@link PropertyType#BINARY} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(File value) throws RepositoryException, IOException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#BINARY} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(byte[] value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#BOOLEAN} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(boolean value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#LONG} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(long value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#DOUBLE} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(double value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Create a new child {@link PropertyInfo} on this {@link NodeInfo}. * * @return <code>this</code> */ public PropertyInfoBuilder createPropertyInfo() { return new PropertyInfoBuilder(this, null, listener); }
/** * Add a {@link PropertyType#URI} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(URI value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#BOOLEAN} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(boolean value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#LONG} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(long value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#DATE} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(Calendar value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#BINARY} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(InputStream value) throws RepositoryException, IOException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#URI} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(URI value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#DECIMAL} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(BigDecimal value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#NAME} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(Name value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#STRING} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(String value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value, PropertyType.STRING)); }
/** * Add a {@link PropertyType#BINARY} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(File value) throws RepositoryException, IOException { return addValue(QValueFactoryImpl.getInstance().create(value)); }