SearchUtils extends ComponentSupport { public boolean isAssetSearchParam(final String assetSearchParam) { return assetSearchParams.containsKey(assetSearchParam) || isFullAssetAttributeName(assetSearchParam); } @Inject  SearchUtils(final RepositoryManagerRESTAdapter repoAdapter,
                     final Map<String, SearchMappings> searchMappings,
                     final Map<String, SearchContribution> searchContributions); Map<String, String> getSearchParameters(); Map<String, String> getAssetSearchParameters(); Repository getRepository(final String repository); QueryBuilder buildQuery(final Collection<SearchFilter> searchFilters); QueryBuilder buildQuery(final UriInfo uriInfo); QueryBuilder buildQuery(final UriInfo uriInfo, final List<String> parameters); boolean isAssetSearchParam(final String assetSearchParam); boolean isFullAssetAttributeName(final String assetSearchParam); String getFullAssetAttributeName(final String key); List<SortBuilder> getSortBuilders(final String sort, final String direction); List<SortBuilder> getSortBuilders(final String sort, final String direction, boolean allowAnySort); static final String CONTINUATION_TOKEN; static final String SORT_FIELD; static final String SORT_DIRECTION; }
@Test public void testIsAssetSearchParam_MappedAlias_Sha1() { assertTrue(underTest.isAssetSearchParam(SHA1_ALIAS)); }
@Test public void testIsAssetSearchParam_UnMapped_FullAssetAttributeName() { assertTrue(underTest.isAssetSearchParam(VALID_SHA1_ATTRIBUTE_NAME)); }
@Test public void testIsAssetSearchParam_UnMappedAlias_Returns_False() { assertFalse(underTest.isAssetSearchParam("new.asset")); }
@Test public void testIsAssetSearchParam_Invalid_Full_AssetAttribute() { assertFalse(underTest.isAssetSearchParam(INVALID_SHA1_ATTRIBUTE_NAME)); }