Package cz.vutbr.fit.layout.impl
Class BaseParametrizedOperation
- java.lang.Object
-
- cz.vutbr.fit.layout.impl.BaseService
-
- cz.vutbr.fit.layout.impl.BaseParametrizedOperation
-
- All Implemented Interfaces:
ParametrizedOperation
,Service
- Direct Known Subclasses:
BaseArtifactService
,BaseOperator
,BaseTagger
public abstract class BaseParametrizedOperation extends BaseService implements ParametrizedOperation
- Author:
- burgetr
-
-
Constructor Summary
Constructors Constructor Description BaseParametrizedOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Parameter>
defineParams()
Creates the parameter definition for this operation.Object
getParam(String name)
Obtains the parameter using the appropriate getter method (if present).List<Parameter>
getParams()
Obtains a list of available parameters.String
getParamString()
Creates a string of parameters and their values.boolean
setParam(String name, Object value)
Sets the parameter using the appropriate setter method (if present).-
Methods inherited from class cz.vutbr.fit.layout.impl.BaseService
getServiceManager, setServiceManager
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cz.vutbr.fit.layout.api.Service
getCategory, getDescription, getId, getName
-
-
-
-
Method Detail
-
getParams
public List<Parameter> getParams()
Description copied from interface:ParametrizedOperation
Obtains a list of available parameters.- Specified by:
getParams
in interfaceParametrizedOperation
- Returns:
- The list of parameters.
-
defineParams
public List<Parameter> defineParams()
Creates the parameter definition for this operation.- Returns:
- The list of parameters.
-
setParam
public boolean setParam(String name, Object value)
Sets the parameter using the appropriate setter method (if present).- Specified by:
setParam
in interfaceParametrizedOperation
- Parameters:
name
- parameter namevalue
- parameter value- Returns:
- true when successfully set, false for unknown parameter or invalid value
-
getParam
public Object getParam(String name)
Obtains the parameter using the appropriate getter method (if present).- Specified by:
getParam
in interfaceParametrizedOperation
- Parameters:
name
- the parameter name- Returns:
- the parameter value or
null
for unknown parameter
-
getParamString
public String getParamString()
Creates a string of parameters and their values.- Specified by:
getParamString
in interfaceParametrizedOperation
- Returns:
- A string of the form: name1=value1 name2=value2 ...
-
-