Generify EventProcessorService to avoid too many casts
[aquarium] / doc / e-r.java
1 /*
2  * Copyright 2011 GRNET S.A. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or
5  * without modification, are permitted provided that the following
6  * conditions are met:
7  *
8  *   1. Redistributions of source code must retain the above
9  *      copyright notice, this list of conditions and the following
10  *      disclaimer.
11  *
12  *   2. Redistributions in binary form must reproduce the above
13  *      copyright notice, this list of conditions and the following
14  *      disclaimer in the documentation and/or other materials
15  *      provided with the distribution.
16  *
17  * THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
18  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
21  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
24  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
25  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
27  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28  * POSSIBILITY OF SUCH DAMAGE.
29  *
30  * The views and conclusions contained in the software and
31  * documentation are those of the authors and should not be
32  * interpreted as representing official policies, either expressed
33  * or implied, of GRNET S.A.
34  */
35
36 /**
37  * @opt operations
38  * @opt attributes
39  * @opt operations
40  * @hidden
41  */
42 class UMLOptions {}
43
44 /**
45  * @assoc 1 - n ServiceTemplate
46  * @assoc 1 - n ServiceItem
47  */ 
48 public class Entity {
49     public String name;
50     public float credits;
51 }
52
53 public enum EntityType {
54     User, Group
55 }
56
57 public class User extends Entity {
58 }
59
60 /** 
61  * @composed m - n User
62  * @assoc 0 - n Group
63  */
64 public class Group extends Entity{}
65
66 /** 
67  * @assoc m - n Group
68  * @composed n - m User
69  */
70 public class Organization extends Entity {
71 }
72
73 /**
74  * @assoc 1 - n ServiceItem 
75  * @has n - 1 ResourceType
76  */
77 public class ServiceTemplate {
78     public String name;
79 }
80
81 public class ServiceItem {
82     public String url;
83 }
84
85 /**
86  * @assoc n - 1 ServiceTemplate 
87  */ 
88 public class Action{}
89
90 /**
91  * @assoc n - 1 Action
92  * @assoc n - 1 ServiceTemplate
93  * @assoc n - 1 EntityType
94  */
95 public class DefaultPermission {}
96
97 /**
98  * @has n - 1 Entity
99  * @composed n - 1 Action
100  * @composed n - 1 ServiceItem
101  */ 
102 public class Permission{}
103
104
105 /**
106  * @assoc n - 1 Entity
107  * @assoc n - 1 ServiceItem
108  */ 
109 public class Limit{
110     public String value;
111 }
112
113 /**
114  * @assoc n - 1 ServiceItem 
115  * @assoc n - 1 Entity
116  */
117 public class Bill {
118     public float cost;
119     public Date date;
120 }
121
122 public class SynnefoVM extends ServiceItem {}
123 public class PithosFile extends ServiceItem{}
124 public class SaaSVM extends SynnefoVM {}
125
126
127 public enum ResourceType {
128     CPU, RAM, DiskSpace, Bandwidth, License, Network
129 }
130
131 /**
132  * @assoc n - 1 EntityType
133  * @assoc n - 1 ServiceTemplate
134  */
135 public class DefaultLimit {
136     public float limit;
137 }
138
139