diff --git a/src/main/java/pl/com/it_crowd/youtrack/api/Command.java b/src/main/java/pl/com/it_crowd/youtrack/api/Command.java index 83d45e8..d2d2c06 100644 --- a/src/main/java/pl/com/it_crowd/youtrack/api/Command.java +++ b/src/main/java/pl/com/it_crowd/youtrack/api/Command.java @@ -59,9 +59,9 @@ public class Command { return state(state.getCommandValue()); } - private Command command(Fields command, String argument) + protected Command command(Commander commander, String argument) { - this.command.append(" ").append(command.getCommand()).append(" ").append(argument); + this.command.append(" ").append(commander.getCommand()).append(" ").append(argument); return this; } } diff --git a/src/main/java/pl/com/it_crowd/youtrack/api/Commander.java b/src/main/java/pl/com/it_crowd/youtrack/api/Commander.java new file mode 100644 index 0000000..cc88b98 --- /dev/null +++ b/src/main/java/pl/com/it_crowd/youtrack/api/Commander.java @@ -0,0 +1,7 @@ +package pl.com.it_crowd.youtrack.api; + +public interface Commander { +// -------------------------- OTHER METHODS -------------------------- + + String getCommand(); +} diff --git a/src/main/java/pl/com/it_crowd/youtrack/api/defaults/Fields.java b/src/main/java/pl/com/it_crowd/youtrack/api/defaults/Fields.java index ec7b932..ad02a7b 100644 --- a/src/main/java/pl/com/it_crowd/youtrack/api/defaults/Fields.java +++ b/src/main/java/pl/com/it_crowd/youtrack/api/defaults/Fields.java @@ -1,6 +1,8 @@ package pl.com.it_crowd.youtrack.api.defaults; -public enum Fields { +import pl.com.it_crowd.youtrack.api.Commander; + +public enum Fields implements Commander { assignee, issueId("issue id"), state,