Search in sources :

Example 6 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 7 with XXTagResourceMap

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

the class RangerTagResourceMapService method getTagResourceMapsByServiceId.

public List<RangerTagResourceMap> getTagResourceMapsByServiceId(Long serviceId) {
    List<RangerTagResourceMap> ret = new ArrayList<RangerTagResourceMap>();
    List<XXTagResourceMap> xxTagResourceMaps = daoMgr.getXXTagResourceMap().findByServiceId(serviceId);
    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 8 with XXTagResourceMap

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

the class RangerTagResourceMapService method getByResourceId.

public List<RangerTagResourceMap> getByResourceId(Long resourceId) {
    List<RangerTagResourceMap> ret = new ArrayList<RangerTagResourceMap>();
    List<XXTagResourceMap> xxTagResourceMaps = daoMgr.getXXTagResourceMap().findByResourceId(resourceId);
    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 9 with XXTagResourceMap

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

the class RangerTagResourceMapService method getByTagAndResourceGuid.

public RangerTagResourceMap getByTagAndResourceGuid(String tagGuid, String resourceGuid) {
    RangerTagResourceMap ret = null;
    XXTagResourceMap xxTagResourceMap = daoMgr.getXXTagResourceMap().findByTagAndResourceGuid(tagGuid, resourceGuid);
    if (xxTagResourceMap != null) {
        ret = populateViewBean(xxTagResourceMap);
    }
    return ret;
}
Also used : XXTagResourceMap(org.apache.ranger.entity.XXTagResourceMap) 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 XXServiceResourceElement (org.apache.ranger.entity.XXServiceResourceElement)1 XXServiceResourceElementValue (org.apache.ranger.entity.XXServiceResourceElementValue)1 XXTag (org.apache.ranger.entity.XXTag)1 XXTagAttribute (org.apache.ranger.entity.XXTagAttribute)1 RangerServiceNotFoundException (org.apache.ranger.plugin.util.RangerServiceNotFoundException)1