KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > hivemind > definition > impl > ContributionDefinitionImpl


1 // Copyright 2007 The Apache Software Foundation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15 package org.apache.hivemind.definition.impl;
16
17 import org.apache.hivemind.Location;
18 import org.apache.hivemind.definition.Contribution;
19 import org.apache.hivemind.definition.ContributionDefinition;
20 import org.apache.hivemind.definition.ModuleDefinition;
21
22 /**
23  * Default implementation of {@link ContributionDefinition}.
24  *
25  * @author Achim Huegen
26  */

27 public class ContributionDefinitionImpl extends ExtensionDefinitionImpl implements ContributionDefinition
28 {
29     private Contribution _contribution;
30     private boolean _initial;
31
32     public ContributionDefinitionImpl(ModuleDefinition module)
33     {
34         super(module);
35     }
36
37     public ContributionDefinitionImpl(ModuleDefinition module, Location location,
38             Contribution contribution, boolean initial)
39     {
40         super(module, location);
41         _contribution = contribution;
42         _initial = initial;
43     }
44
45     /**
46      * @see org.apache.hivemind.definition.ContributionDefinition#getContribution()
47      */

48     public Contribution getContribution()
49     {
50         return _contribution;
51     }
52
53     /**
54      * Sets the contribution implementation.
55      */

56     public void setContribution(Contribution contribution)
57     {
58         _contribution = contribution;
59     }
60
61     /**
62      * @see org.apache.hivemind.definition.ContributionDefinition#isInitalContribution()
63      */

64     public boolean isInitalContribution()
65     {
66         return _initial;
67     }
68 }
69
Popular Tags