Package org.geotools.process.impl
Class SingleProcessFactory
Object
SingleProcessFactory
- All Implemented Interfaces:
ProcessFactory,Factory,OptionalFactory
- Direct Known Subclasses:
AbstractFeatureCollectionProcessFactory
Helper class for a process factory that will return just a single process
- Author:
- Andrea Aime - OpenGeo
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUtility method for factories that will use the process factory name in order to define the process name by stripping the "Factory" at the end of the name.protectedSingleProcessFactory(Name processName) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Processcreate()Create a process for execution.protected abstract InternationalStringgetDescription(Name name) Human readable description of the specified processThe default implementation returns an empty map.getNames()The names (non human readable) that can be used to refer to the processes generated by this factory.getParameterInfo(Name name) Description of the Map parameter to use when executing.getResultInfo(Map<String, Object> parameters) getResultInfo(Name name, Map<String, Object> parameters) Description of the results returnedgetTitle()Name suitable for display to end user.Human readable title suitable for display for the specified processprotected abstract StringgetVersion(Name name) Return the version of the processbooleanDefault Implementation return trueprotected abstract booleanbooleansupportsProgress(Name name) It is up to the process implementors to implement progress on the task, this method is used to see if the process has progress monitoring implemented
-
Constructor Details
-
SingleProcessFactory
protected SingleProcessFactory()Utility method for factories that will use the process factory name in order to define the process name by stripping the "Factory" at the end of the name. -
SingleProcessFactory
- Parameters:
processName-
-
-
Method Details
-
create
Description copied from interface:ProcessFactoryCreate a process for execution.- Specified by:
createin interfaceProcessFactory- Parameters:
name- the process identifier- Returns:
- Process implementation
-
getNames
Description copied from interface:ProcessFactoryThe names (non human readable) that can be used to refer to the processes generated by this factory.This name is used to advertise the availability of a Process in a WPS; while the Title and Description will change depending on the users locale; this name will be consistent. It is up to the implementor to ensure this name is unique
- Specified by:
getNamesin interfaceProcessFactory- Returns:
- a set of names handled by this process factory
-
getDescription
Description copied from interface:ProcessFactoryHuman readable description of the specified process- Specified by:
getDescriptionin interfaceProcessFactory- Parameters:
name- the process whose description is to be returned
-
getParameterInfo
Description copied from interface:ProcessFactoryDescription of the Map parameter to use when executing.- Specified by:
getParameterInfoin interfaceProcessFactory- Parameters:
name- the process identifier- Returns:
- Description of required parameters
-
getResultInfo
public Map<String,Parameter<?>> getResultInfo(Name name, Map<String, Object> parameters) throws IllegalArgumentExceptionDescription copied from interface:ProcessFactoryDescription of the results returned- Specified by:
getResultInfoin interfaceProcessFactory- Parameters:
name- the process identifierparameters- the parameters to be used- Throws:
IllegalArgumentException
-
getTitle
Description copied from interface:ProcessFactoryHuman readable title suitable for display for the specified processPlease note that this title is *not* stable across locale; if you want to remember a ProcessFactory between runs please use getName (which is dependent on the implementor to guarantee uniqueness) or use the classname
- Specified by:
getTitlein interfaceProcessFactory- Parameters:
name- the process identifier
-
getVersion
Description copied from interface:ProcessFactoryReturn the version of the process- Specified by:
getVersionin interfaceProcessFactory- Parameters:
name- the process identifier- Returns:
- String version
-
supportsProgress
Description copied from interface:ProcessFactoryIt is up to the process implementors to implement progress on the task, this method is used to see if the process has progress monitoring implemented- Specified by:
supportsProgressin interfaceProcessFactory- Parameters:
name- the process identifier- Returns:
- true if it supports progress monitoring
-
isAvailable
public boolean isAvailable()Default Implementation return true- Specified by:
isAvailablein interfaceOptionalFactory
-
getImplementationHints
The default implementation returns an empty map.- Specified by:
getImplementationHintsin interfaceFactory- Returns:
- The map of hints, or an {@linkplain java.util.Collections.emptyMap() empty map} if none.
-
create
-
getDescription
-
getParameterInfo
-
getResultInfo
protected abstract Map<String,Parameter<?>> getResultInfo(Map<String, Object> parameters) throws IllegalArgumentException- Throws:
IllegalArgumentException
-
getTitle
Name suitable for display to end user.- Specified by:
getTitlein interfaceProcessFactory- Returns:
- A short name suitable for display in a user interface.
-
getVersion
-
supportsProgress
protected abstract boolean supportsProgress()
-