@Override public void processError(String message) { if (isCommandLineInvocation) { processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, message); throw new AbortException(); } else { throw new ModelerException(message); } }
protected void error(Entity entity, String message){ if (entity == null) { errReceiver.error(null, message); } else { errReceiver.error(entity.getLocator(), message); } throw new AbortException(); }
public GloballyKnown find(Kind k, QName name) { Map map = getMap(k); Object result = map.get(name); if (result == null){ errReceiver.error(null, WsdlMessages.ENTITY_NOT_FOUND_BY_Q_NAME(k.getName(), name, _systemId)); throw new AbortException(); } return (GloballyKnown) result; }
public void validateThis() { if (_message == null) { errorReceiver.error(getLocator(), WsdlMessages.VALIDATION_MISSING_REQUIRED_ATTRIBUTE("name", "wsdl:message")); throw new AbortException(); } }
@Override public void pollAbort() throws AbortException { if (listener.isCanceled()) { throw new AbortException(); } }
protected void error(Entity entity, String message){ if (entity == null) { errReceiver.error(null, message); } else { errReceiver.error(entity.getLocator(), message); } throw new AbortException(); }
public void validateThis() { if (_message == null) { errorReceiver.error(getLocator(), WsdlMessages.VALIDATION_MISSING_REQUIRED_ATTRIBUTE("name", "wsdl:message")); throw new AbortException(); } }
public void validateThis() { if (getName() == null) { errorReceiver.error(getLocator(), WsdlMessages.VALIDATION_MISSING_REQUIRED_ATTRIBUTE("name", "wsdl:message")); throw new AbortException(); } }
public void validateThis() { if (getName() == null) { errorReceiver.error(getLocator(), WsdlMessages.VALIDATION_MISSING_REQUIRED_ATTRIBUTE("name", "wsdl:message")); throw new AbortException(); } }
public void validateThis() { if (getName() == null) { errorReceiver.error(getLocator(), WsdlMessages.VALIDATION_MISSING_REQUIRED_ATTRIBUTE("name", "wsdl:message")); throw new AbortException(); } }
public Binding resolveBinding(AbstractDocument document) { try{ return (Binding) document.find(Kinds.BINDING, _binding); } catch (NoSuchEntityException e) { errorReceiver.error(getLocator(), WsdlMessages.ENTITY_NOT_FOUND_BINDING(_binding, new QName(getNamespaceURI(), getName()))); throw new AbortException(); } }
public Binding resolveBinding(AbstractDocument document) { try{ return (Binding) document.find(Kinds.BINDING, _binding); } catch (NoSuchEntityException e) { errorReceiver.error(getLocator(), WsdlMessages.ENTITY_NOT_FOUND_BINDING(_binding, new QName(getNamespaceURI(), getName()))); throw new AbortException(); } }
public void addParameter(Parameter p) { if (_parametersByName.containsKey(p.getName())) { errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE(p.getName(), p.getName())); throw new AbortException(); } _parameters.add(p); String name = p.getCustomName() != null ? p.getCustomName() : p.getName(); _parametersByName.put(name, p); }
public void addHeaderBlock(Block b) { if (_headerBlocks.containsKey(b.getName())) { errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PART_NOT_UNIQUE(((com.sun.tools.ws.wsdl.document.Message)getEntity()).getName(), b.getName())); throw new AbortException(); } _headerBlocks.put(b.getName(), b); b.setLocation(Block.HEADER); }
/** attachment block */ public void addAttachmentBlock(Block b) { if (_attachmentBlocks.containsKey(b.getName())) { errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PART_NOT_UNIQUE(((com.sun.tools.ws.wsdl.document.Message)getEntity()).getName(), b.getName())); throw new AbortException(); } _attachmentBlocks.put(b.getName(), b); b.setLocation(Block.ATTACHMENT); }
/** attachment block */ public void addAttachmentBlock(Block b) { if (_attachmentBlocks.containsKey(b.getName())) { errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PART_NOT_UNIQUE(((com.sun.tools.ws.wsdl.document.Message)getEntity()).getName(), b.getName())); throw new AbortException(); } _attachmentBlocks.put(b.getName(), b); b.setLocation(Block.ATTACHMENT); }
public void addBodyBlock(Block b) { if (_bodyBlocks.containsKey(b.getName())) { errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PART_NOT_UNIQUE(((com.sun.tools.ws.wsdl.document.Message)getEntity()).getName(), b.getName())); throw new AbortException(); } _bodyBlocks.put(b.getName(), b); b.setLocation(Block.BODY); }
public void addHeaderBlock(Block b) { if (_headerBlocks.containsKey(b.getName())) { errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PART_NOT_UNIQUE(((com.sun.tools.ws.wsdl.document.Message)getEntity()).getName(), b.getName())); throw new AbortException(); } _headerBlocks.put(b.getName(), b); b.setLocation(Block.HEADER); }
public void addBodyBlock(Block b) { if (_bodyBlocks.containsKey(b.getName())) { errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PART_NOT_UNIQUE(((com.sun.tools.ws.wsdl.document.Message)getEntity()).getName(), b.getName())); throw new AbortException(); } _bodyBlocks.put(b.getName(), b); b.setLocation(Block.BODY); }
public void add(MessagePart part) { if (_partsByName.get(part.getName()) != null){ errorReceiver.error(part.getLocator(), WsdlMessages.VALIDATION_DUPLICATE_PART_NAME(getName(), part.getName())); throw new AbortException(); } if(part.getDescriptor() != null && part.getDescriptorKind() != null) { _partsByName.put(part.getName(), part); _parts.add(part); } else errorReceiver.warning(part.getLocator(), WsdlMessages.PARSING_ELEMENT_OR_TYPE_REQUIRED(part.getName())); }