org.globus.cog.abstraction.impl.file
Class GridFileImpl

java.lang.Object
  extended byorg.globus.cog.abstraction.impl.file.GridFileImpl
All Implemented Interfaces:
GridFile

public class GridFileImpl
extends Object
implements GridFile

GridFileImpl contains information pertaining to a file.


Field Summary
 
Fields inherited from interface org.globus.cog.abstraction.interfaces.GridFile
DEVICE, DIRECTORY, FILE, SOFTLINK, UNKNOWN
 
Constructor Summary
GridFileImpl()
           
 
Method Summary
 boolean allCanExecute()
          return true of all users can execute the current file
 boolean allCanRead()
          return true if all users can read from this file
 boolean allCanWrite()
          return true if all users can write into this file
 String getAbsolutePathName()
          return the absolute path name
 Permissions getAllPermissions()
          return permissions for all users
 byte getFileType()
          return file type
 Permissions getGroupPermissions()
          return permissions for the group
 String getLastModified()
          return last modified date for this file
 String getMode()
          return mode as a string of the form 777
 String getName()
          return name of the file
 long getSize()
          return the size of the file
 Permissions getUserPermissions()
          get permissions for the user
 boolean groupCanExecute()
          return true of the group members can execute the current file
 boolean groupCanRead()
          return true if the group members can read from this file
 boolean groupCanWrite()
          return true if the group members can write into this file
 boolean isDevice()
          return true if the GridFile represents a device
 boolean isDirectory()
          return true if the GridFile represents a directory
 boolean isFile()
          return true if the GridFile represents a file
 boolean isSoftLink()
          return true if the GridFile represents a softlink
 void setAbsolutePathName(String name)
          set the absolute path name
 void setAllPermissions(Permissions allPermissions)
          set permissions for all users
 void setFileType(byte type)
          set file type to UNKNOWN/ FILE/ DIRECTORY/ SOFTLINK/ DEVICE
 void setGroupPermissions(Permissions groupPermissions)
          set permissions for the group
 void setLastModified(String date)
          set the last modified date for this file
 void setMode(String mode)
          set mode for the current file.
 void setName(String name)
          set name for the file
 void setSize(long size)
          set the size of the file
 void setUserPermissions(Permissions userPermissions)
          set permissions for the user
 String toString()
          represents the entire grid file properties as a string
 boolean userCanExecute()
          return true of the user can execute the current file
 boolean userCanRead()
          return true if the user can read from this file
 boolean userCanWrite()
          return true if the user can write into this file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GridFileImpl

public GridFileImpl()
Method Detail

setName

public void setName(String name)
set name for the file

Specified by:
setName in interface GridFile

getName

public String getName()
return name of the file

Specified by:
getName in interface GridFile

setAbsolutePathName

public void setAbsolutePathName(String name)
set the absolute path name

Specified by:
setAbsolutePathName in interface GridFile

getAbsolutePathName

public String getAbsolutePathName()
return the absolute path name

Specified by:
getAbsolutePathName in interface GridFile

setSize

public void setSize(long size)
set the size of the file

Specified by:
setSize in interface GridFile

getSize

public long getSize()
return the size of the file

Specified by:
getSize in interface GridFile

setLastModified

public void setLastModified(String date)
set the last modified date for this file

Specified by:
setLastModified in interface GridFile

getLastModified

public String getLastModified()
return last modified date for this file

Specified by:
getLastModified in interface GridFile

setFileType

public void setFileType(byte type)
set file type to UNKNOWN/ FILE/ DIRECTORY/ SOFTLINK/ DEVICE

Specified by:
setFileType in interface GridFile

getFileType

public byte getFileType()
return file type

Specified by:
getFileType in interface GridFile

isFile

public boolean isFile()
return true if the GridFile represents a file

Specified by:
isFile in interface GridFile

isDirectory

public boolean isDirectory()
return true if the GridFile represents a directory

Specified by:
isDirectory in interface GridFile

isSoftLink

public boolean isSoftLink()
return true if the GridFile represents a softlink

Specified by:
isSoftLink in interface GridFile

isDevice

public boolean isDevice()
return true if the GridFile represents a device

Specified by:
isDevice in interface GridFile

setMode

public void setMode(String mode)
set mode for the current file. Mode is in the form 777

Specified by:
setMode in interface GridFile

getMode

public String getMode()
return mode as a string of the form 777

Specified by:
getMode in interface GridFile

setUserPermissions

public void setUserPermissions(Permissions userPermissions)
set permissions for the user

Specified by:
setUserPermissions in interface GridFile

getUserPermissions

public Permissions getUserPermissions()
get permissions for the user

Specified by:
getUserPermissions in interface GridFile

setGroupPermissions

public void setGroupPermissions(Permissions groupPermissions)
set permissions for the group

Specified by:
setGroupPermissions in interface GridFile

getGroupPermissions

public Permissions getGroupPermissions()
return permissions for the group

Specified by:
getGroupPermissions in interface GridFile

setAllPermissions

public void setAllPermissions(Permissions allPermissions)
set permissions for all users

Specified by:
setAllPermissions in interface GridFile

getAllPermissions

public Permissions getAllPermissions()
return permissions for all users

Specified by:
getAllPermissions in interface GridFile

userCanRead

public boolean userCanRead()
return true if the user can read from this file

Specified by:
userCanRead in interface GridFile

userCanWrite

public boolean userCanWrite()
return true if the user can write into this file

Specified by:
userCanWrite in interface GridFile

userCanExecute

public boolean userCanExecute()
return true of the user can execute the current file

Specified by:
userCanExecute in interface GridFile

groupCanRead

public boolean groupCanRead()
return true if the group members can read from this file

Specified by:
groupCanRead in interface GridFile

groupCanWrite

public boolean groupCanWrite()
return true if the group members can write into this file

Specified by:
groupCanWrite in interface GridFile

groupCanExecute

public boolean groupCanExecute()
return true of the group members can execute the current file

Specified by:
groupCanExecute in interface GridFile

allCanRead

public boolean allCanRead()
return true if all users can read from this file

Specified by:
allCanRead in interface GridFile

allCanWrite

public boolean allCanWrite()
return true if all users can write into this file

Specified by:
allCanWrite in interface GridFile

allCanExecute

public boolean allCanExecute()
return true of all users can execute the current file

Specified by:
allCanExecute in interface GridFile

toString

public String toString()
represents the entire grid file properties as a string