sharpster.common
Class SharedFile

java.lang.Object
  |
  +--sharpster.common.SharedFile
All Implemented Interfaces:
java.io.Serializable

public class SharedFile
extends java.lang.Object
implements java.io.Serializable

A class for file management. The File objects contain a file attribute and attributes for storing information associated with the file.

See Also:
Serialized Form

Constructor Summary
SharedFile()
           
SharedFile(sharpster.common.SharedFile origFile)
          Overloaded constructor, for deep copying of file objects.
 
Method Summary
 void addSharedToUser(java.lang.String user)
           
 int getAccessRights()
          Returns the access rights with which the files has been shared.
 java.lang.String getAccessRightString()
           
 sharpster.common.Body getBody()
          Returns the contents of the file.
 java.lang.String getFileName()
          Returns the name of a file.
 java.lang.String getFullPath()
           
 java.lang.String getPathInCVS()
          Returns the path of the file in the CVS tree.
 sharpster.common.PluginData getPluginData()
          Returns the plug-in information associated with the file share made to the specified user.
 java.lang.String getPluginDataString()
           
 java.lang.String[] getSharedToUsers()
          The users to whom the file is shared.
 java.lang.String getVersion()
          Returns the version of the file in the CVS.
 boolean hasDeleteAccess(java.lang.String user)
           
 boolean hasReadAccess(java.lang.String user)
           
 boolean hasWriteAccess(java.lang.String user)
           
 void setAccessDelete()
          Sets the access rights delete for this file
 void setAccessRead()
          Sets the access rights read for this file
 void setAccessRights(int access)
           
 void setAccessWrite()
          Sets the access rights write for this file
 void setBody(sharpster.common.Body body)
           
 void setFileName(java.lang.String name)
          Sets the name of a file.
 void setPathInCVS(java.lang.String path)
          Sets the path of the file in the CVS tree.
 void setPluginData(sharpster.common.PluginData data)
          Sets the plug-in information associated with the file share made to the specified user.
 void setSharedToUsers(java.lang.String[] users)
           
 void setVersion(java.lang.String ver)
          Sets the version of the file in the CVS.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SharedFile

public SharedFile()

SharedFile

public SharedFile(sharpster.common.SharedFile origFile)
Overloaded constructor, for deep copying of file objects.

Method Detail

getFileName

public java.lang.String getFileName()
Returns the name of a file.


setFileName

public void setFileName(java.lang.String name)
Sets the name of a file.


getPathInCVS

public java.lang.String getPathInCVS()
Returns the path of the file in the CVS tree.


setPathInCVS

public void setPathInCVS(java.lang.String path)
Sets the path of the file in the CVS tree.


getFullPath

public java.lang.String getFullPath()

getVersion

public java.lang.String getVersion()
Returns the version of the file in the CVS.


setVersion

public void setVersion(java.lang.String ver)
Sets the version of the file in the CVS.


getSharedToUsers

public java.lang.String[] getSharedToUsers()
The users to whom the file is shared.


setSharedToUsers

public void setSharedToUsers(java.lang.String[] users)

addSharedToUser

public void addSharedToUser(java.lang.String user)

getAccessRights

public int getAccessRights()
Returns the access rights with which the files has been shared.


getAccessRightString

public java.lang.String getAccessRightString()

hasReadAccess

public boolean hasReadAccess(java.lang.String user)

hasWriteAccess

public boolean hasWriteAccess(java.lang.String user)

hasDeleteAccess

public boolean hasDeleteAccess(java.lang.String user)

setAccessRights

public void setAccessRights(int access)

setAccessRead

public void setAccessRead()
Sets the access rights read for this file


setAccessWrite

public void setAccessWrite()
Sets the access rights write for this file


setAccessDelete

public void setAccessDelete()
Sets the access rights delete for this file


getPluginDataString

public java.lang.String getPluginDataString()

getPluginData

public sharpster.common.PluginData getPluginData()
Returns the plug-in information associated with the file share made to the specified user.


setPluginData

public void setPluginData(sharpster.common.PluginData data)
Sets the plug-in information associated with the file share made to the specified user.


setBody

public void setBody(sharpster.common.Body body)

getBody

public sharpster.common.Body getBody()
Returns the contents of the file.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object