com.application.areca.impl
Class FileSystemRecoveryTarget

java.lang.Object
  extended by com.application.areca.AbstractRecoveryTarget
      extended by com.application.areca.impl.FileSystemRecoveryTarget
All Implemented Interfaces:
HistoryEntryTypes, Identifiable, TargetActions, Duplicable

public class FileSystemRecoveryTarget
extends AbstractRecoveryTarget
implements TargetActions

Target implementation that handles files.

Author:
Olivier PETRUCCI

Areca Build ID : 7299034069467778562

Field Summary
protected  boolean followSubdirectories
           
static java.lang.String RECOVERY_LOCATION_SUFFIX
           
protected  java.util.Set sources
           
protected  java.lang.String sourcesRoot
           
protected  boolean trackEmptyDirectories
           
protected  boolean trackSymlinks
          Tells whether symbolic are considered as normal files or as symbolic links
 
Fields inherited from class com.application.areca.AbstractRecoveryTarget
BACKUP_SCHEME_DIFFERENTIAL, BACKUP_SCHEME_FULL, BACKUP_SCHEME_INCREMENTAL, comments, createSecurityCopyOnBackup, filterGroup, group, id, medium, postProcessors, preProcessors, running, targetName, uid
 
Fields inherited from interface com.application.areca.TargetActions
ACTION_ALL, ACTION_BACKUP, ACTION_DESCRIBE, ACTION_INDICATORS, ACTION_MERGE_OR_DELETE, ACTION_RECOVER, ACTION_SIMULATE
 
Fields inherited from interface com.application.areca.HistoryEntryTypes
HISTO_BACKUP, HISTO_BACKUP_CANCEL, HISTO_DELETE, HISTO_MERGE, HISTO_MERGE_CANCEL, HISTO_RECOVER
 
Constructor Summary
FileSystemRecoveryTarget()
           
 
Method Summary
 Manifest buildDefaultMergeManifest(java.util.GregorianCalendar fromDate, java.util.GregorianCalendar toDate)
           
 ActionReport checkTargetState(int action)
          Check the target's state
 void commitBackup(ProcessContext context)
          Commit the backup and release the lock on the target
protected  void copyAttributes(java.lang.Object clone)
           
 Duplicable duplicate()
          Create a copy of the Duplicable
 java.lang.String getSourceDirectory()
           
 java.util.Set getSources()
           
 java.lang.String getSourcesRoot()
           
protected  java.lang.String getSpecificTargetDescription()
           
 boolean isFollowSubdirectories()
           
 boolean isTrackEmptyDirectories()
           
 boolean isTrackSymlinks()
           
 RecoveryEntry nextElement(ProcessContext context)
          Returns the next element.
 void open(Manifest manifest, ProcessContext context, java.lang.String backupScheme)
          Open and lock the target
 void processArchiveCheck(java.lang.String destination, boolean checkOnlyArchiveContent, java.util.GregorianCalendar date, ProcessContext context)
          Check the archive's content
 void processRecoverImpl(java.lang.String destination, java.util.GregorianCalendar date, java.lang.String entry, boolean checkRecoveredEntries, ProcessContext context)
          Recover a specific entry
 void processRecoverImpl(java.lang.String destination, java.lang.String[] filters, java.util.GregorianCalendar date, boolean keepDeletedEntries, boolean checkRecoveredEntries, ProcessContext context)
          Recover the data
 SimulationResult processSimulateImpl(ProcessContext context, boolean returnDetailedResults)
          Launch a simulation process.
 void setFollowSubdirectories(boolean followSubdirectories)
           
 void setSources(java.util.Set sources)
           
 void setTrackEmptyDirectories(boolean trackEmptyDirectories)
           
 void setTrackSymlinks(boolean trackSymlinks)
           
 
Methods inherited from class com.application.areca.AbstractRecoveryTarget
addBasicInformationsToManifest, addFilter, clearHistory, commitMerge, computeIndicators, doAfterDelete, doBeforeDelete, equals, filterEntryBeforeStore, getComments, getDescription, getFilterGroup, getFilterIterator, getGroup, getHistory, getId, getMedium, getPostProcessors, getPreProcessors, getTargetName, getUid, hashCode, isCreateSecurityCopyOnBackup, isRunning, processBackup, processDeleteArchives, processDeleteArchives, processMerge, processMerge, processRecover, processRecover, processSimulate, rollbackBackup, rollbackMerge, search, secureUpdateCurrentTask, secureUpdateCurrentTask, setComments, setCreateSecurityCopyOnBackup, setFilterGroup, setGroup, setId, setMedium, setRunning, setTargetName, setUid, supportsBackupScheme, toString, validateTargetState
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RECOVERY_LOCATION_SUFFIX

public static final java.lang.String RECOVERY_LOCATION_SUFFIX
See Also:
Constant Field Values

sourcesRoot

protected java.lang.String sourcesRoot

sources

protected java.util.Set sources

followSubdirectories

protected boolean followSubdirectories

trackEmptyDirectories

protected boolean trackEmptyDirectories

trackSymlinks

protected boolean trackSymlinks
Tells whether symbolic are considered as normal files or as symbolic links

Constructor Detail

FileSystemRecoveryTarget

public FileSystemRecoveryTarget()
Method Detail

duplicate

public Duplicable duplicate()
Description copied from interface: Duplicable
Create a copy of the Duplicable

Specified by:
duplicate in interface Duplicable

copyAttributes

protected void copyAttributes(java.lang.Object clone)
Overrides:
copyAttributes in class AbstractRecoveryTarget

setSources

public void setSources(java.util.Set sources)

isFollowSubdirectories

public boolean isFollowSubdirectories()

setFollowSubdirectories

public void setFollowSubdirectories(boolean followSubdirectories)

isTrackEmptyDirectories

public boolean isTrackEmptyDirectories()

setTrackEmptyDirectories

public void setTrackEmptyDirectories(boolean trackEmptyDirectories)

getSources

public java.util.Set getSources()

getSourcesRoot

public java.lang.String getSourcesRoot()

getSourceDirectory

public java.lang.String getSourceDirectory()

isTrackSymlinks

public boolean isTrackSymlinks()

setTrackSymlinks

public void setTrackSymlinks(boolean trackSymlinks)

commitBackup

public void commitBackup(ProcessContext context)
                  throws ApplicationException
Description copied from class: AbstractRecoveryTarget
Commit the backup and release the lock on the target

Overrides:
commitBackup in class AbstractRecoveryTarget
Throws:
ApplicationException

nextElement

public RecoveryEntry nextElement(ProcessContext context)
                          throws ApplicationException
Returns the next element. It may be a file or a directory.
Filters are applied.

Specified by:
nextElement in class AbstractRecoveryTarget
Throws:
ApplicationException

open

public void open(Manifest manifest,
                 ProcessContext context,
                 java.lang.String backupScheme)
          throws ApplicationException
Description copied from class: AbstractRecoveryTarget
Open and lock the target

Overrides:
open in class AbstractRecoveryTarget
Throws:
ApplicationException

processSimulateImpl

public SimulationResult processSimulateImpl(ProcessContext context,
                                            boolean returnDetailedResults)
                                     throws ApplicationException
Description copied from class: AbstractRecoveryTarget
Launch a simulation process.

Overrides:
processSimulateImpl in class AbstractRecoveryTarget
Throws:
ApplicationException

processArchiveCheck

public void processArchiveCheck(java.lang.String destination,
                                boolean checkOnlyArchiveContent,
                                java.util.GregorianCalendar date,
                                ProcessContext context)
                         throws ApplicationException
Description copied from class: AbstractRecoveryTarget
Check the archive's content

Specified by:
processArchiveCheck in class AbstractRecoveryTarget
Throws:
ApplicationException

processRecoverImpl

public void processRecoverImpl(java.lang.String destination,
                               java.lang.String[] filters,
                               java.util.GregorianCalendar date,
                               boolean keepDeletedEntries,
                               boolean checkRecoveredEntries,
                               ProcessContext context)
                        throws ApplicationException
Recover the data

Specified by:
processRecoverImpl in class AbstractRecoveryTarget
Throws:
ApplicationException

processRecoverImpl

public void processRecoverImpl(java.lang.String destination,
                               java.util.GregorianCalendar date,
                               java.lang.String entry,
                               boolean checkRecoveredEntries,
                               ProcessContext context)
                        throws ApplicationException
Recover a specific entry

Specified by:
processRecoverImpl in class AbstractRecoveryTarget
Throws:
ApplicationException

getSpecificTargetDescription

protected java.lang.String getSpecificTargetDescription()
Specified by:
getSpecificTargetDescription in class AbstractRecoveryTarget

checkTargetState

public ActionReport checkTargetState(int action)
Check the target's state

Overrides:
checkTargetState in class AbstractRecoveryTarget

buildDefaultMergeManifest

public Manifest buildDefaultMergeManifest(java.util.GregorianCalendar fromDate,
                                          java.util.GregorianCalendar toDate)
                                   throws ApplicationException
Specified by:
buildDefaultMergeManifest in class AbstractRecoveryTarget
Throws:
ApplicationException