Mercurial > hg4j
comparison src/org/tmatesoft/hg/internal/Filter.java @ 114:46291ec605a0
Filters to read and initialize according to configuration files
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 03 Feb 2011 22:13:55 +0100 |
parents | 67ae317408c9 |
children | c0cc2535462c |
comparison
equal
deleted
inserted
replaced
113:67ae317408c9 | 114:46291ec605a0 |
---|---|
29 public interface Filter { | 29 public interface Filter { |
30 | 30 |
31 ByteBuffer filter(ByteBuffer src); | 31 ByteBuffer filter(ByteBuffer src); |
32 | 32 |
33 interface Factory { | 33 interface Factory { |
34 Filter create(HgRepository hgRepo, Path path, Options opts); | 34 void initialize(HgRepository hgRepo, ConfigFile cfg); |
35 // may return null if for a given path and/or options this filter doesn't make any sense | |
36 Filter create(Path path, Options opts); | |
35 } | 37 } |
36 | 38 |
37 enum Direction { | 39 enum Direction { |
38 FromRepo, ToRepo | 40 FromRepo, ToRepo |
39 } | 41 } |
40 | 42 |
41 abstract class Options { | 43 public class Options { |
42 abstract Direction getDirection(); | 44 |
45 private final Direction direction; | |
46 public Options(Direction dir) { | |
47 direction = dir; | |
48 } | |
49 | |
50 Direction getDirection() { | |
51 return direction; | |
52 } | |
53 | |
43 } | 54 } |
44 } | 55 } |