org.kohsuke.stapler
Interface Ancestor


public interface Ancestor

Information about ancestor of the "it" node.

Author:
Kohsuke Kawaguchi

Method Summary
 java.lang.String getFullUrl()
          Gets the complete URL to this ancestor.
 Ancestor getNext()
          Gets the next ancestor, or null if none (meaning this is the 'it' object.
 java.lang.Object getObject()
          Gets the model object of the application.
 Ancestor getPrev()
          Gets the previous ancestor, or null if none (meaning this is the root object.)
 java.lang.String getRelativePath()
          Gets the relative path from the current object to this ancestor.
 java.lang.String getUrl()
          Gets the URL to this ancestor.
 

Method Detail

getObject

java.lang.Object getObject()
Gets the model object of the application.


getUrl

java.lang.String getUrl()
Gets the URL to this ancestor.

The returned string represents the portion of the request URL that matches this object. It starts with context path, and it ends without '/'. So, for example, if your web app is deployed as "mywebapp" and this ancestor object is obtained from the app root object by getFoo().getBar(3), then this string will be /mywebapp/foo/bar/3

Any ASCII-unsafe characters are escaped.

Returns:
never null.

getFullUrl

java.lang.String getFullUrl()
Gets the complete URL to this ancestor.

This method works like getUrl() except it contains the host name and the port number.


getRelativePath

java.lang.String getRelativePath()
Gets the relative path from the current object to this ancestor.

The returned string looks like "../.." (ends without '/')

Returns:
never null.

getPrev

Ancestor getPrev()
Gets the previous ancestor, or null if none (meaning this is the root object.)


getNext

Ancestor getNext()
Gets the next ancestor, or null if none (meaning this is the 'it' object.



Copyright © 2009. All Rights Reserved.