Package org.codehaus.enunciate.util

Examples of org.codehaus.enunciate.util.TypeDeclarationComparator


      if (isClass()) {
        //if the declaration is a class, the endpoint interface is implied...
        impls.add(new EndpointImplementation((ClassDeclaration) getDelegate(), this));
      }
      else {
        Set<TypeDeclaration> potentialImpls = new TreeSet<TypeDeclaration>(new TypeDeclarationComparator());
        potentialImpls.addAll(getAnnotationProcessorEnvironment().getTypeDeclarations());
        if (implementationCandidates != null) {
          potentialImpls.addAll(Arrays.asList(implementationCandidates));
        }
        for (TypeDeclaration declaration : potentialImpls) {
View Full Code Here


      Map<String, String> overlayConversions = new HashMap<String, String>();
      String clientNamespace = this.rpcModuleNamespace + ".client";
      conversions.put(this.rpcModuleNamespace, clientNamespace);
      overlayConversions.put(this.rpcModuleNamespace, clientNamespace + ".json");
      if (!this.enforceNamespaceConformance) {
        TreeSet<WebFault> allFaults = new TreeSet<WebFault>(new TypeDeclarationComparator());
        for (WsdlInfo wsdlInfo : model.getNamespacesToWSDLs().values()) {
          for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) {
            if (!isFacetExcluded(ei)) {
              String pckg = ei.getPackage().getQualifiedName();
              if (!pckg.startsWith(this.rpcModuleNamespace) && !conversions.containsKey(pckg)) {
                conversions.put(pckg, clientNamespace + "." + pckg);
              }
              for (WebMethod webMethod : ei.getWebMethods()) {
                for (WebFault webFault : webMethod.getWebFaults()) {
                  allFaults.add(webFault);
                }
              }
            }
          }
        }
        for (WebFault webFault : allFaults) {
          if (!isFacetExcluded(webFault)) {
            String pckg = webFault.getPackage().getQualifiedName();
            if (!pckg.startsWith(this.rpcModuleNamespace) && !conversions.containsKey(pckg) && (getKnownGwtModule(webFault) == null)) {
              conversions.put(pckg, clientNamespace + "." + pckg);
            }
          }
        }
        for (SchemaInfo schemaInfo : model.getNamespacesToSchemas().values()) {
          for (TypeDefinition typeDefinition : schemaInfo.getTypeDefinitions()) {
            if (!isFacetExcluded(typeDefinition)) {
              String pckg = typeDefinition.getPackage().getQualifiedName();
              if (!pckg.startsWith(this.rpcModuleNamespace) && !conversions.containsKey(pckg)) {
                if (getKnownGwtModule(typeDefinition) == null) {
                  conversions.put(pckg, clientNamespace + "." + pckg);
                }
                overlayConversions.put(pckg, clientNamespace + ".json." + pckg);
              }
            }
          }
        }
      }

      ClientClassnameForMethod classnameFor = new ClientClassnameForMethod(conversions);
      classnameFor.setJdk15(true);
      OverlayClientClassnameForMethod overlayClassnameFor = new OverlayClientClassnameForMethod(overlayConversions);
      overlayClassnameFor.setJdk15(true);
      model.put("packageFor", new ClientPackageForMethod(conversions));
      model.put("overlayPackageFor", new ClientPackageForMethod(overlayConversions));
      model.put("isAccessorOfTypeLong", new IsAccessorOfTypeLongMethod());
      model.put("classnameFor", classnameFor);
      model.put("overlayClassnameFor", overlayClassnameFor);
      model.put("simpleNameFor", new SimpleNameWithParamsMethod(classnameFor));
      model.put("overlaySimpleNameFor", new SimpleNameWithParamsMethod(overlayClassnameFor));
      model.put("gwtSubcontext", getGwtSubcontext());
      model.put("accessorOverridesAnother", new AccessorOverridesAnotherMethod());

      model.setFileOutputDirectory(clientSideGenerateDir);
      Properties gwt2jaxbMappings = new Properties();
      TreeSet<WebFault> allFaults = new TreeSet<WebFault>(new TypeDeclarationComparator());

      Set<String> importedModules = new TreeSet<String>();
      if (isGenerateRPCSupport()) {
        debug("Generating the GWT endpoints...");
        for (WsdlInfo wsdlInfo : model.getNamespacesToWSDLs().values()) {
View Full Code Here

  @Override
  public ValidationResult validateEndpointInterface(EndpointInterface ei) {
    ValidationResult result = super.validateEndpointInterface(ei);

    TreeSet<WebFault> allFaults = new TreeSet<WebFault>(new TypeDeclarationComparator());
    if (!isGWTTransient(ei)) {
      if ((this.enforceNamespaceConformance) && (!ei.getPackage().getQualifiedName().startsWith(this.gwtModuleNamespace))) {
        result.addError(ei, String.format("The package of the endpoint interface, %s, must start with the GWT module namespace, %s.", ei.getPackage().getQualifiedName(), gwtModuleNamespace));
      }
View Full Code Here

  @Override
  public void initModel(EnunciateFreemarkerModel model) {
    super.initModel(model);

    if (!isDisabled()) {
      TreeSet<WebFault> allFaults = new TreeSet<WebFault>(new TypeDeclarationComparator());
      for (WsdlInfo wsdlInfo : model.getNamespacesToWSDLs().values()) {
        for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) {
          String pckg = ei.getPackage().getQualifiedName();
          if (!this.packageToNamespaceConversions.containsKey(pckg)) {
            this.packageToNamespaceConversions.put(pckg, packageToNamespace(pckg));
View Full Code Here

  private final TreeSet<WebFault> faultSet = new TreeSet<WebFault>(new TypeDeclarationComparator());

  @Override
  public ValidationResult validateEndpointInterface(EndpointInterface ei) {
    ValidationResult result = super.validateEndpointInterface(ei);
    TreeSet<WebFault> unvisitedFaults = new TreeSet<WebFault>(new TypeDeclarationComparator());
    for (WebMethod webMethod : ei.getWebMethods()) {
      for (WebMessage webMessage : webMethod.getMessages()) {
        if (webMessage instanceof RequestWrapper) {
          result.aggregate(validateRequestWrapper((RequestWrapper) webMessage, jaxwsBeans));
        }
View Full Code Here

      URL requestBeanTemplate = JAXWSSupportDeploymentModule.class.getResource("request-bean.fmt");
      URL responseBeanTemplate = JAXWSSupportDeploymentModule.class.getResource("response-bean.fmt");
      URL faultBeanTemplate = JAXWSSupportDeploymentModule.class.getResource("fault-bean.fmt");

      TreeSet<WebFault> visitedFaults = new TreeSet<WebFault>(new TypeDeclarationComparator());
      for (WsdlInfo wsdlInfo : ns2wsdl.values()) {
        for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) {
          for (WebMethod webMethod : ei.getWebMethods()) {
            for (WebMessage webMessage : webMethod.getMessages()) {
              if (webMessage instanceof RequestWrapper) {
View Full Code Here

TOP

Related Classes of org.codehaus.enunciate.util.TypeDeclarationComparator

Copyright © 2018 www.massapicom. 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.