Copyright © 2003
2003-10-20
| Revision History | |
|---|---|
| Revision 0.1 | 2003-05-19 |
| Initial public release. | |
| Revision 0.2 | 2003-06-09 |
| Corrected some cardinalities, extended descriptions, added operations. | |
| Revision 0.3 | 2003-06-15 |
| Added "user logs in" sequence diagram. | |
| Revision 0.4 | 2003-06-23 |
| Extended from static model to analysis model. | |
| Revision 0.5 | 2003-10-06 |
| Incorporated optional feature "Resource Reservation" (see appendix of this document for the use cases derived from that feature); refined package structure; introduced distinction between physical resource containment hierarchy and resource usage. | |
| Revision 0.6 | 2003-10-20 |
| Extended from analysis model to design model | |
Abstract
This document contains the class diagrams and class descriptions that resulted from the static analysis and the design analysis as well as sequence diagrams and state chart diagrams that we used to verify the class model.
Table of Contents
So far, the design model only covers a subset of all use cases - completely defined in the document “Use Cases”. The remaining use cases will be considered during the next revisions of this document. The use cases covered so far are:
User logs in
Create filtered collection of resource entries
Edit resources
This document is organized along the package structure of the MRMS. Every package describes one aspect of the system:
model.entity: The MRMS can handle resources and the employees; the attributes that are to be saved for each resource type and employee type can be configured by an administrator. This common functionality is pulled up to the super type Entity. The package model.entity contains the classes to handle entities (resources, employees) and their attributes (number, text, boolean).
model.linkage: Resources and employees do not exist detached. Resources can be organized in a physical containment structure (e.g. a room contains workplaces, workplaces contain a computer, and so on) and resources can be used by employees. The package model.linkage contains the classes that are necessary to represent these links.
model.user: The users of the system need different access rights according to the role they play in the business. The package model.user contains the classes that represent the rights users have to create and delete entities, edit their attributes and create links.
model.filter: Creating a filtered collection of resources is a complex function that is required in different use cases. The package model.filter contains the classes needed to configure a filter with constraints and execute it.
client: Classes needed to realize an interaction between the user and the MRMS.
server: Classes for the MRMS server.
(The classes imported from others packages are colored yellow.)
The following diagram depicts the classes to handle entities (resources, employees) and their attributes (number, text, boolean).
An EntityType has a name and specifies (by composition) the Attributes that an Entity of this type has, it references a unique EntityTypeID.
name (String): the name of the EntityType
---
An EntityTypeID is a unique identifier for an EntityType.
uniqueID (int): an instance field making the EntityTypeID unique
---
A ResourceType is a specialised EntityType for defining Resources.
parentRequired (Boolean): specifies whether instances of this ResourceType must have a parent Resource
---
An EmployeeType is a specialised EntityType for defining Employees.
---
---
An Entity is composed of its Attributes and is an instance of an EntityType which specifies which Attributes the Entity may have, it references a unique EntityID.
---
---
An EntityID is a unique identifier for an Entity.
uniqueID (int): an instance field making the EntityID unique
---
A Resource is a specialised Entity for representing real-life-resources and is an instance of a ResourceType which specifies if this Resource must have a parent Resource within the Resources-Containment-Hierarchy.
---
---
An Employee is a specialised Entity for representing users of real-life-resources and is an instance of an EmployeeType.
---
---
Abstract base class for attribute types that an EntityType is composed of.
name (String): the name of the AttributeType
onlyPredefinedValuesAllowed (Boolean): if true, the user may only select the predefined values for an Attribute that has this type; if false, he may enter another value as well
mandatory (Boolean): if true, the user must enter a value for Attributes of this type
frozen (Boolean): if true, the user may not change the value of Attributes of this type
---
Concrete AttributeType for logical property characterisation of an Entity.
value (Boolean): logical property characterisation of an Entity
---
Concrete AttributeType for NumericalAttributes.
predefinedValues (Number[]): an array specifying predefined values for Attributes of this type
minValue (Number): the minimum value Attributes of this type may have
maxValue (Number): the maximum value Attributes of this type may have
---
Concrete AttributeType for TextAttributes.
predefinedValues (String[]): an array specifying predefined values for Attributes of this type
minSize (Number): the minimum number of characters Attributes of this type may have
maxSize (Number): the maximum number of characters Attributes of this type may have
---
Abstract base class for Attributes that an Entity is composed of.
---
---
Concrete Attribute for a boolean property characterisation of an Entity.
value (Boolean): numerical property characterisation of an Entity
---
Concrete Attribute for a numerical property characterisation of an Entity.
value (Number): numerical property characterisation of an Entity
---
The following diagram depicts the classes that are necessary to represent the physical containment links between resources and resources and the usage links between resources and employees.
A Link Rule defines the characteristics of a consistent Link. Both the physical containment structure of the resources as well as the usages of the resource by the users can be modelled as links. In both cases the corresponding link rules have the characteristic that the cardinality of one side is 1; for the physical containment links this side is the parent resource type and for the usage links this side is the employee type. The other side of the link rule can have an arbitrary cardinality (i.e. the number of children a parent has in the physical containment structure as well as the number of resources an employee may use is not constrained by the system but can be customized by the administrator); this cardinality is contained in the CardinalitySpec referenced by the LinkRule. A LinkRule can reference an BooleanAttributeType of the parent resource / using employee; in this case Links of this LinkRule can only be created for those Resources / Employees where the corresponding BooleanAttribute is true.
name (String): name of the LinkRule
---
Base class for ResourceContainmentLink and ResourceUsageLink.
---
---
A ResourceContainmentLinkRule defines the characteristics of a consistent ResourceContainmentLink. It references two ResourceTypes which may be linked together by a ResourceContainmentLink.
---
---
A ResourceContainmentLink references two Resources that are linked together by it; one resource takes the parent role, the other is its child in the pysical containmet. Its consistency is checked against the ResourceContainment LinkRule references.
---
---
A ResourceUsageLinkRule defines the characteristics of a consistent ResourceUsageLink. It references one ResourceType and one EmployeeType whose instances may be linked together by a ResourceUsageLink.
---
---
A ResourceUsageLink references one Resource and one Employee that are linked together by it. Its consistency is checked against the ResourceUsageLinkRule it references. There may be more than one ResourceUsageLink at a Resource; but only one of can be active at a certain time.
startDate (Date): Time when usage starts.
stopDate (Date): Time when usage expires.
---
Specifies the minimum and maximum cardinality for a certain ResourceType, referenced by a ResourceUsageLinkRule or a ResourceContainmentLinkRule. Example: A ResourceContainmentLinkRule has two ends ResourceType1 (parent) and ResourceType2 (child). The ResourceType1 always has the cardinality 1 while ResourceType2 has the cardinality min=1 and max=4, this means that one specific Resource of ResourceType1 must have at least 1 and may have up to 4 Links to Resources of ResourceType2. The CardinalitySpec may also reference a NumberAttributeType of the ResourceType1.
minCardinality (Number): value for the minimum cardinality; will be ignored when there is a “min”-reference to a NumberAttributeType, in this case the NumberAttribute's value will be used instead
maxCardinality (Number): value for the maximum cardinality; will be ignored when there is a “max”-reference to a NumberAttributeType, in this case the NumberAttribute's value will be used instead
---
The following diagram depicts the classes for user and access rights management of the MRMS.
Value class, encapsulating the authentication data of a user.
userName (String): the user's name
password (String): the user's password
---
Class for user accounts of the MRMS. Its instances may play Roles in the system.
passwordExpirationDate (Date): date after which the user has to enter a new password
realName (String): real name of the user
static checkPasswordStrength(password: String): Boolean
Checks, if the given password String is strong enough (minimum length, mixed letters and numbers, ...) to be accepted by the system.
password: the password to be checked
The boolean value true, iff the password is strong enough.
---
Control class of the use case “User changes password”.
static findUser(authData: AuthenticationData): User
Searches the system for a User matching the given AuthenticationData.
authData: the AuthenticationData to search for
If a matching User object could be found it is returned, otherwise the operation returns the null pointer.
---
Control class of the use case “User logs in”.
A Role defines which AccessRights its players (Users) have.
name (String): name of the Role
isAdministratorRole (Boolean): defines if Users of the Role have administration rights
---
Abstract base class for access rights. If a Role references an AccessRight it has this AccessRight. Users have the AccessRights which the Roles they play have.
---
---
Concrete AccessRight that defines owner's authority of working with Resources that are of a specific ResourceType.
canCreate (Boolean): defines if Resources of the referenced ResourceType may be created
canDelete (Boolena): defines if Resources of the referenced ResourceType may be deleted
---
Concrete AccessRight that defines owner's authority of working with Atrributes of a specific AttributeType that belongs to a specific ResourceType.
canRead (Boolean): defines if Attributes of the referenced AttributeType may be read
canWrite (Boolean): defines if Attributes of the referenced AttributeType may be written
---
Concrete AccessRight that defines owner's authority of creating and deleting Links according to a specific LinkRule.
canLink (Boolean): defines if Links according to the referenced LinkRule may be created
canUnlink (Boolean): defines if Links according to the referenced LinkRule may be deleted
---
The following diagram depicts the classes needed to configure a filter and get a collection of Resources out of it.
A Filter is used to get a subset of all Resources of the referenced ResourceType. The Filter is defined by the Constraints it is composed of.
---
getMatchingResources(): Resource[]
Searches the system for Resources matching the referenced Constraints.
---
An array of the matching Resources.
---
Control class of the use case “Create filtered collection of resource entries”.
Abstract base class for constraints. Constraints are used by a Filter to describe a specific state that Resource must fulfill to pass.
---
matches(resource: Resource): Boolean
Tests, if the given Resource matches this Constraint.
resource: the Resource to be tested
The boolean value true, iff the given Resource matches this Constraint.
---
Class Filter.
An AttributeConstraint is a concrete Constraint that checks whether an Attribute of the referenced AttributeType is either equal to the referenced Attribute or lays between the two referenced min- and max-Attributes.
---
---
A ContainmentConstraint is a concrete Constraint that checks whether a Resource matches the physical containment state that is described by the following attributes. A ContainmentConstraint references the LinkRule it refers to. If in this LinkRule the ResourceType that is to be filtered has (1) the parent role minimum and maximum cardinality are taken from LinkRule's CardinalitySpec and refer to the number of children; if it has (2) the client role then min = max = 1 iff the field requiresParent of the ResourceType is true, min = max = 0 otherwise.
underLinked (Boolean): cur < min
free (Boolean): cur = 0
linkable (Boolean): cur < max
unlinkable (Boolean): cur >= max
overLinked (Boolean): cur > max
---
A UsageConstraint is a concrete Constraint that checks whether a Resource is used or unused in a given time period.
used (Boolean): Defines whether the filtered Resources have to be used or unused in the given time period.
startDate (Date): Start time of the time time period.
stopDate (Date): End time of the time period.
---
The following diagram depicts the main classes needed to realize an interaction between the user and the MRMS.
A SessionState describes a session of interaction between the MRMS and a user. A User is logged in in a SessionState if it references that User. It logged in it has a remote reference to an instance of MrmsFacade on the server which can be used by the control to communicate with the server.
---
loggedIn(user: User): Boolean
Checks whether the given User is logged in in this SessionState.
---
The boolean value true, if the given User is logged in in this SessionState.
---
ClientApplication
The ClientApplication manages concrete AbstractControls. It provides a ViewContainer were AbstractViews of AbstractControls may be plugged in. It is associated with a SessionState that provides a reference to the suitable MRMS server facade. Managed AbstractControls may interact with the ClientApplication by using Events. Therefore the ClientApplication provides operations that may be registered at the appropriate EventHandle. Moreover it contains static helper operations for showing dialogs to the user (used by AbstractControls). The ClientApplication implements the Mediator pattern as described by the GoF.
---
handleEditResourceEvent(sender: AbstractControl, args: System.Args): void
An EditResourceControl for the selected Resource is created and invoked (uses static createEditResourceControl()) .
sender: The Sender of the event that invoked this operation
args: Arguments of the event that invoked this operation
---
AbstractControls using an EventHandle
handleCreateFilterEvent(sender: AbstractControl, args: System.Args): void
A CreateFilterControl is created and invoked (uses static createCreateFilterControl()) .
sender: The Sender of the event that invoked this operation
args: Arguments of the event that invoked this operation
---
---
AbstractControls using an EventHandle
static createEditResourceControl(entityID: EntityID): CreateFilterControl
Factory method for creating an EditResourceControl
entityID: The EntityID of the Resource to be eddited
---
---
this
static createCreateFilterControl(resourceType: ResourceType): void
Factory method for creating a CreateFilterControl
resourceType: The ResourceType the CreateFilterControl is created for
---
---
this
static requestAuthenticationData(): AuthenticationData
Requests authentication data (user name and password) from the user.
---
An AuthenticationData object holding the values for user name and password provided by the user.
AuthenticationAbortedException if the user cancelled the operation
UserLogsInControl
static showError(text: String): void
An error pop up is shown to the user.
text: Error message
---
---
AbstractControls
static requestConfirmation(text: String): int
A confirmation dialog is shown to the user.
text: Confirmation message
An int value that is representing the decision of the user
---
AbstractControls
Base class for all concrete use case controllers. Encapsulates the common control flow.
---
invoke(): void
Constructor operation that activates this AbstractControl instance.
---
---
ClientApplication.
createView(): AbstractView
The AbstractControl is told to create its view component.
---
The created view component
---
ClientApplication
dispose(): void
Destroys the AbstractControl and its view component.
---
---
---
ClientApplication
The following diagrams show the activation and invocation of a concrete use case control.
A ViewContainer is a component were the ClientApplication may plug in AbstractViews of AbstractControls.
---
addView(view: AbstractView,location: int): void
Adds the given AbstractView.
view: AbstractView to be added
location: An identifier determining the location to place the AbstractView
---
---
ClientApplication
removeView(view: AbstractView): void
Removes the given AbstractView.
view: AbstractView to be removed
---
---
ClientApplication
A concrete AbstractControl for logging a user in.
---
---
A concrete AbstractControl for navigating entities managed by the MRMS system.
---
---
A concrete AbstractControl for editing Resources managed by the MRMS system.
---
---
A concrete AbstractControl editing Resources managed by the MRMS system.
---
---
A concrete AbstractView for navigating entities managed by the MRMS system.
---
---
A concrete AbstractView for editing Resources managed by the MRMS system.
---
---
Currently we have only modelled the facade over which the client accesses the server. It provides methods to navigate over and to change the MRMS's data.
These are the use cases derived from the additional functionality “Resource Reservation”.
A new reservation for a resource is created.
Primary
User
A user is logged in who has proper access rights to create the new resource reservation.
The user requests the system to create a new resource reservation.
A new resource reservation has been created according to the users input.
No new resource reservation has been created.
The system requests the user to choose the resource, start-, endtime of the reservation and the customer.
The user determines resource reservation and submits his input.
The system creates a new resource reservation.
---
---
---
---
The reservation for a resource is deleted.
Primary
User
A user is logged in who has proper access rights to delete the resource reservation.
The user requests the system to delete a resource reservation.
The resource reservation has been deleted.
The resource reservation has not been deleted.
The system requests the user to choose a resource reservation.
The user determines the resource reservation to delete and submits his input.
The system deletes the resource reservation.
---
---
---
---
The reservation for a resource is changed.
Secondary
User
A user is logged in.
The user requests the system to create a filtered collection of resource reservations.
The user is shown a collection of resource reservations that passed the filter he created.
---
The system requests the user to choose a resource reservation for changing.
The user determines the resource reservation to change and submits his input.
The system changes the resource reservation.
---
---
---
---
Collect a set of resources reservations meeting a specific criterion and offer it to the user for further processing.
Secondary
User
A user is logged in who has proper access rights to change the resource reservation.
The user requests the system to change a resource reservation.
The resource reservation has been changed.
The resource reservation has not been changed.
The system requests the user to configure a filter listed resource reservations will have to pass
The system collects all resource reservations passing the specified filter and offers them to the user for further processing.
---
---
---
---
The MRMS is implemented for the .NET platform and therefore partly builds up on the .NET model for event handling. The following two figures are an overview on how that mechanism works.