Commit 1f0624db7c6550bcb5414014b633936547d7704f
1 parent
ba81aa31
Make command more extendable (Commander interface).
Showing
3 changed files
with
12 additions
and
3 deletions
@@ -59,9 +59,9 @@ public class Command { | @@ -59,9 +59,9 @@ public class Command { | ||
59 | return state(state.getCommandValue()); | 59 | return state(state.getCommandValue()); |
60 | } | 60 | } |
61 | 61 | ||
62 | - private Command command(Fields command, String argument) | 62 | + protected Command command(Commander commander, String argument) |
63 | { | 63 | { |
64 | - this.command.append(" ").append(command.getCommand()).append(" ").append(argument); | 64 | + this.command.append(" ").append(commander.getCommand()).append(" ").append(argument); |
65 | return this; | 65 | return this; |
66 | } | 66 | } |
67 | } | 67 | } |
1 | package pl.com.it_crowd.youtrack.api.defaults; | 1 | package pl.com.it_crowd.youtrack.api.defaults; |
2 | 2 | ||
3 | -public enum Fields { | 3 | +import pl.com.it_crowd.youtrack.api.Commander; |
4 | + | ||
5 | +public enum Fields implements Commander { | ||
4 | assignee, | 6 | assignee, |
5 | issueId("issue id"), | 7 | issueId("issue id"), |
6 | state, | 8 | state, |
Please
register
or
login
to post a comment