Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

@Annotations in class diagram

 
Alessandro Aloisi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I'm working on Part 2 and I have a question

On Cade's class diagram, the author uses annotation to describe Session beans, entities, and so on. This use is not UML compliat but if sun loves it....

the question is.... if I want to show declarative security on my solution, is the correct way? am I making it all up?

Any feedback is greatly appreciated

regards
Alessandro
 
Rahul Mishra
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usage of Stereotypes on a class is UML compliant. You can define your own stereotypes or use the ones available by your modeling tool.

So, if you say...<<stateless>> on your class diagram..you would be fine..
If you say... <<@stateless>> there are no issues..because either one is a stereotype..

However if you use something like @Stateless, I think its invalid UML..i have never bothered to check the UML standard..so i cant be sure..

 
Alessandro Aloisi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are right but I have read many post of people who used this annotation style and passed

Ok, I decided I'll use standard notation

But, what about declarative roles? Where and how do I have to write them? I'm thinking that a note is sufficient ...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think a note is fine. And I used annotations where there were standard Java ones. I think either way is fine on that front.
 
Alessandro Aloisi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I finally decided to use a constraint in my class diagram to declare pragmatically security

Thanks to all!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic