Package de.innovationgate.wga.common.beans.csconfig.v1

Examples of de.innovationgate.wga.common.beans.csconfig.v1.PublisherOption


      url.append("&tag=" + tagname);
      url.append("&attribute=" + attribute);
      if (value != null) {
          url.append("&value=" + value);
      }
      Version version = VersionCompliance.toWGAVersion(versionCompliance);
      if (version != null) {
          url.append("&version=" +  Integer.toString(version.getMajorVersion()) + Integer.toString(version.getMinorVersion()));
      }
      return url.toString();
  }
View Full Code Here


              url.append(BROWSE_DOCUMENTATION_URL);
              url.append("?tag=" + tagname);
              if (_attribute != null) {
                  url.append("&attribute=" + _attribute);   
              }
              Version version = VersionCompliance.toWGAVersion(_versionCompliance);
              if (version != null) {
                  url.append("&version=" +  Integer.toString(version.getMajorVersion()) + Integer.toString(version.getMinorVersion()));
              }
              return new URL(url.toString());
          } catch (Exception e) {
              return null;
          }       
View Full Code Here

  public static TMLTagDefinitions getInstance(VersionCompliance versionCompliance) {
    if (_instances.containsKey(versionCompliance.getKey())) {
      return _instances.get(versionCompliance.getKey());
    } else {
      Version wgaVersion = (Version) WGADesignConfigurationModel.VERSIONCOMPLIANCE_TO_WGA_VERSION.get(versionCompliance.getKey());
      String tmlTagDefinitionsFileName = "tmlTagDefinitions_50";

      if (wgaVersion != null) {   
        tmlTagDefinitionsFileName = "tmlTagDefinitions_" + Integer.toString(wgaVersion.getMajorVersion()) + Integer.toString(wgaVersion.getMinorVersion());
      }

      TMLTagDefinitions instance;
      InputStreamReader reader = null;
      try {
View Full Code Here

    copy.addAll(_tags);
    return copy;
  }

  public TMLTag getTagByName(String name) {
        Version wgaVersion = getWgaVersion();
    if (wgaVersion != null && wgaVersion.isAtLeast(4, 1)) {
      if (name.matches("\\[.*\\]")) {
        name = "include";
      }
    }
    Iterator<TMLTag> tags = _tags.iterator();
View Full Code Here

 

  private void handleAddDependency() {
    PluginID id = new PluginID();
    id.setUniqueName(EMPTY_PLUGIN_UNAME);
    id.setVersion(new Version(EMPTY_PLUGIN_VERSION));
    _pluginDependenciesModel.add(id);
  }
View Full Code Here

    private InputStream retrieveJavaSource(String classname) {
       
        ZipInputStream zipIn = null;
        try {
            Version wgaVersion = (Version) WGADesignConfigurationModel.VERSIONCOMPLIANCE_TO_WGA_VERSION.get(_versionCompliance.getKey());
            if (wgaVersion != null) {
                InputStream sourceIn;
                try {
                    sourceIn = Plugin.getDefault().getResourceAsStream("resources/wga/source_" + wgaVersion.getMajorVersion() + "_" + wgaVersion.getMinorVersion() + ".jar");
                }
                catch (Exception e) {
                    Plugin.getDefault().logError("Unable to find source for wga version compliance '" + wgaVersion.getMajorVersion() + "." + wgaVersion.getMinorVersion() + "'.");
                    return null;
                }               
                zipIn = new ZipInputStream(sourceIn);
                ZipEntry entry = zipIn.getNextEntry();
                while (entry != null) {
View Full Code Here

            File jarFile = libLocation.getSystemLibraryPath().toFile();
            jarFiles.add(jarFile);
        }
       
       
        Version wgaVersion = (Version) WGADesignConfigurationModel.VERSIONCOMPLIANCE_TO_WGA_VERSION.get(_versionCompliance.getKey());
       
       
        if (includeSource) {
            if (wgaVersion != null) {           
                try {
                    File sourceJar = Plugin.getDefault().getResourceAsFile("resources/wga/source_" + wgaVersion.getMajorVersion() + "_" + wgaVersion.getMinorVersion() + ".jar");
                    if (sourceJar != null) {
                        jarFiles.add(sourceJar);
                    }
                }
                catch (IOException e) {
                    Plugin.getDefault().logWarning("Unable to retrieve wga source.jar as file.", e);
                }           
            }
        }
       
        // retrieve J2EE libs
        Bundle bundle = Platform.getBundle("de.innovationgate.eclipse.plugins.Core");
        if (bundle != null && wgaVersion != null) {           
            IPath path = new Path("resources").append("librarySets");
            if (wgaVersion.isAtLeast(5, 0)) {
                path = path.append("j2ee14");
            } else {
                path = path.append("j2ee13");
            }
            URL librarySetURL = FileLocator.find(bundle, path, null);                       
View Full Code Here

    WGADeployment existingDefaultDeployment = getDeployment(DEFAULT_DEPLOYMENT_NAME);
    if (existingDefaultDeployment != null) {
      InputStream propIn = null;
      try {
        propIn = propFile.getURL().openStream();
        Version newDefaultDeploymentVersion = WGADeployment.determineWGAVersion(propIn);
        Version existingDefaultDeploymentVersion = existingDefaultDeployment.getWGAVersion();
        if (!newDefaultDeploymentVersion.equals(existingDefaultDeploymentVersion)) {
          // we have to update the default deployment
          createDeployment(DEFAULT_DEPLOYMENT_NAME, defaultWGAWar, monitor, true);
        }
      } finally {
View Full Code Here

    InputStream propIn = null;
    try {
      FileSystemManager fsManager = VFS.getManager();
      FileObject propFile = fsManager.resolveFile( "zip:" + wgaWar.toURI() + "!/WEB-INF/wgabuild.properties");
      propIn = propFile.getURL().openStream();
      Version version = WGADeployment.determineWGAVersion(propIn);
      if (version != null) {
        if (version.isAtLeast(Activator.SUPPORTED_WGA_VERSION_MIN.getMajor(),  Activator.SUPPORTED_WGA_VERSION_MIN.getMinor())) {
          if (version.getMajorVersion() < Activator.SUPPORTED_WGA_VERSION_MAX.getMajor()) {
            return true;
          } else if (version.getMajorVersion() == Activator.SUPPORTED_WGA_VERSION_MAX.getMajor()) {
            return version.getMinorVersion() <= Activator.SUPPORTED_WGA_VERSION_MAX.getMinor();
          } else {
            return false;
          }
        } else {
          return false;
View Full Code Here

  }


  public String getWGAVersionString() {
    String wgaVersion = "n.a.";
    Version version = getWGAVersion();
    if (version != null) {
      wgaVersion = version.getMainVersionString();
    }
    return wgaVersion;
  }
View Full Code Here

TOP

Related Classes of de.innovationgate.wga.common.beans.csconfig.v1.PublisherOption

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.