Examples of autoSave()


Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

            Authorizable a = ((JackrabbitSession) superuser).getUserManager().getAuthorizable(uid);
            if (a != null) {
                a.remove();
                superuser.save();
            }
            umgr.autoSave(true);
        }
    }
}
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

        sImpl = (SessionImpl) superuser;

        UserManager umgr = sImpl.getUserManager();
        if (umgr.isAutoSave()) {
            try {
                umgr.autoSave(false);
            } catch (RepositoryException e) {
                // user manager cannot have the autosave behavior changed
                // -> test not executable
                throw new NotExecutableException("Expected user manager that can have its autosave behavior changed to false.");
            }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

            SessionImpl.class, String.class}, (SessionImpl) superuser, "admin");
        assertNotNull(um);
        assertTrue(um instanceof UserManagerImpl);
        assertTrue(um.isAutoSave());
        try {
            um.autoSave(false);
            fail("must not be allowed");
        } catch (RepositoryException e) {
            // success
        }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

        assertNotNull(um);
        assertTrue(um instanceof UserPerWorkspaceUserManager);
        // but: configured class creates a umgr that requires session.save
        assertTrue(um.isAutoSave());
        // changing autosave behavior must succeed.
        um.autoSave(false);
    }

    public void testInvalidConfig() {
        List<InputSource> invalid = new ArrayList();
        invalid.add(new InputSource(new StringReader(INVALID_CONFIG_1)));
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

        try {
            UserManager uMgr = session.getUserManager();
            if (uMgr instanceof UserPerWorkspaceUserManager) {
                // make sure the user managers autosave flag can be changed to false.
                if (uMgr.isAutoSave()) {
                    uMgr.autoSave(false);
                    resetAutoSave = true;
                    log.debug("Changed autosave behavior of UserManager to 'false'.");
                }
                userManager = (UserPerWorkspaceUserManager) uMgr;
                initialized = true;
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

        sImpl = (SessionImpl) superuser;

        UserManager umgr = sImpl.getUserManager();
        if (umgr.isAutoSave()) {
            try {
                umgr.autoSave(false);
            } catch (RepositoryException e) {
                // user manager cannot have the autosave behavior changed
                // -> test not executable
                throw new NotExecutableException("Expected user manager that can have its autosave behavior changed to false.");
            }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

            try {
                UserManager uMgr = session.getUserManager();
                if (uMgr instanceof UserPerWorkspaceUserManager) {
                    // make sure the user managers autosave flag can be changed to false.
                    if (uMgr.isAutoSave()) {
                        uMgr.autoSave(false);
                        resetAutoSave = true;
                        log.debug("Changed autosave behavior of UserManager to 'false'.");
                    }
                    userManager = (UserPerWorkspaceUserManager) uMgr;
                    initialized = true;
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

        sImpl = (SessionImpl) superuser;

        UserManager umgr = sImpl.getUserManager();
        if (umgr.isAutoSave()) {
            try {
                umgr.autoSave(false);
            } catch (RepositoryException e) {
                // user manager cannot have the autosave behavior changed
                // -> test not executable
                throw new NotExecutableException("Expected user manager that can have its autosave behavior changed to false.");
            }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

    protected void createSourceContent(Repository repository) throws Exception {
        JackrabbitSession session = (JackrabbitSession) repository.login(CREDENTIALS);
        try {
            UserManager userMgr = session.getUserManager();
            userMgr.autoSave(false);
            User users[] = new User[getNumUsers()];
            for (int i=0; i<users.length; i++) {
                String userId = TEST_USER_PREFIX + i;
                users[i] = userMgr.createUser(userId, userId);
            }
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.