Examples of TicketQuery


Examples of com.gitblit.wicket.TicketsUI.TicketQuery

    }

    Set<TicketQuery> dynamicQueries = new TreeSet<TicketQuery>();
    for (TicketLabel label : app().tickets().getLabels(getRepositoryModel())) {
      String q = QueryBuilder.q(Lucene.labels.matches(label.name)).build();
      dynamicQueries.add(new TicketQuery(label.name, q).color(label.color));
    }

    for (QueryResult ticket : results) {
      if (!StringUtils.isEmpty(ticket.topic)) {
        String q = QueryBuilder.q(Lucene.topic.matches(ticket.topic)).build();
        dynamicQueries.add(new TicketQuery(ticket.topic, q));
      }

      if (!ArrayUtils.isEmpty(ticket.labels)) {
        for (String label : ticket.labels) {
          String q = QueryBuilder.q(Lucene.labels.matches(label)).build();
          dynamicQueries.add(new TicketQuery(label, q));
        }
      }
    }

    if (dynamicQueries.size() == 0) {
      add(new Label("dynamicQueries").setVisible(false));
    } else {
      Fragment fragment = new Fragment("dynamicQueries", "dynamicQueriesFragment", this);
      ListDataProvider<TicketQuery> dynamicQueriesDp = new ListDataProvider<TicketQuery>(new ArrayList<TicketQuery>(dynamicQueries));
      DataView<TicketQuery> dynamicQueriesList = new DataView<TicketQuery>("dynamicQuery", dynamicQueriesDp) {
        private static final long serialVersionUID = 1L;

        @Override
        public void populateItem(final Item<TicketQuery> item) {
          final TicketQuery tq = item.getModelObject();
          Component swatch = new Label("swatch", "&nbsp;").setEscapeModelStrings(false);
          if (StringUtils.isEmpty(tq.color)) {
            // calculate a color
            tq.color = StringUtils.getColor(tq.name);
          }
View Full Code Here

Examples of com.nineteendrops.tracdrops.client.api.ticket.ticket.TicketQuery

*/
public class TicketQueryToStringEncoder implements ParameterEncoder {

    public Object encode(TracProperties tracProperties, Object parameter) {

        TicketQuery ticketQuery = (TicketQuery)parameter;

        String query = ticketQuery.getFullQuery();

        if(query.equals("")){
            throw new TracException(MessageUtils.getMessage("api.ticket.ticket.query.no.filters"));
        }

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.