1 | /* |
2 | * Copyright 2005-2006 The RbUtils Project |
3 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | * you may not use this file except in compliance with the License. |
6 | * You may obtain a copy of the License at |
7 | * |
8 | * http://www.apache.org/licenses/LICENSE-2.0 |
9 | * |
10 | * Unless required by applicable law or agreed to in writing, software |
11 | * distributed under the License is distributed on an "AS IS" BASIS, |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. |
15 | * |
16 | */ |
17 | |
18 | // $Id: RbGeneratorTask.java,v 1.3 2007/07/06 04:52:16 moishi Exp $ |
19 | |
20 | package org.ktc.rbutils.rb.generation; |
21 | |
22 | import java.io.File; |
23 | import java.io.FileNotFoundException; |
24 | |
25 | import org.ktc.rbutils.rb.AbstractRbTask; |
26 | import org.ktc.rbutils.rb.TaskType; |
27 | |
28 | /** |
29 | * The ant task for RB Generation. |
30 | * <p> |
31 | * See the task documentation for information. |
32 | * @since RbUtils 0.8.1 |
33 | * @version $Revision: 1.3 $ |
34 | * @author ktcguru |
35 | */ |
36 | public class RbGeneratorTask extends AbstractRbTask { |
37 | /** Root directory where java resourcebundle file will be generated. */ |
38 | private File genRootdir; |
39 | /** |
40 | * Instanciates a new RbGeneratorTask. |
41 | */ |
42 | public RbGeneratorTask() { |
43 | super(); |
44 | taskType = TaskType.RBGENERATOR; |
45 | } |
46 | |
47 | /** |
48 | * {@inheritDoc} |
49 | */ |
50 | protected void specificTaskinitilization() throws FileNotFoundException { |
51 | processor = new MainGenerator(root, genRootdir); |
52 | } |
53 | |
54 | /** |
55 | * Launches the check. {@inheritDoc} |
56 | */ |
57 | public void execute() { |
58 | doJob(); |
59 | } |
60 | |
61 | // //////////////////////////////////////////////////////////////////////////////////////////// |
62 | // Setters for ANT specific attributes |
63 | // //////////////////////////////////////////////////////////////////////////////////////////// |
64 | /** |
65 | * Sets the directory where the java file will be generated. |
66 | * @param genRootdir the directory to set. |
67 | */ |
68 | public void setGenRootdir(final File genRootdir) { |
69 | this.genRootdir = genRootdir; |
70 | } |
71 | |
72 | } |