Print Page | Close Window

Multiple EntityServerSaveInterceptors

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2889
Printed Date: 05-May-2025 at 9:50pm


Topic: Multiple EntityServerSaveInterceptors
Posted By: tersiusk
Subject: Multiple EntityServerSaveInterceptors
Date Posted: 12-Aug-2011 at 2:26am
I'm working with two models and both these models have EntityServerSaveInterceptor classes. I'm using the one model to do authentication and then just link the other model for authentication.

But now I'm running into a problem where devforce seems to be complaining about not knowing which interceptor to use. The logic for the two interceptors are different so I'm not sure how to proceed. 

Edit: It would have been nice to be able to specify,maybe with generics, which interceptor must handle which model.



Replies:
Posted By: sbelini
Date Posted: 15-Aug-2011 at 9:32am
Hi tersiusk,
 
You will be able to define different EntityServerSaveInterceptors if you use CompositionContexts. You will find detailed information in the http://drc.ideablade.com/xwiki/bin/view/Documentation/discovery-context - DevForce Resource Center .
 
Or you could simply use one interceptor with additional logic to switch between the 2 behaviors.
 
Regards,
   Silvio.



Print Page | Close Window