This project has retired. For details please refer to its Attic page.
MemoryAuthenticationKey xref
View Javadoc

1   package org.apache.archiva.redback.keys.memory;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   * http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import org.apache.archiva.redback.keys.AuthenticationKey;
23  
24  import java.util.Date;
25  
26  /**
27   * MemoryAuthenticationKey
28   *
29   * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
30   *
31   */
32  public class MemoryAuthenticationKey
33      implements AuthenticationKey
34  {
35      private String key;
36  
37      private String forPrincipal;
38  
39      private String purpose;
40  
41      private Date dateCreated;
42  
43      private Date dateExpires;
44  
45      public Date getDateCreated()
46      {
47          return dateCreated;
48      }
49  
50      public Date getDateExpires()
51      {
52          return dateExpires;
53      }
54  
55      public String getForPrincipal()
56      {
57          return forPrincipal;
58      }
59  
60      public String getKey()
61      {
62          return key;
63      }
64  
65      public String getPurpose()
66      {
67          return purpose;
68      }
69  
70      public void setDateCreated( Date dateCreated )
71      {
72          this.dateCreated = dateCreated;
73      }
74  
75      public void setDateExpires( Date dateExpires )
76      {
77          this.dateExpires = dateExpires;
78      }
79  
80      public void setForPrincipal( String forPrincipal )
81      {
82          this.forPrincipal = forPrincipal;
83      }
84  
85      public void setKey( String key )
86      {
87          this.key = key;
88      }
89  
90      public void setPurpose( String purpose )
91      {
92          this.purpose = purpose;
93      }
94  
95      public String toString()
96      {
97          StringBuilder sb = new StringBuilder();
98  
99          sb.append( "MemoryAuthenticationKey[" );
100         sb.append( "key=" ).append( key );
101         sb.append( ",forPrincipal=" ).append( forPrincipal );
102         sb.append( ",purpose=" ).append( purpose );
103         sb.append( ",dateCreated=" ).append( dateCreated );
104         sb.append( ",dateExpired=" ).append( dateExpires );
105         sb.append( ']' );
106 
107         return sb.toString();
108     }
109 }