001: /*
002: * JOSSO: Java Open Single Sign-On
003: *
004: * Copyright 2004-2008, Atricore, Inc.
005: *
006: * This is free software; you can redistribute it and/or modify it
007: * under the terms of the GNU Lesser General Public License as
008: * published by the Free Software Foundation; either version 2.1 of
009: * the License, or (at your option) any later version.
010: *
011: * This software is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this software; if not, write to the Free
018: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
019: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
020: */
021:
022: /**
023: * SSOSessionManagerSoapBindingImpl.java
024: *
025: * This file was auto-generated from WSDL
026: * by the Apache Axis 1.2alpha ago 27, 2004 (08:42:06 GMT-03:00) WSDL2Java emitter.
027: */package org.josso.gateway.session.service.ws.impl;
028:
029: import org.josso.Lookup;
030: import org.josso.SecurityDomain;
031: import org.josso.gateway.assertion.AssertionManager;
032: import org.josso.gateway.assertion.AuthenticationAssertion;
033:
034: import java.rmi.RemoteException;
035:
036: public class SSOSessionManagerSoapBindingImpl implements
037: org.josso.gateway.session.service.ws.impl.SSOSessionManager {
038:
039: public org.josso.gateway.session.service.ws.impl.SSOSession getSession(
040: java.lang.String in0)
041: throws java.rmi.RemoteException,
042: org.josso.gateway.session.service.ws.impl.NoSuchSessionException,
043: org.josso.gateway.session.service.ws.impl.SSOSessionException {
044: try {
045: SecurityDomain domain = Lookup.getInstance()
046: .lookupSecurityDomain();
047: return adaptSSOSession(domain.getSessionManager()
048: .getSession(in0));
049: } catch (org.josso.gateway.session.exceptions.NoSuchSessionException e) {
050: throw new org.josso.gateway.session.service.ws.impl.NoSuchSessionException();
051: } catch (Exception e) {
052: throw new org.josso.gateway.session.service.ws.impl.SSOSessionException();
053: }
054: }
055:
056: public java.lang.String initiateSession(java.lang.String in0)
057: throws java.rmi.RemoteException,
058: org.josso.gateway.session.service.ws.impl.SSOSessionException {
059: throw new UnsupportedOperationException(
060: "Not supported by this type of manager");
061: }
062:
063: /**
064: * Gets all SSO sessions.
065: */
066: public Object[] getSessions() throws RemoteException,
067: SSOSessionException {
068: throw new UnsupportedOperationException(
069: "Not supported by this implementation");
070: }
071:
072: public Object[] getUserSessions(String in0) throws RemoteException,
073: NoSuchSessionException, SSOSessionException {
074: throw new UnsupportedOperationException(
075: "Not supported by this type of manager");
076: }
077:
078: public void accessSession(java.lang.String in0)
079: throws java.rmi.RemoteException,
080: org.josso.gateway.session.service.ws.impl.NoSuchSessionException,
081: org.josso.gateway.session.service.ws.impl.SSOSessionException {
082: try {
083: SecurityDomain domain = Lookup.getInstance()
084: .lookupSecurityDomain();
085: domain.getSessionManager().accessSession(in0);
086: } catch (org.josso.gateway.session.exceptions.NoSuchSessionException e) {
087: throw new org.josso.gateway.session.service.ws.impl.NoSuchSessionException();
088: } catch (Exception e) {
089: throw new org.josso.gateway.session.service.ws.impl.SSOSessionException();
090: }
091:
092: }
093:
094: public int getSessionCount() throws RemoteException,
095: SSOSessionException {
096: try {
097: SecurityDomain domain = Lookup.getInstance()
098: .lookupSecurityDomain();
099: return domain.getSessionManager().getSessionCount();
100: } catch (org.josso.gateway.session.exceptions.NoSuchSessionException e) {
101: throw new org.josso.gateway.session.service.ws.impl.NoSuchSessionException();
102: } catch (Exception e) {
103: throw new org.josso.gateway.session.service.ws.impl.SSOSessionException();
104: }
105: }
106:
107: public void invalidateAll() throws RemoteException,
108: SSOSessionException {
109: //To change body of implemented methods use File | Settings | File Templates.
110: throw new UnsupportedOperationException(
111: "Not supported by this type of manager");
112: }
113:
114: public void invalidate(java.lang.String in0)
115: throws java.rmi.RemoteException,
116: org.josso.gateway.session.service.ws.impl.NoSuchSessionException,
117: org.josso.gateway.session.service.ws.impl.SSOSessionException {
118: throw new UnsupportedOperationException(
119: "Not supported by this type of manager");
120: }
121:
122: public void checkValidSessions() throws java.rmi.RemoteException {
123: throw new UnsupportedOperationException(
124: "Not supported by this type of manager");
125: }
126:
127: public void initialize() throws RemoteException {
128: throw new UnsupportedOperationException(
129: "Not supported by this type of manager");
130: }
131:
132: protected org.josso.gateway.session.service.ws.impl.SSOSession adaptSSOSession(
133: org.josso.gateway.session.SSOSession srcSSOSession) {
134: org.josso.gateway.session.service.ws.impl.SSOSession targetSSOSession = new org.josso.gateway.session.service.ws.impl.SSOSession();
135:
136: targetSSOSession.setId(srcSSOSession.getId());
137: targetSSOSession.setCreationTime(srcSSOSession
138: .getCreationTime());
139: targetSSOSession.setMaxInactiveInterval(srcSSOSession
140: .getMaxInactiveInterval());
141: targetSSOSession.setUsername(srcSSOSession.getUsername());
142: targetSSOSession.setAccessCount(srcSSOSession.getAccessCount());
143:
144: return targetSSOSession;
145: }
146:
147: }
|