08.09.00 IN-RTIMe UML Unified Modeling

advertisement
IN-RTIMe
08.09.00
UML
Unified Modeling
Language
Part 1: Domain Modeling
most of the slides originates from
Richard Sanders, Sintef and NTNU
Øystein Haugen, Ericsson NorARC, Ifi Uio
IN-RTIMe 2000 / Slide 1
Problem domain
Domain model
Domain concepts,
problems,
ideas
Classes, Use Cases, Sequences
UML for
domain
modeling
Product family
Specification
Classes, Use Cases, Sequences, MSC
Application design
Product needs
Framework design
Architecture design
Classes, Sequences, SDL,
Collaborations, Statecharts
Components, Deployment
Implementation
Instance needs
Market
needs
C++, Java, …
instance
System
instance
configuration
needs
needs
needs
User satisfaction
IN-RTIMe 2000 / Slide 2
system
Øystein Haugen, Ericsson NorARC, Ifi Uio
1
IN-RTIMe
08.09.00
Access Control Example
INSER T YOUR CAR D
2
3
4
5
6
7
8
9
0
cancel
ins ert c ard h ere
SESA M SES AM IN C
1
Sesam Sesam Inc
IN-RTIMe 2000 / Slide 3
Øystein Haugen, Ericsson NorARC, Ifi Uio
Access Control Domain Statement
lControlling access of users to access zones
lOnly known users with correct access rights are allowed to
enter an access zone
lOther users shall be denied access
lA user enters an access zone through an access point
lAuthentication: secret personal number (PIN)
lAuthorization: user identification + user access rights + info
about zone wishing to be entered
lSecret code can be changed by user
IN-RTIMe 2000 / Slide 4
Øystein Haugen, Ericsson NorARC, Ifi Uio
2
IN-RTIMe
08.09.00
Domain Dictionary
Access point
Access zone
Authentication
Authorization
Authorizer
PIN
User
User name
Access Granting
A point of access into an access zone.
A physical or logical zone bounded by a set of access
points.
To establish the identity of a user.
To establish the right of a user to enter an access
zone.
The entity which determines authentication and
authorization.
A personal identification means.
A person attempting to enter an access zone.
A user name.
The role of granting (or not granting) a user access.
IN-RTIMe 2000 / Slide 5
Øystein Haugen, Ericsson NorARC, Ifi Uio
Finding objects in the Domain
lNouns in the Domain Statement and Domain Dictionary are
candidates for objects.
lObjects can be
– physical entities (like user and access point)
– immaterial concepts (like access zone and access rights)
IN-RTIMe 2000 / Slide 6
Øystein Haugen, Ericsson NorARC, Ifi Uio
3
IN-RTIMe
08.09.00
UML – why
lWe have a need for an informal notation with tool support to
describe the object model in the very early domain modelling
phases
lWe want a notation where the decisions about whether
entities are dynamic objects, processes, variables or signals
have been deferred to later
lUML is supported by Rational, a strong driving force in the
marketplace
lUML is maintained by OMG (Object Management Group)
which also maintains CORBA
IN-RTIMe 2000 / Slide 7
Øystein Haugen, Ericsson NorARC, Ifi Uio
UML – Summing up
lUML purpose (for TIMe): associations between concepts
without needing to fix the nature of every concept
lCurrent UML version 1.3 can be found at:
– ftp://ftp.omg.org/pub/docs/ad/99-06-08.pdf
– The document is 808 pages so do not print it!
lUML ambition: to become a language for complete
specification
– architecture improvements
– action semantics
– special profiles (e.g. for real time)
IN-RTIMe 2000 / Slide 8
Øystein Haugen, Ericsson NorARC, Ifi Uio
4
IN-RTIMe
08.09.00
Class diagram for Access Control Domain (magiC)
AccessZone
name direction arrow
*
ter
en
ay
m
1,2
association name
bounded by
association
1..*
*
AccessPoint
class
may enter
through 1..*
c
1..*
multiplicity
User
navigability
Note:
Note: the
the number
number (cardinality)
(cardinality) of
of objects
objects is
is not
not stated.
stated.
IN-RTIMe 2000 / Slide 9
Øystein Haugen, Ericsson NorARC, Ifi Uio
UML objects (maGic)
lAn object:
– is an instance of a class
– is an entity with boundary and identity
– encapsulates state (attributes and relationships) and behaviour
(operations, methods and state machines)
Petter
Petter:User
:User
IN-RTIMe 2000 / Slide 10
object name, class suppressed
object name of type user
Anonymous object of type user
Øystein Haugen, Ericsson NorARC, Ifi Uio
5
IN-RTIMe
08.09.00
UML objects and links
Adam:User
Bob:User
may enter
ma
ye
nter
nte may e er
r
nt
ye
a
may enter m
Zone1:Access Zone
Zone2:Access Zone
Celia:User
Zone3:Access Zone
Devil:User
Zone4:Access Zone
Links
Links are
are instances
instances of
of associations.
associations.
Note:
Note: Zone4
Zone4 does
does not
not conform
conform to
to class
class diagram!
diagram!
Øystein Haugen, Ericsson NorARC, Ifi Uio
IN-RTIMe 2000 / Slide 11
UML multiplicity
lMultiplicity specifies the range of allowable cardinalities that
a set may assume.
– lower-bound .. upper-bound or single-value
lExamples:
–
–
–
–
–
–
–
0..1
1
0..*
*
1..*
1..5
1..3,5
zero or one (optional)
exactly one
zero or more
zero or more
one or more (many)
between one and five
either between 1 and 3, or exactly 5
lMultiplicity may be suppressed (not shown).
IN-RTIMe 2000 / Slide 12
Øystein Haugen, Ericsson NorARC, Ifi Uio
6
IN-RTIMe
08.09.00
The Access System Context
may enter
*
AccessZone
1..*
controls access to
1..*
1
mmi
User
*
*
accepts 1
uses
1 maintenance 1
AC-System
Authorizer
0..1
1
1
controls and monitors
owns
1..*
0..1
Door
Card
Note:
Note: UML
UML has
has no
no concept
concept of
ofsystem
system versus
versus environment.
environment.
Øystein Haugen, Ericsson NorARC, Ifi Uio
IN-RTIMe 2000 / Slide 13
Domain Model of Access Control V2
1,2
bounded by
Authorizer
1c
onf
igu
res
*
AccessZone
*
ter
en
ay
m
t
ou
ab
s
ow
kn
1
1..*
*
AccessPoint
1..*
may enter through
*
1..*
User
Revising
Revising earlier
earlier models
models isis aa natural
natural part
part of
ofdevelopment.
development.
IN-RTIMe 2000 / Slide 14
Øystein Haugen, Ericsson NorARC, Ifi Uio
7
IN-RTIMe
08.09.00
Generalization in UML (magIc)
Simple AP
Access Point
Card Only AP
Card and PIN AP
generalization symbol
IN-RTIMe 2000 / Slide 15
Øystein Haugen, Ericsson NorARC, Ifi Uio
Aggregation in UML (mAgic)
Access Point
CardReader
Keyboard
aggregation symbol
IN-RTIMe 2000 / Slide 16
Øystein Haugen, Ericsson NorARC, Ifi Uio
8
IN-RTIMe
08.09.00
UML Attribute Specification
User
Access Zone
Access Point
Name: string
Number: integer
Level: integer
Name: string
Level: integer
Name: string
Number: integer
Access: key type
User
name: string
change_name()
IN-RTIMe 2000 / Slide 17
class name
optional attribute list compartment
optional operation list compartment
Øystein Haugen, Ericsson NorARC, Ifi Uio
9
Download