fr.paris.lutece.plugins.updater.service.resource
Class FileSystemResource

java.lang.Object
  extended by fr.paris.lutece.plugins.updater.service.resource.FileSystemResource
Direct Known Subclasses:
DirectoryTreeResource, FilePatternResource, FileResource

public abstract class FileSystemResource
extends java.lang.Object

File system resource : pattern of files or directories


Field Summary
static int DELETE_NOW
          Mode of deletion using the standard IO method File.delete
static int DELETE_ON_EXIT
          Mode of deletion using the method File.deleteOnExit
 
Constructor Summary
FileSystemResource(java.lang.String strRootPath, java.lang.String strRelativePath)
          Constructor
 
Method Summary
abstract  void copy(java.lang.String strDestination)
          Move file system resources
abstract  void delete(int nMode)
          Delete file system resources
 java.lang.String getFullPath()
          Returns the FullPath
 java.lang.String getRelativePath()
          Returns the ResourcePattern
 java.lang.String getRootPath()
          Returns the RootPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELETE_NOW

public static final int DELETE_NOW
Mode of deletion using the standard IO method File.delete

See Also:
Constant Field Values

DELETE_ON_EXIT

public static final int DELETE_ON_EXIT
Mode of deletion using the method File.deleteOnExit

See Also:
Constant Field Values
Constructor Detail

FileSystemResource

public FileSystemResource(java.lang.String strRootPath,
                          java.lang.String strRelativePath)
Constructor

Parameters:
strRootPath - The root path of the resource (webapp node)
strRelativePath - The relative path of the resource (within the webapp)
Method Detail

copy

public abstract void copy(java.lang.String strDestination)
                   throws java.io.IOException
Move file system resources

Parameters:
strDestination - The new location
Throws:
java.io.IOException - If an error occurs

delete

public abstract void delete(int nMode)
                     throws java.io.IOException
Delete file system resources

Parameters:
nMode - The mode of deletion
Throws:
java.io.IOException - If an error occurs

getRootPath

public java.lang.String getRootPath()
Returns the RootPath

Returns:
The RootPath

getRelativePath

public java.lang.String getRelativePath()
Returns the ResourcePattern

Returns:
The ResourcePattern

getFullPath

public java.lang.String getFullPath()
Returns the FullPath

Returns:
The FullPath


Copyright © 2009 Mairie de Paris. All Rights Reserved.