Package hudson.model
Class AbstractModelObject
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- All Implemented Interfaces:
ModelObject,SearchableModelObject,SearchItem
- Direct Known Subclasses:
Actionable,AdministrativeMonitor,Api,CloudSet,ComputerSet,HudsonHomeDiskUsageMonitor.Solution,LogRecorder,LogRecorderManager,Node,PluginManager,TaskAction,UpdateCenter,User,View
public abstract class AbstractModelObject extends Object implements SearchableModelObject
ModelObjectwith some convenience methods.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description AbstractModelObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SearchgetSearch()This bindsSearchobject to the URL hierarchy.SearchIndexgetSearchIndex()Returns theSearchIndexto further search sub items inside this item.StringgetSearchName()Default implementation that returns the display name.protected SearchIndexBuildermakeSearchIndex()Default implementation that returns empty index.protected voidrequirePOST()Deprecated.UseRequirePOSTon your method.protected voidsendError(Exception e)protected voidsendError(Exception e, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Displays the error in a page.protected voidsendError(String message)protected voidsendError(String message, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)protected voidsendError(String message, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, boolean pre)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.model.ModelObject
getDisplayName
-
Methods inherited from interface hudson.search.SearchItem
getSearchUrl
-
-
-
-
Method Detail
-
sendError
protected final void sendError(Exception e, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws javax.servlet.ServletException, IOException
Displays the error in a page.- Throws:
javax.servlet.ServletExceptionIOException
-
sendError
protected final void sendError(Exception e) throws javax.servlet.ServletException, IOException
- Throws:
javax.servlet.ServletExceptionIOException
-
sendError
protected final void sendError(String message, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws javax.servlet.ServletException, IOException
- Throws:
javax.servlet.ServletExceptionIOException
-
sendError
protected final void sendError(String message, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, boolean pre) throws javax.servlet.ServletException, IOException
- Parameters:
pre- If true, the message is put in a PRE tag.- Throws:
javax.servlet.ServletExceptionIOException
-
sendError
protected final void sendError(String message) throws javax.servlet.ServletException, IOException
- Throws:
javax.servlet.ServletExceptionIOException
-
requirePOST
@Deprecated protected final void requirePOST() throws javax.servlet.ServletException
Deprecated.UseRequirePOSTon your method.Convenience method to verify that the current request is a POST request.- Throws:
javax.servlet.ServletException
-
makeSearchIndex
protected SearchIndexBuilder makeSearchIndex()
Default implementation that returns empty index.
-
getSearchIndex
public final SearchIndex getSearchIndex()
Description copied from interface:SearchItemReturns theSearchIndexto further search sub items inside this item.- Specified by:
getSearchIndexin interfaceSearchItem- Returns:
SearchIndex.EMPTYif this is a leaf.- See Also:
SearchIndexBuilder
-
getSearch
public Search getSearch()
Description copied from interface:SearchableModelObjectThis bindsSearchobject to the URL hierarchy.- Specified by:
getSearchin interfaceSearchableModelObject
-
getSearchName
public String getSearchName()
Default implementation that returns the display name.- Specified by:
getSearchNamein interfaceSearchItem
-
-