1 8 9 package mx4j.tools.remote.soap.axis.ser; 10 11 import java.util.Set ; 12 import javax.security.auth.Subject ; 13 14 import org.xml.sax.SAXException ; 15 16 19 public class SubjectDeser extends AxisDeserializer 20 { 21 private boolean readOnly; 22 private Set principals; 23 private Set publicCredentials; 24 private Set privateCredentials; 25 26 public void onSetChildValue(Object value, Object hint) throws SAXException 27 { 28 if (SubjectSer.READ_ONLY.equals(hint)) 29 readOnly = ((Boolean )value).booleanValue(); 30 else if (SubjectSer.PRINCIPALS.equals(hint)) 31 principals = (Set )value; 32 else if (SubjectSer.PUBLIC_CREDENTIALS.equals(hint)) 33 publicCredentials = (Set )value; 34 else if (SubjectSer.PRIVATE_CREDENTIALS.equals(hint)) privateCredentials = (Set )value; 35 } 36 37 protected Object createObject() throws SAXException 38 { 39 return new Subject (readOnly, principals, publicCredentials, privateCredentials); 40 } 41 } 42 | Popular Tags |