hudson.model
Class DescriptorVisibilityFilter

java.lang.Object
  extended by hudson.model.DescriptorVisibilityFilter
All Implemented Interfaces:
ExtensionPoint

public abstract class DescriptorVisibilityFilter
extends Object
implements ExtensionPoint

Hides Descriptors from users.

Since:
1.393
Author:
Kohsuke Kawaguchi
See Also:
ExtensionFilter

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
DescriptorVisibilityFilter()
           
 
Method Summary
static ExtensionList<DescriptorVisibilityFilter> all()
           
static
<T extends Descriptor>
List<T>
apply(Object context, Iterable<T> source)
           
abstract  boolean filter(Object context, Descriptor descriptor)
          Decides if the given descriptor should be visible to the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptorVisibilityFilter

public DescriptorVisibilityFilter()
Method Detail

filter

public abstract boolean filter(Object context,
                               Descriptor descriptor)
Decides if the given descriptor should be visible to the user.

Parameters:
context - The object that indicates where the visibility of a descriptor is evaluated. For example, if Hudson is deciding whether a FreeStyleProject should gets a SCMDescriptor, the context object will be the FreeStyleProject. The caller can pass in null if there's no context.
descriptor - Descriptor whose visibility is evaluated. Never null.
Returns:
true to allow the descriptor to be visible. false to hide it. If any of the installed DescriptorVisibilityFilter returns false, the descriptor is not shown.

all

public static ExtensionList<DescriptorVisibilityFilter> all()

apply

public static <T extends Descriptor> List<T> apply(Object context,
                                                   Iterable<T> source)


Copyright © 2004-2013. All Rights Reserved.