private HandlerAddHandler() {
}
static void launchServices(final OperationContext context, final PathAddress pathAddress , final ModelNode model, final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) throws OperationFailedException {
Handler newHandler = new Handler();
String typeName = getHandlerType(context, model);
newHandler.setClazz(typeName);
ModelNode handler = Resource.Tools.readModel(context.readResourceFromRoot(pathAddress));
if (handler.hasDefined(COMMON_HANDLER_PARAMETER.getName())) {
for (Property handlerParameter : handler.get(COMMON_HANDLER_PARAMETER.getName()).asPropertyList()) {
String paramName = handlerParameter.getName();
String paramValue = HandlerParameterResourceDefinition.VALUE
.resolveModelAttribute(context, handlerParameter.getValue()).asString();
KeyValueType kv = new KeyValueType();
kv.setKey(paramName);
kv.setValue(paramValue);
newHandler.add(kv);
}
}
SAMLHandlerService service = new SAMLHandlerService(newHandler);
PathElement providerAlias = pathAddress.subAddress(0, pathAddress.size() - 1).getLastElement();