public static void createRootRegistry( final ManagementResourceRegistration root, final HostControllerEnvironment environment, final IgnoredDomainResourceRegistry ignoredDomainResourceRegistry, final HostModelRegistrar hostModelRegistrar, final ProcessType processType, final DelegatingConfigurableAuthorizer authorizer, final Resource modelControllerResource) { // Add of the host itself final HostModelRegistrationHandler hostModelRegistratorHandler = new HostModelRegistrationHandler( environment, ignoredDomainResourceRegistry, hostModelRegistrar, modelControllerResource); root.registerOperationHandler( HostModelRegistrationHandler.DEFINITION, hostModelRegistratorHandler); // Global operations GlobalOperationHandlers.registerGlobalOperations(root, processType); // Global notifications GlobalNotifications.registerGlobalNotifications(root, processType); if (root.getOperationEntry( PathAddress.EMPTY_ADDRESS, ValidateOperationHandler.DEFINITION.getName()) == null) { // this is hack root.registerOperationHandler( ValidateOperationHandler.DEFINITION, ValidateOperationHandler.INSTANCE); } root.registerOperationHandler( WhoAmIOperation.DEFINITION, WhoAmIOperation.createOperation(authorizer), true); // Other root resource operations root.registerOperationHandler( CompositeOperationHandler.DEFINITION, CompositeOperationHandler.INSTANCE); }
@Override public OperationEntry getOperationEntry(PathAddress address, String operationName) { return deployments.getOperationEntry(address, operationName); }