private String getValueFor(String property) {
   if (property == null) return null;
   String result = TestActivator.getContext().getProperty(property);
   if (result == null && archiveAndRepositoryProperties == null) return null;
   if (result == null) archiveAndRepositoryProperties.getProperty(property);
   if (result == null)
     result = archiveAndRepositoryProperties.getProperty(property + '.' + Platform.getOS());
   return result;
 }
Esempio n. 2
0
 private URL getSourceURL() {
   String urlString = props.getProperty(KEY_SOURCE_URL, null);
   try {
     return urlString == null ? null : new URL(urlString);
   } catch (MalformedURLException e) {
     // impossible because we validated URL in the setter method
     throw new RuntimeException(e);
   }
 }
 /**
  * Returns the list of bundles in the osgi.bundles property of the platform config ini, or a set
  * of default bundles if the property could not be found.
  *
  * @return string list of bundles
  */
 public static String getBundleList() {
   Properties properties = getConfigIniProperties();
   String osgiBundles =
       properties == null ? null : properties.getProperty("osgi.bundles"); // $NON-NLS-1$
   if (osgiBundles == null) {
     osgiBundles = getDefaultBundleList();
   } else {
     osgiBundles = stripPathInformation(osgiBundles);
   }
   return osgiBundles;
 }
  public static Dictionary[] getPlatformProperties(String[] profiles, MinimalState state) {
    if (profiles == null || profiles.length == 0)
      return new Dictionary[] {getTargetEnvironment(state)};

    // add java profiles for those EE's that have a .profile file in the current system bundle
    ArrayList result = new ArrayList(profiles.length);
    for (int i = 0; i < profiles.length; i++) {
      IExecutionEnvironment environment =
          JavaRuntime.getExecutionEnvironmentsManager().getEnvironment(profiles[i]);
      if (environment != null) {
        Properties profileProps = environment.getProfileProperties();
        if (profileProps != null) {
          Dictionary props = TargetPlatformHelper.getTargetEnvironment(state);
          String systemPackages = profileProps.getProperty(Constants.FRAMEWORK_SYSTEMPACKAGES);
          if (systemPackages != null) props.put(Constants.FRAMEWORK_SYSTEMPACKAGES, systemPackages);
          String ee = profileProps.getProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT);
          if (ee != null) props.put(Constants.FRAMEWORK_EXECUTIONENVIRONMENT, ee);
          result.add(props);
        }
      }
    }
    if (result.size() > 0) return (Dictionary[]) result.toArray(new Dictionary[result.size()]);
    return new Dictionary[] {TargetPlatformHelper.getTargetEnvironment(state)};
  }
Esempio n. 5
0
 /** Returns the number of bytes transferred so far. */
 private Integer getTransferred() {
   return Integer.valueOf(props.getProperty(KEY_TRANSFERRED, "0")); // $NON-NLS-1$
 }
Esempio n. 6
0
 private String getPath() {
   return props.getProperty(KEY_PATH, ""); // $NON-NLS-1$
 }
Esempio n. 7
0
 private List<String> getOptions() {
   return TransferServlet.getOptions(props.getProperty(KEY_OPTIONS, "")); // $NON-NLS-1$
 }
Esempio n. 8
0
 private int getLength() {
   return Integer.valueOf(props.getProperty(KEY_LENGTH, "0")); // $NON-NLS-1$
 }
Esempio n. 9
0
 private String getFileName() {
   return props.getProperty(KEY_FILE_NAME, ""); // $NON-NLS-1$
 }