Tabnine Logo
MSentryRole.removePrivileges
Code IndexAdd Tabnine to your IDE (free)

How to use
removePrivileges
method
in
org.apache.sentry.provider.db.service.model.MSentryRole

Best Java code snippets using org.apache.sentry.provider.db.service.model.MSentryRole.removePrivileges (Showing top 7 results out of 315)

origin: apache/sentry

/**
 * Removes all the privileges associated with
 * a particular role. After this dis-association if the
 * privilege doesn't have any roles associated it will be
 * removed from the underlying persistence layer.
 * @param pm Instance of PersistenceManager
 * @param sentryRole Role for which all the privileges are to be removed.
 */
private void removePrivileges(PersistenceManager pm, MSentryRole sentryRole) {
 List<MSentryPrivilege> privilegesCopy = new ArrayList<>(sentryRole.getPrivileges());
 List<MSentryGMPrivilege> gmPrivilegesCopy = new ArrayList<>(sentryRole.getGmPrivileges());
 sentryRole.removePrivileges();
 // with SENTRY-398 generic model
 sentryRole.removeGMPrivileges();
 removeStaledPrivileges(pm, privilegesCopy);
 removeStaledGMPrivileges(pm, gmPrivilegesCopy);
}
origin: apache/incubator-sentry

private void dropSentryRoleCore(PersistenceManager pm, String roleName)
  throws SentryNoSuchObjectException {
 String lRoleName = roleName.trim().toLowerCase();
 Query query = pm.newQuery(MSentryRole.class);
 query.setFilter("this.roleName == t");
 query.declareParameters("java.lang.String t");
 query.setUnique(true);
 MSentryRole sentryRole = (MSentryRole) query.execute(lRoleName);
 if (sentryRole == null) {
  throw new SentryNoSuchObjectException("Role: " + lRoleName + " doesn't exist");
 } else {
  pm.retrieve(sentryRole);
  int numPrivs = sentryRole.getPrivileges().size();
  sentryRole.removePrivileges();
  // with SENTRY-398 generic model
  sentryRole.removeGMPrivileges();
  privCleaner.incPrivRemoval(numPrivs);
  pm.deletePersistent(sentryRole);
 }
}
origin: apache/incubator-sentry

pm.retrieve(sentryRole);
sentryRole.removeGMPrivileges();
sentryRole.removePrivileges();
pm.deletePersistent(sentryRole);
origin: apache/sentry

role.removePrivileges();
role.removeGMPrivileges();
pm.deletePersistent(role);
origin: apache/sentry

role1.removePrivileges();
role1.removeGMPrivileges();
pm.deletePersistent(role1);
origin: apache/incubator-sentry

role = getMSentryRole(pm, roleName);
role.removeGMPrivileges();
role.removePrivileges();
pm.makePersistent(role);
commitTransaction(pm);
origin: apache/sentry

role = getMSentryRole(pm, roleName);
role.removeGMPrivileges();
role.removePrivileges();
pm.makePersistent(role);
commitTransaction(pm);
org.apache.sentry.provider.db.service.modelMSentryRoleremovePrivileges

Popular methods of MSentryRole

  • <init>
  • getGmPrivileges
  • getGroups
  • getPrivileges
  • removeGMPrivileges
  • getRoleName
  • appendGMPrivilege
  • appendGroup
  • getUsers
  • removeGMPrivilege
  • removeGroup
  • appendPrivilege
  • removeGroup,
  • appendPrivilege,
  • appendUser,
  • removePrivilege,
  • removeUser

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Top PhpStorm plugins
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