01: /*
02: * $Id: LogoutImpl.java,v 1.5 2007/03/12 10:46:15 agoubard Exp $
03: */
04: package com.mycompany.petstore.api;
05:
06: /**
07: * Implementation of the <code>Logout</code> function.
08: *
09: * @version $Revision: 1.5 $ $Date: 2007/03/12 10:46:15 $
10: * @author TODO
11: */
12: public final class LogoutImpl extends Logout {
13:
14: /**
15: * Constructs a new <code>LogoutImpl</code> instance.
16: *
17: * @param api
18: * the API to which this function belongs, guaranteed to be not
19: * <code>null</code>.
20: */
21: public LogoutImpl(APIImpl api) {
22: super (api);
23: }
24:
25: /**
26: * Calls this function. If the function fails, it may throw any kind of
27: * exception. All exceptions will be handled by the caller.
28: *
29: * @param request
30: * the request, never <code>null</code>.
31: *
32: * @return
33: * the result of the function call, should never be <code>null</code>.
34: *
35: * @throws Throwable
36: * if anything went wrong.
37: */
38: public Result call(Request request) throws Throwable {
39: String customerLogin = (String) _sessionManager
40: .getProperty("email.login");
41: _sessionManager.removeProperties();
42: _sessionManager.setProperty(_sessionManager.getSessionId(),
43: Boolean.FALSE);
44: SuccessfulResult result = new SuccessfulResult();
45: return result;
46: }
47: }
|