2009-05-11  Hans-Peter Locher <hans-peter.locher@inquant.de>

    * utilities.py (make_request): 
		prepare for oprt out functionality
    * utilities.py (make_request): 
		added error messages diplayed to the user when 
		an error occurs
    * content/formsilverpopadapter.py (FormSilverpopAdapter.onSuccess): 
		return result of make_request call, so we are able to
		display error messages
    * README.txt: refactor test, showing pretty xml outputs
    * utilities.py(add_recipient): refactor to create pretty xml
    * utilities.py: implemented, doesn't check the response
	  currently
    * utilities.py: remove 
	   COLUMN_MAPPING usage, we don't need it anymore, as we explicitly have
	   EMAIL and OPT_IN.
	* config.py: remove COLUMN_MAPPING
    * utilities.py (submit_to_silverpop): 
		interpret the sivlerpop response
		inform user whether his request was successful or not

2009-05-08  Hans-Peter Locher <hans-peter.locher@inquant.de>

    * README.txt: reorganized test
    * README.txt: started doctest for OPT-IN/OPT-OUT
    * utilities.py (get_mapping): hide OPT_IN 
	  (id=silverpop_opt_in)
	  form user definable mapping
    * tests/test_xmlcreation.py: 
		disabled test, we omit the tested method, and replace it

2009-05-06  Hans-Peter Locher <hans-peter.locher@inquant.de>

    * content/formsilverpopadapter.py: 
		added mapping DataGridField, for configuring the mapping of field_ids 
		to Silverpop API keys, uses accessor, mutator methods to get
		and store the mappings to PFG field's annotations
    * utilities.py (set_mapping): 
		implemented, used as mutator for mapping field, stores mapping
		to annotations of pfg field
    * utilities.py (get_mapping): 
		implemented, used as edit_accessor, accessor for mapping field,
		get's mapping of fields (must start with COLUMN_NAME_PREFIX)
		returns list of dicts ontaining field id, title, silverpop api key.
		gets the sivlerpop api key of the annotations of the PFG fields.
    * utilities.py: 
		fixed bug, trying to del a not existing key in annotations
    * tests/test_mapping.py: 
		added tests for accessor/mutator methods
    * utilities.py (set_storage): 
		refactor accessor / mutator methods, put actual get set from
		field annotations into seperate methods
    * content/formsilverpopadapter.py: 
		pep8ification,
		use SILVERPOP_API_KEY_IDENTIFIER
		from config
    * utilities.py (transform_column_name): 
		refactor, to prepare for mapping considering
    * utilities.py (get_mapping): 
		do not add special fields, defined in the COLUMN_MAPPING
		(currently silverpop_email) in the DataGrid,
		as these values are not user editable
    * README.txt: 
		update doctest to test for new user editable mapping functionality
    * utilities.py (transform_column_name): 
		respect user defined mappings. If a field attribute is provided,
		we get the silverpop_api_key from the field's storage.
		if this is not '' (we have a user defined mapping), we
		apply the value for the column name. Else, (we have no user defined
		mapping) we just cut away the 'silverpop_ prefix'
    * utilities.py (make_request): 
		add a fields attribute (list). For each key in the request,
		check if we have a matching field in fields, if so use transform_column_name
		if we have more or less than one field, just use
		transform_column_name without providing a field.
    * content/formsilverpopadapter.py (FormSilverpopAdapter): 
		add fields to make_request call
    * profiles/default/workflows.xml: 
		remove default workflow for FormSilverpopAdapter,
		we don't want workflow for it



2009-04-08  Stefan Eletzhofer <stefan.eletzhofer@inquant.de>

    * utilities.py: New policy: filter data fields by prefix.  We're only
	using field names which start with COLUMN_NAME_PREFIX ("silverpop_"). This
	saves us from having field names which clash with plone IDs.
	Additionally, we've defined a mapping table for column names which are
	required verbatim as of the SilverPop API -- COLUMN_MAPPING.
    * content/formsilverpopadapter.py (FormSilverpopAdapter.onSuccess): 
	Removed CONFIRMATION logic -- this can be handled better in PFG.

2009-04-08  Hans-Peter Locher <hans-peter.locher@inquant.de>

    * utilities.py (make_request): 
		change content-type header to
			application/x-www-form-urlencoded;charset=UTF-8
		urlencode the xml before making request

2009-04-01  Hans-Peter Locher <hans-peter.locher@inquant.de>

    * content/formsilverpopadapter.py (FormSilverpopAdapter.onSuccess): 
		refactored, to use function make_request from utilities
    * utilities.py: added functions for refactoring:
		construct_xml(listid, data, ignores=[])
		make_request(apiurl, listid, data, ignores=[])
    * utilities.py (submit_to_silverpop): remove error handling attempts, we
		want to get a traceback atm if an error occurs

2009-03-31  Hans-Peter Locher <hans-peter.locher@inquant.de>

    * content/formsilverpopadapter.py (FormSilverpopAdapter.constructXML): 
		added
		construct sivlerpop api xml, get listid from actionadapter, get 
		email from form (Field with id email)
    * content/formsilverpopadapter.py: 
		get all fields from form an construct xml from them (including
		EMAIL) (generated column name = field.id, column value = request's
		value for field)
    * content/formsilverpopadapter.py (FormSilverpopAdapter.onSuccess): 
		if a field with id confirmation (defined in config.py) is in the
		form, check if it's value is True. 
		Only make a request to sivlerpop if this is the case, or there is no
		field with id confirmation
    * profiles/default/propertiestool.xml: 
		added, configure to exclude FormSilverpopAdapter from navigation, search

2009-03-30  Hans-Peter Locher <hans-peter.locher@inquant.de>

    * content/formsilverpopadapter.py (FormSilverpopAdapter): 
		switch to base on FormActionAdapter, FormAdapterSchema
    * content/formsilverpopadapter.py (FormSilverpopAdapter.onSuccess): 
		add basic data extraction from form fields
    * content/formsilverpopadapter.py: 
		make request with static data to silverpop using
		utilities.submit_to_silverpop
    * utilities.py (submit_to_silverpop): added
		submits the request to silverpop and logs the response

2009-03-27  Hans-Peter Locher <hans-peter.locher@inquant.de>

    * started
    * profiles/default/types/FormFolder.xml: 
		added to add FormSilverpopAdapter to
		allowed types of FormFolder
    * content/formsilverpopadapter.py: 
		added FormSilverpopAdapter class (ZopeSkel template)
    * tests/base.py: finally fixed the test setup, so it works with
	  bin/instance test and bin/roadrunner, Yay!
