
hudson.tools.ToolProperty Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hudson-core Show documentation
Show all versions of hudson-core Show documentation
Contains the core Hudson code and view files to render HTML.
The newest version!
/*******************************************************************************
*
* Copyright (c) 2004-2009, Oracle Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*
*
*
*
*******************************************************************************/
package hudson.tools;
import hudson.DescriptorExtensionList;
import hudson.ExtensionPoint;
import hudson.model.Describable;
import hudson.model.Hudson;
/**
* Extensible property of {@link ToolInstallation}.
*
* Plugins can contribute this extension point to add additional data or UI
* actions to {@link ToolInstallation}. {@link ToolProperty}s show up in the
* configuration screen of a tool, and they are persisted with the
* {@link ToolInstallation} object.
*
*
*
Views
- config.jelly
- Added to the configuration page
* of the tool.
*
* @param {@link ToolProperty} can choose to only work with a certain
* subtype of {@link ToolInstallation}, and this 'T' represents that type. Also
* see {@link ToolPropertyDescriptor#isApplicable(Class)}.
*
* @since 1.303
*/
public abstract class ToolProperty implements Describable>, ExtensionPoint {
protected transient T tool;
protected void setTool(T tool) {
this.tool = tool;
}
public ToolPropertyDescriptor getDescriptor() {
return (ToolPropertyDescriptor) Hudson.getInstance().getDescriptorOrDie(getClass());
}
/**
* What is your 'T'?
*/
public abstract Class type();
/**
* Lists up all the registered {@link ToolPropertyDescriptor}s in the
* system.
*
* @see ToolDescriptor#getPropertyDescriptors()
*/
public static DescriptorExtensionList, ToolPropertyDescriptor> all() {
return (DescriptorExtensionList) Hudson.getInstance().getDescriptorList(ToolProperty.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy