1
2
3
4
5
6
7
8
9
10
11
12
13 package org.abstracthorizon.extend.server.deployment;
14
15 import java.util.Collections;
16 import java.util.Set;
17
18
19
20
21
22
23 public class ModuleUtil {
24
25
26
27
28 public static final Set<Module> EMPTY_SET = Collections.emptySet();
29
30
31
32
33
34
35 public static String stateAsString(int state) {
36 if (state == Module.UNDEFINED) {
37 return "UNDEFINED";
38 } else if (state == Module.DEFINED) {
39 return "DEFINED";
40 } else if (state == Module.WAITING_ON_CREATE) {
41 return "WAITING ON DEPENDENCY CREATE";
42 } else if (state == Module.WAITING_ON_CREATE_TO_START) {
43 return "WAITING ON DEPENDENCY CREATE AND START";
44 } else if (state == Module.CREATED) {
45 return "CREATED";
46 } else if (state == Module.WAITING_ON_START) {
47 return "WAITING ON DEPENDENCY START";
48 } else if (state == Module.STARTED) {
49 return "STARTED";
50 } else {
51 return "UNLKNOWN";
52 }
53 }
54
55 }