• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to achieve composition

 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i am working on OPenCms, an open source project from apache.Which has a concept of groups,users,roles.A group can inherit from another group.Every group has some users and permissions is given on a group?so any child group will have permissions from all ancestral group as well as from itself.Inheritance is supported by this open source API.But inheritance is not full fulling my current requirement .so i want to go with composition.This description is very brief as groups ,permissions concept is quiet big in OpenCms.Can any one tell me how should i proceed ?I am not getting how to write my code to achieve group composition.I mean what kind of question should comes to my mind/If any one can refer me any link or can briefly describe how i should start, will be very helpful.

regards
Rajvinder
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Raj,
Start by thinking about how each part of the description relates. For example compare "Every group has some users" to "every user has a name". The structure of this sentence hints at composition. Which tells you the user object has a String instance variable called name. Now you try it. Feel free to post your thoughts here for comments/questions.
 
raj malhotra
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeanne
Thanks for reply.Our team has put hold on this functionality for some time due to time limit.But i will sure put my doubts when it will start again.Once again thanks very much.

regards
Raj
reply
    Bookmark Topic Watch Topic
  • New Topic