|
JAFS API v2 | |||||||||
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)
|
|
ACL(String path,
boolean init)
|
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 |
containsPositiveEntry(ACL.Entry entry)
Returns true if this ACL contains the specified ACL entry. |
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
public ACL(String path, boolean init) throws AFSException
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.
entry
- Positive ACL entry
true
if the specified ACL entry 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 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 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |