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

1   package org.apache.archiva.redback.authentication;
2   /*
3    * Licensed to the Apache Software Foundation (ASF) under one
4    * or more contributor license agreements.  See the NOTICE file
5    * distributed with this work for additional information
6    * regarding copyright ownership.  The ASF licenses this file
7    * to you under the Apache License, Version 2.0 (the
8    * "License"); you may not use this file except in compliance
9    * with the License.  You may obtain a copy of the License at
10   *
11   * http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing,
14   * software distributed under the License is distributed on an
15   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16   * KIND, either express or implied.  See the License for the
17   * specific language governing permissions and limitations
18   * under the License.
19   */
20  
21  import org.apache.archiva.redback.users.User;
22  
23  import java.io.Serializable;
24  
25  /**
26   * detail on possible authentication failure.
27   *
28   * @author Olivier Lamy
29   * @since 1.4-M4
30   */
31  public class AuthenticationFailureCause
32      implements Serializable
33  {
34      private int cause;
35  
36      private String message;
37  
38      private User user;
39  
40      public AuthenticationFailureCause( int cause, String message )
41      {
42          this.cause = cause;
43          this.message = message;
44      }
45  
46      public int getCause()
47      {
48          return cause;
49      }
50  
51      public void setCause( int cause )
52      {
53          this.cause = cause;
54      }
55  
56      public String getMessage()
57      {
58          return message;
59      }
60  
61      public void setMessage( String message )
62      {
63          this.message = message;
64      }
65  
66      public User getUser()
67      {
68          return user;
69      }
70  
71      public AuthenticationFailureCause user ( User user)
72      {
73          this.user = user;
74          return this;
75      }
76  
77      public void setUser( User user )
78      {
79          this.user = user;
80      }
81  
82      @Override
83      public String toString()
84      {
85          final StringBuilder sb = new StringBuilder();
86          sb.append( "AuthenticationFailureCause" );
87          sb.append( "{cause=" ).append( cause );
88          sb.append( ", message='" ).append( message ).append( '\'' );
89          sb.append( '}' );
90          return sb.toString();
91      }
92  }