Package net.sf.redmine_mylyn.api.query

Examples of net.sf.redmine_mylyn.api.query.Query


  @Override
  public void applyTo(IRepositoryQuery repositoryQuery) {
    repositoryQuery.setSummary(getQueryTitle());
   
    Query query = new Query();
    net.sf.redmine_mylyn.api.model.Query selectedQuery = getSelectedQuery();

    query.addFilter(QueryField.STOREDQUERY, CompareOperator.IS, ""+selectedQuery.getId()); //$NON-NLS-1$
    if(selectedQuery.getProjectId()>=1) {
      query.addFilter(QueryField.PROJECT, CompareOperator.IS, ""+selectedQuery.getProjectId()); //$NON-NLS-1$
    }
   
    try {
      repositoryQuery.setUrl(query.toUrl(getTaskRepository().getCharacterEncoding()));
    } catch (RedmineApiErrorException e) {
      IStatus status = RedmineUiPlugin.toStatus(e, Messages.ERRMSG_QUERY_CREATION_FAILED);
      StatusHandler.log(status);
      setErrorMessage(status.getMessage());
    }
View Full Code Here


    return getSelectedQuery()!=null;
  }

  private void restoreQuery() {
    try {
      Query query = getRedmineQuery();
      if(query != null) {

        QueryFilter queryFilter = query.getQueryFilter(QueryField.STOREDQUERY);
        if(queryFilter!=null) {

          int storedQueryId = RedmineUtil.parseIntegerId(queryFilter.getValues().get(0));
          net.sf.redmine_mylyn.api.model.Query oldValue = getConfiguration().getQueries().getById(storedQueryId);
View Full Code Here

import org.eclipse.swt.widgets.Text;

public class QueryBuilder {

  static Query buildQuery(Map<IQueryField, ComboViewer> searchOperators,  Map<IQueryField, Text> textValues, Map<IQueryField, StructuredViewer> structuredValues) {
    Query query = new Query();

    buildStructuredQueryPart(query, searchOperators, structuredValues);
    buildTextQueryPart(query, searchOperators, textValues);
   
    return query;
View Full Code Here

    }
    return null;
  }
 
  private void restoreQuery() {
    Query query = getRedmineQuery();
    if(query!=null) {
      titleText.setText(getQuery().getSummary());

      QueryBuilder.restoreTextQueryPart(query, configuration, searchOperators, queryText);
      QueryBuilder.restoreStructuredQueryPart(query, configuration, searchOperators, queryStructuredViewer);
View Full Code Here

  @Override
  public void applyTo(IRepositoryQuery repositoryQuery) {
    repositoryQuery.setSummary(getQueryTitle());
   
    Query query = QueryBuilder.buildQuery(searchOperators, queryText, queryStructuredViewer);
    try {
      repositoryQuery.setUrl(query.toUrl(getTaskRepository().getCharacterEncoding()));
    } catch (RedmineApiErrorException e) {
      IStatus status = RedmineUiPlugin.toStatus(e, Messages.ERRMSG_QUERY_CREATION_FAILED);
      StatusHandler.log(status);
      setErrorMessage(status.getMessage());
    }
View Full Code Here

 
  @Override
  public IStatus performQuery(TaskRepository repository, IRepositoryQuery repositoryQuery, TaskDataCollector collector, ISynchronizationSession session, IProgressMonitor monitor) {
   
    try {
      Query query = Query.fromUrl(repositoryQuery.getUrl(), repository.getCharacterEncoding(), getRepositoryConfiguration(repository));

      IClient client = getClientManager().getClient(repository);
      Issue[] partialIssues = client.query(query, monitor);
     
      for(Issue partialIssue : partialIssues) {
View Full Code Here

    assertEquals(8, issues[2].getId());
  }
 
  @Test
  public void testQuery() throws Exception {
    Query query = new Query();
    Issue[] issues =testee.query(query, monitor);
    assertNotNull(issues);
    assertEquals(PartialIssueValidator.COUNT, issues.length);
  }
View Full Code Here

TOP

Related Classes of net.sf.redmine_mylyn.api.query.Query

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.