hudson.model
Class AbstractModelObject

java.lang.Object
  extended by hudson.model.AbstractModelObject
All Implemented Interfaces:
ModelObject, SearchableModelObject, SearchItem
Direct Known Subclasses:
Actionable, AdministrativeMonitor, Api, Cloud, ComputerSet, HudsonHomeDiskUsageMonitor.Solution, LogRecorder, LogRecorderManager, Node, PluginManager, TaskAction, TestObject, UpdateCenter, User, View

public abstract class AbstractModelObject
extends Object
implements SearchableModelObject

ModelObject with some convenience methods.

Author:
Kohsuke Kawaguchi

Constructor Summary
AbstractModelObject()
           
 
Method Summary
 Search getSearch()
          This binds Search object to the URL hierarchy.
 SearchIndex getSearchIndex()
          Returns the SearchIndex to further search sub items inside this item.
 String getSearchName()
          Default implementation that returns the display name.
protected  SearchIndexBuilder makeSearchIndex()
          Default implementation that returns empty index.
protected  void requirePOST()
          Deprecated. Use RequirePOST on your method.
protected  void sendError(Exception e)
           
protected  void sendError(Exception e, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Displays the error in a page.
protected  void sendError(String message)
           
protected  void sendError(String message, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
           
protected  void sendError(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
 

Constructor Detail

AbstractModelObject

public AbstractModelObject()
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.ServletException
IOException

sendError

protected final void sendError(Exception e)
                        throws javax.servlet.ServletException,
                               IOException
Throws:
javax.servlet.ServletException
IOException

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.ServletException
IOException

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.ServletException
IOException

sendError

protected final void sendError(String message)
                        throws javax.servlet.ServletException,
                               IOException
Throws:
javax.servlet.ServletException
IOException

requirePOST

protected final void requirePOST()
                          throws javax.servlet.ServletException
Deprecated. Use RequirePOST on 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: SearchItem
Returns the SearchIndex to further search sub items inside this item.

Specified by:
getSearchIndex in interface SearchItem
Returns:
SearchIndex.EMPTY if this is a leaf.
See Also:
SearchIndexBuilder

getSearch

public Search getSearch()
Description copied from interface: SearchableModelObject
This binds Search object to the URL hierarchy.

Specified by:
getSearch in interface SearchableModelObject

getSearchName

public String getSearchName()
Default implementation that returns the display name.

Specified by:
getSearchName in interface SearchItem


Copyright © 2004-2013. All Rights Reserved.