Search in sources :

Example 6 with SearchedResRepList

use of com.emc.storageos.api.service.impl.response.SearchedResRepList in project coprhd-controller by CoprHD.

the class TaggedResource method getTagSearchResults.

/**
 * Get search results by tag in zone (default) or in a specific tenant level
 *
 * @return SearchedResRepList
 */
protected SearchedResRepList getTagSearchResults(String tag, URI tenant) {
    SearchedResRepList resRepList = new SearchedResRepList(getResourceType());
    _dbClient.queryByConstraint(PrefixConstraint.Factory.getTagsPrefixConstraint(getResourceClass(), tag, tenant), resRepList);
    return resRepList;
}
Also used : SearchedResRepList(com.emc.storageos.api.service.impl.response.SearchedResRepList)

Example 7 with SearchedResRepList

use of com.emc.storageos.api.service.impl.response.SearchedResRepList in project coprhd-controller by CoprHD.

the class VirtualPoolService method filterResultsList.

/**
 * Filters the SearchedResRepList by VirtualPoolType (e.g., block or file)
 *
 * @param user the current user
 * @param list a list of resource matching the search
 * @return a list filtered by virtual pool type
 */
protected SearchedResRepList filterResultsList(StorageOSUser user, SearchedResRepList list) {
    SearchedResRepList filteredResRepList = new SearchedResRepList();
    Iterator<SearchResultResourceRep> _queryResultIterator = list.iterator();
    ResRepFilter<SearchResultResourceRep> resrepFilter = new VirtualPoolTypeFilter<SearchResultResourceRep>(user, _permissionsHelper, this.getVirtualPoolType());
    filteredResRepList.setResult(new FilterIterator<SearchResultResourceRep>(_queryResultIterator, resrepFilter));
    return filteredResRepList;
}
Also used : SearchResultResourceRep(com.emc.storageos.model.search.SearchResultResourceRep) SearchedResRepList(com.emc.storageos.api.service.impl.response.SearchedResRepList)

Example 8 with SearchedResRepList

use of com.emc.storageos.api.service.impl.response.SearchedResRepList in project coprhd-controller by CoprHD.

the class ExportGroupService method getProjectSearchResults.

/**
 * Get search results by project alone.
 *
 * @return SearchedResRepList
 */
@Override
protected SearchedResRepList getProjectSearchResults(URI projectId) {
    SearchedResRepList resRepList = new SearchedResRepList(getResourceType());
    _dbClient.queryByConstraint(ContainmentConstraint.Factory.getProjectExportGroupConstraint(projectId), resRepList);
    return resRepList;
}
Also used : SearchedResRepList(com.emc.storageos.api.service.impl.response.SearchedResRepList)

Example 9 with SearchedResRepList

use of com.emc.storageos.api.service.impl.response.SearchedResRepList in project coprhd-controller by CoprHD.

the class FileQuotaDirectoryService method getProjectSearchResults.

/**
 * Get search results by project alone.
 *
 * @return SearchedResRepList
 */
@Override
protected SearchedResRepList getProjectSearchResults(URI projectId) {
    SearchedResRepList resRepList = new SearchedResRepList(getResourceType());
    _dbClient.queryByConstraint(ContainmentConstraint.Factory.getProjectFileshareConstraint(projectId), resRepList);
    return resRepList;
}
Also used : SearchedResRepList(com.emc.storageos.api.service.impl.response.SearchedResRepList)

Example 10 with SearchedResRepList

use of com.emc.storageos.api.service.impl.response.SearchedResRepList in project coprhd-controller by CoprHD.

the class BucketService method getProjectSearchResults.

/**
 * Get search results by project alone.
 *
 * @return SearchedResRepList
 */
@Override
protected SearchedResRepList getProjectSearchResults(URI projectId) {
    SearchedResRepList resRepList = new SearchedResRepList(getResourceType());
    _dbClient.queryByConstraint(ContainmentConstraint.Factory.getProjectBucketConstraint(projectId), resRepList);
    return resRepList;
}
Also used : SearchedResRepList(com.emc.storageos.api.service.impl.response.SearchedResRepList)

Aggregations

SearchedResRepList (com.emc.storageos.api.service.impl.response.SearchedResRepList)20 SearchResultResourceRep (com.emc.storageos.model.search.SearchResultResourceRep)9 SearchResults (com.emc.storageos.model.search.SearchResults)5 List (java.util.List)5 BulkList (com.emc.storageos.api.service.impl.response.BulkList)4 ResRepFilter (com.emc.storageos.api.service.impl.response.ResRepFilter)3 URI (java.net.URI)3 Map (java.util.Map)3 URIQueryResultList (com.emc.storageos.db.client.constraint.URIQueryResultList)2 StringMap (com.emc.storageos.db.client.model.StringMap)2 RestLinkRep (com.emc.storageos.model.RestLinkRep)2 ITLRestRepList (com.emc.storageos.model.block.export.ITLRestRepList)2 ArrayList (java.util.ArrayList)2 Consumes (javax.ws.rs.Consumes)2 GET (javax.ws.rs.GET)2 Path (javax.ws.rs.Path)2 Produces (javax.ws.rs.Produces)2 MapCustomConfig (com.emc.storageos.api.mapper.functions.MapCustomConfig)1 MapVolume (com.emc.storageos.api.mapper.functions.MapVolume)1 ProjOwnedResRepFilter (com.emc.storageos.api.service.impl.response.ProjOwnedResRepFilter)1