private static boolean primaryChanged(NodeState before, String after) { String pre = before.getName(JCR_PRIMARYTYPE); return !Objects.equal(pre, after); }
@NotNull Set<String> getTypeNames() { Set<String> names = newHashSet(); for (NodeState type : types) { names.add(type.getName(JCR_NODETYPENAME)); addAll(names, type.getNames(REP_SUPERTYPES)); } return names; }
@NotNull Set<String> getTypeNames() { Set<String> names = newHashSet(); for (NodeState type : types) { names.add(type.getName(JCR_NODETYPENAME)); addAll(names, type.getNames(REP_SUPERTYPES)); } return names; }
@Override public String getName(@NotNull String name) { return delegate.getName(name); }
@Nonnull Set<String> getTypeNames() { Set<String> names = newHashSet(); for (NodeState type : types) { names.add(type.getName(JCR_NODETYPENAME)); addAll(names, type.getNames(REP_SUPERTYPES)); } return names; }
private static boolean isVersionStorageNode(NodeState state) { String ntName = state.getName(JCR_PRIMARYTYPE); return VERSION_STORE_NT_NAMES.contains(ntName) || VERSION_NODE_TYPE_NAMES.contains(ntName); }
private void addParentNodeType(@Nullable NodeState state) { if (state == null){ return; } String primaryType = state.getName(JcrConstants.JCR_PRIMARYTYPE); if (primaryType != null) { support.changeSetBuilder.addParentNodeType(primaryType); } support.changeSetBuilder.addParentNodeTypes(state.getNames(JcrConstants.JCR_MIXINTYPES)); }
private static boolean isVersionStorageNode(NodeState state) { String ntName = state.getName(JCR_PRIMARYTYPE); return VERSION_STORE_NT_NAMES.contains(ntName) || VERSION_NODE_TYPE_NAMES.contains(ntName); }
private void addParentNodeType(@Nullable NodeState state) { if (state == null){ return; } String primaryType = state.getName(JcrConstants.JCR_PRIMARYTYPE); if (primaryType != null) { support.changeSetBuilder.addParentNodeType(primaryType); } support.changeSetBuilder.addParentNodeTypes(state.getNames(JcrConstants.JCR_MIXINTYPES)); }
private static boolean isVersionStorageNode(NodeState state) { String ntName = state.getName(JCR_PRIMARYTYPE); return VERSION_STORE_NT_NAMES.contains(ntName) || VERSION_NODE_TYPE_NAMES.contains(ntName); }
private void addParentNodeType(@Nullable NodeState state) { if (state == null){ return; } String primaryType = state.getName(JcrConstants.JCR_PRIMARYTYPE); if (primaryType != null) { support.changeSetBuilder.addParentNodeType(primaryType); } support.changeSetBuilder.addParentNodeTypes(state.getNames(JcrConstants.JCR_MIXINTYPES)); }
List<String> getDirectTypeNames() { List<String> names = newArrayListWithCapacity(types.size()); for (NodeState type : types) { names.add(type.getName(JCR_NODETYPENAME)); } return names; }
private void addToAllNodeType(NodeState state) { String primaryType = state.getName(JcrConstants.JCR_PRIMARYTYPE); if (primaryType != null) { support.changeSetBuilder.addNodeType(primaryType); } support.changeSetBuilder.addNodeTypes(state.getNames(JcrConstants.JCR_MIXINTYPES)); }
List<String> getDirectTypeNames() { List<String> names = newArrayListWithCapacity(types.size()); for (NodeState type : types) { names.add(type.getName(JCR_NODETYPENAME)); } return names; }
private void addToAllNodeType(NodeState state) { String primaryType = state.getName(JcrConstants.JCR_PRIMARYTYPE); if (primaryType != null) { support.changeSetBuilder.addNodeType(primaryType); } support.changeSetBuilder.addNodeTypes(state.getNames(JcrConstants.JCR_MIXINTYPES)); }
List<String> getDirectTypeNames() { List<String> names = newArrayListWithCapacity(types.size()); for (NodeState type : types) { names.add(type.getName(JCR_NODETYPENAME)); } return names; }
private void addToAllNodeType(NodeState state) { String primaryType = state.getName(JcrConstants.JCR_PRIMARYTYPE); if (primaryType != null) { support.changeSetBuilder.addNodeType(primaryType); } support.changeSetBuilder.addNodeTypes(state.getNames(JcrConstants.JCR_MIXINTYPES)); }
private static String getPrimaryTypeName(NodeState state) { String primaryType = state.getName(JcrConstants.JCR_PRIMARYTYPE); //To ensure compatibility with previous Tree based usage look based on string also if (primaryType == null) { primaryType = state.getString(JcrConstants.JCR_PRIMARYTYPE); } //In case not a proper JCR assume nt:base TODO return null and ignore indexing such nodes //at all return primaryType != null ? primaryType : "nt:base"; }
private Set<String> getAllNodeTypeNames() { Set<String> modifiedTypes = new HashSet<>(); for ( ChildNodeEntry child : nodeTypes.getChildNodeEntries() ) { modifiedTypes.add(child.getNodeState().getName(JcrConstants.JCR_NODETYPENAME)); } return modifiedTypes; }
@NotNull @Override public Iterable<Field> getAugmentedFields(String path, NodeState document, NodeState indexDefinition) { assertEquals("/test/item", path); assertEquals(TestUtil.NT_TEST, document.getName(JcrConstants.JCR_PRIMARYTYPE)); assertEquals(IndexConstants.INDEX_DEFINITIONS_NODE_TYPE, indexDefinition.getName(JcrConstants.JCR_PRIMARYTYPE)); return Lists.<Field>newArrayList(new StringField("barbar", "1", Field.Store.NO)); }