Skip to content

Basic

Basic Component

The following section contains detailed information on how the basic component is structured.

In some cases the model is devided into contextual parts due to clearness.

The following basic models focuses on the specific parts to provide clearness.

Basic Packages

The Basic Components contains two important packages. The Roles and the Customer Relations.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@startuml

node "Roles" {

    component role [
        Role
    ]

    component user [
        User
    ]

    component user_role [
            UserRole
    ]

    component target [
        UserRoleTarget
    ]

    [role] <-- [user_role]
    [user] <-- [user_role]
    target <.. user_role : use
}

node "Customer Relations" {

    component unit [
        Unit
    ]

    component cr [
        Customer Relation
    ]

    component contract [
        Contract
    ]


    component contract_item [
        Contract Item
    ]

    [cr] <-- [contract]
    [contract] <-- [contract_item]
    [contract_item] <-- [unit]
    cr --|> target
    target <|-- contract
    target <|-- contract_item
}

@enduml

Class Diagramm Roles

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@startuml

class Portal {
    domain: String
}

class Role {
    name: String
}

class UserRole {
    role: Role
    user: User
    target: AbstractUserRoleTarget
    targetType: UserRoleTargetType
}

class User {
    name: String
    contacts: UserContact[]
    userRoles: UserRoles[]
}

class Contact {
    value: String
    type: UserContactType
}

class ContactType {
    type: String
    name: String
}
note right: EMAIL, PHONE, etc.

class UserContact {
    portal: Portal
    user: User
    contact: Contact
    default: Short
}

Role "1" - "*" UserRole
Portal "*" -- "*" UserContact
Portal "*" -- "*" UserRole
Contact "*" - "1" ContactType
UserRole "*" --* "1" User
UserContact "*" --* "1" User
UserContact "1" *-- "1" Contact

@enduml

Class Diagramm Customer Relations

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
@startuml


class Portal {
    domain: String
}

class UserRole {
    role: Role
    user: User
    target: AbstractUserRoleTarget
    targetType: UserRoleTargetType
}

class CustomerRelation {
    name: String
    portals: Portal[]
}

interface Contract {
    getPortal()
    getCustomerRelation()
    getStatus()
    getBegin()
    getEnd()
}

class ContractStatus {
    status: String
    name: String
}

interface ContractItem {
     getName()
     getContracts()
     getStatus()
     getUnit()
     getBegin()
     getEnd()
}

class ContractItemStatus {
    status: String
    name: String
}

interface Unit {
    getType()
    getName()
    getPortal()
}

class UnitType {
    type: String
    name: String
}

Portal "*" *-- "*" CustomerRelation
Portal "*" -- "*" UserRole
Portal "1" *-- "*" Unit
Portal "1" *-- "*" Contract
CustomerRelation "1" *-- "*" Contract
CustomerRelation "1" o-- "*" UserRole
Contract "1" o-- "*" UserRole
Contract "*" -- "1" ContractStatus
Contract "1" o-- "*" ContractItem
UserRole "*" --o "1" ContractItem
ContractItem "1" - "1" Unit
ContractItem "*" -- "1" ContractItemStatus
Unit "*" -- "1" UnitType

@enduml

Class Diagramm Customer Relation with abstract classes

To avoid implementing the interfaces all the time, the model contains abstract adapter classes.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@startuml

interface Contract {
    getPortal()
    getCustomerRelation()
    getStatus()
    getBegin()
    getEnd()
}

abstract class AbstractContract {
    portal: Portal
    customerRelation: CustomerRelation
    contractItems: ContractItem[]
    status: ContractStatus
    begin: DateTime
    end: DateTime
}

abstract class AbstractContractItem {
    name: String
    contract: Contract
    unit: Unit
    status: ContractItemStatus
    begin: DateTime
    end: DateTime
}

interface ContractItem {
     getName()
     getContract()
     getStatus()
     getUnit()
     getBegin()
     getEnd()
}

interface Unit {
    getType()
    getName()
    getPortal()
    getLogicalUnitGroups()
}

abstract class AbstractUnit {
    name: String
    unitType: UnitType
    portal: Portal
    unitGroups: LogicalUnitGroup[]
}

Contract <|-- AbstractContract
ContractItem <|-- AbstractContractItem
Unit <|-- AbstractUnit
Contract *-- ContractItem
ContractItem *-- Unit

@enduml

Class Diagramm combining Roles and Customer Relations

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
@startuml

interface UserRoleTarget {
    getTargetId()
    getTargetType()
}

enum UserRoleTargetType {
    PORTAL,
    CUSTOMER_RELATION,
    CONTRACT,
    CONTRACT_ITEM
}

abstract class AbstractUserRoleTarget {
    targetId: String
    #getTargetType()
}

class Portal {
    domain: String
    getTargetType()
}

class UserRole {
    role: Role
    user: User
    target: AbstractUserRoleTarget
    targetType: UserRoleTargetType
}

class CustomerRelation {
    name: String
    portals: Portal[]
    getTargetType()
}

interface Contract {
    getCustomerRelation()
    ...()
}

interface ContractItem {
     getName()
     getContracts()
     ...()
}

abstract class AbstractContract {
    customerRelation: CustomerRelation
    ...
    getTargetType()
}

abstract class AbstractContractItem {
    name: String
    ...
    getTargetType()
}

UserRoleTarget <|-- AbstractUserRoleTarget
AbstractUserRoleTarget <|-- Portal
AbstractUserRoleTarget <|-- CustomerRelation
AbstractUserRoleTarget <|-- Contract
AbstractUserRoleTarget <|-- ContractItem
UserRole "*" *-- "1" AbstractUserRoleTarget
UserRole - UserRoleTargetType
Contract <|-- AbstractContract
ContractItem <|-- AbstractContractItem


@enduml

Model with Grouping Feature

This feature allows us to react to dynamic requirements from the various business models.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
@startuml

class Portal {
    domain: String
    name: String
}

interface Contract {
    getPortal()
    getCustomerRelation()
    getStatus()
    getBegin()
    getEnd()
}

class ContractGroupType {
    type: String
    name: String
}

class ContractGroup {
    name: String
    type: ContractGroupType
    contracts: Contract[]
}

class CompositeContractGroup {
    name: String
    type: String
    contractGroups: ContractGroup[]
}

interface Unit {
    getType()
    getName()
    getPortal()
    getUnitGroups()
}

interface UnitGroup {
    getName()
    getType()
    getPortals()
}

class CompositeUnitGroup {
    name: String
    type: String
    portals: Portal[]
    unitGroups: UnitGroup[]
}

class UnitGroup {
    name: String
    type: String
    portals: Portal[]
    units: Unit[]
}

class UnitGroupType {
    type: String
    name: String
}

Portal "*" -- "*" UnitGroup
Portal "*" -- "*" ContractGroup
Portal "1" *-- "*" Unit
Portal "1" *-- "*" Contract
UnitGroup "*" -- "*" Unit
ContractGroup "*" -- "*" Contract
CompositeContractGroup --|> ContractGroup
ContractGroup "1" *-- "*" CompositeContractGroup
ContractGroupType "1"  -- "*" ContractGroup
UnitGroupType "1" -- "*" UnitGroup
UnitGroup <|-- UnitGroup
CompositeUnitGroup --|> UnitGroup
UnitGroup "1" *-- "*" CompositeUnitGroup

@enduml