1 19 package org.openharmonise.vfs.authentication; 20 21 import java.net.URI ; 22 import java.util.HashMap ; 23 24 31 public abstract class AbstractAuthenticationStore { 32 33 36 protected HashMap m_auths = new HashMap (); 37 38 public AbstractAuthenticationStore() { 39 super(); 40 } 41 42 48 public AuthInfo getAuthentication(URI uri) { 49 return this.getAuthentication(uri.toString()); 50 } 51 52 58 protected AuthInfo getAuthentication(String sURI) { 59 AuthInfo authInfo = null; 60 61 if( this.m_auths.containsKey(sURI) ) { 62 authInfo = (AuthInfo)this.m_auths.get(sURI); 63 } 64 65 return authInfo; 66 } 67 68 74 public void addAuthentication(URI uri, AuthInfo authInfo) { 75 this.m_auths.put(uri.toString(), authInfo); 76 } 77 78 } 79 | Popular Tags |