Examples of canSetProperty()


Examples of javax.jcr.nodetype.NodeType.canSetProperty()

                nodeType.canSetProperty(propDef.getName(), longBinaryValue));

        Value dateValue = NodeTypeUtil.getValueOfType(session, PropertyType.DATE);
        assertTrue("canSetProperty(String propertyName, Value value) must return " +
                "true if the property is of type Long and value is a DateValue",
                nodeType.canSetProperty(propDef.getName(), dateValue));

        Value doubleValue = NodeTypeUtil.getValueOfType(session, PropertyType.DOUBLE);
        assertTrue("canSetProperty(String propertyName, Value value) must return " +
                "true if the property is of type Long and value is a DoubleValue",
                nodeType.canSetProperty(propDef.getName(), doubleValue));
View Full Code Here

Examples of javax.jcr.nodetype.NodeType.canSetProperty()

                nodeType.canSetProperty(propDef.getName(), dateValue));

        Value doubleValue = NodeTypeUtil.getValueOfType(session, PropertyType.DOUBLE);
        assertTrue("canSetProperty(String propertyName, Value value) must return " +
                "true if the property is of type Long and value is a DoubleValue",
                nodeType.canSetProperty(propDef.getName(), doubleValue));

        Value longValue = NodeTypeUtil.getValueOfType(session, PropertyType.LONG);
        assertTrue("canSetProperty(String propertyName, Value value) must return " +
                "true if the property is of type Long and value is a LongValue",
                nodeType.canSetProperty(propDef.getName(), longValue));
View Full Code Here

Examples of javax.jcr.nodetype.NodeType.canSetProperty()

                nodeType.canSetProperty(propDef.getName(), doubleValue));

        Value longValue = NodeTypeUtil.getValueOfType(session, PropertyType.LONG);
        assertTrue("canSetProperty(String propertyName, Value value) must return " +
                "true if the property is of type Long and value is a LongValue",
                nodeType.canSetProperty(propDef.getName(), longValue));

        Value booleanValue = NodeTypeUtil.getValueOfType(session, PropertyType.BOOLEAN);
        assertFalse("canSetProperty(String propertyName, Value value) must return " +
                "false if the property is of type Long and value is a BooleanValue",
                nodeType.canSetProperty(propDef.getName(), booleanValue));
View Full Code Here

Examples of javax.jcr.nodetype.NodeType.canSetProperty()

                nodeType.canSetProperty(propDef.getName(), longValue));

        Value booleanValue = NodeTypeUtil.getValueOfType(session, PropertyType.BOOLEAN);
        assertFalse("canSetProperty(String propertyName, Value value) must return " +
                "false if the property is of type Long and value is a BooleanValue",
                nodeType.canSetProperty(propDef.getName(), booleanValue));

        Value nameValue = NodeTypeUtil.getValueOfType(session, PropertyType.NAME);
        assertFalse("canSetProperty(String propertyName, Value value) must return " +
                "false if the property is of type Long and value is a NameValue",
                nodeType.canSetProperty(propDef.getName(), nameValue));
View Full Code Here

Examples of javax.jcr.nodetype.NodeType.canSetProperty()

                nodeType.canSetProperty(propDef.getName(), booleanValue));

        Value nameValue = NodeTypeUtil.getValueOfType(session, PropertyType.NAME);
        assertFalse("canSetProperty(String propertyName, Value value) must return " +
                "false if the property is of type Long and value is a NameValue",
                nodeType.canSetProperty(propDef.getName(), nameValue));

        Value pathValue = NodeTypeUtil.getValueOfType(session, PropertyType.PATH);
        assertFalse("canSetProperty(String propertyName, Value value) must return " +
                "false if the property is of type Long and value is a PathValue",
                nodeType.canSetProperty(propDef.getName(), pathValue));
View Full Code Here

Examples of javax.jcr.nodetype.NodeType.canSetProperty()

                nodeType.canSetProperty(propDef.getName(), nameValue));

        Value pathValue = NodeTypeUtil.getValueOfType(session, PropertyType.PATH);
        assertFalse("canSetProperty(String propertyName, Value value) must return " +
                "false if the property is of type Long and value is a PathValue",
                nodeType.canSetProperty(propDef.getName(), pathValue));
    }

    /**
     * Tests if NodeType.canSetProperty(String propertyName, Value[] values)
     * returns true if all values and its types are convertible to LongValue.
View Full Code Here

Examples of javax.jcr.nodetype.NodeType.canSetProperty()

     */
    protected void setUpMultiValueTest() throws RepositoryException, NotExecutableException {
        // check if NodeType supports mvp
        NodeType nt = superuser.getWorkspace().getNodeTypeManager().getNodeType(testNodeType);
        Value[] testValue = new Value[]{superuser.getValueFactory().createValue("one"), superuser.getValueFactory().createValue("two"), superuser.getValueFactory().createValue("three")};
        if (!nt.canSetProperty(propertyName2, testValue)) {
            throw new NotExecutableException("Property " + propertyName2 + " of NodeType " + testNodeType + " does not allow multi values");
        }

        Node node = testRootNode.addNode(nodeName1, testNodeType);
        node.setProperty(propertyName1, "existence");
View Full Code Here

Examples of javax.jcr.nodetype.NodeType.canSetProperty()

        Value anyStringValue = NodeTypeUtil.getValueOfType(superuser, PropertyType.STRING);
        Value anyStringValues[] = new Value[] {longValue, anyStringValue};
        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
                "false if the property is of type Long and values are of type StringValue " +
                "that are not convertible to LongValues",
                nodeType.canSetProperty(propDef.getName(), anyStringValues));

        Value longStringValue =
                superuser.getValueFactory().createValue(NodeTypeUtil.getValueOfType(superuser, PropertyType.LONG).getString());
        Value longStringValues[] = new Value[] {longStringValue};
        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
View Full Code Here

Examples of javax.jcr.nodetype.NodeType.canSetProperty()

                superuser.getValueFactory().createValue(NodeTypeUtil.getValueOfType(superuser, PropertyType.LONG).getString());
        Value longStringValues[] = new Value[] {longStringValue};
        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
                "true if the property is of type Long and values are of type StringValue " +
                "that are convertible to LongValues",
                nodeType.canSetProperty(propDef.getName(), longStringValues));

        Value anyBinaryValue = NodeTypeUtil.getValueOfType(superuser, PropertyType.BINARY);
        Value anyBinaryValues[] = new Value[] {longValue, anyBinaryValue};
        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
                "false if the property is of type Long and values are of type BinaryValue " +
View Full Code Here

Examples of javax.jcr.nodetype.NodeType.canSetProperty()

        Value anyBinaryValue = NodeTypeUtil.getValueOfType(superuser, PropertyType.BINARY);
        Value anyBinaryValues[] = new Value[] {longValue, anyBinaryValue};
        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
                "false if the property is of type Long and values are of type BinaryValue " +
                "that are not convertible to LongValues",
                nodeType.canSetProperty(propDef.getName(), anyBinaryValues));

        Value longBinaryValue =
                superuser.getValueFactory().createValue(NodeTypeUtil.getValueOfType(superuser, PropertyType.LONG).getString(), PropertyType.BINARY);
        Value longBinaryValues[] = new Value[] {longBinaryValue};
        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
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.