@Override public ExecutionContext getExecutionContext() { return session.context(); }
@Override public ExecutionContext getExecutionContext() { return context(); }
@Override public ExecutionContext getExecutionContext() { return session.context(); }
@Override public ExecutionContext getExecutionContext() { return session.context(); }
protected SessionTypeSystem( JcrSession session ) { this.session = session; this.delegate = session.context().getValueFactories().getTypeSystem(); }
protected SessionTypeSystem( JcrSession session ) { this.session = session; this.delegate = session.context().getValueFactories().getTypeSystem(); }
final JcrValue createValue( Object value, int propertyType ) throws ValueFormatException { try { return new JcrValue(session().context().getValueFactories(), propertyType, value); } catch (org.modeshape.jcr.value.ValueFormatException e) { throw new ValueFormatException(e); } }
public JcrVersionManager( JcrSession session ) { super(); this.session = session; versionStoragePath = absolutePath(JcrLexicon.SYSTEM, JcrLexicon.VERSION_STORAGE); ExecutionContext context = session.context(); versionHistoryPathAlgorithm = new HiearchicalPathAlgorithm(versionStoragePath, context); readableSystem = new SystemContent(this.session.cache()); }
final JcrValue createValue( Object value, int propertyType ) throws ValueFormatException { try { return new JcrValue(session().context().getValueFactories(), propertyType, value); } catch (org.modeshape.jcr.value.ValueFormatException e) { throw new ValueFormatException(e); } }
public JcrVersionManager( JcrSession session ) { super(); this.session = session; versionStoragePath = absolutePath(JcrLexicon.SYSTEM, JcrLexicon.VERSION_STORAGE); ExecutionContext context = session.context(); versionHistoryPathAlgorithm = new HiearchicalPathAlgorithm(versionStoragePath, context); readableSystem = new SystemContent(this.session.cache()); }
final SessionCache spawnSessionCache( boolean readOnly ) { SessionCache cache = repository().repositoryCache().createSession(context(), workspaceName(), readOnly); return readOnly ? cache : new SystemSessionCache(cache); }
protected SessionSchemata( JcrSession session ) { this.session = session; this.context = this.session.context(); this.nameFactory = context.getValueFactories().getNameFactory(); this.builder = ImmutableSchemata.createBuilder(context, session.nodeTypes()); // Add the "AllNodes" table ... addAllNodesTable(builder, context, null, null); this.schemata = builder.build(); }
protected SessionSchemata( JcrSession session ) { this.session = session; this.context = this.session.context(); this.nameFactory = context.getValueFactories().getNameFactory(); this.builder = ImmutableSchemata.createBuilder(context, session.nodeTypes()); // Add the "AllNodes" table ... addAllNodesTable(builder, context, null, null); this.schemata = builder.build(); }
@Test public void shouldProvideExecutionContext() throws Exception { assertThat(altimaModel.context(), is(session().context())); }
@Test public void shouldUseJcrCardinalityPerPropertyDefinition() throws Exception { initializeData(); // Verify that the node does exist in the source ... Path pathToNode = session.context().getValueFactories().getPathFactory().create("/a/b"); Node carsNode = session.node(pathToNode); String mixinTypesName = JcrLexicon.MIXIN_TYPES.getString(session.context().getNamespaceRegistry()); Property mixinTypes = carsNode.getProperty(mixinTypesName); // Check that the JCR property is a MultiProperty - this call will throw an exception if the property is not. mixinTypes.getValues(); }
@Override @Before public void beforeEach() throws Exception { super.beforeEach(); nodeTypeManager = session.getWorkspace().getNodeTypeManager(); context = session.context(); }
private static void initNodesCount() throws RepositoryException { JcrSession session = repository.login(); try { NodeCache systemSession = repository.createSystemSession(session.context(), true); totalSystemNodeCount = countAllNodesBelow(systemSession.getRootKey(), systemSession) - 1; // not root totalNodeCount = totalSystemNodeCount + TOTAL_NON_SYSTEM_NODE_COUNT; } finally { session.logout(); } }
@Override @Before public void beforeEach() throws Exception { super.beforeEach(); context = session.context(); ntTemplate = new JcrNodeTypeTemplate(context); registry = session.namespaces(); nameFactory = session.nameFactory(); repoTypeManager = session.repository().nodeTypeManager(); }