Class MyViewsProperty
- All Implemented Interfaces:
- ExtensionPoint,- Action,- Describable<UserProperty>,- ModelObject,- ModifiableViewGroup,- ReconfigurableDescribable<UserProperty>,- Saveable,- ViewGroup,- AccessControlled,- org.kohsuke.stapler.StaplerFallback,- org.kohsuke.stapler.StaplerProxy
- Author:
- Tom Huybrechts
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from interface hudson.ExtensionPointExtensionPoint.LegacyInstancesAreScopedToHudson
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic booleanEscape hatch for StaplerProxy-based access controlFields inherited from class hudson.model.UserPropertyuser
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidbooleanDetermine whether a view may be deleted.voiddeleteView(View view) Deletes a view in this group.voiddoCreateView(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) org.kohsuke.stapler.HttpResponsedoIndex()doViewExistsCheck(String value, boolean exists) Checks if a private view with the given name exists.getACL()Obtains the ACL associated with this object.Gets the string to be displayed.Gets the name of the icon.If the view group renders one view in its own URL (like Jenkins top page does), then that view is called the primary view.getUrl()Returns the path of this group, relative to the context root, like "foo/bar/zot/".Gets the URL path name.getUser()Gets a view of the given name.Returns actions that should be displayed in views.getViews()Gets all the views in this group.Gets the TabBar for the views.voidonViewRenamed(View view, String oldName, String newName) Viewcalls this method when it's renamed.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.voidsave()Persists the state of this object into XML.voidsetPrimaryViewName(String primaryViewName) Sets the primary view.voidsetViewsTabBar(ViewsTabBar viewsTabBar) Methods inherited from class hudson.model.UserPropertyall, allByCategoryClass, getDescriptor, reconfigure, setUserMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.security.AccessControlledcheckAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2Methods inherited from interface hudson.model.ViewGroupgetAllViews, getItemGroup, getUserViewsTabBar
- 
Field Details- 
SKIP_PERMISSION_CHECK@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static boolean SKIP_PERMISSION_CHECKEscape hatch for StaplerProxy-based access control
 
- 
- 
Constructor Details- 
MyViewsProperty
 
- 
- 
Method Details- 
readResolve
- 
getPrimaryViewName
- 
setPrimaryViewNameSets the primary view.- Parameters:
- primaryViewName- Name of the primary view to be set.- nullto make the primary view undefined.
 
- 
getUser
- 
getUrlDescription copied from interface:ViewGroupReturns the path of this group, relative to the context root, like "foo/bar/zot/". Note no leading slash but trailing slash.
- 
saveDescription copied from interface:SaveablePersists the state of this object into XML.For making a bulk change efficiently, see BulkChange.To support listeners monitoring changes to this object, call SaveableListener.fireOnChange(hudson.model.Saveable, hudson.XmlFile)- Specified by:
- savein interface- Saveable
- Throws:
- IOException- if the persistence failed.
 
- 
getViewsDescription copied from interface:ViewGroupGets all the views in this group.
- 
getViewDescription copied from interface:ViewGroupGets a view of the given name. This also creates the URL binding for views (in the form of ".../view/FOOBAR/...")
- 
canDeleteDescription copied from interface:ViewGroupDetermine whether a view may be deleted.
- 
deleteViewDescription copied from interface:ViewGroupDeletes a view in this group.- Specified by:
- deleteViewin interface- ViewGroup
- Throws:
- IOException
 
- 
onViewRenamedDescription copied from interface:ViewGroupViewcalls this method when it's renamed. This method is intended to work as a notification to theViewGroup(so that it can adjust its internal data structure, for example.)It is the caller's responsibility to ensure that the new name is a legal view name. - Specified by:
- onViewRenamedin interface- ViewGroup
 
- 
addViewDescription copied from interface:ModifiableViewGroup- Specified by:
- addViewin interface- ModifiableViewGroup
- Throws:
- IOException
 
- 
getPrimaryViewDescription copied from interface:ViewGroupIf the view group renders one view in its own URL (like Jenkins top page does), then that view is called the primary view. In this case, the hyperlink to the primary view points to the view group itself.If the view group doesn't do such rendering, this method can always return null. - Specified by:
- getPrimaryViewin interface- ViewGroup
- Returns:
- by default, null
 
- 
doIndexpublic org.kohsuke.stapler.HttpResponse doIndex()
- 
doCreateView@POST public void doCreateView(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException, ParseException, Descriptor.FormException - Throws:
- IOException
- jakarta.servlet.ServletException
- ParseException
- Descriptor.FormException
 
- 
doViewExistsCheckpublic FormValidation doViewExistsCheck(@QueryParameter String value, @QueryParameter boolean exists) Checks if a private view with the given name exists. An error is returned if exists==true but the view does not exist. An error is also returned if exists==false but the view does exist.
- 
getACLDescription copied from interface:AccessControlledObtains the ACL associated with this object.- Specified by:
- getACLin interface- AccessControlled
- Returns:
- never null.
 
- 
getDisplayNameDescription copied from interface:ActionGets the string to be displayed. The convention is to capitalize the first letter of each word, such as "Test Result".- Specified by:
- getDisplayNamein interface- Action
- Specified by:
- getDisplayNamein interface- ModelObject
- Returns:
- Can be null in case the action is hidden.
 
- 
getIconFileNameDescription copied from interface:ActionGets the name of the icon.- Specified by:
- getIconFileNamein interface- Action
- Returns:
- If the icon name is prefixed with "symbol-", a Jenkins Symbol
      will be used.
      If just a file name (like "abc.gif") is returned, it will be interpreted as a file name inside /images/24x24. This is useful for using one of the stock images.If an absolute file name that starts from '/' is returned (like "/plugin/foo/abc.gif"), then it will be interpreted as a path from the context root of Jenkins. This is useful to pick up image files from a plugin. Finally, return null to hide it from the task list. This is normally not very useful, but this can be used for actions that only contribute floatBox.jellyand no task list item. The other case where this is useful is to avoid showing links that require a privilege when the user is anonymous.
- See Also:
 
- 
getUrlNameDescription copied from interface:ActionGets the URL path name.For example, if this method returns "xyz", and if the parent object (that this action is associated with) is bound to /foo/bar/zot, then this action object will be exposed to /foo/bar/zot/xyz. This method should return a string that's unique among other Actions.The returned string can be an absolute URL, like "http://www.sun.com/", which is useful for directly connecting to external systems. If the returned string starts with '/', like '/foo', then it's assumed to be relative to the context path of the Jenkins webapp. - Specified by:
- getUrlNamein interface- Action
- Returns:
- null if this action object doesn't need to be bound to web
      (when you do that, be sure to also return null from Action.getIconFileName().
- See Also:
 
- 
getTarget- Specified by:
- getTargetin interface- org.kohsuke.stapler.StaplerProxy
 
- 
reconfigurepublic UserProperty reconfigure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject form) throws Descriptor.FormException Description copied from interface:ReconfigurableDescribableWhen 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:
- reconfigurein interface- ReconfigurableDescribable<UserProperty>
- Overrides:
- reconfigurein class- UserProperty
- 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
 
- 
getViewsTabBarDescription copied from interface:ViewGroupGets the TabBar for the views. TabBar for views can be provided by extension. Only one TabBar can be active at a given time (Selectable by user in the global Configuration page). Default TabBar is provided by Hudson Platform.- Specified by:
- getViewsTabBarin interface- ViewGroup
 
- 
setViewsTabBar
- 
getViewActionsDescription copied from interface:ViewGroupReturns actions that should be displayed in views.In this interface, the return value is used read-only. This doesn't prevent subtypes from returning modifiable actions, however. - Specified by:
- getViewActionsin interface- ViewGroup
- Returns:
- may be empty but never null; Jenkins.getActions()by default
- See Also:
 
- 
getStaplerFallback- Specified by:
- getStaplerFallbackin interface- org.kohsuke.stapler.StaplerFallback
 
- 
getMyViewsTabBar
 
-