Hi,
I have a design question about my webapp.
There are different user groups (admin, user, guest). Now I want to separate the access to the service, depending of the user, who accesses the class via the Wrapper class.
Common architecture is:
Presentation_________________Apache Cocoon
Controller___________________Apache Cocoon
________ ------ Wrapper class -------__________
Main Spring Service Interface___MainService
Main Spring Service Interface___MainService Impl
*****
UserService, GuestService, AdminService
*****
--------- DAO interfaces ---------
--------- HibernateDAO ----------
--------- database (mysql) ------
The question now is, how to differ between the different service classes. The administrator can use all services, the user can use the services for user and guest and the guest user can only use the guest services.
So, to have a OOP design, I want to have a common class, which has the services, which all user groups can access, and the user group services inherit from this common class.
As I access the main Spring service class via the beanfactory, the question is, if I should access the user group classes also via the beanfactory and interfaces or is there a other possiblity to do this?
(in the architecture the part with the stars - the interface - is the main part, I'm not quite sure)
A other design would be to have all the methods in the main service class, but then I have a service class with nearly 25 methods. I don't think, that this is a good approach.
Looking forward to your suggestions.
Thanks in advance!
ciao,
Pieper


Reply With Quote
