Class AbstractProductDerivation

    • Constructor Detail

      • AbstractProductDerivation

        public AbstractProductDerivation()
    • Method Detail

      • validate

        public void validate()
                      throws java.lang.Exception
        Description copied from interface: ProductDerivation
        Ensure that this derivation is valid. This action might consist of loading classes for the product this derivation represents to be sure they exist. Throw any throwable to indicate an invalid derivation. Invalid derivations will not be used.
        Specified by:
        validate in interface ProductDerivation
        Throws:
        java.lang.Exception
      • loadGlobals

        public ConfigurationProvider loadGlobals​(java.lang.ClassLoader loader)
                                          throws java.lang.Exception
        Description copied from interface: ProductDerivation
        Load globals into the returned ConfigurationProvider, or return null if no globals are found.
        Specified by:
        loadGlobals in interface ProductDerivation
        Throws:
        java.lang.Exception
      • loadDefaults

        public ConfigurationProvider loadDefaults​(java.lang.ClassLoader loader)
                                           throws java.lang.Exception
        Description copied from interface: ProductDerivation
        Load defaults into the returned ConfigurationProvider, or return null if no defaults are found.
        Specified by:
        loadDefaults in interface ProductDerivation
        Throws:
        java.lang.Exception
      • load

        public ConfigurationProvider load​(java.lang.String resource,
                                          java.lang.String anchor,
                                          java.lang.ClassLoader loader)
                                   throws java.lang.Exception
        Description copied from interface: ProductDerivation
        Load the given given resource into the returned ConfigurationProvider, or return null if it is not a resource this receiver understands. The given class loader may be null.
        Specified by:
        load in interface ProductDerivation
        anchor - optional named anchor within a multiple-configuration resource
        Throws:
        java.lang.Exception
      • load

        public ConfigurationProvider load​(java.io.File file,
                                          java.lang.String anchor)
                                   throws java.lang.Exception
        Description copied from interface: ProductDerivation
        Load given file, or return null if it is not a file this receiver understands.
        Specified by:
        load in interface ProductDerivation
        anchor - optional named anchor within a multiple-configuration file
        Throws:
        java.lang.Exception
      • getDefaultResourceLocation

        public java.lang.String getDefaultResourceLocation()
        Description copied from interface: ProductDerivation
        Return a string identifying the default resource location for this product derivation, if one exists. If there is no default location, returns null.
        Specified by:
        getDefaultResourceLocation in interface ProductDerivation
      • getAnchorsInFile

        public java.util.List<java.lang.String> getAnchorsInFile​(java.io.File file)
                                                          throws java.lang.Exception
        Description copied from interface: ProductDerivation
        Return a List of all the anchors defined in file. The returned names are not fully-qualified, so must be used in conjunction with file in calls to ProductDerivation.load(java.io.File, String). Returns null or an empty list if no anchors could be found.
        Specified by:
        getAnchorsInFile in interface ProductDerivation
        Throws:
        java.lang.Exception
      • getAnchorsInResource

        public java.util.List<java.lang.String> getAnchorsInResource​(java.lang.String resource)
                                                              throws java.lang.Exception
        Description copied from interface: ProductDerivation
        Return a List of all the anchors defined in resource. The returned names are not fully-qualified, so must be used in conjunction with resource in calls to ProductDerivation.load(java.io.File, String). Returns null or an empty list if no anchors could be found.
        Specified by:
        getAnchorsInResource in interface ProductDerivation
        Throws:
        java.lang.Exception
      • beforeConfigurationConstruct

        public boolean beforeConfigurationConstruct​(ConfigurationProvider cp)
        Description copied from interface: ProductDerivation
        Provides the instance with a callback to mutate the initial properties of the ConfigurationProvider. This is primarily to alter or add properties that determine what type of configuration is constructed, and therefore is typically used at runtime only.
        Specified by:
        beforeConfigurationConstruct in interface ProductDerivation
        Returns:
        true if given ConfigurationProvider has been mutated.
      • beforeConfigurationLoad

        public boolean beforeConfigurationLoad​(Configuration conf)
        Description copied from interface: ProductDerivation
        Provides the instance with the opportunity to mutate conf before the user configuration is applied.
        Specified by:
        beforeConfigurationLoad in interface ProductDerivation
        Returns:
        true if given Configuration has been mutated.