/** * {@inheritDoc} */ public NodeDefinition[] getChildNodeDefinitions() { QNodeDefinition[] cnda = ent.getAllNodeDefs(); NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length]; for (int i = 0; i < cnda.length; i++) { nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i]); } return nodeDefs; }
/** * {@inheritDoc} */ public NodeDefinition[] getChildNodeDefinitions() { QNodeDefinition[] cnda = ent.getAllNodeDefs(); NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length]; for (int i = 0; i < cnda.length; i++) { nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i]); } return nodeDefs; }
/** * Returns an array containing only those child node definitions of this * node type (including the child node definitions inherited from supertypes * of this node type) where <code>{@link NodeDefinition#isMandatory()}</code> * returns <code>true</code>. * * @return an array of child node definitions. * @see NodeDefinition#isMandatory */ public NodeDefinition[] getMandatoryNodeDefinitions() { QNodeDefinition[] cnda = ent.getMandatoryNodeDefs(); NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length]; for (int i = 0; i < cnda.length; i++) { nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i]); } return nodeDefs; }
/** * Returns an array containing only those child node definitions of this * node type (including the child node definitions inherited from supertypes * of this node type) where <code>{@link NodeDefinition#isAutoCreated()}</code> * returns <code>true</code>. * * @return an array of child node definitions. * @see NodeDefinition#isAutoCreated */ public NodeDefinition[] getAutoCreatedNodeDefinitions() { QNodeDefinition[] cnda = ent.getAutoCreateNodeDefs(); NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length]; for (int i = 0; i < cnda.length; i++) { nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i]); } return nodeDefs; }
/** * Returns an array containing only those child node definitions of this * node type (including the child node definitions inherited from supertypes * of this node type) where <code>{@link NodeDefinition#isAutoCreated()}</code> * returns <code>true</code>. * * @return an array of child node definitions. * @see NodeDefinition#isAutoCreated */ public NodeDefinition[] getAutoCreatedNodeDefinitions() { QNodeDefinition[] cnda = ent.getAutoCreateNodeDefs(); NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length]; for (int i = 0; i < cnda.length; i++) { nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i]); } return nodeDefs; }
/** * Returns an array containing only those child node definitions of this * node type (including the child node definitions inherited from supertypes * of this node type) where <code>{@link NodeDefinition#isMandatory()}</code> * returns <code>true</code>. * * @return an array of child node definitions. * @see NodeDefinition#isMandatory */ public NodeDefinition[] getMandatoryNodeDefinitions() { QNodeDefinition[] cnda = ent.getMandatoryNodeDefs(); NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length]; for (int i = 0; i < cnda.length; i++) { nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i]); } return nodeDefs; }
protected void onRedefine(QNodeDefinition def) throws RepositoryException { NodeDefinitionImpl newDef = sessionContext.getNodeTypeManager().getNodeDefinition(def); // modify the state of 'this', i.e. the target node getOrCreateTransientItemState(); // set new definition data.setDefinition(newDef); }
protected void onRedefine(QNodeDefinition def) throws RepositoryException { NodeDefinitionImpl newDef = sessionContext.getNodeTypeManager().getNodeDefinition(def); // modify the state of 'this', i.e. the target node getOrCreateTransientItemState(); // set new definition data.setDefinition(newDef); }
/** * Returns the applicable child node definition for a child node with the * specified name and node type. * * @param nodeName * @param nodeTypeName * @return * @throws ConstraintViolationException if no applicable child node definition * could be found * @throws RepositoryException if another error occurs */ protected NodeDefinitionImpl getApplicableChildNodeDefinition(Name nodeName, Name nodeTypeName) throws ConstraintViolationException, RepositoryException { NodeTypeManagerImpl ntMgr = sessionContext.getNodeTypeManager(); QNodeDefinition cnd = getEffectiveNodeType().getApplicableChildNodeDef( nodeName, nodeTypeName, sessionContext.getNodeTypeRegistry()); return ntMgr.getNodeDefinition(cnd); }
/** * Returns the applicable child node definition for a child node with the * specified name and node type. * * @param nodeName * @param nodeTypeName * @return * @throws ConstraintViolationException if no applicable child node definition * could be found * @throws RepositoryException if another error occurs */ protected NodeDefinitionImpl getApplicableChildNodeDefinition(Name nodeName, Name nodeTypeName) throws ConstraintViolationException, RepositoryException { NodeTypeManagerImpl ntMgr = sessionContext.getNodeTypeManager(); QNodeDefinition cnd = getEffectiveNodeType().getApplicableChildNodeDef( nodeName, nodeTypeName, sessionContext.getNodeTypeRegistry()); return ntMgr.getNodeDefinition(cnd); }
if (def.isAutoCreated()) { if (def.definesNode()) { NodeDefinitionImpl ndi = ntMgr.getNodeDefinition((QNodeDefinition) def); createChildNode(def.getName(), (NodeTypeImpl) ndi.getDefaultPrimaryType(), null); } else {
if (def.isAutoCreated()) { if (def.definesNode()) { NodeDefinitionImpl ndi = ntMgr.getNodeDefinition((QNodeDefinition) def); createChildNode(def.getName(), (NodeTypeImpl) ndi.getDefaultPrimaryType(), null); } else {
if (def.isAutoCreated()) { if (def.definesNode()) { NodeDefinitionImpl ndi = ntMgr.getNodeDefinition((QNodeDefinition) def); createChildNode(def.getName(), (NodeTypeImpl) ndi.getDefaultPrimaryType(), null); } else {
if (def.isAutoCreated()) { if (def.definesNode()) { NodeDefinitionImpl ndi = ntMgr.getNodeDefinition((QNodeDefinition) def); createChildNode(def.getName(), (NodeTypeImpl) ndi.getDefaultPrimaryType(), null); } else {
"node definition for type '" + state.getNodeTypeName() + "'"); return sessionContext.getNodeTypeManager().getNodeDefinition(def); } catch (NodeTypeConflictException e) { throw new RepositoryException(e);
"node definition for type '" + state.getNodeTypeName() + "'"); return sessionContext.getNodeTypeManager().getNodeDefinition(def); } catch (NodeTypeConflictException e) { throw new RepositoryException(e);