Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix JENKINS-20170
Added help.html files for all the triggers and cleaned up trigger descriptors.
- Loading branch information
Showing
62 changed files
with
244 additions
and
332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/main/java/hudson/plugins/emailext/plugins/trigger/AlwaysTrigger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* To change this license header, choose License Headers in Project Properties. | ||
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
|
||
package hudson.plugins.emailext.plugins.trigger; | ||
|
||
import hudson.Extension; | ||
import hudson.model.AbstractBuild; | ||
import hudson.model.TaskListener; | ||
import hudson.plugins.emailext.plugins.EmailTrigger; | ||
import hudson.plugins.emailext.plugins.EmailTriggerDescriptor; | ||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
/** | ||
* | ||
* @author acearl | ||
*/ | ||
public class AlwaysTrigger extends EmailTrigger { | ||
|
||
public static final String TRIGGER_NAME = "Always"; | ||
|
||
public static AlwaysTrigger createDefault() { | ||
return new AlwaysTrigger(true, true, true, true, "", "$PROJECT_DEFAULT_REPLYTO", "$PROJECT_DEFAULT_SUBJECT", "$PROJECT_DEFAULT_CONTENT", "", 0, "project"); | ||
} | ||
|
||
@DataBoundConstructor | ||
public AlwaysTrigger(boolean sendToList, boolean sendToDevs, boolean sendToRequestor, boolean sendToCulprits, String recipientList, | ||
String replyTo, String subject, String body, String attachmentsPattern, int attachBuildLog, String contentType) { | ||
super(sendToList, sendToDevs, sendToRequestor, sendToCulprits, recipientList, replyTo, subject, body, attachmentsPattern, attachBuildLog, contentType); | ||
} | ||
|
||
@Override | ||
public boolean trigger(AbstractBuild<?, ?> build, TaskListener listener) { | ||
return true; | ||
} | ||
|
||
@Extension | ||
public static final class DescriptorImpl extends EmailTriggerDescriptor { | ||
|
||
@Override | ||
public String getDisplayName() { | ||
return TRIGGER_NAME; | ||
} | ||
|
||
@Override | ||
public boolean getDefaultSendToDevs() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean getDefaultSendToList() { | ||
return true; | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.