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.server.changepw.service;
21  
22  
23  import java.net.InetAddress;
24  
25  import org.apache.directory.server.changepw.ChangePasswordServer;
26  import org.apache.directory.server.changepw.messages.AbstractPasswordMessage;
27  import org.apache.directory.server.kerberos.shared.crypto.encryption.CipherTextHandler;
28  import org.apache.directory.server.kerberos.shared.messages.ApplicationRequest;
29  import org.apache.directory.server.kerberos.shared.messages.components.Authenticator;
30  import org.apache.directory.server.kerberos.shared.messages.components.Ticket;
31  import org.apache.directory.server.kerberos.shared.replay.ReplayCache;
32  import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
33  import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
34  
35  
36  /**
37   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
38   * @version $Rev: 583938 $, $Date: 2007-10-11 21:57:20 +0200 (Do, 11 Okt 2007) $
39   */
40  public class ChangePasswordContext
41  {
42      private static final long serialVersionUID = -5124209294966799740L;
43  
44      private ChangePasswordServer config;
45      private PrincipalStore store;
46      private AbstractPasswordMessage request;
47      private AbstractPasswordMessage reply;
48      private InetAddress clientAddress;
49  
50      private ApplicationRequest authHeader;
51      private Ticket ticket;
52      private Authenticator authenticator;
53      private PrincipalStoreEntry serverEntry;
54      private ReplayCache replayCache;
55      private CipherTextHandler cipherTextHandler;
56      private String password;
57  
58  
59      /**
60       * @return Returns the replayCache.
61       */
62      public ReplayCache getReplayCache()
63      {
64          return replayCache;
65      }
66  
67  
68      /**
69       * @param replayCache The replayCache to set.
70       */
71      public void setReplayCache( ReplayCache replayCache )
72      {
73          this.replayCache = replayCache;
74      }
75  
76  
77      /**
78       * @return Returns the serverEntry.
79       */
80      public PrincipalStoreEntry getServerEntry()
81      {
82          return serverEntry;
83      }
84  
85  
86      /**
87       * @param serverEntry The serverEntry to set.
88       */
89      public void setServerEntry( PrincipalStoreEntry serverEntry )
90      {
91          this.serverEntry = serverEntry;
92      }
93  
94  
95      /**
96       * @return Returns the config.
97       */
98      public ChangePasswordServer getConfig()
99      {
100         return config;
101     }
102 
103 
104     /**
105      * @param config The config to set.
106      */
107     public void setConfig( ChangePasswordServer config )
108     {
109         this.config = config;
110     }
111 
112 
113     /**
114      * @return Returns the reply.
115      */
116     public AbstractPasswordMessage getReply()
117     {
118         return reply;
119     }
120 
121 
122     /**
123      * @param reply The reply to set.
124      */
125     public void setReply( AbstractPasswordMessage reply )
126     {
127         this.reply = reply;
128     }
129 
130 
131     /**
132      * @return Returns the request.
133      */
134     public AbstractPasswordMessage getRequest()
135     {
136         return request;
137     }
138 
139 
140     /**
141      * @param request The request to set.
142      */
143     public void setRequest( AbstractPasswordMessage request )
144     {
145         this.request = request;
146     }
147 
148 
149     /**
150      * @return Returns the store.
151      */
152     public PrincipalStore getStore()
153     {
154         return store;
155     }
156 
157 
158     /**
159      * @param store The store to set.
160      */
161     public void setStore( PrincipalStore store )
162     {
163         this.store = store;
164     }
165 
166 
167     /**
168      * @return Returns the {@link CipherTextHandler}.
169      */
170     public CipherTextHandler getCipherTextHandler()
171     {
172         return cipherTextHandler;
173     }
174 
175 
176     /**
177      * @param cipherTextHandler The {@link CipherTextHandler} to set.
178      */
179     public void setCipherTextHandler( CipherTextHandler cipherTextHandler )
180     {
181         this.cipherTextHandler = cipherTextHandler;
182     }
183 
184 
185     /**
186      * @return Returns the authenticator.
187      */
188     public Authenticator getAuthenticator()
189     {
190         return authenticator;
191     }
192 
193 
194     /**
195      * @param authenticator The authenticator to set.
196      */
197     public void setAuthenticator( Authenticator authenticator )
198     {
199         this.authenticator = authenticator;
200     }
201 
202 
203     /**
204      * @return Returns the authHeader.
205      */
206     public ApplicationRequest getAuthHeader()
207     {
208         return authHeader;
209     }
210 
211 
212     /**
213      * @param authHeader The authHeader to set.
214      */
215     public void setAuthHeader( ApplicationRequest authHeader )
216     {
217         this.authHeader = authHeader;
218     }
219 
220 
221     /**
222      * @return Returns the ticket.
223      */
224     public Ticket getTicket()
225     {
226         return ticket;
227     }
228 
229 
230     /**
231      * @param ticket The ticket to set.
232      */
233     public void setTicket( Ticket ticket )
234     {
235         this.ticket = ticket;
236     }
237 
238 
239     /**
240      * @return Returns the clientAddress.
241      */
242     public InetAddress getClientAddress()
243     {
244         return clientAddress;
245     }
246 
247 
248     /**
249      * @param clientAddress The clientAddress to set.
250      */
251     public void setClientAddress( InetAddress clientAddress )
252     {
253         this.clientAddress = clientAddress;
254     }
255 
256 
257     /**
258      * @return Returns the password.
259      */
260     public String getPassword()
261     {
262         return password;
263     }
264 
265 
266     /**
267      * @param password The password to set.
268      */
269     public void setPassword( String password )
270     {
271         this.password = password;
272     }
273 }