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

Node should have a getProperty method to get aNodeProperty for specific class

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved (View Workflow)
    • Priority: Trivial
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      Like Job has a
      public <T extends JobProperty> T getProperty(Class<T> clazz)
      and
      public JobProperty getProperty(String className)

      there should be similar methods for a Node
      public <T extends NodeProperty> T getProperty(Class<T> clazz)
      and
      public NodeProperty getProperty(String className)

      This makes it easier when you write your own NodeProperty and want to check if it is set on a node or not.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Markus Winter
          Path:
          core/src/main/java/hudson/model/Node.java
          http://jenkins-ci.org/commit/jenkins/a1258c0009bbdbe1a7de19ce383b5eac8bf4296f
          Log:
          JENKINS-40365 add Node#getNodeProperty methods (#2663)

          • implement getNodeProperty in DummySlave
          • implement getNodeProperty in Node

          avoid binary imcompatible change
          dded javadoc

          • revert Slave.jar to original
          • fix formatting
          • more formatting
          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Markus Winter Path: core/src/main/java/hudson/model/Node.java http://jenkins-ci.org/commit/jenkins/a1258c0009bbdbe1a7de19ce383b5eac8bf4296f Log: JENKINS-40365 add Node#getNodeProperty methods (#2663) JENKINS-40365 add getNodeProperty methods implement getNodeProperty in DummySlave implement getNodeProperty in Node avoid binary imcompatible change dded javadoc revert Slave.jar to original fix formatting more formatting
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Released in jenkins-2.37

          Show
          oleg_nenashev Oleg Nenashev added a comment - Released in jenkins-2.37

            People

            • Assignee:
              Unassigned
              Reporter:
              mwinter69 Markus Winter
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: