Search in sources :

Example 16 with VXAsset

use of org.apache.ranger.view.VXAsset in project ranger by apache.

the class ServiceUtil method publicObjecttoVXAsset.

public VXAsset publicObjecttoVXAsset(VXRepository vXRepository) {
    VXAsset ret = new VXAsset();
    publicDataObjectTovXDataObject(vXRepository, ret);
    Integer assetType = toAssetType(vXRepository.getRepositoryType());
    ret.setAssetType(assetType == null ? -1 : assetType.intValue());
    ret.setName(vXRepository.getName());
    ret.setDescription(vXRepository.getDescription());
    ret.setActiveStatus(vXRepository.getIsActive() ? RangerCommonEnums.STATUS_ENABLED : RangerCommonEnums.STATUS_DISABLED);
    ret.setConfig(vXRepository.getConfig());
    return ret;
}
Also used : VXAsset(org.apache.ranger.view.VXAsset)

Aggregations

VXAsset (org.apache.ranger.view.VXAsset)16 Test (org.junit.Test)10 RangerService (org.apache.ranger.plugin.model.RangerService)9 ArrayList (java.util.ArrayList)3 VXAssetList (org.apache.ranger.view.VXAssetList)3 VXRepository (org.apache.ranger.view.VXRepository)3 HttpServletRequest (javax.servlet.http.HttpServletRequest)2 SearchFilter (org.apache.ranger.plugin.util.SearchFilter)2 X509Certificate (java.security.cert.X509Certificate)1 Date (java.util.Date)1 HashMap (java.util.HashMap)1 WebApplicationException (javax.ws.rs.WebApplicationException)1 BaseDao (org.apache.ranger.common.db.BaseDao)1 XXServiceDao (org.apache.ranger.db.XXServiceDao)1 XXAsset (org.apache.ranger.entity.XXAsset)1 XXDBBase (org.apache.ranger.entity.XXDBBase)1 XXService (org.apache.ranger.entity.XXService)1 RangerPolicy (org.apache.ranger.plugin.model.RangerPolicy)1 ServicePolicies (org.apache.ranger.plugin.util.ServicePolicies)1 VXLong (org.apache.ranger.view.VXLong)1