Class ImportConfigurationKeyTask

  • All Implemented Interfaces:
    SubTask

    public class ImportConfigurationKeyTask
    extends AbstractBaseTask

    A Rhino management sub task for importing configuration items.

    Ant Parameters
    Attribute Description Required

    filename

    Source file containing configuration to be imported.

    Yes.

    type

    The configuration type to import.

    Yes.

    innamespace

    Flag indicating if the configuration should be imported into the global environment (false) or the current namespace (true).

    No. If not specified then the task will attempt to determine the appropriate target for import based on the configuration type and the content being imported.

    replace

    Flag indicating if the update of existing configuration keys is allowed during the import. Must be true if the configuration being imported is expected to replace any existing configuration. If this flag is false and the configuration being imported contains configuration keys that are already present in Rhino, the import will fail with an exception.

    No. Defaults to true.

    failonerror

    Flag to control failure behaviour. If true, the sub task will throw a BuildException when an error is encountered. If false, the sub task will throw a NonFatalBuildException instead of a BuildException under specific circumstances. See below for conditions (if any) which will cause a NonFatalBuildException.

    No. Default value is taken from the Rhino management parent task.

    NonFatalBuildException throw conditions
    • This task will never throw a NonFatalBuildException. It will always fail (throw a BuildException) on errors.

    • Constructor Detail

      • ImportConfigurationKeyTask

        public ImportConfigurationKeyTask()
    • Method Detail

      • execute

        protected void execute()
                        throws org.apache.tools.ant.BuildException
        Specified by:
        execute in class AbstractBaseTask
        Throws:
        org.apache.tools.ant.BuildException
      • validateParameters

        protected void validateParameters()
                                   throws org.apache.tools.ant.BuildException
        Specified by:
        validateParameters in class AbstractBaseTask
        Throws:
        org.apache.tools.ant.BuildException
      • setReplace

        public void setReplace​(boolean replace)
      • setInNamespace

        public void setInNamespace​(boolean inNamespace)
      • setFilename

        public void setFilename​(File file)
      • setType

        public void setType​(String type)