Package javax.jcr

Examples of javax.jcr.ValueFactory


        Node testNode = JcrUtils.getOrCreateByPath(testNodePath, null, adminSession);
        testNode.setProperty("id", "aaron.mcdonald@mailinator.com");

        AccessControlManager acMgr = adminSession.getAccessControlManager();
        JackrabbitAccessControlList tmpl = AccessControlUtils.getAccessControlList(acMgr, "/home/users/geometrixx-outdoors");
        ValueFactory vf = adminSession.getValueFactory();
        Map<String, Value> restrictions = new HashMap<String, Value>();
        restrictions.put("rep:glob", vf.createValue("*/social/relationships/following/*"));
        tmpl.addEntry(EveryonePrincipal.getInstance(), new Privilege[]{acMgr.privilegeFromName(Privilege.JCR_READ)}, true, restrictions);
        acMgr.setPolicy(tmpl.getPath(), tmpl);
        adminSession.save();

        Session anonymousSession = getRepository().login(new GuestCredentials());
View Full Code Here


        }

        try
        {
            Query query = session.getWorkspace().getQueryManager().createQuery( q, Query.JCR_SQL2 );
            ValueFactory valueFactory = session.getValueFactory();
            if ( startTime != null )
            {
                query.bindValue( "start", valueFactory.createValue( createCalendar( startTime ) ) );
            }
            if ( endTime != null )
            {
                query.bindValue( "end", valueFactory.createValue( createCalendar( endTime ) ) );
            }
            QueryResult result = query.execute();

            artifacts = new ArrayList<ArtifactMetadata>();
            for ( Node n : JcrUtils.getNodes( result ) )
View Full Code Here

        String q = getArtifactQuery( repositoryId ) + " AND ([sha1] = $checksum OR [md5] = $checksum)";

        try
        {
            Query query = session.getWorkspace().getQueryManager().createQuery( q, Query.JCR_SQL2 );
            ValueFactory valueFactory = session.getValueFactory();
            query.bindValue( "checksum", valueFactory.createValue( checksum ) );
            QueryResult result = query.execute();

            artifacts = new ArrayList<ArtifactMetadata>();
            for ( Node n : JcrUtils.getNodes( result ) )
            {
View Full Code Here

     *
     * @throws RepositoryException
     */
    protected void initRepositoryDescriptors() throws RepositoryException {

        ValueFactory valFactory = ValueFactoryImpl.getInstance();
        Value valTrue = valFactory.createValue(true);
        Value valFalse = valFactory.createValue(false);

        setDescriptor(Repository.REP_NAME_DESC, "Jackrabbit");
        setDescriptor(Repository.REP_VENDOR_DESC, "Apache Software Foundation");
        setDescriptor(Repository.REP_VENDOR_URL_DESC, "http://jackrabbit.apache.org/");
        setDescriptor(Repository.SPEC_NAME_DESC, "Content Repository API for Java(TM) Technology Specification");
        setDescriptor(Repository.SPEC_VERSION_DESC, "2.0");

        setDescriptor(Repository.IDENTIFIER_STABILITY, Repository.IDENTIFIER_STABILITY_INDEFINITE_DURATION);
        setDescriptor(Repository.LEVEL_1_SUPPORTED, valTrue);
        setDescriptor(Repository.LEVEL_2_SUPPORTED, valTrue);
        setDescriptor(Repository.WRITE_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE, Repository.NODE_TYPE_MANAGEMENT_INHERITANCE_MULTIPLE);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED, valFalse);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED, valTrue);

        Value[] types = new Value[] {
                valFactory.createValue(PropertyType.BINARY),
                valFactory.createValue(PropertyType.BOOLEAN),
                valFactory.createValue(PropertyType.DATE),
                valFactory.createValue(PropertyType.DECIMAL),
                valFactory.createValue(PropertyType.DOUBLE),
                valFactory.createValue(PropertyType.LONG),
                valFactory.createValue(PropertyType.NAME),
                valFactory.createValue(PropertyType.PATH),
                valFactory.createValue(PropertyType.REFERENCE),
                valFactory.createValue(PropertyType.STRING),
                valFactory.createValue(PropertyType.URI),
                valFactory.createValue(PropertyType.WEAKREFERENCE),
                valFactory.createValue(PropertyType.UNDEFINED)
        };
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_PROPERTY_TYPES, types);

        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED, valFalse);
        setDescriptor(Repository.OPTION_ACCESS_CONTROL_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_LIFECYCLE_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_LOCKING_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_OBSERVATION_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_QUERY_SQL_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_RETENTION_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_SHAREABLE_NODES_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_SIMPLE_VERSIONING_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_TRANSACTIONS_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_UNFILED_CONTENT_SUPPORTED, valFalse);
        setDescriptor(Repository.OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_VERSIONING_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_XML_EXPORT_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_XML_IMPORT_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_ACTIVITIES_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_BASELINES_SUPPORTED, valTrue);

        setDescriptor(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED, valTrue);
        setDescriptor(Repository.QUERY_JOINS, Repository.QUERY_JOINS_INNER_OUTER);

        Value[] languages = new Value[] {
                valFactory.createValue("javax.jcr.query.JCR-JQOM"),
                valFactory.createValue("javax.jcr.query.JCR-SQL2")
        };
        setDescriptor(Repository.QUERY_LANGUAGES, languages);

        setDescriptor(Repository.QUERY_STORED_QUERIES_SUPPORTED, valTrue);
        setDescriptor(Repository.QUERY_XPATH_POS_INDEX, valTrue);
View Full Code Here

            rootNode.addNode("node0");
            rootNode.addNode("node1");
            Node node2 = rootNode.addNode("node2");
            Node node3 = node2.addNode("node3");
            Node nodeWithBinary = node3.addNode("node-with-binary");
            ValueFactory vf = sessionGarbageCollector.getValueFactory();
            nodeWithBinary.setProperty("prop", vf.createBinary(new RandomInputStream(10, 1000)));
            sessionMover.save();
            sleepForFile();
        } catch (RepositoryException e) {
            failWithException(e);
        }
View Full Code Here

     *
     * @throws RepositoryException
     */
    protected void initRepositoryDescriptors() throws RepositoryException {

        ValueFactory valFactory = ValueFactoryImpl.getInstance();
        Value valTrue = valFactory.createValue(true);
        Value valFalse = valFactory.createValue(false);

        setDescriptor(Repository.REP_NAME_DESC, "Jackrabbit");
        setDescriptor(Repository.REP_VENDOR_DESC, "Apache Software Foundation");
        setDescriptor(Repository.REP_VENDOR_URL_DESC, "http://jackrabbit.apache.org/");
        setDescriptor(Repository.SPEC_NAME_DESC, "Content Repository API for Java(TM) Technology Specification");
        setDescriptor(Repository.SPEC_VERSION_DESC, "2.0");

        setDescriptor(Repository.IDENTIFIER_STABILITY, Repository.IDENTIFIER_STABILITY_INDEFINITE_DURATION);
        setDescriptor(Repository.LEVEL_1_SUPPORTED, valTrue);
        setDescriptor(Repository.LEVEL_2_SUPPORTED, valTrue);
        setDescriptor(Repository.WRITE_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE, Repository.NODE_TYPE_MANAGEMENT_INHERITANCE_MULTIPLE);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED, valFalse);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED, valTrue);

        Value[] types = new Value[] {
                valFactory.createValue(PropertyType.BINARY),
                valFactory.createValue(PropertyType.BOOLEAN),
                valFactory.createValue(PropertyType.DATE),
                valFactory.createValue(PropertyType.DECIMAL),
                valFactory.createValue(PropertyType.DOUBLE),
                valFactory.createValue(PropertyType.LONG),
                valFactory.createValue(PropertyType.NAME),
                valFactory.createValue(PropertyType.PATH),
                valFactory.createValue(PropertyType.REFERENCE),
                valFactory.createValue(PropertyType.STRING),
                valFactory.createValue(PropertyType.URI),
                valFactory.createValue(PropertyType.WEAKREFERENCE),
                valFactory.createValue(PropertyType.UNDEFINED)
        };
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_PROPERTY_TYPES, types);

        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED, valFalse);
        setDescriptor(Repository.OPTION_ACCESS_CONTROL_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_LIFECYCLE_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_LOCKING_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_OBSERVATION_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_QUERY_SQL_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_RETENTION_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_SHAREABLE_NODES_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_SIMPLE_VERSIONING_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_TRANSACTIONS_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_UNFILED_CONTENT_SUPPORTED, valFalse);
        setDescriptor(Repository.OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_VERSIONING_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_XML_EXPORT_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_XML_IMPORT_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_ACTIVITIES_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_BASELINES_SUPPORTED, valTrue);

        setDescriptor(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED, valTrue);
        setDescriptor(Repository.QUERY_JOINS, Repository.QUERY_JOINS_INNER_OUTER);

        Value[] languages = new Value[] {
                valFactory.createValue("javax.jcr.query.JCR-JQOM"),
                valFactory.createValue("javax.jcr.query.JCR-SQL2")
        };
        setDescriptor(Repository.QUERY_LANGUAGES, languages);

        setDescriptor(Repository.QUERY_STORED_QUERIES_SUPPORTED, valTrue);
        setDescriptor(Repository.QUERY_XPATH_POS_INDEX, valTrue);
View Full Code Here

     *
     * @throws RepositoryException
     */
    protected void initRepositoryDescriptors() throws RepositoryException {

        ValueFactory valFactory = ValueFactoryImpl.getInstance();
        Value valTrue = valFactory.createValue(true);
        Value valFalse = valFactory.createValue(false);

        setDescriptor(Repository.REP_NAME_DESC, "Jackrabbit");
        setDescriptor(Repository.REP_VENDOR_DESC, "Apache Software Foundation");
        setDescriptor(Repository.REP_VENDOR_URL_DESC, "http://jackrabbit.apache.org/");
        setDescriptor(Repository.SPEC_NAME_DESC, "Content Repository API for Java(TM) Technology Specification");
        setDescriptor(Repository.SPEC_VERSION_DESC, "2.0");

        setDescriptor(Repository.IDENTIFIER_STABILITY, Repository.IDENTIFIER_STABILITY_INDEFINITE_DURATION);
        setDescriptor(Repository.LEVEL_1_SUPPORTED, valTrue);
        setDescriptor(Repository.LEVEL_2_SUPPORTED, valTrue);
        setDescriptor(Repository.WRITE_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE, Repository.NODE_TYPE_MANAGEMENT_INHERITANCE_MULTIPLE);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED, valFalse);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED, valTrue);

        Value[] types = new Value[] {
                valFactory.createValue(PropertyType.BINARY),
                valFactory.createValue(PropertyType.BOOLEAN),
                valFactory.createValue(PropertyType.DATE),
                valFactory.createValue(PropertyType.DECIMAL),
                valFactory.createValue(PropertyType.DOUBLE),
                valFactory.createValue(PropertyType.LONG),
                valFactory.createValue(PropertyType.NAME),
                valFactory.createValue(PropertyType.PATH),
                valFactory.createValue(PropertyType.REFERENCE),
                valFactory.createValue(PropertyType.STRING),
                valFactory.createValue(PropertyType.URI),
                valFactory.createValue(PropertyType.WEAKREFERENCE),
                valFactory.createValue(PropertyType.UNDEFINED)
        };
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_PROPERTY_TYPES, types);

        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED, valFalse);
        setDescriptor(Repository.OPTION_ACCESS_CONTROL_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_LIFECYCLE_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_LOCKING_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_OBSERVATION_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_QUERY_SQL_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_RETENTION_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_SHAREABLE_NODES_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_SIMPLE_VERSIONING_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_TRANSACTIONS_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_UNFILED_CONTENT_SUPPORTED, valFalse);
        setDescriptor(Repository.OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_VERSIONING_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_XML_EXPORT_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_XML_IMPORT_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_ACTIVITIES_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_BASELINES_SUPPORTED, valTrue);

        setDescriptor(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED, valTrue);
        setDescriptor(Repository.QUERY_JOINS, Repository.QUERY_JOINS_INNER_OUTER);

        Value[] languages = new Value[] {
                valFactory.createValue("javax.jcr.query.JCR-JQOM"),
                valFactory.createValue("javax.jcr.query.JCR-SQL2")
        };
        setDescriptor(Repository.QUERY_LANGUAGES, languages);

        setDescriptor(Repository.QUERY_STORED_QUERIES_SUPPORTED, valTrue);
        setDescriptor(Repository.QUERY_XPATH_POS_INDEX, valTrue);
View Full Code Here

public class SerialValueFactoryTest extends TestCase {

    private static final String TEST_STRING = "test string";

    public void testStringValueSerialization() throws Exception {
        ValueFactory factory = SerialValueFactory.getInstance();
        Value value = factory.createValue(TEST_STRING);

        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
        ObjectOutputStream output = new ObjectOutputStream(buffer);
        output.writeObject(value);
        output.close();
View Full Code Here

        assertEquals(copy.getString(), TEST_STRING);
    }

    public void testBinaryValueSerialization() throws Exception {
        ValueFactory factory = SerialValueFactory.getInstance();
        Value value = factory.createValue(
                new ByteArrayInputStream(TEST_STRING.getBytes()));

        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
        ObjectOutputStream output = new ObjectOutputStream(buffer);
        output.writeObject(value);
View Full Code Here

     *
     * @throws RepositoryException
     */
    protected void initRepositoryDescriptors() throws RepositoryException {

        ValueFactory valFactory = ValueFactoryImpl.getInstance();
        Value valTrue = valFactory.createValue(true);
        Value valFalse = valFactory.createValue(false);

        setDescriptor(Repository.REP_NAME_DESC, "Jackrabbit");
        setDescriptor(Repository.REP_VENDOR_DESC, "Apache Software Foundation");
        setDescriptor(Repository.REP_VENDOR_URL_DESC, "http://jackrabbit.apache.org/");
        setDescriptor(Repository.SPEC_NAME_DESC, "Content Repository API for Java(TM) Technology Specification");
        setDescriptor(Repository.SPEC_VERSION_DESC, "2.0");

        setDescriptor(Repository.IDENTIFIER_STABILITY, Repository.IDENTIFIER_STABILITY_INDEFINITE_DURATION);
        setDescriptor(Repository.LEVEL_1_SUPPORTED, valTrue);
        setDescriptor(Repository.LEVEL_2_SUPPORTED, valTrue);
        setDescriptor(Repository.WRITE_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE, Repository.NODE_TYPE_MANAGEMENT_INHERITANCE_MULTIPLE);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED, valFalse);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED, valTrue);

        Value[] types = new Value[] {
                valFactory.createValue(PropertyType.BINARY),
                valFactory.createValue(PropertyType.BOOLEAN),
                valFactory.createValue(PropertyType.DATE),
                valFactory.createValue(PropertyType.DECIMAL),
                valFactory.createValue(PropertyType.DOUBLE),
                valFactory.createValue(PropertyType.LONG),
                valFactory.createValue(PropertyType.NAME),
                valFactory.createValue(PropertyType.PATH),
                valFactory.createValue(PropertyType.REFERENCE),
                valFactory.createValue(PropertyType.STRING),
                valFactory.createValue(PropertyType.URI),
                valFactory.createValue(PropertyType.WEAKREFERENCE),
                valFactory.createValue(PropertyType.UNDEFINED)
        };
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_PROPERTY_TYPES, types);

        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED, valTrue);
        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED, valFalse);
        setDescriptor(Repository.OPTION_ACCESS_CONTROL_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_LIFECYCLE_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_LOCKING_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_OBSERVATION_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_QUERY_SQL_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_RETENTION_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_SHAREABLE_NODES_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_SIMPLE_VERSIONING_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_TRANSACTIONS_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_UNFILED_CONTENT_SUPPORTED, valFalse);
        setDescriptor(Repository.OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_VERSIONING_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_XML_EXPORT_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_XML_IMPORT_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_ACTIVITIES_SUPPORTED, valTrue);
        setDescriptor(Repository.OPTION_BASELINES_SUPPORTED, valTrue);

        setDescriptor(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED, valTrue);
        setDescriptor(Repository.QUERY_JOINS, Repository.QUERY_JOINS_INNER_OUTER);

        Value[] languages = new Value[] {
                valFactory.createValue("javax.jcr.query.JCR-JQOM"),
                valFactory.createValue("javax.jcr.query.JCR-SQL2")
        };
        setDescriptor(Repository.QUERY_LANGUAGES, languages);

        setDescriptor(Repository.QUERY_STORED_QUERIES_SUPPORTED, valTrue);
        setDescriptor(Repository.QUERY_XPATH_POS_INDEX, valTrue);
View Full Code Here

TOP

Related Classes of javax.jcr.ValueFactory

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.