ServerUtil(ModelNode operation) { this.deploymentName = getDeploymentName(operation); this.subsysModule = findSubsysModule(); this.serverWar = findServerWarUri(); }
ServerUtil(ModelNode operation) { this.deploymentName = getDeploymentName(operation); this.subsysModule = findSubsysModule(); this.serverWar = findServerWarUri(); }
@Override protected void performRemove(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { String deploymentName = ServerUtil.getDeploymentName(operation); KeycloakAdapterConfigService.INSTANCE.setWebContext(null); if (requiresRuntime(context)) { // don't do this on a domain controller addStepToRemoveServerWar(context, deploymentName); } super.performRemove(context, operation, model); }
@Override protected void finishModelStage(OperationContext context, ModelNode operation, String attributeName, ModelNode newValue, ModelNode oldValue, Resource model) throws OperationFailedException { if (!context.isNormalServer() || attribNotChanging(attributeName, newValue, oldValue)) { super.finishModelStage(context, operation, attributeName, newValue, oldValue, model); return; } String deploymentName = ServerUtil.getDeploymentName(operation); if (attributeName.equals(KeycloakSubsystemDefinition.WEB_CONTEXT.getName())) { KeycloakAdapterConfigService.INSTANCE.setWebContext(newValue.asString()); ServerUtil.addStepToRedeployServerWar(context, deploymentName); } super.finishModelStage(context, operation, attributeName, newValue, oldValue, model); }
@Override protected void performRemove(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { String deploymentName = ServerUtil.getDeploymentName(operation); KeycloakAdapterConfigService.INSTANCE.setWebContext(null); if (requiresRuntime(context)) { // don't do this on a domain controller addStepToRemoveServerWar(context, deploymentName); } super.performRemove(context, operation, model); }
@Override protected void finishModelStage(OperationContext context, ModelNode operation, String attributeName, ModelNode newValue, ModelNode oldValue, Resource model) throws OperationFailedException { if (!context.isNormalServer() || attribNotChanging(attributeName, newValue, oldValue)) { super.finishModelStage(context, operation, attributeName, newValue, oldValue, model); return; } String deploymentName = ServerUtil.getDeploymentName(operation); if (attributeName.equals(KeycloakSubsystemDefinition.WEB_CONTEXT.getName())) { KeycloakAdapterConfigService.INSTANCE.setWebContext(newValue.asString()); ServerUtil.addStepToRedeployServerWar(context, deploymentName); } super.finishModelStage(context, operation, attributeName, newValue, oldValue, model); }