Codota Logo
AccessControlList.hasExtended
Code IndexAdd Codota to your IDE (free)

How to use
hasExtended
method
in
alluxio.security.authorization.AccessControlList

Best Java code snippets using alluxio.security.authorization.AccessControlList.hasExtended (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: Alluxio/alluxio

/**
 * Update the mask to be the union of owning group entry, named user entry and named group entry.
 * This method must be called when the aforementioned entries are modified.
 */
public void updateMask() {
 if (hasExtended()) {
  AclActions actions = getOwningGroupActions();
  mExtendedEntries.updateMask(actions);
 }
}
origin: Alluxio/alluxio

 return new AclActions(getOwningUserActions());
if (hasExtended()) {
 AclActions actions = mExtendedEntries.getNamedUser(user);
 if (actions != null) {
 groupActions.merge(getOwningGroupActions());
if (hasExtended()) {
 for (String group : groups) {
  AclActions actions = mExtendedEntries.getNamedGroup(group);
 if (hasExtended()) {
  groupActions.mask(mExtendedEntries.mMaskActions);
origin: Alluxio/alluxio

@Override
public String getFingerprint(String path) {
 // TODO(yuzhu): include default ACL in the fingerprint
 try {
  UfsStatus status = getStatus(path);
  Pair<AccessControlList, DefaultAccessControlList> aclPair = getAclPair(path);
  if (aclPair == null || aclPair.getFirst() == null || !aclPair.getFirst().hasExtended()) {
   return Fingerprint.create(getUnderFSType(), status).serialize();
  } else {
   return Fingerprint.create(getUnderFSType(), status, aclPair.getFirst()).serialize();
  }
 } catch (Exception e) {
  // In certain scenarios, it is expected that the UFS path does not exist.
  LOG.debug("Failed fingerprint. path: {} error: {}", path, e.toString());
  return Constants.INVALID_UFS_FINGERPRINT;
 }
}
origin: Alluxio/alluxio

/**
 * Returns a list of {@link AclEntry} which represent this ACL instance. The mask will only be
 * included if extended ACL entries exist.
 *
 * @return an immutable list of ACL entries
 */
public List<AclEntry> getEntries() {
 ImmutableList.Builder<AclEntry> builder = new ImmutableList.Builder<>();
 builder.add(new AclEntry.Builder()
   .setType(AclEntryType.OWNING_USER)
   .setSubject(mOwningUser)
   .setActions(getOwningUserActions())
   .build());
 builder.add(new AclEntry.Builder()
   .setType(AclEntryType.OWNING_GROUP)
   .setSubject(mOwningGroup)
   .setActions(getOwningGroupActions())
   .build());
 builder.add(new AclEntry.Builder()
   .setType(AclEntryType.OTHER)
   .setActions(getOtherActions())
   .build());
 if (hasExtended()) {
  builder.addAll(mExtendedEntries.getEntries());
 }
 return builder.build();
}
origin: Alluxio/alluxio

for (AclEntry entry : entries) {
 if ((entry.isDefault() && inode.getDefaultACL().hasExtended())
   || (!entry.isDefault() && inode.getACL().hasExtended())) {
  if (entry.getType() == AclEntryType.MASK) {
   throw new InvalidArgumentException(
origin: Alluxio/alluxio

private void printLsString(URIStatus status, boolean hSize) {
 // detect the extended acls
 boolean hasExtended = status.getAcl().hasExtended()
   || !status.getDefaultAcl().isEmpty();
 System.out.print(formatLsString(hSize,
   SecurityUtils.isSecurityEnabled(mFsContext.getConf()),
   status.isFolder(),
   FormatUtils.formatMode((short) status.getMode(), status.isFolder(), hasExtended),
   status.getOwner(), status.getGroup(), status.getLength(),
   status.getLastModificationTimeMs(), status.getInAlluxioPercentage(),
   status.getPersistenceState(), status.getPath(),
   mFsContext.getConf().get(PropertyKey.USER_DATE_FORMAT_PATTERN)));
}
origin: Alluxio/alluxio

/**
 * @param acl the access control list to convert
 * @return the proto representation of this object
 */
public static PAcl toProto(AccessControlList acl) {
 PAcl.Builder pAcl = PAcl.newBuilder();
 pAcl.setOwner(acl.getOwningUser());
 pAcl.setOwningGroup(acl.getOwningGroup());
 pAcl.setMode(acl.getMode());
 if (acl.hasExtended()) {
  for (AclEntry entry : acl.getExtendedEntries().getEntries()) {
   pAcl.addEntries(toProto(entry));
  }
 }
 pAcl.setIsDefault(false);
 return pAcl.build();
}
origin: Alluxio/alluxio

/**
 * Creates a new instance of {@link alluxio.util.webui.UIFileInfo}.
 *
 * @param status underlying {@link URIStatus}
 */
public UIFileInfo(URIStatus status) {
 // detect the extended acls
 boolean hasExtended = status.getAcl().hasExtended() || !status.getDefaultAcl().isEmpty();
 mId = status.getFileId();
 mName = status.getName();
 mAbsolutePath = status.getPath();
 mBlockSizeBytes = status.getBlockSizeBytes();
 mSize = status.getLength();
 mCreationTimeMs = status.getCreationTimeMs();
 mLastModificationTimeMs = status.getLastModificationTimeMs();
 mInAlluxio = (100 == status.getInAlluxioPercentage());
 mInAlluxioPercentage = status.getInAlluxioPercentage();
 mIsDirectory = status.isFolder();
 mPinned = status.isPinned();
 mOwner = status.getOwner();
 mGroup = status.getGroup();
 mMode = FormatUtils.formatMode((short) status.getMode(), status.isFolder(), hasExtended);
 mPersistenceState = status.getPersistenceState();
 mFileLocations = new ArrayList<>();
}
origin: Alluxio/alluxio

  = ufs.getAclPair(ufsUri.toString());
if (aclPair == null || aclPair.getFirst() == null || !aclPair.getFirst().hasExtended()) {
 ufsFpParsed = Fingerprint.create(ufs.getUnderFSType(), cachedStatus);
 ufsFingerprint = ufsFpParsed.serialize();
alluxio.security.authorizationAccessControlListhasExtended

Popular methods of AccessControlList

  • <init>
    Creates a new instance where owning user and owning group are initialized to empty strings, and no a
  • getEntries
    Returns a list of AclEntry which represent this ACL instance. The mask will only be included if exte
  • getOwningGroup
  • getOwningUser
  • setEntry
    Sets an entry into the access control list. If an entry with the same type and subject already exist
  • setOwningGroup
    Sets owning group.
  • setOwningUser
    Sets owning user.
  • getMode
  • getPermission
    Gets the permitted actions for a user. When AccessControlList is not modified after calling getPermi
  • setMode
    Sets permitted actions for owning user, owning group, and other based on the mode. The format of mod
  • toString
  • toStringEntries
  • toString,
  • toStringEntries,
  • checkPermission,
  • clearEntries,
  • fromStringEntries,
  • getOtherActions,
  • getOwningGroupActions,
  • getOwningUserActions,
  • removeEntry

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • setScale (BigDecimal)
  • getSystemService (Context)
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • Table (org.hibernate.mapping)
    A relational table
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now