Package org.eclipse.jst.server.generic.servertype.definition

Examples of org.eclipse.jst.server.generic.servertype.definition.Property


      final List serverRuntimeProperties = serverRuntime.getProperty();
      final HashMap runtimeProperties = new HashMap();
      final HashMap serverProperties = new HashMap();
      for (int i = 0; i < serverRuntimeProperties.size(); i++)
      {
        final Property property = (Property) serverRuntimeProperties.get(i);
        Map values = null;
        if (property.getContext().equals(Property.CONTEXT_RUNTIME))
        {
          System.out.print("\tServer runtime property: ");
          values = runtimeProperties;
        }
        else
        {
          System.out.print("\tServer property: ");
          values = serverProperties;
        }
        System.out.println(property.getId() + ", default value is: " + property.getDefault());
        final String svalue = pf.getProperty(property.getId());
        if (svalue == null)
        {
          System.out.println("ERROR: No value associated for " + property.getId() + " in " + propertiesFile);
          return;
        }
        Object value = null;
        if (property.getType().equals(Property.TYPE_DIRECTORY))
        {
          final File f = new File(svalue);
          if (!f.exists() || !f.isDirectory())
          {
            System.out.println("ERROR: directory property " + property.getId() + " value does not exist or not a directory: " + svalue);
          }
          value = svalue;
        }
        else if (property.getType().equals(Property.TYPE_FILE))
        {
          final File f = new File(svalue);
          if (!f.exists() || !f.isFile())
          {
            System.out.println("ERROR: file property " + property.getId() + " value does not exist or not a regular file: " + svalue);
          }
          value = svalue;
        }
        else
        {
          value = svalue;
        }
        values.put(property.getId(), value);
      }

      System.out.println("Creating server runtime...");

      final RuntimeWorkingCopy rwc = (RuntimeWorkingCopy) runtimeType.createRuntime(runtimeType.getName() + " GENERATED", monitor);
View Full Code Here

TOP

Related Classes of org.eclipse.jst.server.generic.servertype.definition.Property

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.