Package org.apache.jackrabbit.value

Examples of org.apache.jackrabbit.value.BooleanValue


     * @param bool the boolean
     * @return the value
     */
    @Converter
    public Value toValue(Boolean bool) {
        return new BooleanValue(bool);
    }
View Full Code Here


        InternalValue value;
        if (reqType != PropertyType.BOOLEAN) {
            // type conversion required
            Value targetVal = ValueHelper.convert(
                    new BooleanValue(b), reqType,
                    ValueFactoryImpl.getInstance());
            value = InternalValue.create(targetVal, session.getNamespaceResolver());
        } else {
            // no type conversion required
            value = InternalValue.create(b);
View Full Code Here

            throws RepositoryException {
        switch (type) {
            case PropertyType.BINARY:
                return new BinaryValue(((BLOBFileValue) val).getStream());
            case PropertyType.BOOLEAN:
                return new BooleanValue(((Boolean) val));
            case PropertyType.DATE:
                return new DateValue((Calendar) val);
            case PropertyType.DOUBLE:
                return new DoubleValue((Double) val);
            case PropertyType.LONG:
View Full Code Here

        pe = createEntry(testPrincipal, privs, true, restr);
        assertEquals("", pe.getRestriction(glob).getString());

        restr = new HashMap<String, Value>();
        restr.put(nodePath,  restrictions.get(nodePath));
        restr.put(glob,  new BooleanValue(true));
        assertEquals(PropertyType.STRING, pe.getRestriction(glob).getType());
    }
View Full Code Here

        assertEquals("/a/b/c/d", pe.getRestriction(nodePath).getString());
        assertEquals(PropertyType.PATH, pe.getRestriction(nodePath).getType());

        restr = new HashMap<String, Value>();
        restr.put(nodePath,  restrictions.get(nodePath));
        restr.put(glob,  new BooleanValue(true));
        pe = createEntry(testPrincipal, privs, true, restr);

        assertEquals(true, pe.getRestriction(glob).getBoolean());
        assertEquals(PropertyType.STRING, pe.getRestriction(glob).getType());
    }
View Full Code Here

    private JcrConverter() {
    }

    @Converter
    public static Value toValue(Boolean bool) {
        return new BooleanValue(bool);
    }
View Full Code Here

        pe = createEntry(testPrincipal, privs, true, restr);
        assertEquals("", pe.getRestriction(glob).getString());

        restr = new HashMap();
        restr.put(nodePath,  restrictions.get(nodePath));
        restr.put(glob,  new BooleanValue(true));
        assertEquals(PropertyType.STRING, pe.getRestriction(glob).getType());
    }
View Full Code Here

        assertEquals("/a/b/c/d", pe.getRestriction(nodePath).getString());
        assertEquals(PropertyType.PATH, pe.getRestriction(nodePath).getType());

        restr = new HashMap();
        restr.put(nodePath,  restrictions.get(nodePath));
        restr.put(glob,  new BooleanValue(true));
        pe = createEntry(testPrincipal, privs, true, restr);

        assertEquals(true, pe.getRestriction(glob).getBoolean());
        assertEquals(PropertyType.STRING, pe.getRestriction(glob).getType());
    }
View Full Code Here

            throws RepositoryException {
        switch (type) {
            case PropertyType.BINARY:
                return new BinaryValue(((BLOBFileValue) val).getStream());
            case PropertyType.BOOLEAN:
                return new BooleanValue(((Boolean) val));
            case PropertyType.DATE:
                return new DateValue((Calendar) val);
            case PropertyType.DOUBLE:
                return new DoubleValue((Double) val);
            case PropertyType.LONG:
View Full Code Here

        }

        InternalValue value;
        if (reqType != PropertyType.BOOLEAN) {
            // type conversion required
            value = InternalValue.create(new BooleanValue(b), reqType, session.getNamespaceResolver());
        } else {
            // no type conversion required
            value = InternalValue.create(b);
        }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.value.BooleanValue

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.