Пример #1
0
  public Map<String, Serializable> getParams() {
    try {
      URL location = new URL(url);

      WWServiceExtension creator = new WWServiceExtension();
      String errorMessage = creator.reasonForFailure(location);
      if (errorMessage != null) {
        setErrorMessage(errorMessage);
        return null;
        // return Collections.emptyMap();
      } else return creator.createParams(location);
    } catch (MalformedURLException e) {
      return null;
    }
  }
Пример #2
0
  /** This should be called using the Wizard .. job when next/finish is pressed. (never called?) */
  public List<IService> getResources(IProgressMonitor monitor) throws Exception {
    URL location = new URL(url);

    WWServiceExtension creator = new WWServiceExtension();

    Map<String, Serializable> params = creator.createParams(location);
    IService service = creator.createService(location, params);
    service.getInfo(monitor); // load it

    List<IService> servers = new ArrayList<IService>();
    servers.add(service);

    /*
     * Success! Store the URL in history.
     */
    saveWidgetValues();

    return servers;
  }