Package org.apache.jackrabbit.api

Examples of org.apache.jackrabbit.api.JackrabbitSession.logout()


                if (s.getUserManager().getAuthorizable(testID) == null) {
                    throw new NotExecutableException();
                }
            } finally {
                if (s != null) {
                    s.logout();
                }
            }
        }

        final Exception[] exception = new Exception[1];
View Full Code Here


                            Session s = getHelper().getRepository().login(sc, wspName);
                            try {
                                Set<TokenCredentials> tcs = ((SessionImpl) s).getSubject().getPublicCredentials(TokenCredentials.class);
                                assertFalse(tcs.isEmpty());
                            } finally {
                                s.logout();
                            }

                        } catch (Exception e) {
                            exception[0] = e;
                            break;
View Full Code Here

                                lastex);
                    }
                    userIDs.add(authorizable.getID());
                    log.println(authorizable + " created");
                } finally {
                    s.logout();
                }
            }
        }, CONCURRENCY, "/" + testPath);
    }
}
View Full Code Here

            assertNotNull(aggregate);
            assertFalse(aggregate.isAbstract());
            assertTrue(aggregate.isAggregate());
            assertEquals(2, aggregate.getDeclaredAggregatePrivileges().length);
        } finally {
            session.logout();
        }
    }

    @Test
    public void verifyCustomNodeTypes() throws Exception {
View Full Code Here

                    g.addMember(user);
                }
            }
            session.save();
        } finally {
            session.logout();
        }
    }

    @Test
    public void verifyGroupNodeTypes() throws Exception {
View Full Code Here

                NodeType nt = grpNode.getPrimaryNodeType();
                assertEquals("Migrated group needs to be rep:Group", UserConstants.NT_REP_GROUP, nt.getName());
                assertTrue("Migrated group needs to be new node type", nt.isNodeType(UserConstants.NT_REP_MEMBER_REFERENCES));
            }
        } finally {
            session.logout();
        }
    }

    @Test
    public void verifyMembers() throws Exception {
View Full Code Here

                    assertTrue("group must have member " + auth.getID(), testUsers.remove(auth.getID()));
                }
                assertEquals("group must have all members", 0, testUsers.size());
            }
        } finally {
            session.logout();
        }
    }

    @Test
    public void verifyMemberOf() throws Exception {
View Full Code Here

                    assertTrue("user must be member of group " + grp.getID(), groups.remove(grp.getID()));
                }
                assertEquals("user " + user.getID() + " must be member of all groups", 0, groups.size());
            }
        } finally {
            session.logout();
        }
    }

}
View Full Code Here

            assertNotNull(aggregate);
            assertFalse(aggregate.isAbstract());
            assertTrue(aggregate.isAggregate());
            assertEquals(2, aggregate.getDeclaredAggregatePrivileges().length);
        } finally {
            session.logout();
        }
    }

    @Test
    public void verifyCustomNodeTypes() throws Exception {
View Full Code Here

                    nonAggregatePrivileges.isEmpty());
            assertTrue("Missing aggregate privileges: " + aggregatePrivileges.keySet(),
                aggregatePrivileges.isEmpty());
        }
        finally {
            session.logout();
        }
    }

    private static String[] getNames(Privilege[] privileges) {
        String[] names = new String[privileges.length];
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.