Codota Logo
AccessControlList.<init>
Code IndexAdd Codota to your IDE (free)

How to use
alluxio.security.authorization.AccessControlList
constructor

Best Java code snippets using alluxio.security.authorization.AccessControlList.<init> (Showing top 14 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

protected MutableInode(long id, boolean isDirectory) {
 mCreationTimeMs = System.currentTimeMillis();
 mDeleted = false;
 mDirectory = isDirectory;
 mId = id;
 mTtl = Constants.NO_TTL;
 mTtlAction = TtlAction.DELETE;
 mLastModificationTimeMs = mCreationTimeMs;
 mName = null;
 mParentId = InodeTree.NO_PARENT;
 mPersistenceState = PersistenceState.NOT_PERSISTED;
 mPinned = false;
 mAcl = new AccessControlList();
 mUfsFingerprint = Constants.INVALID_UFS_FINGERPRINT;
}
origin: Alluxio/alluxio

 acl = new DefaultAccessControlList();
} else {
 acl = new AccessControlList();
origin: Alluxio/alluxio

 /**
  * Tests {@link AccessControlList#getPermission(String, List)}.
  */
 @Test
 public void getPermission() {
  AccessControlList acl = new AccessControlList();
  setPermissions(acl);

  assertMode(Mode.Bits.ALL, acl, OWNING_USER, Collections.emptyList());
  assertMode(Mode.Bits.READ_EXECUTE, acl, NAMED_USER, Collections.emptyList());
  assertMode(Mode.Bits.READ_EXECUTE, acl, OTHER_USER, Lists.newArrayList(OWNING_GROUP));
  assertMode(Mode.Bits.READ, acl, OTHER_USER, Lists.newArrayList(NAMED_GROUP));
  assertMode(Mode.Bits.WRITE_EXECUTE, acl, OTHER_USER, Lists.newArrayList(NAMED_GROUP2));
  assertMode(Mode.Bits.ALL, acl, OTHER_USER, Lists.newArrayList(NAMED_GROUP, NAMED_GROUP2));
  assertMode(Mode.Bits.EXECUTE, acl, OTHER_USER, Collections.emptyList());
  assertMode(Mode.Bits.EXECUTE, acl, OTHER_USER, Lists.newArrayList(OTHER_GROUP));
 }
}
origin: Alluxio/alluxio

/**
 * Tests the constructor contract.
 */
@Test
public void constructor() {
 AccessControlList acl = new AccessControlList();
 Assert.assertEquals("", acl.getOwningUser());
 Assert.assertEquals("", acl.getOwningGroup());
}
origin: Alluxio/alluxio

/**
 * Tests {@link AccessControlList#setMode(short)}.
 */
@Test
public void setMode() {
 AccessControlList acl = new AccessControlList();
 short mode = new Mode(Mode.Bits.EXECUTE, Mode.Bits.WRITE, Mode.Bits.READ).toShort();
 acl.setMode(mode);
 Assert.assertEquals(mode, acl.getMode());
}
origin: Alluxio/alluxio

/**
 * Tests {@link AccessControlList#checkPermission(String, List, AclAction)}.
 */
@Test
public void checkPermission() {
 AccessControlList acl = new AccessControlList();
 setPermissions(acl);
 Assert.assertTrue(checkMode(acl, OWNING_USER, Collections.emptyList(), Mode.Bits.ALL));
 Assert.assertTrue(checkMode(acl, NAMED_USER, Collections.emptyList(), Mode.Bits.READ_EXECUTE));
 Assert.assertFalse(checkMode(acl, NAMED_USER, Collections.emptyList(), Mode.Bits.WRITE));
 Assert.assertTrue(checkMode(acl, OTHER_USER, Lists.newArrayList(OWNING_GROUP),
   Mode.Bits.READ_EXECUTE));
 Assert.assertFalse(checkMode(acl, OTHER_USER, Lists.newArrayList(OWNING_GROUP),
   Mode.Bits.WRITE));
 Assert.assertTrue(checkMode(acl, OTHER_USER, Lists.newArrayList(NAMED_GROUP), Mode.Bits.READ));
 Assert.assertFalse(checkMode(acl, OTHER_USER, Lists.newArrayList(NAMED_GROUP),
   Mode.Bits.WRITE));
 Assert.assertFalse(checkMode(acl, OTHER_USER, Lists.newArrayList(NAMED_GROUP),
   Mode.Bits.EXECUTE));
 Assert.assertTrue(checkMode(acl, OTHER_USER, Lists.newArrayList(OTHER_GROUP),
   Mode.Bits.EXECUTE));
 Assert.assertFalse(checkMode(acl, OTHER_USER, Lists.newArrayList(OTHER_GROUP),
   Mode.Bits.READ));
 Assert.assertFalse(checkMode(acl, OTHER_USER, Lists.newArrayList(OTHER_GROUP),
   Mode.Bits.WRITE));
}
origin: Alluxio/alluxio

/**
 * Tests getting and setting owner and group.
 */
@Test
public void ownerGroup() {
 AccessControlList acl = new AccessControlList();
 acl.setOwningUser(OWNING_USER);
 acl.setOwningGroup(OWNING_GROUP);
 Assert.assertEquals(OWNING_USER, acl.getOwningUser());
 Assert.assertEquals(OWNING_GROUP, acl.getOwningGroup());
}
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 acl = new AccessControlList();
acl.mOwningUser = mOwningUser;
acl.mOwningGroup = mOwningGroup;
origin: Alluxio/alluxio

AccessControlList acl = new AccessControlList();
origin: Alluxio/alluxio

 ret = new DefaultAccessControlList();
} else {
 ret = new AccessControlList();
origin: Alluxio/alluxio

/**
 * Tests {@link AccessControlList#getMode()}.
 */
@Test
public void getMode() {
 AccessControlList acl = new AccessControlList();
 Assert.assertEquals(0, acl.getMode());
 acl.setEntry(new AclEntry.Builder().setType(AclEntryType.OWNING_USER).setSubject(OWNING_USER)
   .addAction(AclAction.READ).build());
 acl.setEntry(new AclEntry.Builder().setType(AclEntryType.OWNING_GROUP).setSubject(OWNING_GROUP)
   .addAction(AclAction.WRITE).build());
 acl.setEntry(new AclEntry.Builder().setType(AclEntryType.OTHER)
   .addAction(AclAction.EXECUTE).build());
 Assert.assertEquals(new Mode(Mode.Bits.READ, Mode.Bits.WRITE, Mode.Bits.EXECUTE).toShort(),
   acl.getMode());
}
origin: Alluxio/alluxio

} else {
 AccessControlList acl = new AccessControlList();
 acl.setOwningUser(entry.getOwner());
 acl.setOwningGroup(entry.getGroup());
origin: Alluxio/alluxio

} else {
 AccessControlList acl = new AccessControlList();
 acl.setOwningUser(entry.getOwner());
 acl.setOwningGroup(entry.getGroup());
alluxio.security.authorizationAccessControlList<init>

Javadoc

Creates a new instance where owning user and owning group are initialized to empty strings, and no action is permitted for any user or group.

Popular methods of AccessControlList

  • 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
  • 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