From: <svn...@os...> - 2009-10-30 11:10:37
|
Author: mbedward Date: 2009-10-30 07:10:24 -0400 (Fri, 30 Oct 2009) New Revision: 34288 Modified: branches/2.6.x/modules/unsupported/process/src/main/java/org/geotools/process/ProcessFactory.java branches/2.6.x/modules/unsupported/process/src/main/java/org/geotools/process/impl/BeanProcessFactory.java branches/2.6.x/modules/unsupported/process/src/main/java/org/geotools/process/impl/SingleProcessFactory.java Log: GEOT-2485 ProcessFactory extends OptionalFactory Modified: branches/2.6.x/modules/unsupported/process/src/main/java/org/geotools/process/ProcessFactory.java =================================================================== --- branches/2.6.x/modules/unsupported/process/src/main/java/org/geotools/process/ProcessFactory.java 2009-10-30 11:08:43 UTC (rev 34287) +++ branches/2.6.x/modules/unsupported/process/src/main/java/org/geotools/process/ProcessFactory.java 2009-10-30 11:10:24 UTC (rev 34288) @@ -20,6 +20,7 @@ import java.util.Set; import org.geotools.data.Parameter; +import org.geotools.factory.OptionalFactory; import org.opengis.feature.type.Name; import org.opengis.util.InternationalString; @@ -31,7 +32,7 @@ * * @source $URL$ */ -public interface ProcessFactory { +public interface ProcessFactory extends OptionalFactory { public static final String GT_NAMESPACE = "gt"; /** Modified: branches/2.6.x/modules/unsupported/process/src/main/java/org/geotools/process/impl/BeanProcessFactory.java =================================================================== --- branches/2.6.x/modules/unsupported/process/src/main/java/org/geotools/process/impl/BeanProcessFactory.java 2009-10-30 11:08:43 UTC (rev 34287) +++ branches/2.6.x/modules/unsupported/process/src/main/java/org/geotools/process/impl/BeanProcessFactory.java 2009-10-30 11:10:24 UTC (rev 34288) @@ -16,11 +16,13 @@ */ package org.geotools.process.impl; +import java.awt.RenderingHints.Key; import java.beans.BeanInfo; import java.beans.IntrospectionException; import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.lang.reflect.Method; +import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -147,7 +149,21 @@ } } } + + /** + * Default Implementation return true + */ + public boolean isAvailable() { + return true; + } + /** + * The default implementation returns an empty map. + */ + public Map<Key, ?> getImplementationHints() { + return Collections.emptyMap(); + } + /** * Please return us an instanceof the bean you expect for input. * <p> Modified: branches/2.6.x/modules/unsupported/process/src/main/java/org/geotools/process/impl/SingleProcessFactory.java =================================================================== --- branches/2.6.x/modules/unsupported/process/src/main/java/org/geotools/process/impl/SingleProcessFactory.java 2009-10-30 11:08:43 UTC (rev 34287) +++ branches/2.6.x/modules/unsupported/process/src/main/java/org/geotools/process/impl/SingleProcessFactory.java 2009-10-30 11:10:24 UTC (rev 34288) @@ -16,6 +16,7 @@ */ package org.geotools.process.impl; +import java.awt.RenderingHints.Key; import java.util.Collections; import java.util.Map; import java.util.Set; @@ -117,7 +118,21 @@ checkName(name); return supportsProgress(); } + + /** + * Default Implementation return true + */ + public boolean isAvailable() { + return true; + } + /** + * The default implementation returns an empty map. + */ + public Map<Key, ?> getImplementationHints() { + return Collections.emptyMap(); + } + protected abstract Process create(); protected abstract InternationalString getDescription(); |