New Posts New Posts RSS Feed: Save interception for server side business logic
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Save interception for server side business logic

 Post Reply Post Reply
Author
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Topic: Save interception for server side business logic
    Posted: 15-Nov-2011 at 12:38pm
Hi nazbrok;

You don't have to put all the server side logic in the EntityServerSaveInterceptor class. 

For example, in this particular use case, you can create a separate utility class with a utility method that will create the "many other entities" that you require before saving.

And then, in the ExecuteSave override, you can call this utility method to create those other entities and then call base.ExecuteSave().

My point is that you can separate the logic in a separate class but you have to call the logic within the EntityServerSaveInterceptor class.

We also provide RPC (Remote Procedure Call), also called RSMC, (Remote Server Method Call) to handle other server side scenarios. http://drc.ideablade.com/xwiki/bin/view/Documentation/rsmc-query

Hope this helps.


Back to Top
nazbrok View Drop Down
Newbie
Newbie
Avatar

Joined: 26-Jan-2011
Location: Paris
Posts: 21
Post Options Post Options   Quote nazbrok Quote  Post ReplyReply Direct Link To This Post Posted: 15-Nov-2011 at 1:01am
Hi,

I want to intercept a save on the server to perfom some task BEFORE the save.
For exemple : in the SL client, I created a customer but when I save it I want to create many other entities which are not known in the client (because there is no need to bring all this complexity to the client).

I wanted to use the EntityServerSaveInterceptor but the doc say to not put this kind of stuff in it. Also, it will be a big application (maybe 200 entities+) I can't imagine having all our server side logic in ONE class only.

I did read the guidline (http://drc.ideablade.com/xwiki/bin/view/Documentation/save-lifecycle-server) but it didn't really helped me out.
What is the best way to do it ?

regards
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down