Examples of RedmineServerVersion


Examples of net.sf.redmine_mylyn.api.client.RedmineServerVersion

  public RedmineServerVersion detectServerVersion(IProgressMonitor monitor) throws RedmineApiErrorException {
    monitor = Policy.monitorFor(monitor);
    monitor.beginTask(Messages.PROGRESS_DETECT_REDMINE_VERSION, 1);

    GetMethod method = new GetMethod(URL_SERVER_VERSION);
    RedmineServerVersion version = executeMethod(method, versionParser, monitor);

    if(monitor.isCanceled()) {
      throw new OperationCanceledException();
    } else {
      monitor.worked(1);
View Full Code Here

Examples of net.sf.redmine_mylyn.api.client.RedmineServerVersion

  }
 
  @Override
  public RedmineServerVersion checkClientConnection(IProgressMonitor monitor) throws RedmineStatusException {
   
    RedmineServerVersion version;
    try {
      version = apiClient.detectServerVersion(monitor);
    } catch (RedmineApiErrorException e) {
      throw new RedmineStatusException(e);
    }
View Full Code Here

Examples of net.sf.redmine_mylyn.api.client.RedmineServerVersion

  public RedmineRepositorySettingsPage(TaskRepository taskRepository) {
   
    super(Messages.SETTINGS_PAGE_TITLE, Messages.SETTINGS_PAGE_EXAMPLE_URL, taskRepository);

    //TODO configure
    requiredVersion = new RedmineServerVersion(Release.REDMINE_1_0, Release.PLUGIN_2_7);

    setNeedsAnonymousLogin(false);
    setNeedsValidation(true);
    setNeedsHttpAuth(true);
  }
View Full Code Here

Examples of net.sf.redmine_mylyn.api.client.RedmineServerVersion

          throw new CoreException(new Status(IStatus.ERROR, RedmineCorePlugin.PLUGIN_ID, Messages.INVALID_SERVERURL));
        }
       
        detectedVersionString = null;
       
        RedmineServerVersion detectedVersion = null;
        try {
          IClient client = ClientFactory.createClient(repository);
          detectedVersion = client.checkClientConnection(monitor);
        } catch (RedmineStatusException e) {
          if(e.getCause() instanceof RedmineApiAuthenticationException) {
            throw new CoreException(new Status(IStatus.ERROR, RedmineCorePlugin.PLUGIN_ID, Messages.INVALID_CREDENTIALS));
          }
          throw new CoreException(e.getStatus());
        }
        checkedUrl = repository.getRepositoryUrl();
       
        validateVersion(requiredVersion, detectedVersion);
//        validateEditorExtension(repository);

        detectedVersionString = detectedVersion.toString();

        String msg = Messages.SUCCESSFUL_CONNECTION_TEST_X_X;
        msg = String.format(msg, detectedVersion.redmine.toString(), detectedVersion.plugin.toString());
        this.setStatus(new Status(IStatus.OK, RedmineCorePlugin.PLUGIN_ID, msg));
      }
View Full Code Here

Examples of net.sf.redmine_mylyn.api.client.RedmineServerVersion

    assertNotNull(testee.getConfiguration());
  }

  @Test
  public void testDetectServerVersion() throws Exception {
    RedmineServerVersion version = testee.detectServerVersion(monitor);
    assertNotNull(version);
  }
View Full Code Here

Examples of net.sf.redmine_mylyn.api.client.RedmineServerVersion

    input.close();
  }

  @Test
  public void testParseResponse() throws Exception {
    RedmineServerVersion version = testee.parseResponse(input, HttpStatus.SC_OK);
   
    assertNotNull(version);
    ServerVersionValidator.validate(version);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.