Class SystemPropertiesConfigurationModel

    • Constructor Detail

      • SystemPropertiesConfigurationModel

        public SystemPropertiesConfigurationModel​(List<String> propertyClassNames)
        Create new ExternalConfigurationModel for properties defined by classes in propertyClassNames list.
        Parameters:
        propertyClassNames - List of property defining class names.
    • Method Detail

      • getPropertyClassNames

        protected List<String> getPropertyClassNames()
      • as

        public <T> T as​(String name,
                        Class<T> clazz)
        Description copied from interface: ExternalConfigurationModel
        Get value of a property as a definite type property shall exist in order for this method to be used. Otherwise exception is thrown
        Specified by:
        as in interface ExternalConfigurationModel<Void>
        Type Parameters:
        T - type of an expected value
        Parameters:
        name - property name
        clazz - class type of an expected value
        Returns:
        value of an expected type
      • getOptionalProperty

        public <T> Optional<T> getOptionalProperty​(String name,
                                                   Class<T> clazz)
        Description copied from interface: ExternalConfigurationModel
        Get value of a property as a definite type property may not exist, an empty Optional object is returned in case of an empty property
        Specified by:
        getOptionalProperty in interface ExternalConfigurationModel<Void>
        Type Parameters:
        T - type of an expected value
        Parameters:
        name - property name
        clazz - class type of an expected value
        Returns:
        Optional object filled by a value of an expected type or by the NULL value (
      • isProperty

        public boolean isProperty​(String name)
        Description copied from interface: ExtendedConfig
        Get the value of the property with a given name converted to boolean. Returns false if the value is not convertible.
        Specified by:
        isProperty in interface ExtendedConfig
        Parameters:
        name - property name.
        Returns:
        boolean property value or false if the property is not convertible.
      • getRuntimeType

        public RuntimeType getRuntimeType()
        Description copied from interface: Configuration
        Get the runtime type of this configuration context.
        Specified by:
        getRuntimeType in interface Configuration
        Returns:
        configuration context runtime type.
      • getProperties

        public Map<String,​Object> getProperties()
        Description copied from interface: Configuration
        Get the immutable bag of configuration properties.
        Specified by:
        getProperties in interface Configuration
        Returns:
        the immutable view of configuration properties.
      • getProperty

        public Object getProperty​(String name)
        Description copied from interface: Configuration
        Get the value for the property with a given name.
        Specified by:
        getProperty in interface Configuration
        Parameters:
        name - property name.
        Returns:
        the property value for the specified property name or null if the property with such name is not configured.
      • isEnabled

        public boolean isEnabled​(Feature feature)
        Description copied from interface: Configuration
        Check if a particular feature instance has been previously enabled in the runtime configuration context.

        Method returns true only in case an instance equal to the feature instance is already present among the features previously successfully enabled in the configuration context.

        Specified by:
        isEnabled in interface Configuration
        Parameters:
        feature - a feature instance to test for.
        Returns:
        true if the feature instance has been previously enabled in this configuration context, false otherwise.
      • isEnabled

        public boolean isEnabled​(Class<? extends Feature> featureClass)
        Description copied from interface: Configuration
        Check if a feature instance of featureClass class has been previously enabled in the runtime configuration context.

        Method returns true in case any instance of the featureClass class is already present among the features previously successfully enabled in the configuration context.

        Specified by:
        isEnabled in interface Configuration
        Parameters:
        featureClass - a feature class to test for.
        Returns:
        true if a feature of a given class has been previously enabled in this configuration context, false otherwise.
      • isRegistered

        public boolean isRegistered​(Object component)
        Description copied from interface: Configuration
        Check if a particular JAX-RS component instance (such as providers or features) has been previously registered in the runtime configuration context.

        Method returns true only in case an instance equal to the component instance is already present among the components previously registered in the configuration context.

        Specified by:
        isRegistered in interface Configuration
        Parameters:
        component - a component instance to test for.
        Returns:
        true if the component instance has been previously registered in this configuration context, false otherwise.
        See Also:
        Configuration.isEnabled(Feature)
      • isRegistered

        public boolean isRegistered​(Class<?> componentClass)
        Description copied from interface: Configuration
        Check if a JAX-RS component of the supplied componentClass class has been previously registered in the runtime configuration context.

        Method returns true in case a component of the supplied componentClass class is already present among the previously registered component classes or instances in the configuration context.

        Specified by:
        isRegistered in interface Configuration
        Parameters:
        componentClass - a component class to test for.
        Returns:
        true if a component of a given class has been previously registered in this configuration context, false otherwise.
        See Also:
        Configuration.isEnabled(Class)
      • getContracts

        public Map<Class<?>,​Integer> getContracts​(Class<?> componentClass)
        Description copied from interface: Configuration
        Get the extension contract registration information for a component of a given class. For component classes that are not configured in this configuration context the method returns an empty Map. Method does not return null.
        Specified by:
        getContracts in interface Configuration
        Parameters:
        componentClass - a component class for which to get contracts.
        Returns:
        map of extension contracts and their priorities for which the component class is registered. May return an empty map in case the component has not been registered for any extension contract supported by the implementation.
      • getClasses

        public Set<Class<?>> getClasses()
        Description copied from interface: Configuration
        Get the immutable set of registered JAX-RS component (such as provider, root resource or feature) classes to be instantiated, injected and utilized in the scope of the configurable instance. In contrast to Application.getClasses() this method returns a complete runtime view and therefore also includes auto-discovered components.

        For each component type, there can be only a single class-based or instance-based registration present in the configuration context at any given time.

        Specified by:
        getClasses in interface Configuration
        Returns:
        the immutable set of registered JAX-RS component classes. The returned value may be empty but will never be null.
        See Also:
        Configuration.getInstances()
      • getInstances

        public Set<Object> getInstances()
        Description copied from interface: Configuration
        Get the immutable set of registered JAX-RS component (such as provider or feature) instances to be utilized by the configurable instance. Fields and properties of returned instances are injected with their declared dependencies (see Context) by the runtime prior to use.

        For each component type, there can be only a single class-based or instance-based registration present in the configuration context at any given time.

        Specified by:
        getInstances in interface Configuration
        Returns:
        the immutable set of registered JAX-RS component instances. The returned value may be empty but will never be null.
        See Also:
        Configuration.getClasses()