You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2010/11/14 10:56:14 UTC

[jira] Closed: (CAY-1508) Support for DataChannel filters

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

Andrus Adamchik closed CAY-1508.
--------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 3.1M1)
                   3.1M2

Checked in the basic implementation of the filter chain attached to the DataDomain. May have some changes as I try it with mixins

> Support for DataChannel filters
> -------------------------------
>
>                 Key: CAY-1508
>                 URL: https://issues.apache.org/jira/browse/CAY-1508
>             Project: Cayenne
>          Issue Type: Task
>          Components: Core Library
>    Affects Versions: 3.1M1
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>             Fix For: 3.1M2
>
>
> Support for DataChannel filters with API similar to ServletFilters, only adapted for Cayenne (i.e. it will be mirroring DataChannel onQuery and onSync methods) :
> public interface DataChannelFilter {
>     
>     void init(DataChannel channel);
>     QueryResponse onQuery(
>             ObjectContext originatingContext,
>             Query query,
>             DataChannelFilterChain filterChain);
>     GraphDiff onSync(
>             ObjectContext originatingContext,
>             GraphDiff changes,
>             int syncType,
>             DataChannelFilterChain filterChain);
> }
> One difference with ServletFilter is the absence of  "destroy" method in DataChannelFilter. Destroy is achieved via @BeforeScopeEnd annotation per filter. 
> DataChannelFilters may be good for tying multiple object lifecycle events together in one context, monitoring performance at the ObjectContext-level, and other good things.
> TODO: One possible consequence of this feature is that channel decorators will provide no advantage as a design pattern, and relationships between ObjectContext and its parent DataChannel may not require such a high-level of abstraction (a leaky abstraction for that matter). E.g. we may get rid of DataDomainQuery, returning parent domain the old way via API calls.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.