Class NotificationCommands
java.lang.Object
com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.notification.NotificationCommands
Wrapper for commends send to Gerrit.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTopicChangeCommand(String gerritCommand) Adds the (sub) command to the list of changes assigned to a topic.Returns the main commend of the initial event.Returns list of commands for each change in case of topic.booleanReturns true if topic change commands are available.booleanReturns true if the main command is valid otherwise false.booleanReturns true if all commands are valid otherwise false.booleanisValid()Returns true or false depending on the commands whether they are valid or not.
-
Constructor Details
-
NotificationCommands
Constructor.- Parameters:
command- The main command.
-
-
Method Details
-
getCommand
Returns the main commend of the initial event.- Returns:
- the main command.
-
getCommandsTopicChanges
Returns list of commands for each change in case of topic. Otherwise, command list is just empty.- Returns:
- List of commands for each change in a topic.
-
addTopicChangeCommand
Adds the (sub) command to the list of changes assigned to a topic.- Parameters:
gerritCommand- The command which is added to the commandsTopicChange list.
-
hasTopicChanges
public boolean hasTopicChanges()Returns true if topic change commands are available.- Returns:
- true if commandsTopicChange contains items, otherwise false.
-
isTopicChangeListCommandsValid
public boolean isTopicChangeListCommandsValid()Returns true if all commands are valid otherwise false.- Returns:
- true of false if all commands in list are valid or not.
-
isMainCommandValid
public boolean isMainCommandValid()Returns true if the main command is valid otherwise false.- Returns:
- true if valid otherwise false.
-
isValid
public boolean isValid()Returns true or false depending on the commands whether they are valid or not.- Returns:
- true if valid, otherwise false.
-