Package org.apache.jackrabbit.oak.plugins.value

Examples of org.apache.jackrabbit.oak.plugins.value.ValueFactoryImpl


            protected Root getWriteRoot() {
                return root;
            }
        };

        this.vf = new ValueFactoryImpl(null, new NamePathMapperImpl(
                new GlobalNameMapper() {
                    @Override
                    protected Map<String, String> getNamespaceMap() {
                        return Namespaces.getNamespaceMap(root.getTree("/"));
                    }
View Full Code Here


        }
        return privMgr;
    }

    protected ValueFactory getValueFactory() {
        return new ValueFactoryImpl(root, getNamePathMapper());
    }
View Full Code Here

        registerNamespace(TEST_PREFIX, TEST_URI);
        nameMapper = new GlobalNameMapper(root);
        npMapper = new NamePathMapperImpl(nameMapper);

        acMgr = getAccessControlManager(npMapper);
        valueFactory = new ValueFactoryImpl(root, npMapper);

        NodeUtil rootNode = new NodeUtil(root.getTree("/"), npMapper);
        rootNode.addChild(testName, JcrConstants.NT_UNSTRUCTURED);
        root.commit();
View Full Code Here

    @Test
    public void testSyncUpdate() throws Exception {
        // create user upfront in order to test update mode
        Authorizable user = userManager.createUser(USER_ID, null);
        ExternalUser externalUser = idp.getUser(USER_ID);
        user.setProperty("rep:externalId", new ValueFactoryImpl(root, NamePathMapper.DEFAULT).createValue(externalUser.getExternalId().getString()));
        root.commit();

        ContentSession cs = null;
        try {
            cs = login(new SimpleCredentials(USER_ID, USER_PWD.toCharArray()));
View Full Code Here

        private final Value nowValue;

        private ContextImpl(ExternalIdentityProvider idp, UserManager userManager, Root root) {
            this.idp = idp;
            this.userManager = userManager;
            valueFactory = new ValueFactoryImpl(root, NamePathMapper.DEFAULT);

            // initialize 'now'
            final Calendar nowCal = Calendar.getInstance();
            this.nowValue = valueFactory.createValue(nowCal);
            this.now = nowCal.getTimeInMillis();
View Full Code Here

    public void testSyncUpdate() throws Exception {
        // create user upfront in order to test update mode
        UserManager userManager = getUserManager(root);
        ExternalUser externalUser = idp.getUser(userId);
        Authorizable user = userManager.createUser(externalUser.getId(), null);
        user.setProperty("rep:externalId", new ValueFactoryImpl(root, NamePathMapper.DEFAULT).createValue(externalUser.getExternalId().getString()));
        root.commit();

        ContentSession cs = null;
        try {
            cs = login(new SimpleCredentials(userId, new char[0]));
View Full Code Here

        }
        return privMgr;
    }

    protected ValueFactory getValueFactory() {
        return new ValueFactoryImpl(root, getNamePathMapper());
    }
View Full Code Here

                return namespaces.getSessionLocalMappings();
            }
        };
        this.namePathMapper = new NamePathMapperImpl(
                nameMapper, delegate.getIdManager());
        this.valueFactory = new ValueFactoryImpl(
                delegate.getRoot(), namePathMapper);
    }
View Full Code Here

                return namespaces.getSessionLocalMappings();
            }
        };
        this.namePathMapper = new NamePathMapperImpl(
                nameMapper, delegate.getIdManager());
        this.valueFactory = new ValueFactoryImpl(
                delegate.getRoot(), namePathMapper);
    }
View Full Code Here

        }
        return privMgr;
    }

    protected ValueFactory getValueFactory() {
        return new ValueFactoryImpl(root, getNamePathMapper());
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.value.ValueFactoryImpl

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.