Class ModuleProcessor


  • public class ModuleProcessor
    extends Object
    Loading module. It downloads the procedure Fields module document
    • Constructor Detail

      • ModuleProcessor

        public ModuleProcessor​(Document document,
                               Module module,
                               ScriptVariant scriptVariant,
                               int insertPosition)
        Create LoaderDocumentObject
        Parameters:
        document - - document for which the movements constructor opens,cannot be null
        module - - document object module , cannot be null
        scriptVariant - - platform localization , cannot be null
        insertPosition - - position where the code will be inserted
      • ModuleProcessor

        public ModuleProcessor​(Document document,
                               Module module,
                               ScriptVariant scriptVariant,
                               int insertPosition,
                               String newline)
        Create LoaderDocumentObject
        Parameters:
        document - - document for which the movements constructor opens,cannot be null
        module - - document object module , cannot be null
        scriptVariant - - platform localization , cannot be null
        insertPosition - - position where the code will be inserted
        newline - - line separator, cannot be null
    • Method Detail

      • getRegisterFillingFields

        public List<Fields> getRegisterFillingFields()
        Returns a collection of collections where each collection is register-sensitive
        Returns:
        - associative array register to field list, cannot be null
      • getStartFields

        public List<Fields> getStartFields()
        Generate start fields for movement constuctor
        Returns:
        - start fields , cannot be null
      • getPostingProcedure

        public String getPostingProcedure()
        Returns posting procedure
        Returns:
        posting procedure , may return null
      • getExistingConstructorPartLength

        public int getExistingConstructorPartLength()
        Return constructor part length
        Returns:
        - constructor part length
      • getPositionExistingConstructorCode

        public int getPositionExistingConstructorCode()
        Returns position existing constructor code
        Returns:
        - position existing constructor code
      • insertInProcedure

        public boolean insertInProcedure()
        Check current procedure
        Returns:
        - If code inserting in procedure returns true , else returns false
      • getCodeAboveInsertPosition

        public String getCodeAboveInsertPosition()
        Returns previous code from object module until position
        Returns:
        - previous code, cannot be null
      • getCodeUnderInsertPosition

        public String getCodeUnderInsertPosition()
        Returns next code from object module since position
        Returns:
        - next code, cannot be null
      • generateСode

        public String generateСode​(List<Fields> filledModelFields)
        Returns generated code
        Parameters:
        filledModelFields - - data from register section
        Returns:
        - generated code, cannot be null
      • getProcedureName

        public String getProcedureName()
        Return procedure name
        Returns:
        procedure name,may return null
      • getReplace

        public boolean getReplace()
        Check existing constructor code
        Returns:
        - If insert position in existing constuctor code returns true , else returns false
      • getItemCode

        public String getItemCode​(Field field,
                                  String tabularSectionName,
                                  String registerName)
        Generate code by value
        Parameters:
        field - - field whose code is generated, cannot null
        tabularSectionName - - tabular section name , may null
        registerName - - register that contains the field ,cannot null
        Returns:
        - generated code , cannot null