Class NotificationCommands


  • public class NotificationCommands
    extends Object
    Wrapper for commends send to Gerrit.
    • Constructor Detail

      • NotificationCommands

        public NotificationCommands​(String command)
        Constructor.
        Parameters:
        command - The main command.
    • Method Detail

      • getCommand

        public String getCommand()
        Returns the main commend of the initial event.
        Returns:
        the main command.
      • getCommandsTopicChanges

        public List<String> 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

        public void addTopicChangeCommand​(String gerritCommand)
        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.