/** * Returns the node type definition of the node type with the given name. * * @param nodeTypeName name of node type whose definition should be returned. * @return the node type definition of the node type with the given name. * @throws NoSuchNodeTypeException if a node type with the given name * does not exist */ public QNodeTypeDefinition getNodeTypeDef(Name nodeTypeName) throws NoSuchNodeTypeException { QNodeTypeDefinition def = registeredNTDefs.get(nodeTypeName); if (def == null) { throw new NoSuchNodeTypeException(nodeTypeName.toString()); } return def; }
public boolean canAddMixin(String s) throws NoSuchNodeTypeException, RepositoryException { try { registrySession.getWorkspace().getNodeTypeManager().getNodeType(s); } catch (NoSuchNodeTypeException e) { throw new NoSuchNodeTypeException("No such mix node type exists " + e.getMessage()); } return true; // TODO :check other facts for add a mix : [returns true for testing versioning] }
private static NodeType getJcrNodeType(String superType) throws RepositoryException { try { return UserSession.get().getJcrSession().getWorkspace().getNodeTypeManager().getNodeType(superType); } catch (NoSuchNodeTypeException e) { if (log.isDebugEnabled()) { log.warn("Could not retrieve node type '" + superType + "'. Maybe it is not committed yet.", e); } else { log.warn("Could not retrieve node type '{}'. Maybe it is not committed yet. {}", superType, e.toString()); } } return null; }
log.warn("Error registering subnodes: " + ex.getClass().getName() + ": " + ex.getMessage());
/** * {@inheritDoc} */ public NodeType[] getSupertypes() { Set<InternalQName> supers = nodeTypeDataManager.getSupertypes(nodeTypeData.getName()); NodeType[] superTypes = new NodeType[supers.size()]; int i = 0; for (InternalQName nodeTypeName : supers) { try { superTypes[i++] = nodeTypeManager.findNodeType(nodeTypeName); } catch (NoSuchNodeTypeException e) { LOG.error(e.getLocalizedMessage(), e); } catch (RepositoryException e) { LOG.error(e.getLocalizedMessage(), e); } } return superTypes; }
log.warn("Error registering subnodes: " + ex.getClass().getName() + ": " + ex.getMessage());
/** * Returns the node type definition of the node type with the given name. * * @param nodeTypeName name of node type whose definition should be returned. * @return the node type definition of the node type with the given name. * @throws NoSuchNodeTypeException if a node type with the given name * does not exist */ public QNodeTypeDefinition getNodeTypeDef(Name nodeTypeName) throws NoSuchNodeTypeException { QNodeTypeDefinition def = registeredNTDefs.get(nodeTypeName); if (def == null) { throw new NoSuchNodeTypeException(nodeTypeName.toString()); } return def; }
fail(e.getMessage()); } else { throw new NotExecutableException("NodeType " + name +
private void internalUnregister(Name name) throws NoSuchNodeTypeException { QNodeTypeDefinition ntd = registeredNTDefs.get(name); if (ntd == null) { throw new NoSuchNodeTypeException(name.toString()); } registeredNTDefs.remove(name); entCache.invalidate(name); }
log.error("invalid nodetype" + e.getMessage() + "\n" + MESSAGE_ZEROMATCH_QUERY); } catch (RepositoryException e) { log.error("invalid nodetype" + e.getMessage() + "\n" + MESSAGE_ZEROMATCH_QUERY);
private void internalUnregister(Name name) throws NoSuchNodeTypeException { QNodeTypeDefinition ntd = registeredNTDefs.get(name); if (ntd == null) { throw new NoSuchNodeTypeException(name.toString()); } registeredNTDefs.remove(name); entCache.invalidate(name); }
throw new InvalidQueryException(e.getMessage(), e);
/** * @see NodeTypeRegistry#getNodeTypeDefinition(Name) */ public QNodeTypeDefinition getNodeTypeDefinition(Name nodeTypeName) throws NoSuchNodeTypeException { QNodeTypeDefinition def = registeredNTDefs.get(nodeTypeName); if (def == null) { throw new NoSuchNodeTypeException("Nodetype " + nodeTypeName + " doesn't exist"); } return def; } //------------------------------------------< EffectiveNodeTypeProvider >---
/** * @see NodeTypeRegistry#getNodeTypeDefinition(Name) */ public QNodeTypeDefinition getNodeTypeDefinition(Name nodeTypeName) throws NoSuchNodeTypeException { QNodeTypeDefinition def = registeredNTDefs.get(nodeTypeName); if (def == null) { throw new NoSuchNodeTypeException("Nodetype " + nodeTypeName + " doesn't exist"); } return def; } //------------------------------------------< EffectiveNodeTypeProvider >---
/** * {@inheritDoc} */ public NodeType getNodeType(String nodeTypeName) throws NoSuchNodeTypeException { try { return getNodeType(context.getQName(nodeTypeName)); } catch (NameException e) { throw new NoSuchNodeTypeException(nodeTypeName, e); } catch (NamespaceException e) { throw new NoSuchNodeTypeException(nodeTypeName, e); } }
/** * {@inheritDoc} */ public NodeType getNodeType(String nodeTypeName) throws NoSuchNodeTypeException { try { return getNodeType(context.getQName(nodeTypeName)); } catch (NameException e) { throw new NoSuchNodeTypeException(nodeTypeName, e); } catch (NamespaceException e) { throw new NoSuchNodeTypeException(nodeTypeName, e); } }
public void unregisterNodeTypes(Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException { for (Name name : nodeTypeNames) { if (!definitions.containsKey(name)) { throw new NoSuchNodeTypeException("{" + name.getNamespaceURI() + "}" + name.getLocalName()); } } for (Name name : nodeTypeNames) { definitions.remove(name); } }
public void unregisterNodeTypes(Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException { for (Name name : nodeTypeNames) { if (!definitions.containsKey(name)) { throw new NoSuchNodeTypeException("{" + name.getNamespaceURI() + "}" + name.getLocalName()); } } for (Name name : nodeTypeNames) { definitions.remove(name); } }
/** * {@inheritDoc} */ public NodeType getNodeType(String nodeTypeName) throws NoSuchNodeTypeException { try { Name qName = getNamePathResolver().getQName(nodeTypeName); return getNodeType(qName); } catch (NamespaceException e) { throw new NoSuchNodeTypeException(nodeTypeName, e); } catch (NameException e) { throw new NoSuchNodeTypeException(nodeTypeName, e); } }
/** * {@inheritDoc} */ public NodeType getNodeType(String nodeTypeName) throws NoSuchNodeTypeException { try { Name qName = getNamePathResolver().getQName(nodeTypeName); return getNodeType(qName); } catch (NamespaceException e) { throw new NoSuchNodeTypeException(nodeTypeName, e); } catch (NameException e) { throw new NoSuchNodeTypeException(nodeTypeName, e); } }