1 | void addConfiguredInputMapper(Mapper inputMapper) {↵ | | 1 | void addConfiguredOutputMapper(Mapper outputMapper) {↵
|
2 | if (isReference()) {↵ | | 2 | if (isReference()) {↵
|
3 | throw noChildrenAllowed();↵ | | 3 | throw noChildrenAllowed();↵
|
4 | }↵ | | 4 | }↵
|
5 | if (this.inputMapper != null) {↵ | | 5 | if (this.outputMapper != null) {↵
|
6 | if (usingInput) {↵ | | 6 | if (usingOutput) {↵
|
7 | throw new BuildException("attribute \"input\""↵ | | 7 | throw new BuildException("attribute \"output\""↵
|
8 | + " cannot coexist with a nested <inputmapper>");↵ | | 8 | + " cannot coexist with a nested <outputmapper>");↵
|
9 | } else {↵ | | 9 | } else {↵
|
10 | throw new BuildException("Cannot have > 1 <inputmapper>");↵ | | 10 | throw new BuildException("Cannot have > 1 <outputmapper>");↵
|
11 | }↵ | | 11 | }↵
|
12 | }↵ | | 12 | }↵
|
13 | this.inputMapper = inputMapper;↵ | | 13 | this.outputMapper = outputMapper;↵
|
14 | }↵ | | 14 | }↵
|
|
15 | /**↵ | | 15 | /**↵
|
16 | * Add the output file mapper.↵ | | 16 | * Add the error file mapper.↵
|
17 | * @param outputMapper <code>Mapper</code>.↵ | | 17 | * @param errorMapper <code>Mapper</code>.↵
|
18 | */↵ | | 18 | */↵
|
19 | public void addConfiguredOutputMapper(Mapper outputMapper) {↵ | | 19 | public void addConfiguredErrorMapper(Mapper errorMapper) {↵
|
20 | if (isReference()) {↵ | | 20 | if (isReference()) {↵
|
21 | throw noChildrenAllowed();↵ | | 21 | throw noChildrenAllowed();↵
|
22 | }↵ | | 22 | }↵
|
23 | if (this.outputMapper != null) {↵ | | 23 | if (this.errorMapper != null) {↵
|
24 | if (usingOutput) {↵ | | 24 | if (usingError) {↵
|
25 | throw new BuildException("attribute \"output\""↵ | | 25 | throw new BuildException("attribute \"error\""↵
|
26 | + " cannot coexist with a nested <outputmapper>");↵ | | 26 | + " cannot coexist with a nested <errormapper>");↵
|
27 | } else {↵ | | 27 | } else {↵
|
28 | throw new BuildException("Cannot have > 1 <outputmapper>");↵ | | 28 | throw new BuildException("Cannot have > 1 <errormapper>");↵
|
29 | }↵ | | 29 | }↵
|
30 | }↵ | | 30 | }↵
|
31 | this.outputMapper = outputMapper;↵ | | 31 | this.errorMapper = errorMapper;↵
|
32 | | | 32 |
|