public static TSSConfig getTSSConfig ( Map < String , Object > props , Map < OptionsKey , List < TransportAddress > > addrMap , Bundle bundle ) throws Exception { TSSConfig tssConfig = new TSSConfig ( ) ; List < Map < String , Object > > tssConfigs = Nester . nest ( CSIV2_CONFIGURATION , props ) ; if ( ! tssConfigs . isEmpty ( ) ) { Map < String , Object > properties = tssConfigs . get ( 0 ) ; // tssConfig.setInherit((Boolean) properties.get(INHERIT)); List < Map < String , Object > > mechList = Nester . nest ( COMPOUND_SEC_MECH_TYPE_LIST , properties ) ; //TODO liberty get the ssl transport info from the corbabean? // List<Map<String, Object>> transportMechGroups = mechInfo.get(SSL_OPTIONS); // if (!transportMechGroups.isEmpty()) { // Map<String, Object> transportMechGroup = transportMechGroups.get(0); // String type = (String) transportMechGroup.get(CONFIG_REFERENCE_TYPE); // if (SSL_TRANSPORT_MECH.equals(type)) { // tssConfig.setTransport_mech(extractSSL(transportMechGroup)); // } else if (SECIOP_TRANSPORT_MECH.equals(type)) { // throw new IllegalStateException("SECIOP processing not implemented"); // } else { // throw new IllegalStateException("Unrecognized transport mech type: " + type); // } // } else { // tssConfig.setTransport_mech(new TSSNULLTransportConfig()); // } // List<Map<String, Object>> secmechlists = mechInfo.get(COMPOUND_SEC_MECH_TYPE_LIST); // if (!secmechlists.isEmpty()) { // Map<String, Object> secMechList = secmechlists.get(0); TSSCompoundSecMechListConfig mechListConfig = tssConfig . getMechListConfig ( ) ; mechListConfig . setStateful ( ( Boolean ) properties . get ( STATEFUL ) ) ; // List<Map<String, Object>> mechList = Nester.nest(COMPOUND_SECH_MECH_LIST, secMechList); for ( Map < String , Object > mech : mechList ) { TSSCompoundSecMechConfig cMech = extractCompoundSecMech ( mech , addrMap , bundle ) ; // cMech.setTransport_mech(tssConfig.getTransport_mech()); mechListConfig . add ( cMech ) ; } // } } return tssConfig ; }
Returns a TSSConfig object initialized with the input object as an XML string .