Class ModelTestKernelServicesImpl<T extends ModelTestKernelServices<T>>

    • Constructor Detail

      • ModelTestKernelServicesImpl

        protected ModelTestKernelServicesImpl​(org.jboss.msc.service.ServiceContainer container,
                                              ModelTestModelControllerService controllerService,
                                              StringConfigurationPersister persister,
                                              org.jboss.as.controller.registry.ManagementResourceRegistration rootRegistration,
                                              org.jboss.as.controller.operations.validation.OperationValidator operationValidator,
                                              org.jboss.as.controller.ModelVersion legacyModelVersion,
                                              boolean successfulBoot,
                                              Throwable bootError)
    • Method Detail

      • getLegacyServices

        public T getLegacyServices​(org.jboss.as.controller.ModelVersion modelVersion)
        Gets the legacy controller services for the controller containing the passed in model version
        Specified by:
        getLegacyServices in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
        Parameters:
        modelVersion - the model version of the legacy model controller
        Throws:
        IllegalStateException - if this is not the test's main model controller
        IllegalStateException - if there is no legacy controller containing the version
      • checkIsMainController

        protected void checkIsMainController()
      • readWholeModel

        public org.jboss.dmr.ModelNode readWholeModel​(boolean includeAliases)
        Reads the whole model from the model controller without runtime attributes/resources
        Specified by:
        readWholeModel in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
        Parameters:
        includeAliases - whether to include aliases
        Returns:
        the whole model
      • readWholeModel

        public org.jboss.dmr.ModelNode readWholeModel​(boolean includeAliases,
                                                      boolean includeRuntime)
        Reads the whole model from the model controller
        Specified by:
        readWholeModel in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
        Parameters:
        includeAliases - whether to include aliases
        includeRuntime - whether to include runtime attributes/resources
        Returns:
        the whole model
      • executeOperation

        public org.jboss.dmr.ModelNode executeOperation​(org.jboss.dmr.ModelNode operation,
                                                        InputStream... inputStreams)
        Execute an operation in the model controller
        Specified by:
        executeOperation in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
        Parameters:
        operation - the operation to execute
        inputStreams - Input Streams for the operation
        Returns:
        the whole result of the operation
      • validateOperation

        public void validateOperation​(org.jboss.dmr.ModelNode operation)
        Validates the operation against the description providers in the model controller
        Specified by:
        validateOperation in interface ModelTestKernelServices<T extends ModelTestKernelServices<T>>
        Parameters:
        operation - the operation to validate
      • addLegacyKernelService

        protected void addLegacyKernelService​(org.jboss.as.controller.ModelVersion modelVersion,
                                              T legacyServices)
      • internalExecute

        protected org.jboss.dmr.ModelNode internalExecute​(org.jboss.dmr.ModelNode operation,
                                                          org.jboss.as.controller.OperationStepHandler handler)
      • createTransformationContext

        protected org.jboss.as.controller.transform.TransformationContext createTransformationContext​(org.jboss.as.controller.transform.TransformationTarget target,
                                                                                                      org.jboss.as.controller.transform.TransformerOperationAttachment attachment)
      • getTransformersRegistry

        protected org.jboss.as.controller.transform.TransformerRegistry getTransformersRegistry()