Copyright © 2003
2003-10-06
| 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. | |
Abstract
This document contains the class diagrams and class descriptions that resulted from the static analysis as well as sequence diagrams and state chart diagrams that we used to verify the class model.
Table of Contents
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.
(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.
name (String): the name of the EntityType
---
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.
---
---
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. All use cases have a similar structure, so we have only included the AbstractUseCaseController that serves as a base class for all concrete use case controllers (which we have omitted in this analysis model).
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.
---
loggedIn(user: User): Boolean
Checks whether the given User is logged in in this SessionState.
---
The boolean value true, iff the given User is logged in in this SessionState.
---
All control classes.
This controller requests the UI to display the main dialog to get the use case the user wants to perform next. It invokes the concrete use case controllers according to the user's choice.
---
---
Base class for all concrete use case controllers. Encapsulates the common control flow.
---
invoke(): void
Constructor operation that starts this controller and requests the UI to show the appropriate form for the concrete use case.
---
---
MainController.
private validateUserInput(input: Object): String
Validates the input the user made.
input: The input the user has made.
If not valid, a String describing the input errors; otherwise the null pointer.
---
this
The following diagrams show the control flow of an invocation of a concrete use case controller and the states it passes through.
The UI is responsible for providing all facilities the MRMS needs to interact with a user.
---
informAboutError(text: String): void
The user is informed about an error that occured in the system.
text: the description of the error that occured
---
---
Any control class.
requestConfirmation(text: String): Boolean
The user is requested to confirm or cancel an action.
text: the question to be answered by the user
The boolean value true, iff the user confirmed
---
Any control class.
requestAuthenticationData(): AuthenticationData
Requests authentication data (username and password) from the user.
---
An AuthenticationData object holding the values for username and password provided by the user.
AuthenticationAbortedException if the user cancelled the operation
Control class of the use case “User logs in”.
showMainDialog(): void
The user is shown the main dialog for interaction with the system. There he selects which use case he wants to perform next.
---
The use case that the user wants to perform next.
---
MainController.
showUserForm(io_user: User): void
The user is shown a form for editing a User's attributes.
io_user: the User to be edited
---
---
Control class of the use case “Create user account”.
showPasswordForm(io_password: String): void
The user is shown a form for editing a User's password.
io_password: the password String to be edited
---
---
Control class of the use case “User changes password”.
showRoleForm(io_role: Role): void
The user is shown a form for editing a Role's name.
io_role: the Role to be edited
---
---
Control class of the use case “Create role”.
showRoleAssignmentForm(io_user: User): void
The user is shown a form for editing a User's role assignment.
io_user: the User whose role assignment should be edited
---
---
Control class of the use case “Edit role assignment of user account”.
showRoleAccessRightsForm(io_role: Role): void
The user is shown a form for editing a Role's access rights.
io_role: the Role to be edited
---
---
Control class of the use case “Edit rights for role”.
showResourceTypeForm(io_resourceType: ResourceType): void
The user is shown a form for editing a ResourceType's name and the AttributeTypes it is composed of.
io_resourceType: the ResourceType to be edited
---
---
Control class of the use case “Define resource type”.
showLinkRuleForm(io_linkRule: LinkRule): void
The user is shown a form for editing a LinkRule's attributes.
io_linkRule: the LinkRule to be edited
---
---
Control class of the use case “Define link rule”.
showResourceOverviewForm(resources: Resource[]): void
The user is shown a list of the given Resources.
resources: the Resources to be shown
---
---
MainController and control class of the use case “Create filtered collection of resource entries”.
showResourceForm(io_resource: Resource): void
The user is shown a form for editing a Resource's Attributes.
io_resource: the Resource to be edited
---
---
Control classes of the use cases “Create resource” and “Edit resource”.
showFilterForm(): Filter
The user is shown a form for specifying a Filter.
---
A Filter configured according to the users input.
---
Control class of the use case “Create filtered collection of resource entries”.
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.
---
---
---
---