View Javadoc
1   /*
2    *  Licensed to the Apache Software Foundation (ASF) under one
3    *  or more contributor license agreements.  See the NOTICE file
4    *  distributed with this work for additional information
5    *  regarding copyright ownership.  The ASF licenses this file
6    *  to you under the Apache License, Version 2.0 (the
7    *  "License"); you may not use this file except in compliance
8    *  with the License.  You may obtain a copy of the License at
9    *  
10   *    http://www.apache.org/licenses/LICENSE-2.0
11   *  
12   *  Unless required by applicable law or agreed to in writing,
13   *  software distributed under the License is distributed on an
14   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *  KIND, either express or implied.  See the License for the
16   *  specific language governing permissions and limitations
17   *  under the License. 
18   *  
19   */
20  package org.apache.directory.shared.kerberos.components;
21  
22  
23  import org.apache.directory.shared.kerberos.KerberosTime;
24  import org.apache.directory.shared.kerberos.codec.types.LastReqType;
25  
26  
27  /**
28   * The data structure hold into the LastReq element 
29   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
30   */
31  public class LastReqEntry
32  {
33      /** The LastReq type. */
34      private LastReqType lrType;
35  
36      /** The LastReq value */
37      private KerberosTime lrValue;
38  
39  
40      /**
41       * Creates a new instance of LastReqEntry
42       */
43      public LastReqEntry()
44      {
45      }
46  
47  
48      /**
49       * Creates a new instance of LastReqEntry
50       * @param lrType The LastRequest type
51       * @param lrValue The associated Time
52       */
53      public LastReqEntry( LastReqType lrType, KerberosTime lrValue )
54      {
55          this.lrType = lrType;
56          this.lrValue = lrValue;
57      }
58  
59  
60      /**
61       * @return the LastReqType
62       */
63      public LastReqType getLrType()
64      {
65          return lrType;
66      }
67  
68  
69      /**
70       * @param lrType the lrType to set
71       */
72      public void setLrType( LastReqType lrType )
73      {
74          this.lrType = lrType;
75      }
76  
77  
78      /**
79       * @return the lr-value
80       */
81      public KerberosTime getLrValue()
82      {
83          return lrValue;
84      }
85  
86  
87      /**
88       * @param lrValue the lrValue to set
89       */
90      public void setLrValue( KerberosTime lrValue )
91      {
92          this.lrValue = lrValue;
93      }
94  
95  
96      /**
97       * @see Object#toString()
98       */
99      public String toString( String tabs )
100     {
101         StringBuilder sb = new StringBuilder();
102 
103         sb.append( tabs ).append( "LastRequestEntry : {\n" );
104         sb.append( tabs ).append( "    lrType : " ).append( lrType ).append( "\n" );
105         sb.append( tabs ).append( "    lrValue : " ).append( lrValue ).append( "\n" );
106         sb.append( tabs ).append( "}" );
107 
108         return sb.toString();
109     }
110 
111 
112     /**
113      * @see Object#toString()
114      */
115     public String toString()
116     {
117         return toString( "" );
118     }
119 }