Class Configuration

    • Field Detail

      • CONFIGURATOR_PREFIX

        public static final String CONFIGURATOR_PREFIX
        Prefix for instructions for the configurator.
        See Also:
        Constant Field Values
      • PROP_PREFIX

        public static final String PROP_PREFIX
        Prefix for special properties which are not configuration properties.
        See Also:
        Constant Field Values
      • PROP_ARTIFACT_ID

        public static final String PROP_ARTIFACT_ID
        This optional configuration property stores the artifact id (mvn id) of the bundle this configuration belongs to.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Configuration

        public Configuration​(String pid)
        Create a new configuration
        Parameters:
        pid - The pid
        Throws:
        IllegalArgumentException - If pid is null
    • Method Detail

      • getPid

        public String getPid()
        Get the pid.
        Returns:
        The pid
      • isFactoryConfiguration

        public boolean isFactoryConfiguration()
        Check whether the pid is a factory pid
        Returns:
        true if it's a factory pid
        Since:
        1.3
      • getFactoryPid

        public String getFactoryPid()
        Return the factory pid of a pid if it's a factory configuration
        Returns:
        The factory pid or null.
        Since:
        1.3
        See Also:
        isFactoryConfiguration()
      • getName

        public String getName()
        Return the name for a factory configuration if it is a factory configuration.
        Returns:
        The name or null.
        Since:
        1.3
        See Also:
        isFactoryConfiguration()
      • isFactoryConfiguration

        public static boolean isFactoryConfiguration​(String pid)
        Check whether the pid is a factory pid
        Parameters:
        pid - The pid
        Returns:
        true if it's a factory pid
      • getFactoryPid

        public static String getFactoryPid​(String pid)
        Return the factory pid of a pid if it's a factory configuration
        Parameters:
        pid - The pid
        Returns:
        The factory pid or null.
        See Also:
        isFactoryConfiguration(String)
      • getName

        public static String getName​(String pid)
        Return the name for a factory configuration if it is a factory configuration.
        Parameters:
        pid - The pid
        Returns:
        The name or null.
        See Also:
        isFactoryConfiguration(String)
      • getProperties

        public Dictionary<String,​Object> getProperties()
        Get all properties of the configuration. This method returns a mutable dictionary which can be mutated to alter the properties for this configuration.
        Returns:
        The properties
      • getConfigurationProperties

        public Dictionary<String,​Object> getConfigurationProperties()
        Get the configuration properties of the configuration. This configuration properties are all properties minus properties used to manage the configuration. Managing properties have to start with #CONFIGURATOR_PREFIX. The returned copy is a mutable dictionary which represents a snapshot of the properties at the time this method is called.
        Returns:
        The configuration properties
      • copy

        public Configuration copy​(String aPid)
        Create a copy of the configuration with a provided PID.
        Parameters:
        aPid - The pid of the configuration
        Returns:
        A copy of this configuration with the given PID