package edu.internet2.middleware.shibboleth.idp.session.impl;
import java.net.InetAddress;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
-
-import javolution.util.FastList;
+import java.util.Map;
import edu.internet2.middleware.shibboleth.common.session.impl.AbstractSession;
import edu.internet2.middleware.shibboleth.idp.session.AuthenticationMethodInformation;
private List<AuthenticationMethodInformation> authnMethods;
/** The list of services to which the user has logged in. */
- private List<ServiceInformation> servicesInformation;
+ private Map<String, ServiceInformation> servicesInformation;
/**
* Default constructor.
public SessionImpl(InetAddress presenter, String principal) {
super(presenter, principal);
- authnMethods = new FastList<AuthenticationMethodInformation>();
- servicesInformation = new FastList<ServiceInformation>();
+ authnMethods = new ArrayList<AuthenticationMethodInformation>();
+ servicesInformation = new HashMap<String, ServiceInformation>();
}
/** {@inheritDoc} */
public List<AuthenticationMethodInformation> getAuthenticationMethods() {
return authnMethods;
}
+
+ /** {@inheritDoc} */
+ public ServiceInformation getServiceInformation(String entityId) {
+ return servicesInformation.get(entityId);
+ }
/** {@inheritDoc} */
public List<ServiceInformation> getServicesInformation() {
- return servicesInformation;
+ ArrayList<ServiceInformation> info = new ArrayList<ServiceInformation>();
+ for(Map.Entry<String, ServiceInformation> entry : servicesInformation.entrySet()){
+ info.add(entry.getValue());
+ }
+
+ return info;
}
-
-}
+}
\ No newline at end of file