persistCustomNodeTypeDefs(customNTDefs);
persistCustomNodeTypeDefs(customNTDefs);
/** * Internal implementation of {@link #registerNodeTypes(Collection)} * * @param ntDefs a collection of <code>QNodeTypeDefinition<code> objects * @param external whether this invocation should be considered external * @throws InvalidNodeTypeDefException if the given node type definition is invalid. * @throws RepositoryException if a repository error occurs. */ private void registerNodeTypes(Collection<QNodeTypeDefinition> ntDefs, boolean external) throws InvalidNodeTypeDefException, RepositoryException { synchronized (this) { // validate and register new node type definitions internalRegister(ntDefs, external); // persist new node type definitions for (QNodeTypeDefinition ntDef: ntDefs) { customNTDefs.add(ntDef); } persistCustomNodeTypeDefs(customNTDefs); // notify listeners for (QNodeTypeDefinition ntDef : ntDefs) { notifyRegistered(ntDef.getName()); } } // inform cluster if this is not an external invocation if (!external && eventChannel != null) { eventChannel.registered(ntDefs); } }
/** * Internal implementation of {@link #registerNodeTypes(Collection)} * * @param ntDefs a collection of <code>QNodeTypeDefinition<code> objects * @param external whether this invocation should be considered external * @throws InvalidNodeTypeDefException if the given node type definition is invalid. * @throws RepositoryException if a repository error occurs. */ private void registerNodeTypes(Collection<QNodeTypeDefinition> ntDefs, boolean external) throws InvalidNodeTypeDefException, RepositoryException { synchronized (this) { // validate and register new node type definitions internalRegister(ntDefs, external); // persist new node type definitions for (QNodeTypeDefinition ntDef: ntDefs) { customNTDefs.add(ntDef); } persistCustomNodeTypeDefs(customNTDefs); // notify listeners for (QNodeTypeDefinition ntDef : ntDefs) { notifyRegistered(ntDef.getName()); } } // inform cluster if this is not an external invocation if (!external && eventChannel != null) { eventChannel.registered(ntDefs); } }
persistCustomNodeTypeDefs(customNTDefs);