Package org.codehaus.enunciate.contract.validation

Examples of org.codehaus.enunciate.contract.validation.ValidationResult.addError()


        }
        result.addError(ei, "Sorry, GWT doesn't support two endpoint implementations for interface '" + ei.getQualifiedName() +
          "'.  Found " + ei.getEndpointImplementations().size() + " implementations (" + impls.toString() + ").");
      }
      else if (ei.getEndpointImplementations().isEmpty()) {
        result.addError(ei, "GWT requires an implementation for each service interface.");
      }
    }
   
    for (WebFault fault : allFaults) {
      if (!isGWTTransient(fault)) {
View Full Code Here


    }
   
    for (WebFault fault : allFaults) {
      if (!isGWTTransient(fault)) {
        if ((this.enforceNamespaceConformance) && (!fault.getPackage().getQualifiedName().startsWith(this.gwtModuleNamespace)) && (!isKnownGwtType(fault))) {
          result.addError(fault, String.format("The package of the fault, %s, must start with the GWT module namespace, %s.", fault.getPackage().getQualifiedName(), gwtModuleNamespace));
        }
      }
    }

    return result;
View Full Code Here

  @Override
  public ValidationResult validateComplexType(ComplexTypeDefinition complexType) {
    ValidationResult result = super.validateComplexType(complexType);
    if (!isGWTTransient(complexType)) {
      if (!hasDefaultConstructor(complexType)) {
        result.addError(complexType, "The mapping from GWT to JAXB requires a public no-arg constructor.");
      }

      if ((this.enforceNamespaceConformance)
        && (!complexType.getPackage().getQualifiedName().startsWith(this.gwtModuleNamespace))
        && (!isKnownGwtType(complexType))) {
View Full Code Here

      }

      if ((this.enforceNamespaceConformance)
        && (!complexType.getPackage().getQualifiedName().startsWith(this.gwtModuleNamespace))
        && (!isKnownGwtType(complexType))) {
        result.addError(complexType, String.format("The package of the complex type, %s, must start with the GWT module namespace, %s.", complexType.getPackage().getQualifiedName(), gwtModuleNamespace));
      }

      for (Attribute attribute : complexType.getAttributes()) {
        if (!isGWTTransient(attribute)) {
          if ((attribute.getDelegate() instanceof FieldDeclaration) && (enforceNoFieldAccessors)) {
View Full Code Here

      }

      for (Attribute attribute : complexType.getAttributes()) {
        if (!isGWTTransient(attribute)) {
          if ((attribute.getDelegate() instanceof FieldDeclaration) && (enforceNoFieldAccessors)) {
            result.addError(attribute, "If you're mapping to GWT, you can't use fields for your accessors. ");
          }

          if (!isSupported(attribute.getAccessorType())) {
            result.addError(attribute, "GWT doesn't support the '" + attribute.getAccessorType() + "' type.");
          }
View Full Code Here

          if ((attribute.getDelegate() instanceof FieldDeclaration) && (enforceNoFieldAccessors)) {
            result.addError(attribute, "If you're mapping to GWT, you can't use fields for your accessors. ");
          }

          if (!isSupported(attribute.getAccessorType())) {
            result.addError(attribute, "GWT doesn't support the '" + attribute.getAccessorType() + "' type.");
          }
        }
      }

      for (Element element : complexType.getElements()) {
View Full Code Here

      }

      for (Element element : complexType.getElements()) {
        if (!isGWTTransient(element)) {
          if ((element.getDelegate() instanceof FieldDeclaration) && (enforceNoFieldAccessors)) {
            result.addError(element, "If you're mapping to GWT, you can't use fields for your accessors. ");
          }

          if (!isSupported(element.getAccessorType())) {
            result.addError(element, "GWT doesn't support the '" + element.getAccessorType() + "' type.");
          }
View Full Code Here

          if ((element.getDelegate() instanceof FieldDeclaration) && (enforceNoFieldAccessors)) {
            result.addError(element, "If you're mapping to GWT, you can't use fields for your accessors. ");
          }

          if (!isSupported(element.getAccessorType())) {
            result.addError(element, "GWT doesn't support the '" + element.getAccessorType() + "' type.");
          }

          if (this.generateJsonOverlays) {
            if (element instanceof ElementRef && ((ElementRef) element).isElementRefs()) {
              result.addWarning(complexType, "GWT overlay types don't fully support the @XmlElementRefs annotation. The items in the collection will only be available to the client-side in the form of a raw, untyped JsArray. Consider redesigning using a collection of a single type. See http://jira.codehaus.org/browse/ENUNCIATE-543 for more information, and feel free to contribute your ideas on how to solve this problem.");
View Full Code Here

      Value value = complexType.getValue();
      if (value != null) {
        if (!isGWTTransient(value)) {
          if ((value.getDelegate() instanceof FieldDeclaration) && (enforceNoFieldAccessors)) {
            result.addError(value, "If you're mapping to GWT, you can't use fields for your accessors. ");
          }

          if (!isSupported(value.getAccessorType())) {
            result.addError(value, "GWT doesn't support the '" + value.getAccessorType() + "' type.");
          }
View Full Code Here

          if ((value.getDelegate() instanceof FieldDeclaration) && (enforceNoFieldAccessors)) {
            result.addError(value, "If you're mapping to GWT, you can't use fields for your accessors. ");
          }

          if (!isSupported(value.getAccessorType())) {
            result.addError(value, "GWT doesn't support the '" + value.getAccessorType() + "' type.");
          }
        }
      }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.