@Override protected void revertUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode valueToRestore, ModelNode valueToRevert, SysPropValue handback) throws OperationFailedException { if (handback != null) { if (handback.value != null) { SecurityActions.setSystemProperty(handback.name, handback.value); } else { SecurityActions.clearSystemProperty(handback.name); } systemPropertyUpdater.systemPropertyUpdated(handback.name, handback.value); } }
@Override protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<SysPropValue> handbackHolder) throws OperationFailedException { final String name = PathAddress.pathAddress(operation.get(OP_ADDR)).getLastElement().getValue(); String setValue = resolvedValue.isDefined() ? resolvedValue.asString() : null; // This method will only be called if systemPropertyUpdater != null (see requiresRuntime()) final boolean applyToRuntime = systemPropertyUpdater.isRuntimeSystemPropertyUpdateAllowed(name, setValue, context.isBooting()); if (applyToRuntime) { final String oldValue = WildFlySecurityManager.getPropertyPrivileged(name, null); if (setValue != null) { WildFlySecurityManager.setPropertyPrivileged(name, setValue); } else { WildFlySecurityManager.clearPropertyPrivileged(name); } systemPropertyUpdater.systemPropertyUpdated(name, setValue); handbackHolder.setHandback(new SysPropValue(name, oldValue)); } return !applyToRuntime; }
systemPropertyUpdater.isRuntimeSystemPropertyUpdateAllowed(name, oldValue, context.isBooting()); final boolean reload = !applyToRuntime && context.getProcessType().isServer();
@Override protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<SysPropValue> handbackHolder) throws OperationFailedException { final String name = PathAddress.pathAddress(operation.get(OP_ADDR)).getLastElement().getValue(); String setValue = resolvedValue.isDefined() ? resolvedValue.asString() : null; // This method will only be called if systemPropertyUpdater != null (see requiresRuntime()) final boolean applyToRuntime = systemPropertyUpdater.isRuntimeSystemPropertyUpdateAllowed(name, setValue, context.isBooting()); if (applyToRuntime) { final String oldValue = SecurityActions.getSystemProperty(name); if (setValue != null) { SecurityActions.setSystemProperty(name, setValue); } else { SecurityActions.clearSystemProperty(name); } systemPropertyUpdater.systemPropertyUpdated(name, setValue); handbackHolder.setHandback(new SysPropValue(name, oldValue)); } return !applyToRuntime; }
systemPropertyUpdater.isRuntimeSystemPropertyUpdateAllowed(name, oldValue, context.isBooting()); final boolean reload = !applyToRuntime && context.getProcessType().isServer();
@Override protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<SysPropValue> handbackHolder) throws OperationFailedException { final String name = PathAddress.pathAddress(operation.get(OP_ADDR)).getLastElement().getValue(); String setValue = resolvedValue.isDefined() ? resolvedValue.asString() : null; // This method will only be called if systemPropertyUpdater != null (see requiresRuntime()) final boolean applyToRuntime = systemPropertyUpdater.isRuntimeSystemPropertyUpdateAllowed(name, setValue, context.isBooting()); if (applyToRuntime) { final String oldValue = WildFlySecurityManager.getPropertyPrivileged(name, null); if (setValue != null) { WildFlySecurityManager.setPropertyPrivileged(name, setValue); } else { WildFlySecurityManager.clearPropertyPrivileged(name); } systemPropertyUpdater.systemPropertyUpdated(name, setValue); handbackHolder.setHandback(new SysPropValue(name, oldValue)); } return !applyToRuntime; }
@Override public void handleRollback(OperationContext context, ModelNode operation) { if (applyToRuntime) { WildFlySecurityManager.setPropertyPrivileged(name, oldValue); if (systemPropertyUpdater != null) { systemPropertyUpdater.systemPropertyUpdated(name, oldValue); } } else if (reload) { context.revertReloadRequired(); } } });
final boolean applyToRuntime = systemPropertyUpdater != null && systemPropertyUpdater.isRuntimeSystemPropertyUpdateAllowed(name, value, context.isBooting()); final boolean reload = !applyToRuntime && context.getProcessType().isServer();
@Override protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<SysPropValue> handbackHolder) throws OperationFailedException { final String name = PathAddress.pathAddress(operation.get(OP_ADDR)).getLastElement().getValue(); String setValue = resolvedValue.isDefined() ? resolvedValue.asString() : null; // This method will only be called if systemPropertyUpdater != null (see requiresRuntime()) final boolean applyToRuntime = systemPropertyUpdater.isRuntimeSystemPropertyUpdateAllowed(name, setValue, context.isBooting()); if (applyToRuntime) { final String oldValue = WildFlySecurityManager.getPropertyPrivileged(name, null); if (setValue != null) { WildFlySecurityManager.setPropertyPrivileged(name, setValue); } else { WildFlySecurityManager.clearPropertyPrivileged(name); } systemPropertyUpdater.systemPropertyUpdated(name, setValue); handbackHolder.setHandback(new SysPropValue(name, oldValue)); } return !applyToRuntime; }
@Override protected void revertUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode valueToRestore, ModelNode valueToRevert, SysPropValue handback) throws OperationFailedException { if (handback != null) { if (handback.value != null) { WildFlySecurityManager.setPropertyPrivileged(handback.name, handback.value); } else { WildFlySecurityManager.clearPropertyPrivileged(handback.name); } systemPropertyUpdater.systemPropertyUpdated(handback.name, handback.value); } }
final boolean applyToRuntime = systemPropertyUpdater != null && systemPropertyUpdater.isRuntimeSystemPropertyUpdateAllowed(name, value, context.isBooting()); final boolean reload = !applyToRuntime && context.getProcessType().isServer();
systemPropertyUpdater.isRuntimeSystemPropertyUpdateAllowed(name, oldValue, context.isBooting()); final boolean reload = !applyToRuntime && context.getProcessType().isServer(); WildFlySecurityManager.clearPropertyPrivileged(name); if (systemPropertyUpdater != null) { systemPropertyUpdater.systemPropertyUpdated(name, null);
private void setProperty(String name, String value) { if (value != null) { WildFlySecurityManager.setPropertyPrivileged(name, value); } else { WildFlySecurityManager.clearPropertyPrivileged(name); } if (systemPropertyUpdater != null) { systemPropertyUpdater.systemPropertyUpdated(name, value); } }
final boolean applyToRuntime = systemPropertyUpdater != null && systemPropertyUpdater.isRuntimeSystemPropertyUpdateAllowed(name, value, context.isBooting()); final boolean reload = !applyToRuntime && context.getProcessType().isServer();
systemPropertyUpdater.isRuntimeSystemPropertyUpdateAllowed(name, oldValue, context.isBooting()); final boolean reload = !applyToRuntime && context.getProcessType().isServer(); WildFlySecurityManager.clearPropertyPrivileged(name); if (systemPropertyUpdater != null) { systemPropertyUpdater.systemPropertyUpdated(name, null);
@Override protected void revertUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode valueToRestore, ModelNode valueToRevert, SysPropValue handback) throws OperationFailedException { if (handback != null) { if (handback.value != null) { WildFlySecurityManager.setPropertyPrivileged(handback.name, handback.value); } else { WildFlySecurityManager.clearPropertyPrivileged(handback.name); } systemPropertyUpdater.systemPropertyUpdated(handback.name, handback.value); } }
final boolean applyToRuntime = systemPropertyUpdater != null && systemPropertyUpdater.isRuntimeSystemPropertyUpdateAllowed(name, value, context.isBooting()); final boolean reload = !applyToRuntime && context.getProcessType().isServer(); systemPropertyUpdater.systemPropertyUpdated(name, setValue);
private void setProperty(String name, String value) { if (value != null) { WildFlySecurityManager.setPropertyPrivileged(name, value); } else { WildFlySecurityManager.clearPropertyPrivileged(name); } if (systemPropertyUpdater != null) { systemPropertyUpdater.systemPropertyUpdated(name, value); } }
@Override public void handleRollback(OperationContext context, ModelNode operation) { if (applyToRuntime) { WildFlySecurityManager.setPropertyPrivileged(name, oldValue); if (systemPropertyUpdater != null) { systemPropertyUpdater.systemPropertyUpdated(name, oldValue); } } else if (reload) { context.revertReloadRequired(); } } });
@Override protected void revertUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode valueToRestore, ModelNode valueToRevert, SysPropValue handback) throws OperationFailedException { if (handback != null) { if (handback.value != null) { WildFlySecurityManager.setPropertyPrivileged(handback.name, handback.value); } else { WildFlySecurityManager.clearPropertyPrivileged(handback.name); } systemPropertyUpdater.systemPropertyUpdated(handback.name, handback.value); } }