Fields.java
774 Bytes
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
package pl.itcrowd.youtrack.api.defaults;
import pl.itcrowd.youtrack.api.Commander;
public enum Fields implements Commander {
assignee,
issueId("issue id"),
state,
created("created"),
description,
numberInProject(null),
projectShortName("project"),
reporterName("reporter"),
resolved("resolved date"),
summary,
updated,
updaterName("updated by");
private String command;
private Fields()
{
command = name();
}
private Fields(String command)
{
this.command = command;
}
public String getCommand()
{
if (command == null) {
throw new UnsupportedOperationException("There is no command for field: " + name());
}
return command;
}
}