protected static WSSecurityEngine
createSecurityEngine(
final Map<QName, Object> map
) {
assert map != null;
final WSSConfig config = WSSConfig.getNewInstance();
for (Map.Entry<QName, Object> entry : map.entrySet()) {
final QName key = entry.getKey();
Object val = entry.getValue();
if (val instanceof Class<?>) {
config.setProcessor(key, (Class<?>)val);
} else if (val instanceof Processor) {
config.setProcessor(key, (Processor)val);
} else if (val instanceof Validator) {
config.setValidator(key, (Validator)val);
} else if (val == null) {
config.setProcessor(key, (Class<?>)null);
}
}
final WSSecurityEngine ret = new WSSecurityEngine();
ret.setWssConfig(config);
return ret;