01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: */
18:
19: /* $Id: RCMLEntry.java 564264 2007-08-09 16:28:15Z andreas $ */
20:
21: package org.apache.lenya.cms.rc;
22:
23: /**
24: * A RCML entry
25: */
26: public class RCMLEntry {
27:
28: private String identity = null;
29: private long time = 0;
30: private short type = 0;
31: private String sessionId;
32:
33: /**
34: * Creates a new RCMLEntry object.
35: * @param sessionId The session ID.
36: * @param _identity The identity of the person for this RCML
37: * @param _time The time of the checkin / checkout
38: */
39: public RCMLEntry(String sessionId, String _identity, long _time) {
40: this .identity = _identity;
41: this .time = _time;
42: this .sessionId = sessionId;
43: }
44:
45: /**
46: * Get the identity of the creator (i.e. the user name)
47: * FIXME: this should be changed to an o.a.l.ac.Identity object
48: * @return the identity
49: */
50: public String getIdentity() {
51: return this .identity;
52: }
53:
54: /**
55: * Get the creation time.
56: * @return the time
57: */
58: public long getTime() {
59: return this .time;
60: }
61:
62: /**
63: * Get the type (checkin or checkout).
64: * @see org.apache.lenya.cms.rc.RCML.ci
65: * @see org.apache.lenya.cms.rc.RCML.co
66: * @return the type
67: */
68: public short getType() {
69: return this .type;
70: }
71:
72: /**
73: * Set the type (checkin or checkout).
74: * @see org.apache.lenya.cms.rc.RCML.ci
75: * @see org.apache.lenya.cms.rc.RCML.co
76: * @param s the type
77: */
78: protected void setType(short s) {
79: this .type = s;
80: }
81:
82: public String getSessionId() {
83: return this.sessionId;
84: }
85:
86: }
|