Refactorization of GerritTriggeredEvents

Moved out change, patchset and refupdated to
subclasses, since not all events have these.

Change-Id: I1f212569f39cb89ab7a41c86a64d0f2edbff7488
Add more missing Japanese translations

Add descriptions of the following environment variables in the
Japanese translation of the main help file:

    GERRIT_CHANGE_OWNER
    GERRIT_CHANGE_OWNER_NAME
    GERRIT_CHANGE_OWNER_EMAIL
    GERRIT_PATCHSET_UPLOADER
    GERRIT_PATCHSET_UPLOADER_NAME
    GERRIT_PATCHSET_UPLOADER_EMAIL

Change-Id: I9163a0fb808b8f494950c504ae8f6a6e17aa78f2
Update documentation for consistency

Make sure references to "Change-Id" and "ref-spec." are consistent
throughout the documentation.

Change-Id: Ied5a4945d00820135ecf001fb8d369167277b592
Merge "Add more missing Japanese translations" into internal
Merge "Update documentation for consistency" into internal
Implemented hashCode methods for events.

Not every event should be considered unique as
far as the build memory goes. Added an overridden
hashCode method so that the event type, change,
patchset and refupdated are all part of generating
the hashcode for an event.

Change-Id: I6afda82871eef6bae8e540d5a64c8be027305065
Merge "Implemented hashCode methods for events." into internal
Adding dynamic functionality to the Gerrit Trigger.

With this commit, it will be possible to select with a check box if
the Gerrit trigger configuration also should be fetched from a URL,
in addition to specifying it the usual way - manually.

Change-Id: I1772b5efc31f041105551d64955d51b86fa1ef16
Fix line endings on GerritNotifier.java

Replace DOS style line endings (\r\n) with Unix style endings (\n).

Change-Id: I6a217e6382967c6a97732683c77696baa51d4e14
DRY some of the tests.

The GerritTriggerTest has a large amount of identical code. This tries to DRY
that code a little bit via refactoring.

This also DRY-es up a bit in the ParameterExpanderTests.
[JENKINS-11726] Do not count NOT_BUILT as a fail.

With this change, NOT_BUILT changes are ignored when tallying up what code
review / verified score to give a change. If none of the builds complete
(they're all "NOT_BUILT"), then we use the score & command assigned to the
NotBuilt event.

This is required for plugins to be able to "skip" some gerrit verifiers. (like
the pathignore-plugin)
Don't notify BuildStarted/BuildCompleted if the command is empty

Sending an empty command to Gerrit will cause an error, so if the
BuildStarted or BuildCompleted command is empty, don't send it.

Change-Id: If4da229f132e46d062d461a70e734f184cd46755
Added error handling for regexp matching.

A PatternSyntaxException could be thrown without
any catching, resulting in dead threads. I now
catch the Exception and print its message.

Change-Id: I11cfa6d8c7f8daff345d91b395ccd3e9bc9cdd59
Functionality for fetching and parsing a dynamic gerrit trigger file.

Also fixed a bug in DuplicatesUtil where waiting for a triggered
build in a test case would never time out.

Change-Id: I38162845d4f7395fb240cd4eb5dde2ced68c5ee0
Set a minimum refresh interval for the dynamic configuration.

Also made the GerritDynamicUrlProcessor into a utility class.

Change-Id: I238316b817351867c5ac034e22f0aec1253e6526
Allow extensions to contribute notification messages

New Extension Point introduced. By implementing
GerritMessageProvider other plug-ins can contribute
custom messages to Gerrit at the beginning and/or
end of a build.

Change-Id: Ie4944496db3e9c9c245b8d167a042ba625b4469a
Merge "Allow extensions to contribute notification messages" into internal
Backwards compatibility tests.

The idea is to load in jobs and builds
triggered by version 2.5.2 of the plugin
and verify that the datastructures are as they should
and that new builds can be triggered.

Change-Id: I735b6d162ae6cdb491ee60aa4ac9370a748d0a7c
Initialize triggerOnEvents in GerritTrigger start method.

If a new project is saved without adding any events to
trigger on, the default patchsetcreated is only added
once the project is reconfigured. This change adds the
default when the GerritTrigger is started.

Change-Id: I8339c68f097efbd8254ee08273825a12cd4cc83e
Merge "Backwards compatibility tests." into internal