Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
0374df23
Commit
0374df23
authored
17 years ago
by
brinn
Browse files
Options
Downloads
Patches
Plain Diff
add: new ISimpleLogger that is based on log4j
change: remove log4j dependency from FileUtilities SVN: 1492
parent
f2d25ad1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datamover/source/java/ch/systemsx/cisd/datamover/CleansingPathHandlerDecorator.java
+12
-2
12 additions, 2 deletions
...ystemsx/cisd/datamover/CleansingPathHandlerDecorator.java
with
12 additions
and
2 deletions
datamover/source/java/ch/systemsx/cisd/datamover/CleansingPathHandlerDecorator.java
+
12
−
2
View file @
0374df23
...
@@ -19,6 +19,12 @@ package ch.systemsx.cisd.datamover;
...
@@ -19,6 +19,12 @@ package ch.systemsx.cisd.datamover;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileFilter
;
import
java.io.FileFilter
;
import
org.apache.log4j.Level
;
import
org.apache.log4j.Logger
;
import
ch.systemsx.cisd.common.logging.ISimpleLogger
;
import
ch.systemsx.cisd.common.logging.Log4jSimpleLogger
;
import
ch.systemsx.cisd.common.logging.LogCategory
;
import
ch.systemsx.cisd.common.logging.LogFactory
;
import
ch.systemsx.cisd.common.utilities.FileUtilities
;
import
ch.systemsx.cisd.common.utilities.FileUtilities
;
import
ch.systemsx.cisd.common.utilities.DirectoryScanningTimerTask.IPathHandler
;
import
ch.systemsx.cisd.common.utilities.DirectoryScanningTimerTask.IPathHandler
;
...
@@ -33,6 +39,9 @@ import ch.systemsx.cisd.common.utilities.DirectoryScanningTimerTask.IPathHandler
...
@@ -33,6 +39,9 @@ import ch.systemsx.cisd.common.utilities.DirectoryScanningTimerTask.IPathHandler
public
class
CleansingPathHandlerDecorator
implements
IPathHandler
public
class
CleansingPathHandlerDecorator
implements
IPathHandler
{
{
private
final
Logger
operationLog
=
LogFactory
.
getLogger
(
LogCategory
.
OPERATION
,
CleansingPathHandlerDecorator
.
class
);
private
final
FileFilter
filter
;
private
final
FileFilter
filter
;
private
final
IPathHandler
decoratedHandler
;
private
final
IPathHandler
decoratedHandler
;
...
@@ -50,7 +59,9 @@ public class CleansingPathHandlerDecorator implements IPathHandler
...
@@ -50,7 +59,9 @@ public class CleansingPathHandlerDecorator implements IPathHandler
{
{
assert
path
!=
null
;
assert
path
!=
null
;
final
boolean
pathDeleted
=
FileUtilities
.
deleteRecursively
(
path
,
filter
);
final
ISimpleLogger
logger
=
operationLog
.
isDebugEnabled
()
?
new
Log4jSimpleLogger
(
Level
.
DEBUG
,
operationLog
)
:
null
;
final
boolean
pathDeleted
=
FileUtilities
.
deleteRecursively
(
path
,
filter
,
logger
);
if
(
pathDeleted
==
false
)
if
(
pathDeleted
==
false
)
{
{
return
decoratedHandler
.
handle
(
path
);
return
decoratedHandler
.
handle
(
path
);
...
@@ -59,5 +70,4 @@ public class CleansingPathHandlerDecorator implements IPathHandler
...
@@ -59,5 +70,4 @@ public class CleansingPathHandlerDecorator implements IPathHandler
return
true
;
return
true
;
}
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment