Class Props

  • All Implemented Interfaces:
    Cloneable

    public class Props
    extends Object
    implements Cloneable
    We use Props to store all kinds of user interactive information such as the selected colors, fonts, positions of windows, etc.
    Since:
    15-12-2003
    Author:
    Matt
    • Constructor Detail

      • Props

        protected Props()
      • Props

        protected Props​(int t)
      • Props

        protected Props​(String filename)
    • Method Detail

      • init

        public static final void init​(int t)
        Initialize the properties: load from disk.
        Parameters:
        display - The Display
        t - The type of properties file.
      • init

        public static final void init​(String filename)
        Initialize the properties: load from disk.
        Parameters:
        display - The Display
        filename - the filename to use
      • isInitialized

        public static boolean isInitialized()
        Check to see whether the Kettle properties where loaded.
        Returns:
        true if the Kettle properties where loaded.
      • getInstance

        public static Props getInstance()
      • init

        protected void init()
      • createLogChannel

        protected void createLogChannel()
      • getFilename

        public String getFilename()
      • getLicenseFilename

        public String getLicenseFilename()
      • fileExists

        public boolean fileExists()
      • setType

        public void setType​(int t)
      • getType

        public int getType()
      • loadProps

        public boolean loadProps()
      • addDefaultEntries

        protected void addDefaultEntries()
      • saveProps

        public void saveProps()
      • setLogLevel

        public void setLogLevel​(String level)
      • getLogLevel

        public String getLogLevel()
      • setLogFilter

        public void setLogFilter​(String filter)
      • getLogFilter

        public String getLogFilter()
      • setUseDBCache

        public void setUseDBCache​(boolean use)
      • useDBCache

        public boolean useDBCache()
      • setLastRepository

        public void setLastRepository​(String repname)
      • getLastRepository

        public String getLastRepository()
      • setLastRepositoryLogin

        public void setLastRepositoryLogin​(String login)
      • getLastRepositoryLogin

        public String getLastRepositoryLogin()
      • setOnlyActiveSteps

        public void setOnlyActiveSteps​(boolean only)
      • getOnlyActiveSteps

        public boolean getOnlyActiveSteps()
      • askAboutReplacingDatabaseConnections

        public boolean askAboutReplacingDatabaseConnections()
      • setProperty

        public void setProperty​(String propertyName,
                                String value)
      • getProperty

        public String getProperty​(String propertyName)
      • setAskAboutReplacingDatabaseConnections

        public void setAskAboutReplacingDatabaseConnections​(boolean ask)
      • getCustomParameter

        public String getCustomParameter​(String parameterName,
                                         String defaultValue)
        Parameters:
        parameterName - The parameter name
        defaultValue - The default value in case the parameter doesn't exist yet.
        Returns:
        The custom parameter
      • setCustomParameter

        public void setCustomParameter​(String parameterName,
                                       String value)
        Set the custom parameter
        Parameters:
        parameterName - The name of the parameter
        value - The value to be stored in the properties file.
      • clearCustomParameters

        public void clearCustomParameters()
      • getArgumentNumber

        public static final int getArgumentNumber​(ValueMetaInterface value)
        Convert "argument 1" to 1
        Parameters:
        value - The value to determine the argument number for
        Returns:
        The argument number
      • setLastArguments

        public void setLastArguments​(String[] args)
        Set the last arguments so that we can recall it the next time...
        Parameters:
        args - the arguments to save
      • getLastArguments

        public String[] getLastArguments()
        Get the last entered arguments...
        Returns:
        the last entered arguments...
      • getPluginHistory

        public List<ObjectUsageCount> getPluginHistory()
        Get the list of recently used step
        Returns:
        a list of strings: the plug-in IDs
      • increasePluginHistory

        public int increasePluginHistory​(String pluginID)
      • addPluginHistory

        public void addPluginHistory​(String pluginID,
                                     int uses)
      • loadPluginHistory

        protected void loadPluginHistory()
        Load the plugin history from the properties file
      • areOnlyUsedConnectionsSavedToXML

        public boolean areOnlyUsedConnectionsSavedToXML()
      • setOnlyUsedConnectionsSavedToXML

        public void setOnlyUsedConnectionsSavedToXML​(boolean onlyUsedConnections)
      • replaceExistingDatabaseConnections

        public boolean replaceExistingDatabaseConnections()
      • setReplaceDatabaseConnections

        public void setReplaceDatabaseConnections​(boolean replace)
      • showNewSubtransPopup

        public boolean showNewSubtransPopup()
      • setShowNewSubtransPopup

        public void setShowNewSubtransPopup​(boolean show)
      • getMaxNrLinesInLog

        public int getMaxNrLinesInLog()
      • setMaxNrLinesInLog

        public void setMaxNrLinesInLog​(int maxNrLinesInLog)
      • getMaxNrLinesInHistory

        public int getMaxNrLinesInHistory()
      • getLinesInHistoryFetchSize

        public int getLinesInHistoryFetchSize()
      • disableInitialExecutionHistory

        public boolean disableInitialExecutionHistory()
      • setMaxNrLinesInHistory

        public void setMaxNrLinesInHistory​(int maxNrLinesInHistory)
      • setLinesInHistoryFetchSize

        public void setLinesInHistoryFetchSize​(int linesInHistoryFetchSize)
      • setDisableInitialExecutionHistory

        public void setDisableInitialExecutionHistory​(boolean disable)
      • getMaxLogLineTimeoutMinutes

        public int getMaxLogLineTimeoutMinutes()
      • setMaxLogLineTimeoutMinutes

        public void setMaxLogLineTimeoutMinutes​(int maxLogLineTimeoutMinutes)
      • reset

        public void reset()