Search in sources :

Example 1 with XXTagResourceMap

use of org.apache.ranger.entity.XXTagResourceMap in project ranger by apache.

the class RangerTagResourceMapService method getByTagGuid.

public List<RangerTagResourceMap> getByTagGuid(String tagGuid) {
    List<RangerTagResourceMap> ret = new ArrayList<RangerTagResourceMap>();
    List<XXTagResourceMap> xxTagResourceMaps = daoMgr.getXXTagResourceMap().findByTagGuid(tagGuid);
    if (CollectionUtils.isNotEmpty(xxTagResourceMaps)) {
        for (XXTagResourceMap xxTagResourceMap : xxTagResourceMaps) {
            RangerTagResourceMap tagResourceMap = populateViewBean(xxTagResourceMap);
            ret.add(tagResourceMap);
        }
    }
    return ret;
}
Also used : XXTagResourceMap(org.apache.ranger.entity.XXTagResourceMap) ArrayList(java.util.ArrayList) RangerTagResourceMap(org.apache.ranger.plugin.model.RangerTagResourceMap)

Example 2 with XXTagResourceMap

use of org.apache.ranger.entity.XXTagResourceMap in project ranger by apache.

the class RangerTagResourceMapService method getByTagAndResourceId.

public RangerTagResourceMap getByTagAndResourceId(Long tagId, Long resourceId) {
    RangerTagResourceMap ret = null;
    XXTagResourceMap xxTagResourceMap = daoMgr.getXXTagResourceMap().findByTagAndResourceId(tagId, resourceId);
    if (xxTagResourceMap != null) {
        ret = populateViewBean(xxTagResourceMap);
    }
    return ret;
}
Also used : XXTagResourceMap(org.apache.ranger.entity.XXTagResourceMap) RangerTagResourceMap(org.apache.ranger.plugin.model.RangerTagResourceMap)

Example 3 with XXTagResourceMap

use of org.apache.ranger.entity.XXTagResourceMap in project ranger by apache.

the class RangerTagResourceMapService method getByGuid.

public RangerTagResourceMap getByGuid(String guid) {
    RangerTagResourceMap ret = null;
    XXTagResourceMap xxTagResourceMap = daoMgr.getXXTagResourceMap().findByGuid(guid);
    if (xxTagResourceMap != null) {
        ret = populateViewBean(xxTagResourceMap);
    }
    return ret;
}
Also used : XXTagResourceMap(org.apache.ranger.entity.XXTagResourceMap) RangerTagResourceMap(org.apache.ranger.plugin.model.RangerTagResourceMap)

Example 4 with XXTagResourceMap

use of org.apache.ranger.entity.XXTagResourceMap in project ranger by apache.

the class RangerTagResourceMapService method getByResourceGuid.

public List<RangerTagResourceMap> getByResourceGuid(String resourceGuid) {
    List<RangerTagResourceMap> ret = new ArrayList<RangerTagResourceMap>();
    List<XXTagResourceMap> xxTagResourceMaps = daoMgr.getXXTagResourceMap().findByResourceGuid(resourceGuid);
    if (CollectionUtils.isNotEmpty(xxTagResourceMaps)) {
        for (XXTagResourceMap xxTagResourceMap : xxTagResourceMaps) {
            RangerTagResourceMap tagResourceMap = populateViewBean(xxTagResourceMap);
            ret.add(tagResourceMap);
        }
    }
    return ret;
}
Also used : XXTagResourceMap(org.apache.ranger.entity.XXTagResourceMap) ArrayList(java.util.ArrayList) RangerTagResourceMap(org.apache.ranger.plugin.model.RangerTagResourceMap)

Example 5 with XXTagResourceMap

use of org.apache.ranger.entity.XXTagResourceMap in project ranger by apache.

the class RangerTagResourceMapService method getByTagId.

public List<RangerTagResourceMap> getByTagId(Long tagId) {
    List<RangerTagResourceMap> ret = new ArrayList<RangerTagResourceMap>();
    List<XXTagResourceMap> xxTagResourceMaps = daoMgr.getXXTagResourceMap().findByTagId(tagId);
    if (CollectionUtils.isNotEmpty(xxTagResourceMaps)) {
        for (XXTagResourceMap xxTagResourceMap : xxTagResourceMaps) {
            RangerTagResourceMap tagResourceMap = populateViewBean(xxTagResourceMap);
            ret.add(tagResourceMap);
        }
    }
    return ret;
}
Also used : XXTagResourceMap(org.apache.ranger.entity.XXTagResourceMap) ArrayList(java.util.ArrayList) RangerTagResourceMap(org.apache.ranger.plugin.model.RangerTagResourceMap)

Aggregations

XXTagResourceMap (org.apache.ranger.entity.XXTagResourceMap)9 RangerTagResourceMap (org.apache.ranger.plugin.model.RangerTagResourceMap)8 ArrayList (java.util.ArrayList)5 XXService (org.apache.ranger.entity.XXService)1 XXServiceResource (org.apache.ranger.entity.XXServiceResource)1 XXTag (org.apache.ranger.entity.XXTag)1 RangerServiceNotFoundException (org.apache.ranger.plugin.util.RangerServiceNotFoundException)1