001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.jetspeed.profiler.impl;
018:
019: import org.apache.jetspeed.profiler.ProfileLocatorProperty;
020: import org.apache.jetspeed.profiler.rules.ProfilingRule;
021: import org.apache.jetspeed.profiler.rules.RuleCriterion;
022:
023: /**
024: * ProfileLocatorElement
025: *
026: * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
027: * @version $Id: ProfileLocatorPropertyImpl.java 516448 2007-03-09 16:25:47Z ate $
028: */
029: public class ProfileLocatorPropertyImpl implements
030: ProfileLocatorProperty {
031: private String name;
032: private String value;
033: private String type;
034: private int fallbackType;
035: private boolean isControl = true;
036: private boolean isNavigation = false;
037:
038: public ProfileLocatorPropertyImpl(RuleCriterion criterion,
039: boolean isControl, boolean isNavigation, String value) {
040: this .name = criterion.getName();
041: this .value = value;
042: this .type = criterion.getType();
043: this .fallbackType = criterion.getFallbackType();
044: this .isControl = isControl;
045: this .isNavigation = isNavigation;
046: }
047:
048: public ProfileLocatorPropertyImpl(String name, boolean isControl,
049: boolean isNavigation, String value) {
050: this .name = name;
051: this .value = value;
052: this .type = ProfilingRule.STANDARD;
053: this .fallbackType = RuleCriterion.FALLBACK_CONTINUE;
054: this .isControl = isControl;
055: this .isNavigation = isNavigation;
056: }
057:
058: /**
059: * @return
060: */
061: public String getValue() {
062: return value;
063: }
064:
065: /**
066: * @param string
067: */
068: public void setValue(String value) {
069: this .value = value;
070: }
071:
072: /**
073: * @return
074: */
075: public int getFallbackType() {
076: return fallbackType;
077: }
078:
079: /**
080: * @return
081: */
082: public String getName() {
083: return name;
084: }
085:
086: /**
087: * @return
088: */
089: public String getType() {
090: return type;
091: }
092:
093: /**
094: * @param i
095: */
096: public void setFallbackType(int i) {
097: fallbackType = i;
098: }
099:
100: /**
101: * @param string
102: */
103: public void setName(String string) {
104: name = string;
105: }
106:
107: /**
108: * @param string
109: */
110: public void setType(String string) {
111: type = string;
112: }
113:
114: /**
115: * @return control classification flag
116: */
117: public boolean isControl() {
118: return isControl;
119: }
120:
121: /**
122: * @return navigation classification flag
123: */
124: public boolean isNavigation() {
125: return isNavigation;
126: }
127:
128: }
|