Interface Ancestor
- Author:
- Kohsuke Kawaguchi
-
Method Summary
Modifier and TypeMethodDescriptionGets the complete URL to this ancestor.getNext()
Gets the next ancestor, or null if none (meaning this is the 'it' object.getNextToken
(int n) Of the tokens that constitutegetRestOfUrl()
, return the n-th token.Gets the model object of the application.getPrev()
Gets the previous ancestor, or null if none (meaning this is the root object.)Gets the relative path from the current object to this ancestor.Gets the remaining URL after this ancestor.getUrl()
Gets the URL to this ancestor.
-
Method Details
-
getObject
Object getObject()Gets the model object of the application. -
getUrl
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 bygetFoo().getBar(3)
, then this string will be/mywebapp/foo/bar/3
Any ASCII-unsafe characters are escaped.
- Returns:
- never null.
-
getRestOfUrl
String getRestOfUrl()Gets the remaining URL after this ancestor.The returned string represents the portion of the request URL that follows this ancestor. It starts and ends without '/'. So, for example, if the request URL is "foo/bar/3" and this ancestor object is obtained from the app root object by
getFoo()
, then this string will bebar/3
-
getNextToken
Of the tokens that constitutegetRestOfUrl()
, return the n-th token. So in the example described ingetRestOfUrl()
,getNextToken(0).equals("bar")
andgetNextToken(1).equals("3")
-
getFullUrl
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
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.
-