|
JAFS API v2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openafs.jafs.ACL
An abstract representation of AFS file and directory pathnames. This class is an extension of the standard Java File class with file-based manipulation methods overridden by integrated AFS native methods.
Nested Class Summary | |
static class |
ACL.Entry
AFS ACL Entry Class. |
Constructor Summary | |
ACL(String path)
Constructs a new ACL that reflects the AFS filesystem Access Control List respective to path .
|
|
ACL(String path,
boolean init)
Constructs a new ACL that reflects the AFS filesystem Access Control List respective to path . |
Method Summary | |
void |
addNegativeEntries(ACL.Entry[] entries)
Adds the provided list of negative ACL entries to this ACL instance. |
void |
addNegativeEntry(ACL.Entry entry)
Adds a single negative ACL entry to this ACL instance. |
void |
addNegativeExpungeEntry(ACL.Entry entry)
Add a negative ACL entry to the list of negative ACL entries to be expunged; used in Delta ACLs. |
void |
addPositiveEntries(ACL.Entry[] entries)
Adds the provided list of positive ACL entries to this ACL instance. |
void |
addPositiveEntry(ACL.Entry entry)
Adds a single positive ACL entry to this ACL instance. |
void |
addPositiveExpungeEntry(ACL.Entry entry)
Add a positive ACL entry to the list of positive ACL entries to be expunged; used in Delta ACLs. |
int |
compareTo(ACL acl)
Compares two ACL objects respective to their paths and does not factor any other attribute. |
int |
compareTo(Object obj)
Comparable interface method. |
boolean |
containsNegative(ACL.Entry entry)
Returns true if this ACL contains the specified ACL entry. |
boolean |
containsNegativeEntry(String name)
Returns true if this ACL contains an ACL entry with the
specified user or group name. |
boolean |
containsPositiveEntry(ACL.Entry entry)
Returns true if this ACL contains the specified ACL entry.
|
boolean |
containsPositiveEntry(String name)
Returns true if this ACL contains an ACL entry with the
specified user or group name. |
boolean |
equals(ACL acl)
Tests whether two ACL objects are equal, based on their
paths and permission bits. |
void |
flush()
Writes the ACL to AFS, making all changes immediately effective. |
ACL |
getDeltaACL(ACL acl)
Returns a "Delta ACL", which is an ACL that represents only the difference (delta) of two ACLs, relative to the current ACL instance by the provided ACL specified by acl .
|
int |
getEntryCount()
Returns the total number of ACL entries, this is the sum of positive and negative entries. |
ACL.Entry[] |
getNegativeEntries()
Returns all negative ACL entries for this ACL instance. |
ACL.Entry |
getNegativeEntry(String name)
Returns the negative ACL entry associated with the specified user/group name. |
int |
getNegativeEntryCount()
Returns the number of negative ACL entries for this ACL instance. |
ACL.Entry[] |
getNegativeExpungeEntries()
Returns all negative ACL entries to be expunged; used in Delta ACLs. |
String |
getPath()
Returns the path this ACL instance is bound to. |
ACL.Entry[] |
getPositiveEntries()
Returns all positive ACL entries for this ACL instance. |
ACL.Entry |
getPositiveEntry(String name)
Returns the positive ACL entry associated with the specified user/group name. |
int |
getPositiveEntryCount()
Returns the number of positive ACL entries for this ACL instance. |
ACL.Entry[] |
getPositiveExpungeEntries()
Returns all positive ACL entries to be expunged; used in Delta ACLs. |
void |
removeAllNegativeEntries()
Removes all negative ACL entries from this ACL instance. |
void |
removeAllPositiveEntries()
Removes all positive ACL entries from this ACL instance. |
void |
removeNegativeEntry(ACL.Entry entry)
Removes a single negative ACL entry from this ACL instance. |
void |
removePositiveEntry(ACL.Entry entry)
Removes a single positive ACL entry from this ACL instance. |
void |
setNegativeEntries(ACL.Entry[] entries)
Sets the complete array of negative ACL entries to the provided ACL entry list ( entries ) for this ACL instance. |
void |
setPositiveEntries(ACL.Entry[] entries)
Sets the complete array of positive ACL entries to the provided ACL entry list ( entries ) for this ACL instance. |
String |
toString()
Returns a String representation of this ACL |
void |
update(ACL delta)
Updates the current ACL instance by replacing, adding, or deleting ACL entries designated by the specified Delta ACL ( delta ).
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ACL(String path) throws AFSException
path
.
This constructor will automatically query the filesystem for the most
accurate point-in-time representation of the ACL respective to
path
.
If you wish to construct an ACL without querying the filesystem, please
refer to .
path
- The fully-qualified AFS path (ie. /afs/domain.com/)ACL(String, boolean)
,
flush()
public ACL(String path, boolean init) throws AFSException
path
. If init
is
false
, then the corresponding ACL object is abstract and
will not contain the ACL information present in the filesystem ACL for
path
.
This constructor allows you to automatically query the filesystem for the
most accurate point-in-time representation of the ACL respective to
path
. To automatically query the filesystem upon
construction, init
must be true
.
path
- The fully-qualified AFS path (ie. /afs/domain.com/)init
- Flag that indicates if the filesystem will be queried;
its meaning is "initialize ACL".ACL(String, boolean)
,
flush()
Method Detail |
public int getEntryCount()
public String getPath()
public void flush() throws AFSException
AFSException
public int getPositiveEntryCount()
public ACL.Entry[] getPositiveEntries()
public ACL.Entry getPositiveEntry(String name)
name
- Name of user/group for desired ACL entry.
ACL.Entry.getUser()
public ACL.Entry[] getPositiveExpungeEntries()
public boolean containsPositiveEntry(ACL.Entry entry)
true
if this ACL contains the specified ACL entry.
Please note that this method does compare privileges/permission
bits.
entry
- Positive ACL entry
true
if the specified ACL entry is present;
false
otherwise.ACL.Entry.equals(ACL.Entry)
public boolean containsPositiveEntry(String name)
true
if this ACL contains an ACL entry with the
specified user or group name. Please note that this method does not
compare privileges/permission bits.
name
- User or group name to search for
true
if an ACL entry with the specified user or
group is present; false
otherwise.public void addPositiveEntry(ACL.Entry entry) throws AFSException
entry
- ACL.Entry object to add
AFSException
public void addPositiveEntries(ACL.Entry[] entries) throws AFSException
entries
- Array of ACL.Entry objects to add
AFSException
public void setPositiveEntries(ACL.Entry[] entries) throws AFSException
entries
) for this ACL instance.
entries
- Array of ACL.Entry objects that represent this
ACL's positive entry list.
AFSException
public void addPositiveExpungeEntry(ACL.Entry entry) throws AFSException
entry
- Positive ACL entries to be expunged.
AFSException
public void removePositiveEntry(ACL.Entry entry) throws AFSException
entry
- ACL.Entry object to removed
AFSException
public void removeAllPositiveEntries() throws AFSException
AFSException
public int getNegativeEntryCount()
public ACL.Entry[] getNegativeEntries()
public ACL.Entry getNegativeEntry(String name)
name
- Name of user/group for desired ACL entry.
ACL.Entry.getUser()
public ACL.Entry[] getNegativeExpungeEntries()
public boolean containsNegative(ACL.Entry entry)
true
if this ACL contains the specified ACL entry.
entry
- Negative ACL entry
true
if the specified ACL entry is present;
false
otherwise.public boolean containsNegativeEntry(String name)
true
if this ACL contains an ACL entry with the
specified user or group name. Please note that this method does not
compare privileges/permission bits.
name
- User or group name to search for
true
if an ACL entry with the specified user or
group is present; false
otherwise.public void addNegativeEntry(ACL.Entry entry) throws AFSException
entry
- ACL.Entry object to add
AFSException
public void addNegativeEntries(ACL.Entry[] entries) throws AFSException
entries
- Array of ACL.Entry objects to add
AFSException
public void addNegativeExpungeEntry(ACL.Entry entry) throws AFSException
entry
- Negative ACL entries to be expunged.
AFSException
public void setNegativeEntries(ACL.Entry[] entries) throws AFSException
entries
) for this ACL instance.
entries
- Array of ACL.Entry objects that represent this
ACL's negative entry list.
AFSException
public void removeNegativeEntry(ACL.Entry entry) throws AFSException
entry
- ACL.Entry object to removed
AFSException
public void removeAllNegativeEntries() throws AFSException
AFSException
public ACL getDeltaACL(ACL acl) throws AFSException
acl
.
This ACL instance represents the base or reference object while the
provided ACL (acl
) represents the object in question.
Therefore, if the provided ACL has an entry that differs from the base ACL,
then the resulting Delta ACL will contain that entry found in the provided
ACL; base ACL entries are never entered into the Delta ACL, but rather are
used solely for comparison.
acl
- the ACL to compare this ACL instance to
acl
AFSException
public void update(ACL delta) throws AFSException
delta
).
If the provided Delta ACL has an entry that differs from this ACL instance, then the ACL entry of the Delta ACL will be set.
delta
- the Delta ACL to be applied to this ACL instance
AFSException
public int compareTo(ACL acl)
acl
- The ACL object to be compared to this ACL
instance
public int compareTo(Object obj)
compareTo
in interface Comparable
compareTo(ACL)
public boolean equals(ACL acl)
ACL
objects are equal, based on their
paths and permission bits.
acl
- the ACL to test
public String toString()
ACL
toString
in class Object
ACL
|
JAFS API v2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |