|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.cog.abstraction.impl.file.local.FileResourceImpl
enables access to local file system through the file resource interface Supports absolute and relative path names
| Field Summary |
| Fields inherited from interface org.globus.cog.abstraction.interfaces.FileResource |
FTP, GridFTP, Local, WebDAV |
| Fields inherited from interface org.globus.cog.abstraction.interfaces.GridResource |
EXECUTION, FILE, INFORMATION |
| Constructor Summary | |
FileResourceImpl()
|
|
FileResourceImpl(String name)
|
|
| Method Summary | |
void |
changeMode(GridFile newGridFile)
chmod for the gridFile. |
void |
changeMode(String filename,
int mode)
chmod on a file. |
void |
createDirectory(String directory)
make a new directory |
void |
deleteDirectory(String directory,
boolean force)
delete the given directory. |
void |
deleteFile(String fileName)
remove a file |
boolean |
exists(String filename)
return true of file exists |
Enumeration |
getAllAttributes()
|
Object |
getAttribute(String name)
get an attribute |
String |
getCurrentDirectory()
return current path |
void |
getDirectory(String remoteDirName,
String localDirName)
copy a directory |
void |
getFile(String remoteFileName,
String localFileName)
copy a file |
GridFile |
getGridFile(String fileName)
get file information |
Identity |
getIdentity()
return identity of the resource |
void |
getMultipleFiles(String[] remoteFileNames,
String localDirName)
copy multiple files |
void |
getMultipleFiles(String[] remoteFileNames,
String[] localFileNames)
copy multiple files |
String |
getName()
get name of the file resource |
String |
getProtocol()
return protocol ="file" |
SecurityContext |
getSecurityContext()
get security context of the file resource |
ServiceContact |
getServiceContact()
get service contact |
int |
getType()
return type = FILE which is defined in GridResource |
boolean |
isDirectory(String dirName)
return true if input is a directory |
boolean |
isStarted()
|
Collection |
list()
list the contents of the current directory |
Collection |
list(String directory)
list contents of the given directory |
void |
putDirectory(String localDirName,
String remoteDirName)
copy a directory |
void |
putFile(String localFileName,
String remoteFileName)
copy a file |
void |
putMultipleFiles(String[] localFileNames,
String remoteDirName)
copy multiple files |
void |
putMultipleFiles(String[] localFileNames,
String[] remoteFileNames)
copy multiple files |
void |
rename(String remoteFileName1,
String remoteFileName2)
rename a file. |
void |
setAttribute(String name,
Object value)
set an attribute |
void |
setCurrentDirectory(String directory)
equivalent to cd |
void |
setIdentity(Identity identity)
Set identity of the resource |
void |
setName(String name)
set name for the file resource |
void |
setSecurityContext(SecurityContext securityContext)
set security context for the file resource |
void |
setServiceContact(ServiceContact serviceContact)
set service contact |
void |
start()
set user's home directory as the current directory |
void |
stop()
close the file |
void |
submit(ExecutableObject commandWorkflow)
submit a workflow to local resource. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FileResourceImpl()
public FileResourceImpl(String name)
| Method Detail |
public void setName(String name)
setName in interface GridResourcepublic String getName()
getName in interface GridResourcepublic void setIdentity(Identity identity)
setIdentity in interface GridResourcepublic Identity getIdentity()
getIdentity in interface GridResourcepublic int getType()
getType in interface GridResourcepublic String getProtocol()
getProtocol in interface FileResourcepublic void setSecurityContext(SecurityContext securityContext)
setSecurityContext in interface FileResourcepublic SecurityContext getSecurityContext()
getSecurityContext in interface FileResourcepublic void setServiceContact(ServiceContact serviceContact)
setServiceContact in interface FileResourcepublic ServiceContact getServiceContact()
getServiceContact in interface FileResource
public void start()
throws IllegalHostException,
InvalidSecurityContextException,
GeneralException
start in interface FileResourceIllegalHostException
InvalidSecurityContextException
GeneralException
public void stop()
throws GeneralException
stop in interface FileResourceGeneralExceptionpublic boolean isStarted()
isStarted in interface FileResource
public void setCurrentDirectory(String directory)
throws DirectoryNotFoundException,
GeneralException
setCurrentDirectory in interface FileResourceDirectoryNotFoundException
GeneralException
public String getCurrentDirectory()
throws GeneralException
getCurrentDirectory in interface FileResourceGeneralException
public Collection list()
throws GeneralException
list in interface FileResourceGeneralException
public Collection list(String directory)
throws DirectoryNotFoundException,
GeneralException
list in interface FileResourceDirectoryNotFoundException
GeneralException
public void createDirectory(String directory)
throws GeneralException
createDirectory in interface FileResourceGeneralException
public void deleteDirectory(String directory,
boolean force)
throws DirectoryNotFoundException,
GeneralException
deleteDirectory in interface FileResourceDirectoryNotFoundException
GeneralException
public void deleteFile(String fileName)
throws FileNotFoundException,
GeneralException
deleteFile in interface FileResourceFileNotFoundException
GeneralException
public void getFile(String remoteFileName,
String localFileName)
throws FileNotFoundException,
GeneralException
getFile in interface FileResourceFileNotFoundException
GeneralException
public void putFile(String localFileName,
String remoteFileName)
throws FileNotFoundException,
GeneralException
putFile in interface FileResourceFileNotFoundException
GeneralException
public void getDirectory(String remoteDirName,
String localDirName)
throws DirectoryNotFoundException,
GeneralException
getDirectory in interface FileResourceDirectoryNotFoundException
GeneralException
public void putDirectory(String localDirName,
String remoteDirName)
throws DirectoryNotFoundException,
GeneralException
putDirectory in interface FileResourceDirectoryNotFoundException
GeneralException
public void getMultipleFiles(String[] remoteFileNames,
String[] localFileNames)
throws FileNotFoundException,
GeneralException
getMultipleFiles in interface FileResourceFileNotFoundException
GeneralException
public void getMultipleFiles(String[] remoteFileNames,
String localDirName)
throws FileNotFoundException,
DirectoryNotFoundException,
GeneralException
getMultipleFiles in interface FileResourceFileNotFoundException
DirectoryNotFoundException
GeneralException
public void putMultipleFiles(String[] localFileNames,
String[] remoteFileNames)
throws FileNotFoundException,
GeneralException
putMultipleFiles in interface FileResourceFileNotFoundException
GeneralException
public void putMultipleFiles(String[] localFileNames,
String remoteDirName)
throws FileNotFoundException,
DirectoryNotFoundException,
GeneralException
putMultipleFiles in interface FileResourceFileNotFoundException
DirectoryNotFoundException
GeneralException
public void rename(String remoteFileName1,
String remoteFileName2)
throws FileNotFoundException,
GeneralException
rename in interface FileResourceFileNotFoundException
GeneralException
public void changeMode(String filename,
int mode)
throws FileNotFoundException,
GeneralException
changeMode in interface FileResourceFileNotFoundException
GeneralException
public void changeMode(GridFile newGridFile)
throws FileNotFoundException,
GeneralException
changeMode in interface FileResourceFileNotFoundException
GeneralException
public GridFile getGridFile(String fileName)
throws FileNotFoundException,
GeneralException
getGridFile in interface FileResourceFileNotFoundException
GeneralException
public boolean exists(String filename)
throws FileNotFoundException,
GeneralException
exists in interface FileResourceFileNotFoundException
GeneralException
public boolean isDirectory(String dirName)
throws GeneralException
isDirectory in interface FileResourceGeneralException
public void submit(ExecutableObject commandWorkflow)
throws IllegalSpecException,
TaskSubmissionException
submit in interface FileResourceIllegalSpecException
TaskSubmissionException
public void setAttribute(String name,
Object value)
setAttribute in interface FileResourcepublic Enumeration getAllAttributes()
getAllAttributes in interface FileResourcepublic Object getAttribute(String name)
getAttribute in interface FileResource
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||