From b0d63631d9db561192a8eb50a7e897292ffb7d60 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Sat, 28 Feb 2009 07:16:59 +0000 Subject: [PATCH] modernized by using form field binding and convention over configuration for help files git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15879 71c3de6d-444a-0410-be80-ed276b4c234a --- .../main/java/hudson/tasks/ArtifactArchiver.java | 6 +----- .../hudson/tasks/ArtifactArchiver/config.jelly | 13 ++++++------- .../tasks/ArtifactArchiver/help-artifacts.html | 0 .../tasks/ArtifactArchiver/help-artifacts_de.html | 0 .../tasks/ArtifactArchiver/help-artifacts_fr.html | 0 .../tasks/ArtifactArchiver/help-artifacts_ja.html | 0 .../tasks/ArtifactArchiver/help-artifacts_nl.html | 0 .../ArtifactArchiver/help-artifacts_pt_br.html | 0 .../tasks/ArtifactArchiver/help-artifacts_ru.html | 0 .../tasks/ArtifactArchiver/help-artifacts_tr.html | 0 .../tasks/ArtifactArchiver/help-excludes.html | 0 .../tasks/ArtifactArchiver/help-excludes_de.html | 0 .../tasks/ArtifactArchiver/help-excludes_fr.html | 0 .../tasks/ArtifactArchiver/help-excludes_ja.html | 0 .../tasks/ArtifactArchiver/help-excludes_nl.html | 0 .../tasks/ArtifactArchiver/help-excludes_pt_br.html | 0 .../tasks/ArtifactArchiver/help-excludes_ru.html | 0 .../tasks/ArtifactArchiver/help-excludes_tr.html | 0 .../tasks/ArtifactArchiver/help-latestOnly.html | 0 .../hudson/tasks/ArtifactArchiver/help.html | 0 .../hudson/tasks/ArtifactArchiver/help_de.html | 0 .../hudson/tasks/ArtifactArchiver/help_fr.html | 0 .../hudson/tasks/ArtifactArchiver/help_ja.html | 0 .../hudson/tasks/ArtifactArchiver/help_pt_BR.html | 0 .../hudson/tasks/ArtifactArchiver/help_ru.html | 0 .../hudson/tasks/ArtifactArchiver/help_tr.html | 0 26 files changed, 7 insertions(+), 12 deletions(-) rename war/resources/help/tasks/artifactArchiver/includes.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts.html (100%) rename war/resources/help/tasks/artifactArchiver/includes_de.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_de.html (100%) rename war/resources/help/tasks/artifactArchiver/includes_fr.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_fr.html (100%) rename war/resources/help/tasks/artifactArchiver/includes_ja.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_ja.html (100%) rename war/resources/help/tasks/artifactArchiver/includes_nl.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_nl.html (100%) rename war/resources/help/tasks/artifactArchiver/includes_pt_Br.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_pt_br.html (100%) rename war/resources/help/tasks/artifactArchiver/includes_ru.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_ru.html (100%) rename war/resources/help/tasks/artifactArchiver/includes_tr.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_tr.html (100%) rename war/resources/help/tasks/artifactArchiver/excludes.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes.html (100%) rename war/resources/help/tasks/artifactArchiver/excludes_de.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_de.html (100%) rename war/resources/help/tasks/artifactArchiver/excludes_fr.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_fr.html (100%) rename war/resources/help/tasks/artifactArchiver/excludes_ja.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_ja.html (100%) rename war/resources/help/tasks/artifactArchiver/excludes_nl.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_nl.html (100%) rename war/resources/help/tasks/artifactArchiver/excludes_pt_BR.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_pt_br.html (100%) rename war/resources/help/tasks/artifactArchiver/excludes_ru.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_ru.html (100%) rename war/resources/help/tasks/artifactArchiver/excludes_tr.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_tr.html (100%) rename war/resources/help/tasks/artifactArchiver/latestOnly.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help-latestOnly.html (100%) rename war/resources/help/project-config/archive-artifact.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help.html (100%) rename war/resources/help/project-config/archive-artifact_de.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help_de.html (100%) rename war/resources/help/project-config/archive-artifact_fr.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help_fr.html (100%) rename war/resources/help/project-config/archive-artifact_ja.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help_ja.html (100%) rename war/resources/help/project-config/archive-artifact_pt_BR.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help_pt_BR.html (100%) rename war/resources/help/project-config/archive-artifact_ru.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help_ru.html (100%) rename war/resources/help/project-config/archive-artifact_tr.html => core/src/main/resources/hudson/tasks/ArtifactArchiver/help_tr.html (100%) diff --git a/core/src/main/java/hudson/tasks/ArtifactArchiver.java b/core/src/main/java/hudson/tasks/ArtifactArchiver.java index b91eb64bcb..19982471f2 100644 --- a/core/src/main/java/hudson/tasks/ArtifactArchiver.java +++ b/core/src/main/java/hudson/tasks/ArtifactArchiver.java @@ -165,14 +165,10 @@ public class ArtifactArchiver extends Recorder { return Messages.ArtifactArchiver_DisplayName(); } - public String getHelpFile() { - return "/help/project-config/archive-artifact.html"; - } - /** * Performs on-the-fly validation on the file mask wildcard. */ - public void doCheck(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { + public void doCheckArtifacts(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { new FormFieldValidator.WorkspaceFileMask(req,rsp).process(); } diff --git a/core/src/main/resources/hudson/tasks/ArtifactArchiver/config.jelly b/core/src/main/resources/hudson/tasks/ArtifactArchiver/config.jelly index 5b6bfba38d..841b3f2874 100644 --- a/core/src/main/resources/hudson/tasks/ArtifactArchiver/config.jelly +++ b/core/src/main/resources/hudson/tasks/ArtifactArchiver/config.jelly @@ -23,16 +23,15 @@ THE SOFTWARE. --> - - + + - - + + - - + + diff --git a/war/resources/help/tasks/artifactArchiver/includes.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/includes.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts.html diff --git a/war/resources/help/tasks/artifactArchiver/includes_de.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_de.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/includes_de.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_de.html diff --git a/war/resources/help/tasks/artifactArchiver/includes_fr.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_fr.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/includes_fr.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_fr.html diff --git a/war/resources/help/tasks/artifactArchiver/includes_ja.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_ja.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/includes_ja.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_ja.html diff --git a/war/resources/help/tasks/artifactArchiver/includes_nl.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_nl.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/includes_nl.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_nl.html diff --git a/war/resources/help/tasks/artifactArchiver/includes_pt_Br.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_pt_br.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/includes_pt_Br.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_pt_br.html diff --git a/war/resources/help/tasks/artifactArchiver/includes_ru.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_ru.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/includes_ru.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_ru.html diff --git a/war/resources/help/tasks/artifactArchiver/includes_tr.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_tr.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/includes_tr.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts_tr.html diff --git a/war/resources/help/tasks/artifactArchiver/excludes.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/excludes.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes.html diff --git a/war/resources/help/tasks/artifactArchiver/excludes_de.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_de.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/excludes_de.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_de.html diff --git a/war/resources/help/tasks/artifactArchiver/excludes_fr.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_fr.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/excludes_fr.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_fr.html diff --git a/war/resources/help/tasks/artifactArchiver/excludes_ja.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_ja.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/excludes_ja.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_ja.html diff --git a/war/resources/help/tasks/artifactArchiver/excludes_nl.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_nl.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/excludes_nl.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_nl.html diff --git a/war/resources/help/tasks/artifactArchiver/excludes_pt_BR.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_pt_br.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/excludes_pt_BR.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_pt_br.html diff --git a/war/resources/help/tasks/artifactArchiver/excludes_ru.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_ru.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/excludes_ru.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_ru.html diff --git a/war/resources/help/tasks/artifactArchiver/excludes_tr.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_tr.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/excludes_tr.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-excludes_tr.html diff --git a/war/resources/help/tasks/artifactArchiver/latestOnly.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help-latestOnly.html similarity index 100% rename from war/resources/help/tasks/artifactArchiver/latestOnly.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help-latestOnly.html diff --git a/war/resources/help/project-config/archive-artifact.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help.html similarity index 100% rename from war/resources/help/project-config/archive-artifact.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help.html diff --git a/war/resources/help/project-config/archive-artifact_de.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help_de.html similarity index 100% rename from war/resources/help/project-config/archive-artifact_de.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help_de.html diff --git a/war/resources/help/project-config/archive-artifact_fr.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help_fr.html similarity index 100% rename from war/resources/help/project-config/archive-artifact_fr.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help_fr.html diff --git a/war/resources/help/project-config/archive-artifact_ja.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help_ja.html similarity index 100% rename from war/resources/help/project-config/archive-artifact_ja.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help_ja.html diff --git a/war/resources/help/project-config/archive-artifact_pt_BR.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help_pt_BR.html similarity index 100% rename from war/resources/help/project-config/archive-artifact_pt_BR.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help_pt_BR.html diff --git a/war/resources/help/project-config/archive-artifact_ru.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help_ru.html similarity index 100% rename from war/resources/help/project-config/archive-artifact_ru.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help_ru.html diff --git a/war/resources/help/project-config/archive-artifact_tr.html b/core/src/main/resources/hudson/tasks/ArtifactArchiver/help_tr.html similarity index 100% rename from war/resources/help/project-config/archive-artifact_tr.html rename to core/src/main/resources/hudson/tasks/ArtifactArchiver/help_tr.html -- GitLab