Skip navigation links
com.flexive.shared.scripting.groovy

Class GroovyScriptExporter

    • Method Detail

      • run

        public GroovyScriptExporter run(boolean reset)
        main method to perform script code generation (use setters to override def. options)
        Parameters:
        reset - set to true in order to regenerate any code
        Returns:
        the GroovyScriptExporter itself for chained calls
      • run

        public GroovyScriptExporter run(boolean generateImportStatements,
                                        boolean generateDeleteCode,
                                        boolean generateScriptAssignments,
                                        boolean scriptOverride,
                                        boolean defaultsOnly,
                                        boolean addSystemTypes,
                                        boolean withoutDependencies,
                                        boolean addWorkflow,
                                        boolean reset)
        main method to perform script code generation
        Parameters:
        generateImportStatements - set to true to add package imports
        generateDeleteCode - set to true to add structure / instance deletion code
        generateScriptAssignments - set to true to add script events for types / assignments
        scriptOverride - set to true to add script override code (overwrite event script if it exists)
        defaultsOnly - set to true if the script export should disregard any existing options and use the defaults only
        addSystemTypes - set to true if the script export should include the [fleXive] system types
        withoutDependencies - set to true if dependencies should be ignored (affects assignments from derived types on flat exports)
        addWorkflow - set to true if the script export should include names of workflows
        reset - set to true in order to regenerate any code
        Returns:
        the GroovyScriptExporter itself for chained calls
      • getDeleteCode

        public java.lang.String getDeleteCode()
      • setDeleteCode

        public void setDeleteCode(java.lang.String deleteCode)
      • isGenerateImportStatements

        public boolean isGenerateImportStatements()
      • setGenerateImportStatements

        public void setGenerateImportStatements(boolean generateImportStatements)
      • getImportStatements

        public java.lang.String getImportStatements()
      • setImportStatements

        public void setImportStatements(java.lang.String importStatements)
      • isDefaultsOnly

        public boolean isDefaultsOnly()
      • setDefaultsOnly

        public void setDefaultsOnly(boolean defaultsOnly)
      • isGenerateDeleteCode

        public boolean isGenerateDeleteCode()
      • setGenerateDeleteCode

        public void setGenerateDeleteCode(boolean generateDeleteCode)
      • isGenerateScriptAssignments

        public boolean isGenerateScriptAssignments()
      • setGenerateScriptAssignments

        public void setGenerateScriptAssignments(boolean generateScriptAssignments)
      • isAddSystemTypes

        public boolean isAddSystemTypes()
      • setAddSystemTypes

        public void setAddSystemTypes(boolean addSystemTypes)
      • isScriptOverride

        public boolean isScriptOverride()
      • setScriptOverride

        public void setScriptOverride(boolean scriptOverride)
      • isAddWorkflow

        public boolean isAddWorkflow()
      • setAddWorkflow

        public void setAddWorkflow(boolean addWorkflow)
      • setCustomDeleteCode

        public void setCustomDeleteCode(java.lang.String customCode,
                                        boolean prepend)
        Add custom code to the generated structure / instance deletion code
        Parameters:
        customCode - custom code as a String
        prepend - set to true if it should be prepended to the existing delete code, false = append
      • getScriptCode

        public java.lang.String getScriptCode()
      • setScriptCode

        public void setScriptCode(java.lang.String scriptCode)
      • getScriptAssignments

        public java.lang.String getScriptAssignments()
      • setScriptAssignments

        public void setScriptAssignments(java.lang.String scriptAssignments)
      • setScriptCode

        public void setScriptCode(java.lang.String customCode,
                                  boolean prepend)
        Add custom code to the generated structure creation code
        Parameters:
        customCode - custom code as a String
        prepend - set to true if it should be prepended to the existing delete code, false = append