Commit 1f0624db7c6550bcb5414014b633936547d7704f

Authored by bernard
1 parent ba81aa31

Make command more extendable (Commander interface).

... ... @@ -59,9 +59,9 @@ public class Command {
59 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 65 return this;
66 66 }
67 67 }
... ...
  1 +package pl.com.it_crowd.youtrack.api;
  2 +
  3 +public interface Commander {
  4 +// -------------------------- OTHER METHODS --------------------------
  5 +
  6 + String getCommand();
  7 +}
... ...
1 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 6 assignee,
5 7 issueId("issue id"),
6 8 state,
... ...
Please register or login to post a comment