(self, REQUEST=None, **kwargs)
set transform's parameters
set transform's parameters
set transform s parameters
def set_parameters(self, REQUEST=None, **kwargs):
        """ set transform's parameters """
        if not kwargs:
            kwargs = REQUEST.form
        self.preprocess_param(kwargs)
        for param, value in kwargs.items():
            try:
                self.get_parameter_value(param)
            except KeyError:
                log('Warning: ignored parameter %r' % param)
                continue
            meta = self.get_parameter_infos(param)
            self._config[param] = VALIDATORS[meta[0]](value)

        tr_tool = getToolByName(self, 'portal_transforms')
        # need to remap transform if necessary (i.e. configurable inputs / output)
        if kwargs.has_key('inputs') or kwargs.has_key('output'):
            tr_tool._unmapTransform(self)
            transform = self._load_transform()
            self.inputs = kwargs.get('inputs', transform.inputs)
            self.output = kwargs.get('output', transform.output)
            tr_tool._mapTransform(self)
        # track output encoding
        if kwargs.has_key('output_encoding'):
            self.output_encoding = kwargs['output_encoding']
        if REQUEST is not None:
            REQUEST['RESPONSE'].redirect(tr_tool.absolute_url()+'/manage_main')
def set_parameters ( self , REQUEST = None , * * kwargs ) : if not kwargs : kwargs = REQUEST . form self . preprocess_param ( kwargs ) for param , value in kwargs . items ( ) : try : self . get_parameter_value ( param ) except KeyError : log ( 'Warning: ignored parameter %r' % param ) continue meta = self . get_parameter_infos ( param ) self . _config [ param ] = VALIDATORS [ meta [ 0 ] ] ( value ) tr_tool = getToolByName ( self , 'portal_transforms' ) # need to remap transform if necessary (i.e. configurable inputs / output) if kwargs . has_key ( 'inputs' ) or kwargs . has_key ( 'output' ) : tr_tool . _unmapTransform ( self ) transform = self . _load_transform ( ) self . inputs = kwargs . get ( 'inputs' , transform . inputs ) self . output = kwargs . get ( 'output' , transform . output ) tr_tool . _mapTransform ( self ) # track output encoding if kwargs . has_key ( 'output_encoding' ) : self . output_encoding = kwargs [ 'output_encoding' ] if REQUEST is not None : REQUEST [ 'RESPONSE' ] . redirect ( tr_tool . absolute_url ( ) + '/manage_main' )