Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFCORE-6910 Remove usage of deprecated AbstractAddStepHandler constructors in domain-management #6089

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ public void registerAttributes(ManagementResourceRegistration resourceRegistrati
}

private static class LegacyConfigurationChangeResourceAddHandler extends AbstractAddStepHandler {
private LegacyConfigurationChangeResourceAddHandler() {
super(MAX_HISTORY);
}

@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ static class AccessIdentityAddHandler extends AbstractAddStepHandler {
private final ManagementSecurityIdentitySupplier securityIdentitySupplier;

AccessIdentityAddHandler(ManagementSecurityIdentitySupplier securityIdentitySupplier) {
super(ATTRIBUTES);
this.securityIdentitySupplier = securityIdentitySupplier;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ protected abstract static class AbstractFileAuditLogHandlerAddHandler extends Ab
protected final ManagedAuditLogger auditLogger;
protected final PathManagerService pathManager;

protected AbstractFileAuditLogHandlerAddHandler(ManagedAuditLogger auditLogger, PathManagerService pathManager, AttributeDefinition[] attributes) {
super(attributes);
protected AbstractFileAuditLogHandlerAddHandler(ManagedAuditLogger auditLogger, PathManagerService pathManager) {
this.auditLogger = auditLogger;
this.pathManager = pathManager;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class FileAuditLogHandlerResourceDefinition extends AbstractFileAuditLogH
public FileAuditLogHandlerResourceDefinition(ManagedAuditLogger auditLogger, PathManagerService pathManager) {
super(auditLogger, pathManager, PathElement.pathElement(ModelDescriptionConstants.FILE_HANDLER),
DomainManagementResolver.getDeprecatedResolver(AccessAuditResourceDefinition.DEPRECATED_MESSAGE_CATEGORY, "core.management.file-handler"),
new FileAuditLogHandlerAddHandler(auditLogger, pathManager, FULL_ATTRIBUTES), new HandlerRemoveHandler(auditLogger));
new FileAuditLogHandlerAddHandler(auditLogger, pathManager), new HandlerRemoveHandler(auditLogger));
setDeprecated(ModelVersion.create(1, 7));
}

Expand Down Expand Up @@ -83,8 +83,8 @@ private static FileAuditLogHandler createFileAuditLogHandler(final PathManagerSe

protected static class FileAuditLogHandlerAddHandler extends AbstractFileAuditLogHandlerAddHandler {

protected FileAuditLogHandlerAddHandler(ManagedAuditLogger auditLogger, PathManagerService pathManager, AttributeDefinition[] attributes) {
super(auditLogger, pathManager, attributes);
protected FileAuditLogHandlerAddHandler(ManagedAuditLogger auditLogger, PathManagerService pathManager) {
super(auditLogger, pathManager);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,6 @@ protected boolean requiresRuntime(OperationContext context) {
return true;
}

@Override
protected void populateModel(ModelNode operation, ModelNode model) throws OperationFailedException {
super.populateModel(operation, model);
MAX_OPERATION_COUNT.validateAndSet(operation, model);
}

private InMemoryAuditLogHandler createHandler(final OperationContext context, final ModelNode model) throws OperationFailedException {
final String name = context.getCurrentAddressValue();
final int maxHistory = MAX_OPERATION_COUNT.resolveModelAttribute(context, model).asInt();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ private static class JsonAuditLogFormatterAddHandler extends AbstractAddStepHand
private final ManagedAuditLogger auditLogger;

private JsonAuditLogFormatterAddHandler(ManagedAuditLogger auditLogger) {
super(ATTRIBUTES);
this.auditLogger = auditLogger;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class PeriodicRotatingFileAuditLogHandlerResourceDefinition extends Abstr

public PeriodicRotatingFileAuditLogHandlerResourceDefinition(ManagedAuditLogger auditLogger, PathManagerService pathManager) {
super(auditLogger, pathManager, PathElement.pathElement(PERIODIC_ROTATING_FILE_HANDLER), DomainManagementResolver.getResolver("core.management.periodic-rotating-file-handler"),
new PeriodicRotatingFileAuditLogHandlerAddHandler(auditLogger, pathManager, FULL_ATTRIBUTES), new HandlerRemoveHandler(auditLogger));
new PeriodicRotatingFileAuditLogHandlerAddHandler(auditLogger, pathManager), new HandlerRemoveHandler(auditLogger));
}

public static ModelNode createServerAddOperation(final PathAddress address, final ModelNode fileHandler){
Expand Down Expand Up @@ -86,8 +86,8 @@ private static PeriodicRotatingFileAuditLogHandler createPeriodicRotatingFileAud

protected static class PeriodicRotatingFileAuditLogHandlerAddHandler extends AbstractFileAuditLogHandlerAddHandler {

protected PeriodicRotatingFileAuditLogHandlerAddHandler(ManagedAuditLogger auditLogger, PathManagerService pathManager, AttributeDefinition[] attributes) {
super(auditLogger, pathManager, attributes);
protected PeriodicRotatingFileAuditLogHandlerAddHandler(ManagedAuditLogger auditLogger, PathManagerService pathManager) {
super(auditLogger, pathManager);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class SizeRotatingFileAuditLogHandlerResourceDefinition extends AbstractF

public SizeRotatingFileAuditLogHandlerResourceDefinition(ManagedAuditLogger auditLogger, PathManagerService pathManager) {
super(auditLogger, pathManager, PathElement.pathElement(SIZE_ROTATING_FILE_HANDLER), DomainManagementResolver.getResolver("core.management.size-rotating-file-handler"),
new SizeRotatingFileAuditLogHandlerAddHandler(auditLogger, pathManager, FULL_ATTRIBUTES), new HandlerRemoveHandler(auditLogger));
new SizeRotatingFileAuditLogHandlerAddHandler(auditLogger, pathManager), new HandlerRemoveHandler(auditLogger));
}

public static ModelNode createServerAddOperation(final PathAddress address, final ModelNode fileHandler){
Expand Down Expand Up @@ -97,8 +97,8 @@ private static SizeRotatingFileAuditLogHandler createSizeRotatingFileAuditLogHan

protected static class SizeRotatingFileAuditLogHandlerAddHandler extends AbstractFileAuditLogHandlerAddHandler {

protected SizeRotatingFileAuditLogHandlerAddHandler(ManagedAuditLogger auditLogger, PathManagerService pathManager, AttributeDefinition[] attributes) {
super(auditLogger, pathManager, attributes);
protected SizeRotatingFileAuditLogHandlerAddHandler(ManagedAuditLogger auditLogger, PathManagerService pathManager) {
super(auditLogger, pathManager);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ static class SyslogAuditLogHandlerAddHandler extends AbstractAddStepHandler {
private final EnvironmentNameReader environmentReader;

private SyslogAuditLogHandlerAddHandler(ManagedAuditLogger auditLogger, PathManagerService pathManager, EnvironmentNameReader environmentReader) {
super(ATTRIBUTES);
this.pathManager = pathManager;
this.auditLogger = auditLogger;
this.environmentReader = environmentReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ private static class ProtocolConfigAddHandler extends AbstractAddStepHandler {
private final EnvironmentNameReader environmentReader;

ProtocolConfigAddHandler(ManagedAuditLogger auditLogger, PathManagerService pathManager, AttributeDefinition[] attributes, EnvironmentNameReader environmentReader){
super(attributes);
this.auditLogger = auditLogger;
this.pathManager = pathManager;
this.environmentReader = environmentReader;
Expand Down Expand Up @@ -371,7 +370,6 @@ private static class TlsKeyStoreAddHandler extends AbstractAddStepHandler {
private final PathElement pathElement;

TlsKeyStoreAddHandler(ManagedAuditLogger auditLogger, PathManagerService pathManager, AttributeDefinition[] attributes, EnvironmentNameReader environmentReader, PathElement pathElement) {
super(attributes);
this.auditLogger = auditLogger;
this.pathManager = pathManager;
this.environmentReader = environmentReader;
Expand Down