|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.entityfs.entityattrs.unix.UnixEntityMode
public class UnixEntityMode
The Unix entity mode is three sets of UnixEntityAccessModeFlag:s used
to determine what permissions an entity's owner, a subject in the same group
as the entity's owner and everybody else have to the entity. It also contains
a set of UnixEntityModeFlag determining extra attributes for the
entity.
Note: In EntityFS 1.1, this class was refactored to be immutable. The current version of this object is not compatible with pre-1.1 versions.
UnixEntityAccessModeFlag,
UnixEntityModeFlag| Method Summary | |
|---|---|
UnixEntityMode |
addGroupMode(UnixEntityAccessModeFlag f)
Add a UnixEntityAccessModeFlag in effect for users that do not
own the entity but are members of its owning group. |
UnixEntityMode |
addGroupModes(Set<UnixEntityAccessModeFlag> s)
Add a set of UnixEntityAccessModeFlag:s in effect for users that
do not own the entity but are members of its owning group. |
UnixEntityMode |
addModeFlag(UnixEntityModeFlag f)
Add a UnixEntityModeFlag. |
UnixEntityMode |
addModeFlags(Set<UnixEntityModeFlag> s)
Add a set of UnixEntityModeFlag:s. |
UnixEntityMode |
addOtherMode(UnixEntityAccessModeFlag f)
Add a UnixEntityAccessModeFlag in effect for users that do not
own the entity and that are not members of its owning group. |
UnixEntityMode |
addOtherModes(Set<UnixEntityAccessModeFlag> s)
Add a set of UnixEntityAccessModeFlag:s in effect for users that
do not own the entity and that are not members of its owning group. |
UnixEntityMode |
addUserMode(UnixEntityAccessModeFlag f)
Add one UnixEntityAccessModeFlag in effect for the entity's
owner. |
UnixEntityMode |
addUserModes(Set<UnixEntityAccessModeFlag> s)
Add a set of UnixEntityAccessModeFlag:s in effect for the
entity's owner, and return a new object. |
boolean |
equals(Object o)
|
static UnixEntityMode |
forCode(int code)
Create an UnixEntityMode object from its numerical
representation. |
static UnixEntityMode |
forCode(short code)
Create an UnixEntityMode object from its numerical
representation. |
short |
getCode()
Get the numerical representation of this entity mode object. |
static UnixEntityMode |
getDefault()
Get a UnixEntityMode that has the code 0644. |
Set<UnixEntityAccessModeFlag> |
getGroupModes()
Get the set of UnixEntityAccessModeFlag:s in effect for users
that don't own the entity but are members of its owning group. |
Set<UnixEntityModeFlag> |
getModeFlags()
Get the set of UnixEntityModeFlag:s. |
Set<UnixEntityAccessModeFlag> |
getOtherModes()
Get the set of UnixEntityAccessModeFlag:s in effect for users
that do not own the entity and that are not members of its owning group. |
Set<UnixEntityAccessModeFlag> |
getUserModes()
Get the set of UnixEntityAccessModeFlag:s in effect for the
entity's owner. |
int |
hashCode()
|
UnixEntityMode |
removeGroupMode(UnixEntityAccessModeFlag f)
Remove a UnixEntityAccessModeFlag in effect for users that do not
own the entity but are members of its owning group. |
UnixEntityMode |
removeGroupModes(Set<UnixEntityAccessModeFlag> s)
Remove a set of UnixEntityAccessModeFlag:s in effect for users
that do not own the entity but are members of its owning group. |
UnixEntityMode |
removeModeFlag(UnixEntityModeFlag f)
Remove the UnixEntityModeFlag:s |
UnixEntityMode |
removeModeFlags(Set<UnixEntityModeFlag> s)
Remove the set of UnixEntityModeFlag:s |
UnixEntityMode |
removeOtherMode(UnixEntityAccessModeFlag f)
Remove a UnixEntityAccessModeFlag in effect for users that do not
own the entity and that are not members of its owning group. |
UnixEntityMode |
removeOtherModes(Set<UnixEntityAccessModeFlag> s)
Remove a set of UnixEntityAccessModeFlag:s in effect for users
that do not own the entity and that are not members of its owning group. |
UnixEntityMode |
removeUserMode(UnixEntityAccessModeFlag f)
Remove a UnixEntityAccessModeFlag in effect for the entity's
owner |
UnixEntityMode |
removeUserModes(Set<UnixEntityAccessModeFlag> s)
Remove a set of UnixEntityAccessModeFlag:s in effect for the
entity's owner. |
UnixEntityMode |
setGroupModes(Set<UnixEntityAccessModeFlag> s)
Set the set of UnixEntityAccessModeFlag:s in effect for users
that do not own the entity but are members of its owning group. |
UnixEntityMode |
setModeFlags(Set<UnixEntityModeFlag> s)
Set the set of UnixEntityModeFlag:s. |
UnixEntityMode |
setOtherModes(Set<UnixEntityAccessModeFlag> s)
Set the set of UnixEntityAccessModeFlag:s in effect for users
that do not own the entity and that are not members of its owning group. |
UnixEntityMode |
setUserModes(Set<UnixEntityAccessModeFlag> s)
Set the set of UnixEntityAccessModeFlag:s in effect for the
entity's owner, and return a new object. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static UnixEntityMode getDefault()
UnixEntityMode that has the code 0644.
UnixEntityMode object.
public static UnixEntityMode forCode(short code)
throws IllegalArgumentException
UnixEntityMode object from its numerical
representation. The code may for instance have the octal values
0644 or 01777.
code - The numerical representation of the entity mode.
UnixEntityMode object.
IllegalArgumentException - If the supplied code is not valid.
public static UnixEntityMode forCode(int code)
throws IllegalArgumentException
UnixEntityMode object from its numerical
representation. The code may for instance have the octal values
0644 or 01777.
code - The numerical representation of the entity mode.
UnixEntityMode object.
IllegalArgumentException - If the supplied code is not valid.public short getCode()
0644 or 0750.public Set<UnixEntityAccessModeFlag> getUserModes()
UnixEntityAccessModeFlag:s in effect for the
entity's owner.
public UnixEntityMode setUserModes(Set<UnixEntityAccessModeFlag> s)
UnixEntityAccessModeFlag:s in effect for the
entity's owner, and return a new object.
Note: The state of the object that this method is called on is not changed. It is immutable.
s - A set of user mode flags.
addUserMode(UnixEntityAccessModeFlag),
addUserModes(Set),
removeUserMode(UnixEntityAccessModeFlag),
removeUserModes(Set)public UnixEntityMode addUserModes(Set<UnixEntityAccessModeFlag> s)
UnixEntityAccessModeFlag:s in effect for the
entity's owner, and return a new object.
Note: The state of the object that this method is called on is not changed. It is immutable.
s - A set of flags.
setUserModes(Set),
addUserMode(UnixEntityAccessModeFlag),
removeUserMode(UnixEntityAccessModeFlag),
removeUserModes(Set)public UnixEntityMode addUserMode(UnixEntityAccessModeFlag f)
UnixEntityAccessModeFlag in effect for the entity's
owner.
Note: The state of the object that this method is called on is not changed. It is immutable.
f - The flag.
setUserModes(Set),
addUserModes(Set),
removeUserMode(UnixEntityAccessModeFlag),
removeUserModes(Set)public UnixEntityMode removeUserModes(Set<UnixEntityAccessModeFlag> s)
UnixEntityAccessModeFlag:s in effect for the
entity's owner.
Note: The state of the object that this method is called on is not changed. It is immutable.
s - The set of flags to remove.
setUserModes(Set),
addUserMode(UnixEntityAccessModeFlag),
addUserModes(Set),
removeUserMode(UnixEntityAccessModeFlag)public UnixEntityMode removeUserMode(UnixEntityAccessModeFlag f)
UnixEntityAccessModeFlag in effect for the entity's
owner
Note: The state of the object that this method is called on is not changed. It is immutable.
f - The flag to remove.
setUserModes(Set),
addUserMode(UnixEntityAccessModeFlag),
addUserModes(Set),
removeUserModes(Set)public Set<UnixEntityAccessModeFlag> getGroupModes()
UnixEntityAccessModeFlag:s in effect for users
that don't own the entity but are members of its owning group.
public UnixEntityMode setGroupModes(Set<UnixEntityAccessModeFlag> s)
UnixEntityAccessModeFlag:s in effect for users
that do not own the entity but are members of its owning group.
Note: The state of the object that this method is called on is not changed. It is immutable.
s - The set of flags.
addGroupMode(UnixEntityAccessModeFlag),
addGroupModes(Set),
removeGroupMode(UnixEntityAccessModeFlag),
removeGroupModes(Set)public UnixEntityMode addGroupModes(Set<UnixEntityAccessModeFlag> s)
UnixEntityAccessModeFlag:s in effect for users that
do not own the entity but are members of its owning group.
Note: The state of the object that this method is called on is not changed. It is immutable.
s - The set of flags to add.
setGroupModes(Set),
addGroupModes(Set),
removeGroupMode(UnixEntityAccessModeFlag),
removeGroupModes(Set)public UnixEntityMode addGroupMode(UnixEntityAccessModeFlag f)
UnixEntityAccessModeFlag in effect for users that do not
own the entity but are members of its owning group.
Note: The state of the object that this method is called on is not changed. It is immutable.
f - The flag.
setGroupModes(Set),
addGroupModes(Set),
removeGroupMode(UnixEntityAccessModeFlag),
removeGroupModes(Set)public UnixEntityMode removeGroupModes(Set<UnixEntityAccessModeFlag> s)
UnixEntityAccessModeFlag:s in effect for users
that do not own the entity but are members of its owning group.
Note: The state of the object that this method is called on is not changed. It is immutable.
s - The set of flags to remove.
setGroupModes(Set),
addGroupMode(UnixEntityAccessModeFlag),
addGroupModes(Set),
removeGroupMode(UnixEntityAccessModeFlag)public UnixEntityMode removeGroupMode(UnixEntityAccessModeFlag f)
UnixEntityAccessModeFlag in effect for users that do not
own the entity but are members of its owning group.
Note: The state of the object that this method is called on is not changed. It is immutable.
f - The flag to remove.
setGroupModes(Set),
addGroupMode(UnixEntityAccessModeFlag),
addGroupModes(Set),
removeGroupModes(Set)public Set<UnixEntityAccessModeFlag> getOtherModes()
UnixEntityAccessModeFlag:s in effect for users
that do not own the entity and that are not members of its owning group.
public UnixEntityMode setOtherModes(Set<UnixEntityAccessModeFlag> s)
UnixEntityAccessModeFlag:s in effect for users
that do not own the entity and that are not members of its owning group.
Note: The state of the object that this method is called on is not changed. It is immutable.
s - The set of flags to set.
addOtherMode(UnixEntityAccessModeFlag),
addOtherModes(Set),
removeOtherMode(UnixEntityAccessModeFlag),
removeOtherModes(Set)public UnixEntityMode addOtherModes(Set<UnixEntityAccessModeFlag> s)
UnixEntityAccessModeFlag:s in effect for users that
do not own the entity and that are not members of its owning group.
Note: The state of the object that this method is called on is not changed. It is immutable.
s - The set of flags to add.
setOtherModes(Set),
addOtherMode(UnixEntityAccessModeFlag),
removeOtherMode(UnixEntityAccessModeFlag),
removeOtherModes(Set)public UnixEntityMode addOtherMode(UnixEntityAccessModeFlag f)
UnixEntityAccessModeFlag in effect for users that do not
own the entity and that are not members of its owning group.
Note: The state of the object that this method is called on is not changed. It is immutable.
f - The flag to add.
setOtherModes(Set),
addOtherModes(Set),
removeOtherMode(UnixEntityAccessModeFlag),
removeOtherModes(Set)public UnixEntityMode removeOtherModes(Set<UnixEntityAccessModeFlag> s)
UnixEntityAccessModeFlag:s in effect for users
that do not own the entity and that are not members of its owning group.
Note: The state of the object that this method is called on is not changed. It is immutable.
s - The set of flags to remove.
setOtherModes(Set),
addOtherMode(UnixEntityAccessModeFlag),
addOtherModes(Set),
removeOtherMode(UnixEntityAccessModeFlag)public UnixEntityMode removeOtherMode(UnixEntityAccessModeFlag f)
UnixEntityAccessModeFlag in effect for users that do not
own the entity and that are not members of its owning group.
Note: The state of the object that this method is called on is not changed. It is immutable.
f - The flag to remove.
setOtherModes(Set),
addOtherMode(UnixEntityAccessModeFlag),
addOtherModes(Set),
removeOtherModes(Set)public Set<UnixEntityModeFlag> getModeFlags()
UnixEntityModeFlag:s.
UnixEntityModeFlag:s.
public UnixEntityMode setModeFlags(Set<UnixEntityModeFlag> s)
throws IllegalArgumentException
UnixEntityModeFlag:s.
All combinations of mode flags are not valid.
UnixEntityModeFlag.MANDATORY_LOCKING cannot be set on an entity
that is group executable, and UnixEntityModeFlag.SET_GROUP_ID
cannot be set on an entity that is not group executable.
Note: The state of the object that this method is called on is not changed. It is immutable.
s - The flags to set.
IllegalArgumentException - If the set of flags is invalid.addModeFlag(UnixEntityModeFlag),
addModeFlags(Set),
removeModeFlag(UnixEntityModeFlag),
removeModeFlags(Set)
public UnixEntityMode addModeFlags(Set<UnixEntityModeFlag> s)
throws IllegalArgumentException
UnixEntityModeFlag:s.
All combinations of mode flags are not valid.
UnixEntityModeFlag.MANDATORY_LOCKING cannot be set on an entity
that is group executable, and UnixEntityModeFlag.SET_GROUP_ID
cannot be set on an entity that is not group executable.
Note: The state of the object that this method is called on is not changed. It is immutable.
s - The set of UnixEntityModeFlag:s to add.
IllegalArgumentException - If the set of flags is invalid.setModeFlags(Set),
addModeFlag(UnixEntityModeFlag),
removeModeFlag(UnixEntityModeFlag),
removeModeFlags(Set)
public UnixEntityMode addModeFlag(UnixEntityModeFlag f)
throws IllegalArgumentException
UnixEntityModeFlag.
All combinations of mode flags are not valid.
UnixEntityModeFlag.MANDATORY_LOCKING cannot be set on an entity
that is group executable, and UnixEntityModeFlag.SET_GROUP_ID
cannot be set on an entity that is not group executable.
Note: The state of the object that this method is called on is not changed. It is immutable.
f - The UnixEntityModeFlag to add.
IllegalArgumentException - If the specific mode flag cannot be set
for this object.setModeFlags(Set),
addModeFlags(Set),
removeModeFlag(UnixEntityModeFlag),
removeModeFlags(Set)public UnixEntityMode removeModeFlags(Set<UnixEntityModeFlag> s)
UnixEntityModeFlag:s
Note: The state of the object that this method is called on is not changed. It is immutable.
s - The set of UnixEntityModeFlag:s to remove.
setModeFlags(Set),
addModeFlag(UnixEntityModeFlag),
addModeFlags(Set),
removeModeFlag(UnixEntityModeFlag)public UnixEntityMode removeModeFlag(UnixEntityModeFlag f)
UnixEntityModeFlag:s
Note: The state of the object that this method is called on is not changed. It is immutable.
f - The UnixEntityModeFlag to remove.
setModeFlags(Set),
addModeFlag(UnixEntityModeFlag),
addModeFlags(Set),
removeModeFlags(Set)public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||