Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.services.files
Interface IHostFilePermissions

All Known Implementing Classes:
HostFilePermissions, PendingHostFilePermissions

public interface IHostFilePermissions

Interface for file permission and ownership support in RSE IFileService. An implementation of an IHostFilePermissions object is expected to be a data storage for permission and ownership information.

Since:
3.0

Field Summary
static int PERM_ANY_EXECUTE
           
static int PERM_ANY_READ
           
static int PERM_ANY_WRITE
           
static int PERM_GROUP_EXECUTE
          Permission constant indicating that the group can execute this file
static int PERM_GROUP_READ
          Permission constant indicating that the group can read this file
static int PERM_GROUP_WRITE
          Permission constant indicating that the group can write to this file
static int PERM_OTHER_EXECUTE
          Permission constant indicating that other users can execute to this file
static int PERM_OTHER_READ
          Permission constant indicating that other users can read this file
static int PERM_OTHER_WRITE
          Permission constant indicating that other users can write to this file
static int PERM_USER_EXECUTE
          Permission constant indicating that the user can execute this file
static int PERM_USER_READ
          Permission constant indicating that the user can read this file
static int PERM_USER_WRITE
          Permission constant indicating that the user can write to this file
 
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 bitmask)
          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 bitmask, 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
 

Field Detail

PERM_USER_READ

static final int PERM_USER_READ
Permission constant indicating that the user can read this file

See Also:
Constant Field Values

PERM_USER_WRITE

static final int PERM_USER_WRITE
Permission constant indicating that the user can write to this file

See Also:
Constant Field Values

PERM_USER_EXECUTE

static final int PERM_USER_EXECUTE
Permission constant indicating that the user can execute this file

See Also:
Constant Field Values

PERM_GROUP_READ

static final int PERM_GROUP_READ
Permission constant indicating that the group can read this file

See Also:
Constant Field Values

PERM_GROUP_WRITE

static final int PERM_GROUP_WRITE
Permission constant indicating that the group can write to this file

See Also:
Constant Field Values

PERM_GROUP_EXECUTE

static final int PERM_GROUP_EXECUTE
Permission constant indicating that the group can execute this file

See Also:
Constant Field Values

PERM_OTHER_READ

static final int PERM_OTHER_READ
Permission constant indicating that other users can read this file

See Also:
Constant Field Values

PERM_OTHER_WRITE

static final int PERM_OTHER_WRITE
Permission constant indicating that other users can write to this file

See Also:
Constant Field Values

PERM_OTHER_EXECUTE

static final int PERM_OTHER_EXECUTE
Permission constant indicating that other users can execute to this file

See Also:
Constant Field Values

PERM_ANY_READ

static final int PERM_ANY_READ
See Also:
Constant Field Values

PERM_ANY_WRITE

static final int PERM_ANY_WRITE
See Also:
Constant Field Values

PERM_ANY_EXECUTE

static final int PERM_ANY_EXECUTE
See Also:
Constant Field Values
Method Detail

setPermission

void setPermission(int bitmask,
                   boolean value)
Set or reset all the permission bits from the given bitmask.

Parameters:
bitmask - the permission(s) bits to modify
value - whether to turn on off of the permission(s) Example: setPermission(PERM_USER_WRITE | PERM_GROUP_WRITE, true);

getPermission

boolean getPermission(int bitmask)
Test if any of the permission bits from the bitmask are set.

Parameters:
bitmask - the permission(s) to check for
Returns:
true if one of the permission bits is set Example: getPermission(PERM_USER_WRITE | PERM_GROUP_WRITE)

getPermissionBits

int getPermissionBits()
Get the set of permission bits.

Returns:
set of permission bits

setPermissionBits

void setPermissionBits(int bits)
Set the permission bits

Parameters:
bits - the set of permission bits

toAlphaString


String toAlphaString()
return permissions in rwxrwxrwx form


getUserOwner


String getUserOwner()
returns the user owner of the file

Returns:
the user owner

getGroupOwner


String getGroupOwner()
returns the group owner of the file

Returns:
the group owner

setUserOwner

void setUserOwner(
String user)
Sets the user owner attribute

Parameters:
user - the user owner attribute

setGroupOwner

void setGroupOwner(
String group)
Sets the group owner attribute

Parameters:
group - the group owner attribute

clone


Object clone()
             throws 
CloneNotSupportedException
Creates and returns a copy of this object, as specified by the Object.clone() contract. Each implementer of the IHostFilePermission API must properly implement this method and implement the Cloneable interface.

Returns:
the cloned object
Throws:
CloneNotSupportedException - if an instance cannot be cloned for any reason, e.g. because its state contains complex objects that cannot be cloned.
See Also:
Object.clone()

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire