1 22 package org.jboss.test.xml.mbeanserver; 23 24 import javax.xml.namespace.QName ; 25 import javax.security.auth.login.AppConfigurationEntry ; 26 27 import org.jboss.xb.binding.GenericValueContainer; 28 29 33 public class AuthenticationInfoContainer 34 implements GenericValueContainer 35 { 36 AuthenticationInfo info; 37 38 public void addChild(QName name, Object value) 39 { 40 if("name".equals(name.getLocalPart())) 42 { 43 String infoName = (String )value; 44 info = new AuthenticationInfo(infoName); 45 } 46 else if( value instanceof AppConfigurationEntryHolder ) 47 { 48 AppConfigurationEntryHolder ace = (AppConfigurationEntryHolder) value; 49 info.addAppConfigurationEntry(ace.getEntry()); 50 } 51 else if( value instanceof AppConfigurationEntry ) 52 { 53 AppConfigurationEntry ace = (AppConfigurationEntry ) value; 54 info.addAppConfigurationEntry(ace); 55 } 56 } 57 58 public Object instantiate() 59 { 60 return info; 61 } 62 63 public Class getTargetClass() 64 { 65 return AuthenticationInfo.class; 66 } 67 } 68 | Popular Tags |