Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-18224

TransientActionFactory

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Similar Issues:

      Description

      In the CloudBees Folder plugin, RelocateAction implements TransientProjectActionFactory to add the link to various project types letting them be moved into other folders, and TransientFolderActionFactory for subfolders. Would make sense to have a generic TransientActionFactory for other Actionable subtypes (maybe only AbstractItem), which would allow miscellaneous items (especially when a TopLevelItem) to get actions like Relocate as well.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            core/src/main/java/hudson/cli/SetBuildParameterCommand.java
            core/src/main/java/hudson/matrix/DefaultMatrixExecutionStrategyImpl.java
            core/src/main/java/hudson/model/AbstractBuild.java
            core/src/main/java/hudson/model/AbstractProject.java
            core/src/main/java/hudson/model/Actionable.java
            core/src/main/java/hudson/model/CauseAction.java
            core/src/main/java/hudson/model/Computer.java
            core/src/main/java/hudson/model/Job.java
            core/src/main/java/hudson/model/Queue.java
            core/src/main/java/hudson/model/Run.java
            core/src/main/java/hudson/model/TransientBuildActionFactory.java
            core/src/main/java/hudson/model/TransientComputerActionFactory.java
            core/src/main/java/hudson/model/TransientProjectActionFactory.java
            core/src/main/java/hudson/model/labels/LabelAtom.java
            core/src/main/java/hudson/model/queue/WorkUnitContext.java
            core/src/main/java/hudson/tasks/Fingerprinter.java
            core/src/main/java/hudson/triggers/SCMTrigger.java
            core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java
            core/src/main/java/jenkins/model/TransientActionFactory.java
            core/src/main/resources/hudson/matrix/MatrixProject/index.jelly
            core/src/main/resources/hudson/model/AbstractBuild/index.jelly
            core/src/main/resources/hudson/model/AbstractProject/main.jelly
            core/src/main/resources/lib/hudson/actions.jelly
            core/src/main/resources/lib/hudson/project/projectActionFloatingBox.jelly
            core/src/test/java/hudson/model/ActionableTest.java
            test/src/test/java/hudson/model/UserTest.java
            test/src/test/java/jenkins/model/TransientActionFactoryTest.java
            http://jenkins-ci.org/commit/jenkins/0f7b144fd32544a872075d58300a53b9abcca5f4
            Log:
            Merge pull request #1059 from jglick/TransientActionFactory-JENKINS-18224

            JENKINS-18224 TransientActionFactory

            Compare: https://github.com/jenkinsci/jenkins/compare/e998c2a670fb...0f7b144fd325

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/cli/SetBuildParameterCommand.java core/src/main/java/hudson/matrix/DefaultMatrixExecutionStrategyImpl.java core/src/main/java/hudson/model/AbstractBuild.java core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/Actionable.java core/src/main/java/hudson/model/CauseAction.java core/src/main/java/hudson/model/Computer.java core/src/main/java/hudson/model/Job.java core/src/main/java/hudson/model/Queue.java core/src/main/java/hudson/model/Run.java core/src/main/java/hudson/model/TransientBuildActionFactory.java core/src/main/java/hudson/model/TransientComputerActionFactory.java core/src/main/java/hudson/model/TransientProjectActionFactory.java core/src/main/java/hudson/model/labels/LabelAtom.java core/src/main/java/hudson/model/queue/WorkUnitContext.java core/src/main/java/hudson/tasks/Fingerprinter.java core/src/main/java/hudson/triggers/SCMTrigger.java core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java core/src/main/java/jenkins/model/TransientActionFactory.java core/src/main/resources/hudson/matrix/MatrixProject/index.jelly core/src/main/resources/hudson/model/AbstractBuild/index.jelly core/src/main/resources/hudson/model/AbstractProject/main.jelly core/src/main/resources/lib/hudson/actions.jelly core/src/main/resources/lib/hudson/project/projectActionFloatingBox.jelly core/src/test/java/hudson/model/ActionableTest.java test/src/test/java/hudson/model/UserTest.java test/src/test/java/jenkins/model/TransientActionFactoryTest.java http://jenkins-ci.org/commit/jenkins/0f7b144fd32544a872075d58300a53b9abcca5f4 Log: Merge pull request #1059 from jglick/TransientActionFactory- JENKINS-18224 JENKINS-18224 TransientActionFactory Compare: https://github.com/jenkinsci/jenkins/compare/e998c2a670fb...0f7b144fd325
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/com/cloudbees/hudson/plugins/folder/Folder.java
            src/main/java/com/cloudbees/hudson/plugins/folder/TransientFolderActionFactory.java
            src/main/java/com/cloudbees/hudson/plugins/folder/relocate/RelocateAction.java
            src/main/resources/com/cloudbees/hudson/plugins/folder/Folder/configure.jelly
            src/test/java/com/cloudbees/hudson/plugins/folder/FolderTest.java
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/c006194cec064331b273050177d67c883b6e6d27
            Log:
            Taking advantage of APIs available with newer Jenkins cores.
            · JENKINS-18224 TransientActionFactory simplifies adding the Move action and makes it available more broadly.
            Can therefore deprecate TransientFolderActionFactory.
            · Expanding the search index to look for jobs in subfolders (matches #848 in Jenkins root).
            · testReloadJenkinsAndFindBuildInProgress can now pass unconditionally.
            · ListView.setIncludeRegex avoids the need for reflection.
            · f:bottomButtonBar convenient in Jelly.
            As yet unimplemented:
            · AutoCompletionCandidates.ofJobNames could be used, though it does not filter by permitted children.
            (Nor, generally, should it, since this method is typically used for existing items, which might violate this restriction.)
            Might be feasible to call ofJobNames and then filter the result; or perhaps this method should accept an Item filter.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/hudson/plugins/folder/Folder.java src/main/java/com/cloudbees/hudson/plugins/folder/TransientFolderActionFactory.java src/main/java/com/cloudbees/hudson/plugins/folder/relocate/RelocateAction.java src/main/resources/com/cloudbees/hudson/plugins/folder/Folder/configure.jelly src/test/java/com/cloudbees/hudson/plugins/folder/FolderTest.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/c006194cec064331b273050177d67c883b6e6d27 Log: Taking advantage of APIs available with newer Jenkins cores. · JENKINS-18224 TransientActionFactory simplifies adding the Move action and makes it available more broadly. Can therefore deprecate TransientFolderActionFactory. · Expanding the search index to look for jobs in subfolders (matches #848 in Jenkins root). · testReloadJenkinsAndFindBuildInProgress can now pass unconditionally. · ListView.setIncludeRegex avoids the need for reflection. · f:bottomButtonBar convenient in Jelly. As yet unimplemented: · AutoCompletionCandidates.ofJobNames could be used, though it does not filter by permitted children. (Nor, generally, should it, since this method is typically used for existing items, which might violate this restriction.) Might be feasible to call ofJobNames and then filter the result; or perhaps this method should accept an Item filter.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3157
            [FIXED JENKINS-18224] Introduced TransientActionFactory. (Revision f1a751f79dfbb975e4c436fd0967323e1ae7b8c6)
            JENKINS-18224 Introduced Actionable.replaceAction, allowing getActions() to be deprecated except for subclasses. (Revision a22e9feaaef30b89621ae9ca3f33f862ae99f4c7)
            JENKINS-18224 Preparing to merge #1059. (Revision 6eb191964b415d7f0a025847d5444db922d6fe49)

            Result = SUCCESS
            Jesse Glick : f1a751f79dfbb975e4c436fd0967323e1ae7b8c6
            Files :

            • core/src/main/java/hudson/model/Job.java
            • core/src/main/resources/hudson/matrix/MatrixProject/index.jelly
            • core/src/main/java/hudson/model/queue/WorkUnitContext.java
            • core/src/main/resources/lib/hudson/actions.jelly
            • core/src/main/java/hudson/model/Computer.java
            • core/src/main/java/hudson/matrix/DefaultMatrixExecutionStrategyImpl.java
            • core/src/main/java/hudson/model/AbstractProject.java
            • core/src/main/java/hudson/model/TransientComputerActionFactory.java
            • core/src/main/java/jenkins/model/TransientActionFactory.java
            • core/src/main/resources/lib/hudson/project/projectActionFloatingBox.jelly
            • core/src/main/java/hudson/model/Run.java
            • core/src/main/resources/hudson/model/AbstractBuild/index.jelly
            • core/src/main/java/hudson/model/AbstractBuild.java
            • core/src/main/java/hudson/model/Actionable.java
            • core/src/main/java/hudson/model/Queue.java
            • core/src/main/java/hudson/model/TransientBuildActionFactory.java
            • core/src/main/java/hudson/model/TransientProjectActionFactory.java
            • test/src/test/java/jenkins/model/TransientActionFactoryTest.java
            • core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java
            • core/src/main/resources/hudson/model/AbstractProject/main.jelly

            Jesse Glick : a22e9feaaef30b89621ae9ca3f33f862ae99f4c7
            Files :

            • core/src/main/java/hudson/model/CauseAction.java
            • core/src/main/java/hudson/model/Computer.java
            • core/src/main/java/hudson/model/labels/LabelAtom.java
            • core/src/main/java/hudson/model/Actionable.java
            • core/src/main/java/hudson/cli/SetBuildParameterCommand.java
            • core/src/main/java/hudson/triggers/SCMTrigger.java
            • test/src/test/java/hudson/model/UserTest.java
            • core/src/main/java/hudson/tasks/Fingerprinter.java
            • core/src/main/java/hudson/model/AbstractProject.java
            • core/src/main/java/hudson/model/AbstractBuild.java

            Jesse Glick : 6eb191964b415d7f0a025847d5444db922d6fe49
            Files :

            • core/src/main/java/jenkins/model/TransientActionFactory.java
            • changelog.html
            • core/src/main/java/hudson/model/Actionable.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3157 [FIXED JENKINS-18224] Introduced TransientActionFactory. (Revision f1a751f79dfbb975e4c436fd0967323e1ae7b8c6) JENKINS-18224 Introduced Actionable.replaceAction, allowing getActions() to be deprecated except for subclasses. (Revision a22e9feaaef30b89621ae9ca3f33f862ae99f4c7) JENKINS-18224 Preparing to merge #1059. (Revision 6eb191964b415d7f0a025847d5444db922d6fe49) Result = SUCCESS Jesse Glick : f1a751f79dfbb975e4c436fd0967323e1ae7b8c6 Files : core/src/main/java/hudson/model/Job.java core/src/main/resources/hudson/matrix/MatrixProject/index.jelly core/src/main/java/hudson/model/queue/WorkUnitContext.java core/src/main/resources/lib/hudson/actions.jelly core/src/main/java/hudson/model/Computer.java core/src/main/java/hudson/matrix/DefaultMatrixExecutionStrategyImpl.java core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/TransientComputerActionFactory.java core/src/main/java/jenkins/model/TransientActionFactory.java core/src/main/resources/lib/hudson/project/projectActionFloatingBox.jelly core/src/main/java/hudson/model/Run.java core/src/main/resources/hudson/model/AbstractBuild/index.jelly core/src/main/java/hudson/model/AbstractBuild.java core/src/main/java/hudson/model/Actionable.java core/src/main/java/hudson/model/Queue.java core/src/main/java/hudson/model/TransientBuildActionFactory.java core/src/main/java/hudson/model/TransientProjectActionFactory.java test/src/test/java/jenkins/model/TransientActionFactoryTest.java core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java core/src/main/resources/hudson/model/AbstractProject/main.jelly Jesse Glick : a22e9feaaef30b89621ae9ca3f33f862ae99f4c7 Files : core/src/main/java/hudson/model/CauseAction.java core/src/main/java/hudson/model/Computer.java core/src/main/java/hudson/model/labels/LabelAtom.java core/src/main/java/hudson/model/Actionable.java core/src/main/java/hudson/cli/SetBuildParameterCommand.java core/src/main/java/hudson/triggers/SCMTrigger.java test/src/test/java/hudson/model/UserTest.java core/src/main/java/hudson/tasks/Fingerprinter.java core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/AbstractBuild.java Jesse Glick : 6eb191964b415d7f0a025847d5444db922d6fe49 Files : core/src/main/java/jenkins/model/TransientActionFactory.java changelog.html core/src/main/java/hudson/model/Actionable.java
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/model/Actionable.java
            core/src/main/java/jenkins/model/TransientActionFactory.java
            http://jenkins-ci.org/commit/jenkins/c21b209ba383e5e4f6522ec866d03fb9ca5745a4
            Log:
            JENKINS-18224 Relaxing type parameter restriction on TransientActionFactory since useful mixin interfaces like Item do not extend Actionable.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/Actionable.java core/src/main/java/jenkins/model/TransientActionFactory.java http://jenkins-ci.org/commit/jenkins/c21b209ba383e5e4f6522ec866d03fb9ca5745a4 Log: JENKINS-18224 Relaxing type parameter restriction on TransientActionFactory since useful mixin interfaces like Item do not extend Actionable.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3158
            JENKINS-18224 Relaxing type parameter restriction on TransientActionFactory since useful mixin interfaces like Item do not extend Actionable. (Revision c21b209ba383e5e4f6522ec866d03fb9ca5745a4)

            Result = SUCCESS
            Jesse Glick : c21b209ba383e5e4f6522ec866d03fb9ca5745a4
            Files :

            • core/src/main/java/jenkins/model/TransientActionFactory.java
            • core/src/main/java/hudson/model/Actionable.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3158 JENKINS-18224 Relaxing type parameter restriction on TransientActionFactory since useful mixin interfaces like Item do not extend Actionable. (Revision c21b209ba383e5e4f6522ec866d03fb9ca5745a4) Result = SUCCESS Jesse Glick : c21b209ba383e5e4f6522ec866d03fb9ca5745a4 Files : core/src/main/java/jenkins/model/TransientActionFactory.java core/src/main/java/hudson/model/Actionable.java

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              jglick Jesse Glick
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: