01: /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
02: *
03: * Licensed under the Apache License, Version 2.0 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * 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:
16: package org.acegisecurity.vote;
17:
18: import org.acegisecurity.vote.LabeledData;
19:
20: import java.io.Serializable;
21:
22: /**
23: * For label unit tests.
24: *
25: * @author Greg Turnquist
26: * @version $Id: SampleBlockOfData.java 1750 2006-11-14 22:07:36Z benalex $
27: */
28: public class SampleBlockOfData implements Serializable, LabeledData {
29: //~ Static fields/initializers =====================================================================================
30:
31: private static final long serialVersionUID = 1L;
32: public static final String DATA_LABEL_BLUE = "blue";
33: public static final String DATA_LABEL_ORANGE = "orange";
34: public static final String DATA_LABEL_SHARED = "blue-orange";
35:
36: //~ Instance fields ================================================================================================
37:
38: private String dataType;
39: private String id;
40:
41: //~ Methods ========================================================================================================
42:
43: public String getId() {
44: return id;
45: }
46:
47: public String getLabel() {
48: return dataType;
49: }
50:
51: public String getSomeData() {
52: return dataType;
53: }
54:
55: public void setId(String ticketNumber) {
56: this .id = ticketNumber;
57: }
58:
59: public void setSomeData(String trafficType) {
60: this .dataType = trafficType;
61: }
62:
63: public String toString() {
64: return this .id + "/" + this.dataType;
65: }
66: }
|