Tabnine Logo
TagUserApi.searchTags
Code IndexAdd Tabnine to your IDE (free)

How to use
searchTags
method
in
com.ning.billing.util.api.TagUserApi

Best Java code snippets using com.ning.billing.util.api.TagUserApi.searchTags (Showing top 1 results out of 315)

origin: com.ning.billing/killbill-jaxrs

  @GET
  @Path("/" + SEARCH + "/{searchKey:" + ANYTHING_PATTERN + "}")
  @Produces(APPLICATION_JSON)
  public Response searchTags(@PathParam("searchKey") final String searchKey,
                @QueryParam(QUERY_SEARCH_OFFSET) @DefaultValue("0") final Long offset,
                @QueryParam(QUERY_SEARCH_LIMIT) @DefaultValue("100") final Long limit,
                @QueryParam(QUERY_AUDIT) @DefaultValue("NONE") final AuditMode auditMode,
                @javax.ws.rs.core.Context final HttpServletRequest request) throws TagApiException {
    final TenantContext tenantContext = context.createContext(request);
    final Pagination<Tag> tags = tagUserApi.searchTags(searchKey, offset, limit, tenantContext);
    final URI nextPageUri = uriBuilder.nextPage(TagResource.class, "searchTags", tags.getNextOffset(), limit, ImmutableMap.<String, String>of("searchKey", searchKey,
                                                                         QUERY_AUDIT, auditMode.getLevel().toString()));
    final Map<UUID, TagDefinition> tagDefinitionsCache = new HashMap<UUID, TagDefinition>();
    for (final TagDefinition tagDefinition : tagUserApi.getTagDefinitions(tenantContext)) {
      tagDefinitionsCache.put(tagDefinition.getId(), tagDefinition);
    }
    return buildStreamingPaginationResponse(tags,
                        new Function<Tag, TagJson>() {
                          @Override
                          public TagJson apply(final Tag tag) {
                            final TagDefinition tagDefinition = tagDefinitionsCache.get(tag.getTagDefinitionId());

                            // TODO Really slow - we should instead try to figure out the account id
                            final List<AuditLog> auditLogs = auditUserApi.getAuditLogs(tag.getId(), ObjectType.TAG, auditMode.getLevel(), tenantContext);
                            return new TagJson(tag, tagDefinition, auditLogs);
                          }
                        },
                        nextPageUri);
  }
}
com.ning.billing.util.apiTagUserApisearchTags

Javadoc

Find all tags having their object type, associated tag definition name or description matching the search key

Popular methods of TagUserApi

  • getTagsForObject
  • addTags
  • createTagDefinition
  • deleteTagDefinition
  • getTagDefinition
  • getTagDefinitions
  • getTags
  • removeTags

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onRequestPermissionsResult (Fragment)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now