Andrea the ProcessFilter idea is a good one; can we make use of the existing 
Hints technique?

Example:

interface ProcessFilter {
    boolean filter(ProcessFactory factory, Name name);
}


// global default?
Hints hints = new Hints(Processors.PROCESS_FILTER, new CustomProcessFilter() );
GeoTools.addDefaultHints( hints );
Process process = Processors.createProcess( name ); // makes use of global 
default hints

Inside Processors we can check the hints for a ProcessFilter and put on a 
wrapper
that works on a name by name basis to restrict access.

Option: Allow Processors to be used as lookup (with a specific set of hints)

// From the rendering engine you would need a different process filter
Hints hints = new Hints(Processors.PROCESS_FILTER, new RenderingProcessFilter() 
);
Processors lookup = new Processors( hints );

Process process = lookup.process( name ); // makes use of rendering process 
filter

Option: Extend the static final methods to accept optional hints

// From the rendering engine you would need a different process filter
Hints hints = new Hints(Processors.PROCESS_FILTER, new RenderingProcessFilter() 
);
Process process = Processors.createProcess( name, hints ); // makes use of 
rendering process filter




Thoughts, 
-- 
Jody Garnett


On Thursday, 10 November 2011 at 12:32 AM, Andrea Aime wrote:

> In particular I would like to disallow heavy processes to be used
> as rendering transformations or filter functions, at least give
> the administrator some control on what gets used where.
> 
> A solution could be to have a pluggable process filter that can filter
> and wrap the factories:
> 
> interface ProcessFilter {
> ProcessFactory filter(ProcessFactory factory);
> }
> 
> If it returns null the factory is banned, otherwise it is free to wrap
> the factory so that certain processes in the factory are disallowed,
> or maybe wrapped so that they throw exception under particular
> conditions, such as too large inputs.
> 
> Opinions?
> 
> Cheers
> Andrea
> 
> 
> -- 
> -------------------------------------------------------
> Ing. Andrea Aime
> GeoSolutions S.A.S.
> Tech lead
> 
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
> 
> phone: +39 0584 962313
> fax:      +39 0584 962313
> 
> http://www.geo-solutions.it
> http://geo-solutions.blogspot.com/
> http://www.youtube.com/user/GeoSolutionsIT
> http://www.linkedin.com/in/andreaaime
> http://twitter.com/geowolf
> 
> -------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Geotools-devel mailing list
> [email protected] 
> (mailto:[email protected])
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
> 
> 


------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to