|
RSE Release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.rse.services.files.HostFilePermissions
public class HostFilePermissions
Default implementation of "Universal" UNIX kind of IHostFilePermissions.
Field Summary |
---|
Fields inherited from interface org.eclipse.rse.services.files.IHostFilePermissions |
---|
PERM_ANY_EXECUTE, PERM_ANY_READ, PERM_ANY_WRITE, PERM_GROUP_EXECUTE, PERM_GROUP_READ, PERM_GROUP_WRITE, PERM_OTHER_EXECUTE, PERM_OTHER_READ, PERM_OTHER_WRITE, PERM_USER_EXECUTE, PERM_USER_READ, PERM_USER_WRITE |
Constructor Summary | |
---|---|
HostFilePermissions()
Constructor without any initial values. |
|
HostFilePermissions(int initialPermissions,
String user,
String group)
Constructor that takes the initial permissions as a bitmask |
|
HostFilePermissions(String alphaPermissions,
String user,
String group)
Constructor that takes the initial permissions in rwxrwxrwx form |
Method Summary | |
---|---|
Object |
clone()
Creates and returns a copy of this object, as specified by the Object.clone() contract. |
String |
getGroupOwner()
returns the group owner of the file |
boolean |
getPermission(int permission)
Test if any of the permission bits from the bitmask are set. |
int |
getPermissionBits()
Get the set of permission bits. |
String |
getUserOwner()
returns the user owner of the file |
void |
setGroupOwner(String group)
Sets the group owner attribute |
void |
setPermission(int permission,
boolean value)
Set or reset all the permission bits from the given bitmask. |
void |
setPermissionBits(int bits)
Set the permission bits |
void |
setUserOwner(String user)
Sets the user owner attribute |
String |
toAlphaString()
return permissions in rwxrwxrwx form |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HostFilePermissions()
public HostFilePermissions(String alphaPermissions, String user, String group)
alphaPermissions
- the initial permissions in alpha formpublic HostFilePermissions(int initialPermissions, String user, String group)
initialPermissions
- the initial permissions bitmaskMethod Detail |
---|
public void setPermission(int permission, boolean value)
IHostFilePermissions
setPermission
in interface IHostFilePermissions
permission
- the permission(s) bits to modifyvalue
- whether to turn on off of the permission(s)
Example: setPermission(PERM_USER_WRITE | PERM_GROUP_WRITE, true);public boolean getPermission(int permission)
IHostFilePermissions
getPermission
in interface IHostFilePermissions
permission
- the permission(s) to check for
public int getPermissionBits()
IHostFilePermissions
getPermissionBits
in interface IHostFilePermissions
public void setPermissionBits(int bits)
IHostFilePermissions
setPermissionBits
in interface IHostFilePermissions
bits
- the set of permission bitspublic String toString()
toString
in class Object
public String toAlphaString()
toAlphaString
in interface IHostFilePermissions
public String getGroupOwner()
IHostFilePermissions
getGroupOwner
in interface IHostFilePermissions
public String getUserOwner()
IHostFilePermissions
getUserOwner
in interface IHostFilePermissions
public void setGroupOwner(String group)
IHostFilePermissions
setGroupOwner
in interface IHostFilePermissions
group
- the group owner attributepublic void setUserOwner(String user)
IHostFilePermissions
setUserOwner
in interface IHostFilePermissions
user
- the user owner attributepublic Object clone() throws CloneNotSupportedException
IHostFilePermissions
Object.clone()
contract.
Each implementer of the IHostFilePermission API must properly implement
this method and implement the Cloneable
interface.
clone
in interface IHostFilePermissions
clone
in class Object
CloneNotSupportedException
- if an instance cannot be cloned for
any reason, e.g. because its state contains complex objects that
cannot be cloned.Object.clone()
|
RSE Release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |