Stripers

I'm developing an application that manages email lists (opt-in email  
lists, bounce processing, that is: kosher).

Different customers will have their own instance of the program. They  
will never see each others data. Each table as a customer id.  
Creating a new customer is adding a record rather than deploying a war.

I could set it up so that each customer visits their website with:

http://www.domain.com/customer

I am using Striperist which magically primary keys into domain objects.

I could create an ActionBean like so:

@UrlBinding("/{customer}/subscribe")
public class SubscriberEditActionBean
implements ActionBean
{
     private ActionBeanContext context;

     private Customer customer;

     private Subscriber subscriber;

     /* Getters and Setters */

     @DefaultHandler
     public Resolution view()
     {
        if (!customer.getId().equals(subscriber.getCustomer().getId()))
        {
             // Return 404. (Don't know how to do that yet in Stripes.
        }
        return new ForwardResolution("/subscriber-edit.jsp")
     }
}

I'm very happy using Stripersist to fetch my objects, but I'm  
wondering if I'm going to have to step back from it to implement this  
key detail of my application.

One thought is extending Stripersist to include a where clause in the  
validation somehow.

Alan

--
Alan Gutierrez | [EMAIL PROTECTED] | http://blogometer.com/ | 504  
717 1428
Think New Orleans | http://thinknola.com/



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to