/** * Validates and registers the specified collection of <code>NodeTypeDef</code> * objects. An <code>InvalidNodeTypeDefException</code> is thrown if the * validation of any of the contained <code>NodeTypeDef</code> objects fails. * <p> * Note that in the case an exception is thrown no node type will be * eventually registered. * * @param ntDefs collection of <code>NodeTypeDef</code> objects * @throws InvalidNodeTypeDefException if the node type is not valid * @throws RepositoryException if an error occurs * @see #registerNodeType */ private void internalRegister(Collection<QNodeTypeDefinition> ntDefs, boolean external) throws InvalidNodeTypeDefException, RepositoryException { internalRegister(ntDefs, external, false); }
/** * Validates and registers the specified collection of <code>NodeTypeDef</code> * objects. An <code>InvalidNodeTypeDefException</code> is thrown if the * validation of any of the contained <code>NodeTypeDef</code> objects fails. * <p> * Note that in the case an exception is thrown no node type will be * eventually registered. * * @param ntDefs collection of <code>NodeTypeDef</code> objects * @throws InvalidNodeTypeDefException if the node type is not valid * @throws RepositoryException if an error occurs * @see #registerNodeType */ private void internalRegister(Collection<QNodeTypeDefinition> ntDefs, boolean external) throws InvalidNodeTypeDefException, RepositoryException { internalRegister(ntDefs, external, false); }
ent = internalRegister(ntd);
/** * 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); } }
internalRegister(builtInNTDefs.all(), false, true); } catch (InvalidNodeTypeDefException intde) { String error = internalRegister(customNTDefs.all(), false); } catch (InvalidNodeTypeDefException intde) { String error =
internalRegister(builtInNTDefs.all(), false, true); } catch (InvalidNodeTypeDefException intde) { String error = internalRegister(customNTDefs.all(), false); } catch (InvalidNodeTypeDefException intde) { String error =
entNew = internalRegister(ntd);