%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
org.apache.jetspeed.profiler.impl.ProfileLocatorPropertyImpl |
|
|
1 | /* |
|
2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
|
3 | * contributor license agreements. See the NOTICE file distributed with |
|
4 | * this work for additional information regarding copyright ownership. |
|
5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
|
6 | * (the "License"); you may not use this file except in compliance with |
|
7 | * the License. You may obtain a copy of the License at |
|
8 | * |
|
9 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
10 | * |
|
11 | * Unless required by applicable law or agreed to in writing, software |
|
12 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 | * See the License for the specific language governing permissions and |
|
15 | * limitations under the License. |
|
16 | */ |
|
17 | package org.apache.jetspeed.profiler.impl; |
|
18 | ||
19 | import org.apache.jetspeed.profiler.ProfileLocatorProperty; |
|
20 | import org.apache.jetspeed.profiler.rules.ProfilingRule; |
|
21 | import org.apache.jetspeed.profiler.rules.RuleCriterion; |
|
22 | ||
23 | /** |
|
24 | * ProfileLocatorElement |
|
25 | * |
|
26 | * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a> |
|
27 | * @version $Id: ProfileLocatorPropertyImpl.java 516448 2007-03-09 16:25:47Z ate $ |
|
28 | */ |
|
29 | public class ProfileLocatorPropertyImpl implements ProfileLocatorProperty |
|
30 | { |
|
31 | private String name; |
|
32 | private String value; |
|
33 | private String type; |
|
34 | private int fallbackType; |
|
35 | 0 | private boolean isControl = true; |
36 | 0 | private boolean isNavigation = false; |
37 | ||
38 | public ProfileLocatorPropertyImpl(RuleCriterion criterion, boolean isControl, class="keyword">boolean isNavigation, String value) |
|
39 | 0 | { |
40 | 0 | this.name = criterion.getName(); |
41 | 0 | this.value = value; |
42 | 0 | this.type = criterion.getType(); |
43 | 0 | this.fallbackType = criterion.getFallbackType(); |
44 | 0 | this.isControl = isControl; |
45 | 0 | this.isNavigation = isNavigation; |
46 | 0 | } |
47 | ||
48 | public ProfileLocatorPropertyImpl(String name, boolean isControl, class="keyword">boolean isNavigation, String value) |
|
49 | 0 | { |
50 | 0 | this.name = name; |
51 | 0 | this.value = value; |
52 | 0 | this.type = ProfilingRule.STANDARD; |
53 | 0 | this.fallbackType = RuleCriterion.FALLBACK_CONTINUE; |
54 | 0 | this.isControl = isControl; |
55 | 0 | this.isNavigation = isNavigation; |
56 | 0 | } |
57 | ||
58 | /** |
|
59 | * @return |
|
60 | */ |
|
61 | public String getValue() |
|
62 | { |
|
63 | 0 | return value; |
64 | } |
|
65 | ||
66 | /** |
|
67 | * @param string |
|
68 | */ |
|
69 | public void setValue(String value) |
|
70 | { |
|
71 | 0 | this.value = value; |
72 | 0 | } |
73 | ||
74 | ||
75 | /** |
|
76 | * @return |
|
77 | */ |
|
78 | public int getFallbackType() |
|
79 | { |
|
80 | 0 | return fallbackType; |
81 | } |
|
82 | ||
83 | /** |
|
84 | * @return |
|
85 | */ |
|
86 | public String getName() |
|
87 | { |
|
88 | 0 | return name; |
89 | } |
|
90 | ||
91 | /** |
|
92 | * @return |
|
93 | */ |
|
94 | public String getType() |
|
95 | { |
|
96 | 0 | return type; |
97 | } |
|
98 | ||
99 | /** |
|
100 | * @param i |
|
101 | */ |
|
102 | public void setFallbackType(int i) |
|
103 | { |
|
104 | 0 | fallbackType = i; |
105 | 0 | } |
106 | ||
107 | /** |
|
108 | * @param string |
|
109 | */ |
|
110 | public void setName(String string) |
|
111 | { |
|
112 | 0 | name = string; |
113 | 0 | } |
114 | ||
115 | /** |
|
116 | * @param string |
|
117 | */ |
|
118 | public void setType(String string) |
|
119 | { |
|
120 | 0 | type = string; |
121 | 0 | } |
122 | ||
123 | /** |
|
124 | * @return control classification flag |
|
125 | */ |
|
126 | public boolean isControl() |
|
127 | { |
|
128 | 0 | return isControl; |
129 | } |
|
130 | ||
131 | /** |
|
132 | * @return navigation classification flag |
|
133 | */ |
|
134 | public boolean isNavigation() |
|
135 | { |
|
136 | 0 | return isNavigation; |
137 | } |
|
138 | ||
139 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |