- java.lang.Object
-
- util.paramhandler.ParamLibrary
-
public class ParamLibrary extends java.lang.Object
The default ParamLibrary. If you want to add new parameters or functions for your plugin, extend this class and override the public methods. For an example see the code in the CapturePlugin- Author:
- bodum
-
-
Constructor Summary
Constructors Constructor Description ParamLibrary()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescriptionForFunctions(java.lang.String function)
Get the description for a specific Functionjava.lang.String
getDescriptionForKey(java.lang.String key)
Get the description for one Keyjava.lang.String
getErrorString()
Returns the Error, empty if none occurredjava.lang.String[]
getPossibleFunctions()
Get the List of possible Functionsjava.lang.String[]
getPossibleKeys()
Get the possible Keysjava.lang.String
getStringForFunction(Program prg, java.lang.String function, java.lang.String[] params)
Returns the Value of a functionjava.lang.String
getStringForKey(Program program, java.lang.String key)
Get the String for a keyboolean
hasErrors()
Has an Error occurred ?void
setErrors(boolean errors)
Set the Error-Booleanvoid
setErrorString(java.lang.String error)
Set the Error
-
-
-
Method Detail
-
hasErrors
public boolean hasErrors()
Has an Error occurred ?- Returns:
- true if an error occurred
-
setErrors
public void setErrors(boolean errors)
Set the Error-Boolean- Parameters:
errors
- True, if an error occurred
-
getErrorString
public java.lang.String getErrorString()
Returns the Error, empty if none occurred- Returns:
- error message
-
setErrorString
public void setErrorString(java.lang.String error)
Set the Error- Parameters:
error
- the Error
-
getPossibleKeys
public java.lang.String[] getPossibleKeys()
Get the possible Keys- Returns:
- Array with possible Keys
-
getDescriptionForKey
public java.lang.String getDescriptionForKey(java.lang.String key)
Get the description for one Key- Parameters:
key
- The key- Returns:
- description for one key
-
getPossibleFunctions
public java.lang.String[] getPossibleFunctions()
Get the List of possible Functions- Returns:
- List of possible Functions
-
getDescriptionForFunctions
public java.lang.String getDescriptionForFunctions(java.lang.String function)
Get the description for a specific Function- Parameters:
function
- parameter function- Returns:
- localized description string
-
getStringForKey
public java.lang.String getStringForKey(Program program, java.lang.String key)
Get the String for a key- Parameters:
program
- Program to usekey
- Key to use- Returns:
- Value of key in program
-
getStringForFunction
public java.lang.String getStringForFunction(Program prg, java.lang.String function, java.lang.String[] params)
Returns the Value of a function- Parameters:
prg
- Program to usefunction
- Function to useparams
- Params for the Function- Returns:
- Return-Value of Function
-
-