|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.kfs.sys.batch.service.impl.FilePurgeServiceImpl
public class FilePurgeServiceImpl
Default implementation of the FilePurgeService
Field Summary | |
---|---|
protected static String |
DAYS_BEFORE_PURGE_PARAMETER_PREFIX
|
protected static String |
DAYS_BEFORE_PURGE_PARAMETER_SUFFIX
|
protected org.apache.log4j.Logger |
LOG
|
Constructor Summary | |
---|---|
FilePurgeServiceImpl()
|
Method Summary | |
---|---|
protected org.apache.commons.io.filefilter.IOFileFilter |
buildAnyDirectoryButCustomAgeDirectoryFileFilter(List<FilePurgeCustomAge> customAges)
Builds a file filter which will skip the directories taken by the CustomAges |
protected org.apache.commons.io.filefilter.IOFileFilter |
buildDefaultAgeFileFilter()
Builds an age file filter for the default removal run |
protected FilePurgeDirectoryWalker |
getCustomAgesDirectoryWalker(List<FilePurgeCustomAge> customAges)
Gets a directory walker which will |
int |
getDaysBeforePurgeForCustomAge(FilePurgeCustomAge customAge)
Returns the age in days that files matching this custom age should leave matching files before purging |
protected String |
getDaysBeforePurgeSuffix()
|
protected FilePurgeDirectoryWalker |
getDefaultDirectoryWalker(List<FilePurgeCustomAge> customAges)
Gets the directory walker for the default directories |
org.kuali.rice.kns.service.ParameterService |
getParameterService()
Gets the parameterService attribute. |
int |
getStandardDaysBeforePurge()
Looks up the parameter for the standard number of days before a file should be purged |
protected String |
getStandardDaysBeforePurgeParameterName()
|
protected void |
purgeCustomAgeFiles(String directory,
List<FilePurgeCustomAge> customAges)
Purges any files in the given directory associated with custom ages |
protected void |
purgeDefaultFiles(String directory,
List<FilePurgeCustomAge> customAges)
Purges any files in the given directory not associated with custom ages |
void |
purgeFiles(String directory,
List<FilePurgeCustomAge> customAges)
Uses a FilePurgeDirectoryWalker to get a List of Files to purge, then purges each |
protected int |
retrieveDaysBeforePurgeParameterValue(String parameterName)
Retrieves the parameter value of the KFS-SYS / FilePurgeStep / parameterName parameter and converts it to an integer number of days |
void |
setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
Sets the parameterService attribute value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.apache.log4j.Logger LOG
protected static final String DAYS_BEFORE_PURGE_PARAMETER_SUFFIX
protected static final String DAYS_BEFORE_PURGE_PARAMETER_PREFIX
Constructor Detail |
---|
public FilePurgeServiceImpl()
Method Detail |
---|
public void purgeFiles(String directory, List<FilePurgeCustomAge> customAges)
purgeFiles
in interface FilePurgeService
directory
- the directory to purgecustomAges
- the List of customized ages for files which do not follow the standardorg.kuali.kfs.gl.batch.service.FilePurgeService#purgeFiles(java.lang.String, java.util.List)
protected void purgeCustomAgeFiles(String directory, List<FilePurgeCustomAge> customAges)
directory
- the directory to purge files fromcustomAges
- custom ages to purge files forprotected void purgeDefaultFiles(String directory, List<FilePurgeCustomAge> customAges)
directory
- the directory to purge files fromcustomAges
- the custom ages with directories to avoidprotected FilePurgeDirectoryWalker getCustomAgesDirectoryWalker(List<FilePurgeCustomAge> customAges)
customAges
- the custom ages to purge files for
protected FilePurgeDirectoryWalker getDefaultDirectoryWalker(List<FilePurgeCustomAge> customAges)
customAges
- the custom ages, because custom age directories will not be purged
protected org.apache.commons.io.filefilter.IOFileFilter buildAnyDirectoryButCustomAgeDirectoryFileFilter(List<FilePurgeCustomAge> customAges)
customAges
- the customAges to avoid
public int getDaysBeforePurgeForCustomAge(FilePurgeCustomAge customAge)
FilePurgeService
getDaysBeforePurgeForCustomAge
in interface FilePurgeService
customAge
- a custom age to check
org.kuali.kfs.gl.batch.service.FilePurgeService#getAgeInDaysForCustomAge(org.kuali.kfs.sys.batch.FilePurgeCustomAge)
protected String getDaysBeforePurgeSuffix()
public int getStandardDaysBeforePurge()
FilePurgeService
getStandardDaysBeforePurge
in interface FilePurgeService
org.kuali.kfs.gl.batch.service.FilePurgeService#getStandardDaysBeforePurge()
protected String getStandardDaysBeforePurgeParameterName()
protected int retrieveDaysBeforePurgeParameterValue(String parameterName)
parameterName
- the name of the parameter to retrieve the value of
protected org.apache.commons.io.filefilter.IOFileFilter buildDefaultAgeFileFilter()
public org.kuali.rice.kns.service.ParameterService getParameterService()
public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
parameterService
- The parameterService to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |