|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.model.UserProperty
hudson.model.MyViewsProperty
public class MyViewsProperty
A UserProperty that remembers user-private views.
| Nested Class Summary | |
|---|---|
static class |
MyViewsProperty.DescriptorImpl
|
static class |
MyViewsProperty.GlobalAction
|
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Field Summary |
|---|
| Fields inherited from interface hudson.model.Saveable |
|---|
NOOP |
| Constructor Summary | |
|---|---|
MyViewsProperty(String primaryViewName)
|
|
| Method Summary | |
|---|---|
void |
addView(View view)
|
boolean |
canDelete(View view)
Determine whether a view may be deleted. |
void |
checkPermission(Permission permission)
Convenient short-cut for getACL().checkPermission(permission) |
void |
deleteView(View view)
Deletes a view in this group. |
void |
doCreateView(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
|
org.kohsuke.stapler.HttpResponse |
doIndex()
|
FormValidation |
doViewExistsCheck(String value,
boolean exists)
Checks if a private view with the given name exists. |
ACL |
getACL()
Obtains the ACL associated with this object. |
String |
getDisplayName()
Gets the string to be displayed. |
String |
getIconFileName()
Gets the file name of the icon. |
MyViewsTabBar |
getMyViewsTabBar()
|
View |
getPrimaryView()
|
String |
getPrimaryViewName()
|
String |
getUrl()
Returns the path of this group, relative to the context root, like "foo/bar/zot/". |
String |
getUrlName()
Gets the URL path name. |
User |
getUser()
|
View |
getView(String name)
Gets a view of the given name. |
Collection<View> |
getViews()
Gets all the views in this group. |
ViewsTabBar |
getViewsTabBar()
Gets the TabBar for the views. |
boolean |
hasPermission(Permission permission)
Convenient short-cut for getACL().hasPermission(permission) |
void |
onViewRenamed(View view,
String oldName,
String newName)
View calls this method when it's renamed. |
Object |
readResolve()
|
UserProperty |
reconfigure(org.kohsuke.stapler.StaplerRequest req,
net.sf.json.JSONObject form)
|
void |
save()
Persists the state of this object into XML. |
void |
setPrimaryViewName(String primaryViewName)
|
| Methods inherited from class hudson.model.UserProperty |
|---|
all, getDescriptor |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@DataBoundConstructor public MyViewsProperty(String primaryViewName)
| Method Detail |
|---|
public String getPrimaryViewName()
public void setPrimaryViewName(String primaryViewName)
public User getUser()
public String getUrl()
ViewGroup
getUrl in interface ViewGroup
public void save()
throws IOException
Saveable For making a bulk change efficiently, see BulkChange.
To support listeners monitoring changes to this object, call
SaveableListener.fireOnChange(Saveable, hudson.XmlFile)
save in interface SaveableIOException - if the persistence failed.public Collection<View> getViews()
ViewGroup
getViews in interface ViewGrouppublic View getView(String name)
ViewGroup
getView in interface ViewGrouppublic boolean canDelete(View view)
ViewGroup
canDelete in interface ViewGroup
public void deleteView(View view)
throws IOException
ViewGroup
deleteView in interface ViewGroupIOException
public void onViewRenamed(View view,
String oldName,
String newName)
ViewGroupView calls this method when it's renamed. This method is intended
to work as a notification to the ViewGroup (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.
onViewRenamed in interface ViewGroup
public void addView(View view)
throws IOException
IOExceptionpublic View getPrimaryView()
public org.kohsuke.stapler.HttpResponse doIndex()
public void doCreateView(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
ParseException,
Descriptor.FormException
IOException
javax.servlet.ServletException
ParseException
Descriptor.FormException
public FormValidation doViewExistsCheck(@QueryParameter
String value,
@QueryParameter
boolean exists)
public ACL getACL()
AccessControlled
getACL in interface AccessControlled
public void checkPermission(Permission permission)
throws org.springframework.security.AccessDeniedException
AccessControlledgetACL().checkPermission(permission)
checkPermission in interface AccessControlledorg.springframework.security.AccessDeniedExceptionpublic boolean hasPermission(Permission permission)
AccessControlledgetACL().hasPermission(permission)
hasPermission in interface AccessControlledpublic String getDisplayName()
Action
getDisplayName in interface ActiongetDisplayName in interface ModelObjectpublic String getIconFileName()
Action
getIconFileName in interface ActionIf an absolute file name that starts from '/' is returned (like "/plugin/foo/abc.png'), then it will be interpreted as a path from the context root of Hudson. 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.jelly and 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.
Hudson.isAdmin()public String getUrlName()
ActionFor 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 Hudson webapp.
getUrlName in interface ActionAction.getIconFileName().
public UserProperty reconfigure(org.kohsuke.stapler.StaplerRequest req,
net.sf.json.JSONObject form)
throws Descriptor.FormException
reconfigure in class UserPropertyDescriptor.FormExceptionpublic Object readResolve()
public ViewsTabBar getViewsTabBar()
ViewGroup
getViewsTabBar in interface ViewGrouppublic MyViewsTabBar getMyViewsTabBar()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||