Examples of CoreValueFactory


Examples of org.apache.jackrabbit.oak.api.CoreValueFactory

    public TokenInfo createToken(Credentials credentials) {
        if (credentials instanceof SimpleCredentials) {
            final SimpleCredentials sc = (SimpleCredentials) credentials;
            String userId = sc.getUserID();

            CoreValueFactory valueFactory = contentSession.getCoreValueFactory();
            try {
                Tree userTree = userProvider.getAuthorizable(userId, Type.USER);
                if (userTree != null) {
                    NodeUtil userNode = new NodeUtil(userTree, valueFactory);
                    NodeUtil tokenParent = userNode.getChild(TOKENS_NODE_NAME);
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.CoreValueFactory

*/
public class FilterTest {

    @Test
    public void propertyRestriction() {
        CoreValue one = new CoreValueFactory().createValue("1");
        CoreValue two = new CoreValueFactory().createValue("2");

        Filter f = new Filter(null);
        assertTrue(null == f.getPropertyRestriction("x"));
        f.restrictProperty("x", Operator.LESS_OR_EQUAL, two);
        assertEquals("..2]", f.getPropertyRestriction("x").toString());
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.CoreValueFactory

                String lowerBound = p.getLowerBound();
                String upperBound = p.getUpperBound();
                if (lowerBound == null && upperBound == null) {
                    // ignore
                } else {
                    CoreValueFactory vf = query.getValueFactory();
                    if (lowerBound != null) {
                        operand1.apply(f, Operator.GREATER_OR_EQUAL, vf.createValue(lowerBound));
                    }
                    if (upperBound != null) {
                        operand1.apply(f, Operator.LESS_OR_EQUAL, vf.createValue(upperBound));
                    }
                }
            } else {
                operand1.apply(f, operator, v);
            }
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.