Tabnine Logo
DefaultAccessControlList.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
alluxio.security.authorization.DefaultAccessControlList
constructor

Best Java code snippets using alluxio.security.authorization.DefaultAccessControlList.<init> (Showing top 7 results out of 315)

origin: Alluxio/alluxio

/**
 * Creates a new instance of {@link MutableInodeDirectory}.
 *
 * @param id the id to use
 */
private MutableInodeDirectory(long id) {
 super(id, true);
 mMountPoint = false;
 mDirectChildrenLoaded = false;
 mChildCount = 0;
 mDefaultAcl = new DefaultAccessControlList(mAcl);
}
origin: Alluxio/alluxio

AclEntry aclEntry = AclEntry.fromCliString(stringEntries.get(0));
if (aclEntry.isDefault()) {
 acl = new DefaultAccessControlList();
} else {
 acl = new AccessControlList();
acl = new DefaultAccessControlList();
origin: Alluxio/alluxio

/**
 * Creates a child directory's access ACL and default ACL based on the default ACL.
 * @param umask child's umask
 * @return child directory's access ACL and default ACL
 */
public Pair<AccessControlList, DefaultAccessControlList> generateChildDirACL(Short umask) {
 AccessControlList acl = generateChildFileACL(umask);
 DefaultAccessControlList dAcl = new DefaultAccessControlList(acl);
 dAcl.setEmpty(false);
 dAcl.mOwningUser = mOwningUser;
 dAcl.mOwningGroup = mOwningGroup;
 dAcl.mMode = mMode;
 if (mExtendedEntries == null) {
  dAcl.mExtendedEntries = null;
 } else {
  dAcl.mExtendedEntries = new ExtendedACLEntries(mExtendedEntries);
 }
 return new Pair<>(acl, dAcl);
}
origin: Alluxio/alluxio

private void apply(SetAclEntry entry) {
 MutableInode<?> inode = mInodeStore.getMutable(entry.getId()).get();
 List<AclEntry> entries = StreamUtils.map(ProtoUtils::fromProto, entry.getEntriesList());
 switch (entry.getAction()) {
  case REPLACE:
   // fully replace the acl for the path
   inode.replaceAcl(entries);
   break;
  case MODIFY:
   inode.setAcl(entries);
   break;
  case REMOVE:
   inode.removeAcl(entries);
   break;
  case REMOVE_ALL:
   inode.removeExtendedAcl();
   break;
  case REMOVE_DEFAULT:
   inode.setDefaultACL(new DefaultAccessControlList(inode.getACL()));
   break;
  default:
   LOG.warn("Unrecognized acl action: " + entry.getAction());
 }
 mInodeStore.writeInode(inode);
}
origin: Alluxio/alluxio

/**
 * @param pAcl the proto representation
 * @return the {@link AccessControlList} instance created from the proto representation
 */
public static AccessControlList fromProto(PAcl pAcl) {
 AccessControlList acl;
 if (pAcl.getIsDefault()) {
  acl = new DefaultAccessControlList();
  ((DefaultAccessControlList) acl).setEmpty(pAcl.getIsDefaultEmpty());
 } else {
  acl = new AccessControlList();
 }
 acl.setOwningUser(pAcl.getOwner());
 acl.setOwningGroup(pAcl.getOwningGroup());
 acl.setMode((short) pAcl.getMode());
 if (pAcl.getEntriesCount() > 0) {
  for (PAclEntry tEntry : pAcl.getEntriesList()) {
   acl.setEntry(fromProto(tEntry));
  }
 }
 return acl;
}
origin: Alluxio/alluxio

AccessControlList ret;
if (acl.hasIsDefault() && acl.getIsDefault()) {
 ret = new DefaultAccessControlList();
} else {
 ret = new AccessControlList();
origin: Alluxio/alluxio

 ret.mDefaultAcl = (DefaultAccessControlList) ProtoUtils.fromProto(entry.getDefaultAcl());
} else {
 ret.mDefaultAcl = new DefaultAccessControlList();
alluxio.security.authorizationDefaultAccessControlList<init>

Javadoc

Constructor to build a default ACL that is empty.

Popular methods of DefaultAccessControlList

  • isEmpty
    Returns true if the default ACL is empty.
  • toStringEntries
  • generateChildFileACL
    create a child file 's accessACL based on the default ACL.
  • getEntries
    Returns a list of AclEntry which represent this ACL instance. The mask will only be included if exte
  • setEmpty
  • equals
  • generateChildDirACL
    Creates a child directory's access ACL and default ACL based on the default ACL.
  • hasExtended
  • setEntry
  • setOwningGroup
  • setOwningUser
  • toString
  • setOwningUser,
  • toString,
  • updateMask

Popular in Java

  • Creating JSON documents from java classes using gson
  • addToBackStack (FragmentTransaction)
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Menu (java.awt)
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • From CI to AI: The AI layer in your organization
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