Package org.pentaho.di.core
Class Props
- java.lang.Object
-
- org.pentaho.di.core.Props
-
-
Field Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addDefaultEntries()
void
addPluginHistory(String pluginID, int uses)
boolean
areOnlyUsedConnectionsSavedToXML()
boolean
askAboutReplacingDatabaseConnections()
void
clearCustomParameters()
static String[]
convertArguments(RowMetaAndData row)
protected void
createLogChannel()
boolean
disableInitialExecutionHistory()
boolean
fileExists()
static int
getArgumentNumber(ValueMetaInterface value)
Convert "argument 1" to 1String
getCustomParameter(String parameterName, String defaultValue)
String
getFilename()
static Props
getInstance()
String[]
getLastArguments()
Get the last entered arguments...String
getLastRepository()
String
getLastRepositoryLogin()
String
getLicenseFilename()
int
getLinesInHistoryFetchSize()
String
getLogFilter()
String
getLogLevel()
int
getMaxLogLineTimeoutMinutes()
int
getMaxNrLinesInHistory()
int
getMaxNrLinesInLog()
boolean
getOnlyActiveSteps()
List<ObjectUsageCount>
getPluginHistory()
Get the list of recently used stepString
getProperty(String propertyName)
int
getType()
int
increasePluginHistory(String pluginID)
protected void
init()
static void
init(int t)
Initialize the properties: load from disk.static void
init(String filename)
Initialize the properties: load from disk.static boolean
isInitialized()
Check to see whether the Kettle properties where loaded.protected void
loadPluginHistory()
Load the plugin history from the properties fileboolean
loadProps()
boolean
replaceExistingDatabaseConnections()
void
reset()
void
saveProps()
void
setAskAboutReplacingDatabaseConnections(boolean ask)
void
setCustomParameter(String parameterName, String value)
Set the custom parametervoid
setDisableInitialExecutionHistory(boolean disable)
void
setLastArguments(String[] args)
Set the last arguments so that we can recall it the next time...void
setLastRepository(String repname)
void
setLastRepositoryLogin(String login)
void
setLinesInHistoryFetchSize(int linesInHistoryFetchSize)
void
setLogFilter(String filter)
void
setLogLevel(String level)
void
setMaxLogLineTimeoutMinutes(int maxLogLineTimeoutMinutes)
void
setMaxNrLinesInHistory(int maxNrLinesInHistory)
void
setMaxNrLinesInLog(int maxNrLinesInLog)
void
setOnlyActiveSteps(boolean only)
void
setOnlyUsedConnectionsSavedToXML(boolean onlyUsedConnections)
void
setProperty(String propertyName, String value)
void
setReplaceDatabaseConnections(boolean replace)
void
setShowNewSubtransPopup(boolean show)
void
setType(int t)
void
setUseDBCache(boolean use)
boolean
showNewSubtransPopup()
String
toString()
boolean
useDBCache()
-
-
-
Field Detail
-
props
protected static Props props
-
STRING_FONT_FIXED_NAME
public static final String STRING_FONT_FIXED_NAME
- See Also:
- Constant Field Values
-
STRING_FONT_FIXED_SIZE
public static final String STRING_FONT_FIXED_SIZE
- See Also:
- Constant Field Values
-
STRING_FONT_FIXED_STYLE
public static final String STRING_FONT_FIXED_STYLE
- See Also:
- Constant Field Values
-
STRING_FONT_DEFAULT_NAME
public static final String STRING_FONT_DEFAULT_NAME
- See Also:
- Constant Field Values
-
STRING_FONT_DEFAULT_SIZE
public static final String STRING_FONT_DEFAULT_SIZE
- See Also:
- Constant Field Values
-
STRING_FONT_DEFAULT_STYLE
public static final String STRING_FONT_DEFAULT_STYLE
- See Also:
- Constant Field Values
-
STRING_FONT_GRAPH_NAME
public static final String STRING_FONT_GRAPH_NAME
- See Also:
- Constant Field Values
-
STRING_FONT_GRAPH_SIZE
public static final String STRING_FONT_GRAPH_SIZE
- See Also:
- Constant Field Values
-
STRING_FONT_GRAPH_STYLE
public static final String STRING_FONT_GRAPH_STYLE
- See Also:
- Constant Field Values
-
STRING_FONT_GRID_NAME
public static final String STRING_FONT_GRID_NAME
- See Also:
- Constant Field Values
-
STRING_FONT_GRID_SIZE
public static final String STRING_FONT_GRID_SIZE
- See Also:
- Constant Field Values
-
STRING_FONT_GRID_STYLE
public static final String STRING_FONT_GRID_STYLE
- See Also:
- Constant Field Values
-
STRING_FONT_NOTE_NAME
public static final String STRING_FONT_NOTE_NAME
- See Also:
- Constant Field Values
-
STRING_FONT_NOTE_SIZE
public static final String STRING_FONT_NOTE_SIZE
- See Also:
- Constant Field Values
-
STRING_FONT_NOTE_STYLE
public static final String STRING_FONT_NOTE_STYLE
- See Also:
- Constant Field Values
-
STRING_BACKGROUND_COLOR_R
public static final String STRING_BACKGROUND_COLOR_R
- See Also:
- Constant Field Values
-
STRING_BACKGROUND_COLOR_G
public static final String STRING_BACKGROUND_COLOR_G
- See Also:
- Constant Field Values
-
STRING_BACKGROUND_COLOR_B
public static final String STRING_BACKGROUND_COLOR_B
- See Also:
- Constant Field Values
-
STRING_GRAPH_COLOR_R
public static final String STRING_GRAPH_COLOR_R
- See Also:
- Constant Field Values
-
STRING_GRAPH_COLOR_G
public static final String STRING_GRAPH_COLOR_G
- See Also:
- Constant Field Values
-
STRING_GRAPH_COLOR_B
public static final String STRING_GRAPH_COLOR_B
- See Also:
- Constant Field Values
-
STRING_TAB_COLOR_R
public static final String STRING_TAB_COLOR_R
- See Also:
- Constant Field Values
-
STRING_TAB_COLOR_G
public static final String STRING_TAB_COLOR_G
- See Also:
- Constant Field Values
-
STRING_TAB_COLOR_B
public static final String STRING_TAB_COLOR_B
- See Also:
- Constant Field Values
-
STRING_SVG_ENABLED
public static final String STRING_SVG_ENABLED
- See Also:
- Constant Field Values
-
STRING_ICON_SIZE
public static final String STRING_ICON_SIZE
- See Also:
- Constant Field Values
-
STRING_LINE_WIDTH
public static final String STRING_LINE_WIDTH
- See Also:
- Constant Field Values
-
STRING_SHADOW_SIZE
public static final String STRING_SHADOW_SIZE
- See Also:
- Constant Field Values
-
STRING_LOG_LEVEL
public static final String STRING_LOG_LEVEL
- See Also:
- Constant Field Values
-
STRING_LOG_FILTER
public static final String STRING_LOG_FILTER
- See Also:
- Constant Field Values
-
STRING_MIDDLE_PCT
public static final String STRING_MIDDLE_PCT
- See Also:
- Constant Field Values
-
STRING_INDICATE_SLOW_TRANS_STEPS
public static final String STRING_INDICATE_SLOW_TRANS_STEPS
- See Also:
- Constant Field Values
-
STRING_LAST_PREVIEW_TRANS
public static final String STRING_LAST_PREVIEW_TRANS
- See Also:
- Constant Field Values
-
STRING_LAST_PREVIEW_STEP
public static final String STRING_LAST_PREVIEW_STEP
- See Also:
- Constant Field Values
-
STRING_LAST_PREVIEW_SIZE
public static final String STRING_LAST_PREVIEW_SIZE
- See Also:
- Constant Field Values
-
STRING_MAX_UNDO
public static final String STRING_MAX_UNDO
- See Also:
- Constant Field Values
-
STRING_SIZE_MAX
public static final String STRING_SIZE_MAX
- See Also:
- Constant Field Values
-
STRING_SIZE_X
public static final String STRING_SIZE_X
- See Also:
- Constant Field Values
-
STRING_SIZE_Y
public static final String STRING_SIZE_Y
- See Also:
- Constant Field Values
-
STRING_SIZE_W
public static final String STRING_SIZE_W
- See Also:
- Constant Field Values
-
STRING_SIZE_H
public static final String STRING_SIZE_H
- See Also:
- Constant Field Values
-
STRING_SASH_W1
public static final String STRING_SASH_W1
- See Also:
- Constant Field Values
-
STRING_SASH_W2
public static final String STRING_SASH_W2
- See Also:
- Constant Field Values
-
STRING_AUTO_SAVE
public static final String STRING_AUTO_SAVE
- See Also:
- Constant Field Values
-
STRING_SAVE_CONF
public static final String STRING_SAVE_CONF
- See Also:
- Constant Field Values
-
STRING_AUTO_SPLIT
public static final String STRING_AUTO_SPLIT
- See Also:
- Constant Field Values
-
STRING_AUTO_COLLAPSE_CORE_TREE
public static final String STRING_AUTO_COLLAPSE_CORE_TREE
- See Also:
- Constant Field Values
-
STRING_USE_DB_CACHE
public static final String STRING_USE_DB_CACHE
- See Also:
- Constant Field Values
-
STRING_OPEN_LAST_FILE
public static final String STRING_OPEN_LAST_FILE
- See Also:
- Constant Field Values
-
STRING_LAST_REPOSITORY_LOGIN
public static final String STRING_LAST_REPOSITORY_LOGIN
- See Also:
- Constant Field Values
-
STRING_LAST_REPOSITORY
public static final String STRING_LAST_REPOSITORY
- See Also:
- Constant Field Values
-
STRING_ONLY_ACTIVE_STEPS
public static final String STRING_ONLY_ACTIVE_STEPS
- See Also:
- Constant Field Values
-
STRING_START_SHOW_REPOSITORIES
public static final String STRING_START_SHOW_REPOSITORIES
- See Also:
- Constant Field Values
-
STRING_ANTI_ALIASING
public static final String STRING_ANTI_ALIASING
- See Also:
- Constant Field Values
-
STRING_SHOW_CANVAS_GRID
public static final String STRING_SHOW_CANVAS_GRID
- See Also:
- Constant Field Values
-
STRING_SHOW_EXIT_WARNING
public static final String STRING_SHOW_EXIT_WARNING
- See Also:
- Constant Field Values
-
STRING_SHOW_OS_LOOK
public static final String STRING_SHOW_OS_LOOK
- See Also:
- Constant Field Values
-
STRING_LAST_ARGUMENT
public static final String STRING_LAST_ARGUMENT
- See Also:
- Constant Field Values
-
STRING_ARGUMENT_NAME_PREFIX
public static final String STRING_ARGUMENT_NAME_PREFIX
- See Also:
- Constant Field Values
-
STRING_CUSTOM_PARAMETER
public static final String STRING_CUSTOM_PARAMETER
- See Also:
- Constant Field Values
-
STRING_PLUGIN_HISTORY
public static final String STRING_PLUGIN_HISTORY
- See Also:
- Constant Field Values
-
STRING_DEFAULT_PREVIEW_SIZE
public static final String STRING_DEFAULT_PREVIEW_SIZE
- See Also:
- Constant Field Values
-
STRING_ONLY_USED_DB_TO_XML
public static final String STRING_ONLY_USED_DB_TO_XML
- See Also:
- Constant Field Values
-
STRING_ASK_ABOUT_REPLACING_DATABASES
public static final String STRING_ASK_ABOUT_REPLACING_DATABASES
- See Also:
- Constant Field Values
-
STRING_REPLACE_DATABASES
public static final String STRING_REPLACE_DATABASES
- See Also:
- Constant Field Values
-
STRING_DISABLE_INITIAL_EXECUTION_HISTORY
public static final String STRING_DISABLE_INITIAL_EXECUTION_HISTORY
- See Also:
- Constant Field Values
-
STRING_RECENT_SEARCHES
public static final String STRING_RECENT_SEARCHES
- See Also:
- Constant Field Values
-
STRING_SHOW_NEW_SUBTRANS_POPUP
public static final String STRING_SHOW_NEW_SUBTRANS_POPUP
- See Also:
- Constant Field Values
-
log
protected LogChannelInterface log
-
properties
protected Properties properties
-
pluginHistory
protected ArrayList<ObjectUsageCount> pluginHistory
-
type
protected int type
-
filename
protected String filename
-
TYPE_PROPERTIES_EMPTY
public static final int TYPE_PROPERTIES_EMPTY
- See Also:
- Constant Field Values
-
TYPE_PROPERTIES_SPOON
public static final int TYPE_PROPERTIES_SPOON
- See Also:
- Constant Field Values
-
TYPE_PROPERTIES_PAN
public static final int TYPE_PROPERTIES_PAN
- See Also:
- Constant Field Values
-
TYPE_PROPERTIES_CHEF
public static final int TYPE_PROPERTIES_CHEF
- See Also:
- Constant Field Values
-
TYPE_PROPERTIES_KITCHEN
public static final int TYPE_PROPERTIES_KITCHEN
- See Also:
- Constant Field Values
-
TYPE_PROPERTIES_MENU
public static final int TYPE_PROPERTIES_MENU
- See Also:
- Constant Field Values
-
TYPE_PROPERTIES_PLATE
public static final int TYPE_PROPERTIES_PLATE
- See Also:
- Constant Field Values
-
WIDGET_STYLE_DEFAULT
public static final int WIDGET_STYLE_DEFAULT
- See Also:
- Constant Field Values
-
WIDGET_STYLE_FIXED
public static final int WIDGET_STYLE_FIXED
- See Also:
- Constant Field Values
-
WIDGET_STYLE_TABLE
public static final int WIDGET_STYLE_TABLE
- See Also:
- Constant Field Values
-
WIDGET_STYLE_NOTEPAD
public static final int WIDGET_STYLE_NOTEPAD
- See Also:
- Constant Field Values
-
WIDGET_STYLE_GRAPH
public static final int WIDGET_STYLE_GRAPH
- See Also:
- Constant Field Values
-
WIDGET_STYLE_TAB
public static final int WIDGET_STYLE_TAB
- See Also:
- Constant Field Values
-
WIDGET_STYLE_TOOLBAR
public static final int WIDGET_STYLE_TOOLBAR
- See Also:
- Constant Field Values
-
-
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 Displayt
- The type of properties file.
-
init
public static final void init(String filename)
Initialize the properties: load from disk.- Parameters:
display
- The Displayfilename
- 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()
-
setAskAboutReplacingDatabaseConnections
public void setAskAboutReplacingDatabaseConnections(boolean ask)
-
getCustomParameter
public String getCustomParameter(String parameterName, String defaultValue)
- Parameters:
parameterName
- The parameter namedefaultValue
- 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 parametervalue
- 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
-
convertArguments
public static final String[] convertArguments(RowMetaAndData row)
-
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()
-
-