Class AccountTree


  • public class AccountTree
    extends Object
    Author:
    Fernando Iriazabal This one is the class in charge of the report of accounting
    • Constructor Detail

      • AccountTree

        public AccountTree​(VariablesSecureApp _vars,
                           ConnectionProvider _conn,
                           AccountTreeData[] _accountsTree,
                           AccountTreeData[] _accountsFacts,
                           String _reportNode)
                    throws javax.servlet.ServletException
        Constructor
        Parameters:
        _vars - VariablesSecureApp object with the session methods.
        _conn - ConnectionProvider object with the connection methods.
        _accountsTree - Array of element values. (structure)
        _accountsFacts - Array of accounting facts. (data)
        _reportNode - String with the value of the parent element to evaluate.
        Throws:
        javax.servlet.ServletException
      • AccountTree

        public AccountTree​(VariablesSecureApp _vars,
                           ConnectionProvider _conn,
                           AccountTreeData[] _accountsTree,
                           AccountTreeData[] _accountsFacts,
                           String[] _reportNodes)
                    throws javax.servlet.ServletException
        Constructor
        Parameters:
        _vars - VariablesSecureApp object with the session methods.
        _conn - ConnectionProvider object with the connection methods.
        _accountsTree - Array of account's elements (elementValues).
        _accountsFacts - Array of all the fact accts.
        _reportNodes - Array with the value of the parent elements to evaluate (For example, first expenses then revenues) Objective tree.
        Throws:
        javax.servlet.ServletException
    • Method Detail

      • getAccounts

        public AccountTreeData[] getAccounts()
        Method to get the processed accounts.
        Returns:
        Array with the resultant accounts.
      • filterStructure

        public AccountTreeData[] filterStructure​(String[] indice,
                                                 boolean notEmptyLines,
                                                 String strLevel,
                                                 boolean isLevel)
        Method to filter the complete tree to show only the desired levels.
        Parameters:
        indice - Array of start indexes.
        notEmptyLines - Boolean to indicate if the empty lines must been removed.
        strLevel - String with the level.
        isLevel - Boolean not used.
        Returns:
        New Array with the filtered tree.
      • filter

        public void filter​(boolean notEmptyLines,
                           String strLevel,
                           boolean isLevel)
        Not used
        Parameters:
        notEmptyLines -
        strLevel -
        isLevel -
      • filterSVC

        public void filterSVC()
        Resets amounts of subaccounts which parents have been reset because of show value condition