final PropertyFactory propertyFactory() { return context.getPropertyFactory(); }
final PropertyFactory propertyFactory() { return context.getPropertyFactory(); }
protected final PropertyFactory propertyFactory() { return context.getPropertyFactory(); }
protected final PropertyFactory propertyFactory() { return context.getPropertyFactory(); }
protected PropertyFactory propertyFactory() { return context.getPropertyFactory(); }
/** * Parse the content of the vendor extension excluding the curly braces in the CND content. * * @param vendorExtension the vendor extension string; never null * @return the property representing the vendor extension, or null if the vendor extension is incomplete */ protected final Property parseVendorExtensionContent( String vendorExtension ) { Matcher matcher = VENDOR_PATTERN.matcher(vendorExtension); if (!matcher.find()) return null; String vendorName = removeQuotes(matcher.group(1)); String vendorValue = removeQuotes(matcher.group(3)); assert vendorName != null; assert vendorValue != null; assert vendorName.length() != 0; assert vendorValue.length() != 0; return context.getPropertyFactory().create(nameFactory.create(vendorName), vendorValue); }
/** * Parse the content of the vendor extension excluding the curly braces in the CND content. * * @param vendorExtension the vendor extension string; never null * @return the property representing the vendor extension, or null if the vendor extension is incomplete */ protected final Property parseVendorExtensionContent( String vendorExtension ) { Matcher matcher = VENDOR_PATTERN.matcher(vendorExtension); if (!matcher.find()) return null; String vendorName = removeQuotes(matcher.group(1)); String vendorValue = removeQuotes(matcher.group(3)); assert vendorName != null; assert vendorValue != null; assert vendorName.length() != 0; assert vendorValue.length() != 0; return context.getPropertyFactory().create(nameFactory.create(vendorName), vendorValue); }
protected LegacySidecarExtraPropertyStore( FileSystemConnector connector ) { this.connector = connector; this.registry = this.connector.registry(); this.propertyFactory = this.connector.getContext().getPropertyFactory(); this.factories = this.connector.getContext().getValueFactories(); this.stringFactory = factories.getStringFactory(); }
protected LegacySidecarExtraPropertyStore( FileSystemConnector connector ) { this.connector = connector; this.registry = this.connector.registry(); this.propertyFactory = this.connector.getContext().getPropertyFactory(); this.factories = this.connector.getContext().getValueFactories(); this.stringFactory = factories.getStringFactory(); }
@Override public boolean initializeIndexStorage(SessionCache session, MutableCachedNode systemNode) { this.propFactory = session.getContext().getPropertyFactory(); assert systemNode != null; ChildReferences childReferences = systemNode.getChildReferences(session); //initializes the /jcr:system/mode:indexes node if not already present. NodeKey indexesNodeKey = systemNode.getKey().withId(INDEXES_NODE_ID); if (!childReferences.hasChild(indexesNodeKey)) { MutableCachedNode indexes = createNode(session, systemNode, INDEXES_NODE_ID, ModeShapeLexicon.INDEXES, ModeShapeLexicon.INDEXES); indexes.excludeFromSearch(); return true; } return false; }
@Override public boolean initializeIndexStorage(SessionCache session, MutableCachedNode systemNode) { this.propFactory = session.getContext().getPropertyFactory(); assert systemNode != null; ChildReferences childReferences = systemNode.getChildReferences(session); //initializes the /jcr:system/mode:indexes node if not already present. NodeKey indexesNodeKey = systemNode.getKey().withId(INDEXES_NODE_ID); if (!childReferences.hasChild(indexesNodeKey)) { MutableCachedNode indexes = createNode(session, systemNode, INDEXES_NODE_ID, ModeShapeLexicon.INDEXES, ModeShapeLexicon.INDEXES); indexes.excludeFromSearch(); return true; } return false; }
SystemContent( SessionCache systemCache ) { this.system = systemCache; ExecutionContext context = systemCache.getContext(); this.propertyFactory = context.getPropertyFactory(); ValueFactories factories = context.getValueFactories(); this.booleans = factories.getBooleanFactory(); this.strings = factories.getStringFactory(); this.names = factories.getNameFactory(); this.referenceFactory = factories.getReferenceFactory(); this.weakReferenceFactory = factories.getWeakReferenceFactory(); this.jcrValues = new JcrValueFactory(context); }
SystemContent( SessionCache systemCache ) { this.system = systemCache; ExecutionContext context = systemCache.getContext(); this.propertyFactory = context.getPropertyFactory(); ValueFactories factories = context.getValueFactories(); this.booleans = factories.getBooleanFactory(); this.strings = factories.getStringFactory(); this.names = factories.getNameFactory(); this.referenceFactory = factories.getReferenceFactory(); this.weakReferenceFactory = factories.getWeakReferenceFactory(); this.jcrValues = new JcrValueFactory(context); }
public DocumentTranslator( ExecutionContext context, DocumentStore documentStore, long largeStringSize ) { this.documentStore = documentStore; this.largeStringSize.set(largeStringSize); this.context = context; this.propertyFactory = this.context.getPropertyFactory(); this.factories = this.context.getValueFactories(); this.paths = this.factories.getPathFactory(); this.names = this.factories.getNameFactory(); this.dates = this.factories.getDateFactory(); this.binaries = this.factories.getBinaryFactory(); this.longs = this.factories.getLongFactory(); this.doubles = this.factories.getDoubleFactory(); this.uris = this.factories.getUriFactory(); this.decimals = this.factories.getDecimalFactory(); this.refs = this.factories.getReferenceFactory(); this.weakrefs = this.factories.getWeakReferenceFactory(); this.simplerefs = this.factories.getSimpleReferenceFactory(); this.strings = this.factories.getStringFactory(); assert this.largeStringSize.get() >= 0; }
public DocumentTranslator( ExecutionContext context, DocumentStore documentStore, long largeStringSize ) { this.documentStore = documentStore; this.largeStringSize.set(largeStringSize); this.context = context; this.propertyFactory = this.context.getPropertyFactory(); this.factories = this.context.getValueFactories(); this.paths = this.factories.getPathFactory(); this.names = this.factories.getNameFactory(); this.dates = this.factories.getDateFactory(); this.binaries = this.factories.getBinaryFactory(); this.longs = this.factories.getLongFactory(); this.doubles = this.factories.getDoubleFactory(); this.uris = this.factories.getUriFactory(); this.decimals = this.factories.getDecimalFactory(); this.refs = this.factories.getReferenceFactory(); this.weakrefs = this.factories.getWeakReferenceFactory(); this.simplerefs = this.factories.getSimpleReferenceFactory(); this.strings = this.factories.getStringFactory(); assert this.largeStringSize.get() >= 0; }
protected DeepCopy( SessionNode targetNode, WritableSessionCache cache, CachedNode sourceNode, SessionCache sourceCache, String systemWorkspaceKey, Connectors connectors ) { this.targetCache = cache; this.targetNode = targetNode; this.sourceCache = sourceCache; this.sourceNode = sourceNode; this.startingPathInSource = sourceNode.getPath(sourceCache); this.propertyFactory = this.targetCache.getContext().getPropertyFactory(); this.targetWorkspaceKey = targetNode.getKey().getWorkspaceKey(); this.documentStore = ((WorkspaceCache)sourceCache.getWorkspace()).documentStore(); this.systemWorkspaceKey = systemWorkspaceKey; this.connectors = connectors; this.valueFactories = this.targetCache.context().getValueFactories(); }
protected DeepCopy( SessionNode targetNode, WritableSessionCache cache, CachedNode sourceNode, SessionCache sourceCache, String systemWorkspaceKey, Connectors connectors ) { this.targetCache = cache; this.targetNode = targetNode; this.sourceCache = sourceCache; this.sourceNode = sourceNode; this.startingPathInSource = sourceNode.getPath(sourceCache); this.propertyFactory = this.targetCache.getContext().getPropertyFactory(); this.targetWorkspaceKey = targetNode.getKey().getWorkspaceKey(); this.documentStore = ((WorkspaceCache)sourceCache.getWorkspace()).documentStore(); this.systemWorkspaceKey = systemWorkspaceKey; this.connectors = connectors; this.valueFactories = this.targetCache.context().getValueFactories(); }
private void storeProjection( Projection projection, SessionCache systemSession ) { PropertyFactory propertyFactory = repository.context().getPropertyFactory(); // we need to store the projection mappings so that we don't loose that information NodeKey systemNodeKey = getSystemNode(systemSession).getKey(); MutableCachedNode systemNode = systemSession.mutable(systemNodeKey); ChildReference federationNodeRef = systemNode.getChildReferences(systemSession).getChild(ModeShapeLexicon.FEDERATION); if (federationNodeRef == null) { // there isn't a federation node present, so we need to add it try { Property primaryType = propertyFactory.create(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.FEDERATION); systemNode.createChild(systemSession, systemNodeKey.withId("mode:federation"), ModeShapeLexicon.FEDERATION, primaryType); federationNodeRef = systemNode.getChildReferences(systemSession).getChild(ModeShapeLexicon.FEDERATION); } catch (Exception e) { throw new RuntimeException(e); } } NodeKey federationNodeKey = federationNodeRef.getKey(); MutableCachedNode federationNode = systemSession.mutable(federationNodeKey); Property primaryType = propertyFactory.create(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.PROJECTION); Property externalNodeKeyProp = propertyFactory.create(ModeShapeLexicon.EXTERNAL_NODE_KEY, projection.getExternalNodeKey()); Property projectedNodeKeyProp = propertyFactory.create(ModeShapeLexicon.PROJECTED_NODE_KEY, projection.getProjectedNodeKey()); Property alias = propertyFactory.create(ModeShapeLexicon.PROJECTION_ALIAS, projection.getAlias()); federationNode.createChild(systemSession, federationNodeKey.withRandomId(), ModeShapeLexicon.PROJECTION, primaryType, externalNodeKeyProp, projectedNodeKeyProp, alias); }
private void storeProjection( Projection projection, SessionCache systemSession ) { PropertyFactory propertyFactory = repository.context().getPropertyFactory(); // we need to store the projection mappings so that we don't loose that information NodeKey systemNodeKey = getSystemNode(systemSession).getKey(); MutableCachedNode systemNode = systemSession.mutable(systemNodeKey); ChildReference federationNodeRef = systemNode.getChildReferences(systemSession).getChild(ModeShapeLexicon.FEDERATION); if (federationNodeRef == null) { // there isn't a federation node present, so we need to add it try { Property primaryType = propertyFactory.create(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.FEDERATION); systemNode.createChild(systemSession, systemNodeKey.withId("mode:federation"), ModeShapeLexicon.FEDERATION, primaryType); federationNodeRef = systemNode.getChildReferences(systemSession).getChild(ModeShapeLexicon.FEDERATION); } catch (Exception e) { throw new RuntimeException(e); } } NodeKey federationNodeKey = federationNodeRef.getKey(); MutableCachedNode federationNode = systemSession.mutable(federationNodeKey); Property primaryType = propertyFactory.create(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.PROJECTION); Property externalNodeKeyProp = propertyFactory.create(ModeShapeLexicon.EXTERNAL_NODE_KEY, projection.getExternalNodeKey()); Property projectedNodeKeyProp = propertyFactory.create(ModeShapeLexicon.PROJECTED_NODE_KEY, projection.getProjectedNodeKey()); Property alias = propertyFactory.create(ModeShapeLexicon.PROJECTION_ALIAS, projection.getAlias()); federationNode.createChild(systemSession, federationNodeKey.withRandomId(), ModeShapeLexicon.PROJECTION, primaryType, externalNodeKeyProp, projectedNodeKeyProp, alias); }
SystemContent systemContent = new SystemContent(systemSession); MutableCachedNode systemNode = systemContent.mutableSystemNode(); systemNode.setProperty(systemSession, context.getPropertyFactory().create(ModeShapeLexicon.ACL_COUNT, nodesWithAccessControl)); systemSession.save(); } catch (RepositoryException e) {