use of javax.jcr.Session in project jackrabbit-oak by apache.
the class AceCreationTest method runTest.
@Override
protected void runTest() throws Exception {
Session session = createOrGetSystemSession();
createAce(session, numberOfAce);
save(session, transientWrites);
logout(session, transientWrites);
}
use of javax.jcr.Session in project jackrabbit-oak by apache.
the class AceCreationTest method afterTest.
@Override
protected void afterTest() throws Exception {
Session session = createOrGetSystemSession();
AccessControlManager acm = session.getAccessControlManager();
for (AccessControlPolicy policy : acm.getPolicies(nodePath)) {
acm.removePolicy(nodePath, policy);
}
save(session, transientWrites);
super.afterTest();
}
use of javax.jcr.Session in project jackrabbit-oak by apache.
the class AceCreationTest method beforeSuite.
@Override
protected void beforeSuite() throws Exception {
super.beforeSuite();
Session session = createOrGetSystemSession();
nodePath = session.getRootNode().addNode("test" + new Random().nextInt()).getPath();
save(session, transientWrites);
logout(session, transientWrites);
}
use of javax.jcr.Session in project jackrabbit-oak by apache.
the class AbstractExternalTest method beforeSuite.
@Override
protected void beforeSuite() throws Exception {
Set<String> autoMembership = syncConfig.user().getAutoMembership();
if (!autoMembership.isEmpty()) {
Session s = systemLogin();
UserManager userManager = ((JackrabbitSession) s).getUserManager();
for (String groupId : autoMembership) {
userManager.createGroup(groupId, new PrincipalImpl(groupId), PATH_PREFIX);
}
s.save();
}
}
use of javax.jcr.Session in project jackrabbit-oak by apache.
the class ScalabilityNodeSuite method beforeSuite.
@Override
protected void beforeSuite() throws Exception {
Session session = loginWriter();
Node root = session.getRootNode();
root.addNode(ROOT_NODE_NAME);
session.save();
if (CUSTOM_TYPE) {
NodeTypeUtils.createNodeType(session, CUSTOM_DESC_NODE_TYPE, new String[] { DATE_PROP, SORT_PROP, FILTER_PROP, TITLE_PROP }, new int[] { PropertyType.DATE, PropertyType.BOOLEAN, PropertyType.STRING, PropertyType.STRING }, new String[0], new String[] { CUSTOM_DESC_NODE_TYPE }, null, false);
NodeTypeUtils.createNodeType(session, CUSTOM_ROOT_NODE_TYPE, new String[] { DATE_PROP, SORT_PROP, FILTER_PROP, TITLE_PROP }, new int[] { PropertyType.DATE, PropertyType.BOOLEAN, PropertyType.STRING, PropertyType.STRING }, new String[0], new String[] { CUSTOM_DESC_NODE_TYPE }, null, false);
nodeTypes.add(CUSTOM_ROOT_NODE_TYPE);
nodeTypes.add(CUSTOM_DESC_NODE_TYPE);
}
if (INDEX) {
createIndexes(session);
}
}
Aggregations