cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dzmitry Kazimirchyk (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAY-1615) Implement DataObject validation as DataChannelFilter
Date Thu, 08 Sep 2011 14:49:09 GMT

     [ https://issues.apache.org/jira/browse/CAY-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dzmitry Kazimirchyk updated CAY-1615:
-------------------------------------

    Attachment: ValidationFilter.patch

Here is the first patch, that moves validation to DataDomain filter.
I've done following:
* removed validation from DataContext and left only check for noop there.
* removed check for noop in ObjectStoreGraphDiff#validateAndCheckNoop method. Suppose we can
rename to just "validate" now.
* created ValidationFilter class which calls ObjectStoreGraphDiff#validate() in its onSync
method
* added ValidationFilter instance to list binding with DataDomainProvider.FILTER_LIST key.



Also we have DataChannelFilterChain only in DataDomain, i.e. if committing changes to context
whose parent is another context (not domain), then no validation will occur. So, we need to
implement something like DataDomain's filter chain in DataContext (and maybe CayenneContext?).

> Implement DataObject validation as DataChannelFilter
> ----------------------------------------------------
>
>                 Key: CAY-1615
>                 URL: https://issues.apache.org/jira/browse/CAY-1615
>             Project: Cayenne
>          Issue Type: Task
>          Components: Core Library
>    Affects Versions: 3.1M2
>            Reporter: Dzmitry Kazimirchyk
>            Assignee: Dzmitry Kazimirchyk
>         Attachments: ValidationFilter.patch
>
>
> Another task that takes an existing Cayenne feature and brings it to DI, making it easier
to manage. Cayenne DataContext validates objects on commit by calling predefined callback
methods:
> http://cayenne.apache.org/doc30/dataobject-validation.html
> We need to take the existing validation code and implement it as org.apache.cayenne.DataChannelFilter.
Filter approach should hopefully be more flexible than current placement of this logic in
DataContext. This will require some design effort - figuring out how to move this piece into
a filter, while preserving the commit sequence; installing default filters on Cayenne stack
startup (right now we don't have any built-in filters), etc.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message