Tabnine Logo
AccessControlList.toStringEntries
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: Alluxio/alluxio

@Override
public String toString() {
 List<String> entries = toStringEntries();
 return String.join(",", entries);
}
origin: Alluxio/alluxio

/**
 * @return the ACL as string entries for this file
 */
public List<String> convertAclToStringEntries() {
 // do not use getX as the name of the method, otherwise it will be used by json serialization
 return (mAcl == null) ? new ArrayList<>() : mAcl.toStringEntries();
}
origin: Alluxio/alluxio

 /**
  * Serialize an AccessControlList object.
  * @param accessControlList the ACL object to be serialized
  * @param jsonGenerator json generator
  * @param serializerProvider default serializer
  * @throws IOException
  */
 @Override
 public void serialize(AccessControlList accessControlList, JsonGenerator jsonGenerator,
   SerializerProvider serializerProvider) throws IOException {
  jsonGenerator.writeStartObject();
  jsonGenerator.writeStringField(OWNER_FIELD, accessControlList.getOwningUser());
  jsonGenerator.writeStringField(OWNING_GROUP_FIELD, accessControlList.getOwningGroup());
  jsonGenerator.writeObjectField(STRING_ENTRY_FIELD, accessControlList.toStringEntries());
  jsonGenerator.writeEndObject();
 }
}
origin: Alluxio/alluxio

@Override
protected void runPlainPath(AlluxioURI path, CommandLine cl)
  throws AlluxioException, IOException {
 URIStatus status = mFileSystem.getStatus(path);
 System.out.println("# file: " + status.getPath());
 System.out.println("# owner: " + status.getOwner());
 System.out.println("# group: " + status.getGroup());
 for (String entry : status.getAcl().toStringEntries()) {
  System.out.println(entry);
 }
 List<String> defaultAclEntries = status.getDefaultAcl().toStringEntries();
 for (String entry: defaultAclEntries) {
  System.out.println(entry);
 }
}
origin: Alluxio/alluxio

@Test
public void inheritNonExtendedDefaultAcl() throws Exception {
 AlluxioURI dir = new AlluxioURI("/dir");
 mFileSystemMaster.createDirectory(dir, CreateDirectoryContext.defaults());
 String aclString = "default:user::-w-";
 mFileSystemMaster.setAcl(dir, SetAclAction.MODIFY,
   Arrays.asList(AclEntry.fromCliString(aclString)), SetAclContext.defaults());
 AlluxioURI inner = new AlluxioURI("/dir/inner");
 mFileSystemMaster.createDirectory(inner, CreateDirectoryContext.defaults());
 FileInfo fileInfo = mFileSystemMaster.getFileInfo(inner, GetStatusContext.defaults());
 List<String> accessEntries = fileInfo.getAcl().toStringEntries();
 assertTrue(accessEntries.toString(), accessEntries.contains("user::-w-"));
 List<String> defaultEntries = fileInfo.getDefaultAcl().toStringEntries();
 assertTrue(defaultEntries.toString(), defaultEntries.contains(aclString));
}
origin: Alluxio/alluxio

@Test
public void inheritExtendedDefaultAcl() throws Exception {
 AlluxioURI dir = new AlluxioURI("/dir");
 mFileSystemMaster.createDirectory(dir, CreateDirectoryContext.defaults());
 String aclString = "default:user:foo:-w-";
 mFileSystemMaster.setAcl(dir, SetAclAction.MODIFY,
   Arrays.asList(AclEntry.fromCliString(aclString)), SetAclContext.defaults());
 AlluxioURI inner = new AlluxioURI("/dir/inner");
 mFileSystemMaster.createDirectory(inner, CreateDirectoryContext.defaults());
 FileInfo fileInfo = mFileSystemMaster.getFileInfo(inner, GetStatusContext.defaults());
 List<String> accessEntries = fileInfo.getAcl().toStringEntries();
 assertTrue(accessEntries.toString(), accessEntries.contains("user:foo:-w-"));
 List<String> defaultEntries = fileInfo.getDefaultAcl().toStringEntries();
 assertTrue(defaultEntries.toString(), defaultEntries.contains(aclString));
}
alluxio.security.authorizationAccessControlListtoStringEntries

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
  • hasExtended
  • 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
  • setMode,
  • toString,
  • checkPermission,
  • clearEntries,
  • fromStringEntries,
  • getOtherActions,
  • getOwningGroupActions,
  • getOwningUserActions,
  • removeEntry

Popular in Java

  • Finding current android device location
  • getApplicationContext (Context)
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • BoxLayout (javax.swing)
  • JButton (javax.swing)
  • Top Sublime Text 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