Tabnine Logo
MSentryGMPrivilege.getScope
Code IndexAdd Tabnine to your IDE (free)

How to use
getScope
method
in
org.apache.sentry.provider.db.service.model.MSentryGMPrivilege

Best Java code snippets using org.apache.sentry.provider.db.service.model.MSentryGMPrivilege.getScope (Showing top 2 results out of 315)

origin: apache/incubator-sentry

query.append("serviceName == \"" + toNULLCol(privilege.getServiceName()) + "\" ");
query.append("&& componentName == \"" + toNULLCol(privilege.getComponentName()) + "\" ");
query.append("&& scope == \"" + toNULLCol(privilege.getScope()) + "\" ");
query.append("&& action == \"" + toNULLCol(privilege.getAction()) + "\"");
if (privilege.getGrantOption() == null) {
origin: apache/sentry

/**
 * Return query builder to execute in JDO for search the given privilege
 * @param privilege Privilege to extract
 * @return query builder suitable for executing the query
 */
private static QueryParamBuilder toQueryParam(MSentryGMPrivilege privilege) {
 QueryParamBuilder paramBuilder = QueryParamBuilder.newQueryParamBuilder();
 paramBuilder.add(SERVICE_NAME, SentryStore.toNULLCol(privilege.getServiceName()), true)
     .add(COMPONENT_NAME, SentryStore.toNULLCol(privilege.getComponentName()), true)
     .add(SCOPE, SentryStore.toNULLCol(privilege.getScope()), true)
     .add(ACTION, SentryStore.toNULLCol(privilege.getAction()), true);
 Boolean grantOption = privilege.getGrantOption();
 paramBuilder.addObject(SentryConstants.GRANT_OPTION, grantOption);
 List<? extends Authorizable> authorizables = privilege.getAuthorizables();
 int nAuthorizables = authorizables.size();
 for (int i = 0; i < MSentryGMPrivilege.AUTHORIZABLE_LEVEL; i++) {
  String resourceName = MSentryGMPrivilege.PREFIX_RESOURCE_NAME + String.valueOf(i);
  String resourceType = MSentryGMPrivilege.PREFIX_RESOURCE_TYPE + String.valueOf(i);
  if (i >= nAuthorizables) {
   paramBuilder.addNull(resourceName);
   paramBuilder.addNull(resourceType);
  } else {
   paramBuilder.add(resourceName, authorizables.get(i).getName(), true);
   paramBuilder.add(resourceType, authorizables.get(i).getTypeName(), true);
  }
 }
 return paramBuilder;
}
org.apache.sentry.provider.db.service.modelMSentryGMPrivilegegetScope

Popular methods of MSentryGMPrivilege

  • <init>
  • appendRole
  • implies
    Return true if this privilege implies request privilege Otherwise, return false
  • removeRole
  • setAction
  • setAuthorizables
    Only allow strict hierarchies. That is, can level =1 be not null when level = 0 is null
  • getAction
  • getAuthorizables
  • getComponentName
  • getField
  • getGrantOption
  • getRoles
  • getGrantOption,
  • getRoles,
  • getServiceName,
  • isNULL,
  • notNULL,
  • setComponentName,
  • setField,
  • setGrantOption,
  • setRoles

Popular in Java

  • Making http requests using okhttp
  • startActivity (Activity)
  • compareTo (BigDecimal)
  • runOnUiThread (Activity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now