|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
AbstractServiceInvocationDescriptor.java | 100% | 100% | 83.3% | 94.7% |
|
1 |
// Copyright 2004 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.parse;
|
|
16 |
|
|
17 |
import java.util.ArrayList;
|
|
18 |
import java.util.List;
|
|
19 |
|
|
20 |
import org.apache.hivemind.Element;
|
|
21 |
import org.apache.hivemind.impl.BaseLocatable;
|
|
22 |
import org.apache.hivemind.util.ToStringBuilder;
|
|
23 |
|
|
24 |
/**
|
|
25 |
* Base class for descriptors that represent invocating a service with parameters.
|
|
26 |
* This is used for the <interceptor> and <invoke-factory> elements.
|
|
27 |
*
|
|
28 |
* @author Howard Lewis Ship
|
|
29 |
*/
|
|
30 |
public abstract class AbstractServiceInvocationDescriptor extends BaseLocatable |
|
31 |
{ |
|
32 |
private String _factoryServiceId;
|
|
33 |
|
|
34 |
private List _parameters;
|
|
35 |
|
|
36 | 593 |
public void addParameter(Element parameter) |
37 |
{ |
|
38 | 593 |
if (_parameters == null) |
39 | 591 |
_parameters = new ArrayList();
|
40 |
|
|
41 | 593 |
_parameters.add(parameter); |
42 |
} |
|
43 |
|
|
44 | 604 |
public List getParameters()
|
45 |
{ |
|
46 | 604 |
return _parameters;
|
47 |
} |
|
48 |
|
|
49 | 607 |
public String getFactoryServiceId()
|
50 |
{ |
|
51 | 607 |
return _factoryServiceId;
|
52 |
} |
|
53 |
|
|
54 | 634 |
public void setFactoryServiceId(String string) |
55 |
{ |
|
56 | 634 |
_factoryServiceId = string; |
57 |
} |
|
58 |
|
|
59 | 65 |
public String toString()
|
60 |
{ |
|
61 | 65 |
ToStringBuilder builder = new ToStringBuilder(this); |
62 |
|
|
63 | 65 |
builder.append("factoryServiceId", _factoryServiceId);
|
64 | 65 |
builder.append("parameters", _parameters);
|
65 |
|
|
66 | 65 |
extendDescription(builder); |
67 |
|
|
68 | 65 |
return builder.toString();
|
69 |
} |
|
70 |
|
|
71 |
/**
|
|
72 |
* Overridden in subclasses to provide more information about
|
|
73 |
* the instance. This implementation does nothing.
|
|
74 |
*/
|
|
75 | 0 |
protected void extendDescription(ToStringBuilder builder) |
76 |
{ |
|
77 |
} |
|
78 |
|
|
79 |
|
|
80 |
} |
|
81 |
|
|