All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hudson.model.LabelFinder Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 *
 * Copyright (c) 2004-2010 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:
 *
 *    Kohsuke Kawaguchi, Stephen Connolly
 *
 *
 *******************************************************************************/ 

package hudson.model;

import hudson.Extension;
import hudson.ExtensionList;
import hudson.ExtensionPoint;
import hudson.model.labels.LabelAtom;

import java.util.Collection;

/**
 * Automatically adds labels to {@link Node}s.
 *
 * 

To register your implementation, put {@link Extension} on your derived * types. * * @author Stephen Connolly * @since 1.323 Signature of this class changed in 1.323, after making sure that * no plugin in the Subversion repository is using this. */ public abstract class LabelFinder implements ExtensionPoint { /** * Returns all the registered {@link LabelFinder}s. */ public static ExtensionList all() { return Hudson.getInstance().getExtensionList(LabelFinder.class); } /** * Find the labels that the node supports. * * @param node The node that receives labels. Never null. * @return A set of labels for the node. Can be empty but never null. */ public abstract Collection findLabels(Node node); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy