Package hudson.model
Class ViewProperty
java.lang.Object
hudson.model.ViewProperty
- All Implemented Interfaces:
ExtensionPoint
,Describable<ViewProperty>
,ReconfigurableDescribable<ViewProperty>
public class ViewProperty
extends Object
implements ReconfigurableDescribable<ViewProperty>, ExtensionPoint
Extensible property of
View
.
Plugin
s can extend this to define custom properties for View
s.
ViewProperty
s show up in the view configuration screen, and they are
persisted with the view object.
Configuration screen should be defined in config.jelly
.
Within this page, the ViewProperty
instance is available as
the instance
EL variable (while the it
EL variable
refers to the View
.
- Since:
- 1.406
- Author:
- Stephen Connolly
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionall()
Gets the descriptor for this instance.reconfigure
(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject form) When a parent/owner object of a Describable gets a config form submission and instances are recreated, this method is invoked on the existing instance (meaning the 'this' reference points to the existing instance) to create a new instance to be added to the parent/owner object.reconfigure
(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form) Deprecated.
-
Field Details
-
view
The view object that owns this property. This value will be set by the core code. Derived classes can expect this value to be always set.
-
-
Constructor Details
-
ViewProperty
public ViewProperty()
-
-
Method Details
-
getDescriptor
Description copied from interface:Describable
Gets the descriptor for this instance.Descriptor
is a singleton for every concreteDescribable
implementation, so ifa.getClass() == b.getClass()
then by defaulta.getDescriptor() == b.getDescriptor()
as well. (In rare cases a single implementation class may be used for instances with distinct descriptors.)- Specified by:
getDescriptor
in interfaceDescribable<ViewProperty>
-
all
-
reconfigure
public ViewProperty reconfigure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject form) throws Descriptor.FormException Description copied from interface:ReconfigurableDescribable
When a parent/owner object of a Describable gets a config form submission and instances are recreated, this method is invoked on the existing instance (meaning the 'this' reference points to the existing instance) to create a new instance to be added to the parent/owner object.The default implementation of this should be the following:
return form==null ? null : getDescriptor().newInstance(req, form);
- Specified by:
reconfigure
in interfaceReconfigurableDescribable<ViewProperty>
- Parameters:
req
- The current HTTP request being processed.form
- JSON fragment that corresponds to this describable object. If the newly submitted form doesn't include a fragment for this describable (meaning the user has de-selected your descriptor), then this argument is null.- Returns:
- The new instance. To not to create an instance of a describable, return null.
- Throws:
Descriptor.FormException
-
reconfigure
@Deprecated public ViewProperty reconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form) throws Descriptor.FormException Deprecated.- Specified by:
reconfigure
in interfaceReconfigurableDescribable<ViewProperty>
- Throws:
Descriptor.FormException
-