http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/4752869d/content/site/apidocs/org/apache/juneau/rest/RestContext.html ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/rest/RestContext.html b/content/site/apidocs/org/apache/juneau/rest/RestContext.html new file mode 100644 index 0000000..21e024c --- /dev/null +++ b/content/site/apidocs/org/apache/juneau/rest/RestContext.html @@ -0,0 +1,2046 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>RestContext (Apache Juneau (incubating) 6.1.1-incubating-SNAPSHOT)</title> +<link rel="stylesheet" type="text/css" href="../../../../javadoc.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="RestContext (Apache Juneau (incubating) 6.1.1-incubating-SNAPSHOT)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/juneau/rest/RestConfig.html" title="class in org.apache.juneau.rest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/juneau/rest/RestConverter.html" title="interface in org.apache.juneau.rest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/juneau/rest/RestContext.html" target="_top">Frames</a></li> +<li><a href="RestContext.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.juneau.rest</div> +<h2 title="Class RestContext" class="title">Class RestContext</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">org.apache.juneau.Context</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.juneau.rest.RestContext</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public final class <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.44">RestContext</a> +extends <a href="../../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">Context</a></pre> +<div class="block">Contains all the configuration on a REST resource and the entry points for handling REST calls. + <p> + See <a href="../../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a> for more information about context properties.</div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_allowBodyParam">REST_allowBodyParam</a></span></code> +<div class="block"><b>Configuration property:</b> Enable <js>"body"</js> URL parameter.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_allowHeaderParams">REST_allowHeaderParams</a></span></code> +<div class="block"><b>Configuration property:</b> Enable header URL parameters.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_allowMethodParam">REST_allowMethodParam</a></span></code> +<div class="block"><b>Configuration property:</b> Enable <js>"method"</js> URL parameter for specific HTTP methods.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_defaultCharset">REST_defaultCharset</a></span></code> +<div class="block"><b>Configuration property:</b> Default character encoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_method">REST_method</a></span></code> +<div class="block">The request method.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_methodDescription">REST_methodDescription</a></span></code> +<div class="block">The localized method description.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_methodSummary">REST_methodSummary</a></span></code> +<div class="block">The localized method summary.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_paramFormat">REST_paramFormat</a></span></code> +<div class="block"><b>Configuration property:</b> Expected format of request parameters.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_pathInfo">REST_pathInfo</a></span></code> +<div class="block">The request URI path info.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_relativeServletURI">REST_relativeServletURI</a></span></code> +<div class="block">The request servlet URI.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_renderResponseStackTraces">REST_renderResponseStackTraces</a></span></code> +<div class="block"><b>Configuration property:</b> Render stack traces.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_requestURI">REST_requestURI</a></span></code> +<div class="block">The request URI.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_servletDescription">REST_servletDescription</a></span></code> +<div class="block">The localized servlet description.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_servletPath">REST_servletPath</a></span></code> +<div class="block">The request servlet path.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_servletTitle">REST_servletTitle</a></span></code> +<div class="block">The localized servlet title.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_servletURI">REST_servletURI</a></span></code> +<div class="block">The request servlet URI.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#REST_useStackTraceHashes">REST_useStackTraceHashes</a></span></code> +<div class="block"><b>Configuration property:</b> Use stack trace hashes.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#RestContext-java.lang.Object-org.apache.juneau.rest.RestConfig-">RestContext</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> resource, + <a href="../../../../org/apache/juneau/rest/RestConfig.html" title="class in org.apache.juneau.rest">RestConfig</a> config)</code> +<div class="block">Constructor.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>protected boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#allowMethodParam-java.lang.String-">allowMethodParam</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> m)</code> +<div class="block">Returns <jk>true</jk> if the specified <code>Method</code> GET parameter value can be used to override + the method name in the HTTP header.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>protected void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#checkForInitException--">checkForInitException</a></span>()</code> +<div class="block">Throws a <a href="../../../../org/apache/juneau/rest/RestException.html" title="class in org.apache.juneau.rest"><code>RestException</code></a> if an exception occurred in the constructor of this object.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>protected void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#destroy--">destroy</a></span>()</code> +<div class="block">Calls <a href="http://docs.oracle.com/javaee/5/api/javax/servlet/Servlet.html?is-external=true#destroy--" title="class or interface in javax.servlet"><code>Servlet.destroy()</code></a> on any child resources defined on this resource.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code><a href="../../../../org/apache/juneau/BeanContext.html" title="class in org.apache.juneau">BeanContext</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getBeanContext--">getBeanContext</a></span>()</code> +<div class="block">Returns the <a href="../../../../org/apache/juneau/BeanContext.html" title="class in org.apache.juneau"><code>BeanContext</code></a> object used for parsing path variables and header values.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getBeanFilters--">getBeanFilters</a></span>()</code> +<div class="block">Returns the bean filters associated with this resource.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>protected <a href="../../../../org/apache/juneau/rest/RestCallHandler.html" title="class in org.apache.juneau.rest">RestCallHandler</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getCallHandler--">getCallHandler</a></span>()</code> +<div class="block">Returns the REST call handler used by this resource.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,org.apache.juneau.rest.CallMethod></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getCallMethods--">getCallMethods</a></span>()</code> +<div class="block">Returns the REST Java methods defined in this resource.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,org.apache.juneau.rest.CallRouter></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getCallRouters--">getCallRouters</a></span>()</code> +<div class="block">Returns a map of HTTP method names to call routers.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code>protected <a href="../../../../org/apache/juneau/rest/RestContext.html" title="class in org.apache.juneau.rest">RestContext</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getChildResource-java.lang.String-">getChildResource</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> path)</code> +<div class="block">Returns the context of the child resource associated with the specified path.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="../../../../org/apache/juneau/rest/RestContext.html" title="class in org.apache.juneau.rest">RestContext</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getChildResources--">getChildResources</a></span>()</code> +<div class="block">Returns the child resources associated with this servlet.</div> +</td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getClientVersionHeader--">getClientVersionHeader</a></span>()</code> +<div class="block">Returns the name of the client version header name used by this resource.</div> +</td> +</tr> +<tr id="i11" class="rowColor"> +<td class="colFirst"><code><a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getConfigFile--">getConfigFile</a></span>()</code> +<div class="block">Returns the config file associated with this servlet.</div> +</td> +</tr> +<tr id="i12" class="altColor"> +<td class="colFirst"><code>protected <a href="../../../../org/apache/juneau/rest/RestConverter.html" title="interface in org.apache.juneau.rest">RestConverter</a>[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getConverters--">getConverters</a></span>()</code> +<div class="block">Returns the converters associated with this resource at the class level.</div> +</td> +</tr> +<tr id="i13" class="rowColor"> +<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getDefaultCharset--">getDefaultCharset</a></span>()</code> +<div class="block">Returns the value of the <a href="../../../../org/apache/juneau/rest/RestContext.html#REST_defaultCharset"><code>REST_defaultCharset</code></a> setting.</div> +</td> +</tr> +<tr id="i14" class="altColor"> +<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getDefaultRequestHeaders--">getDefaultRequestHeaders</a></span>()</code> +<div class="block">Returns the default request headers for this resource.</div> +</td> +</tr> +<tr id="i15" class="rowColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getDefaultResponseHeaders--">getDefaultResponseHeaders</a></span>()</code> +<div class="block">Returns the default response headers for this resource.</div> +</td> +</tr> +<tr id="i16" class="altColor"> +<td class="colFirst"><code>protected <a href="../../../../org/apache/juneau/encoders/EncoderGroup.html" title="class in org.apache.juneau.encoders">EncoderGroup</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getEncoders--">getEncoders</a></span>()</code> +<div class="block">Returns the encoders associated with this resource.</div> +</td> +</tr> +<tr id="i17" class="rowColor"> +<td class="colFirst"><code>protected <a href="../../../../org/apache/juneau/rest/StreamResource.html" title="class in org.apache.juneau.rest">StreamResource</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getFavIcon--">getFavIcon</a></span>()</code> +<div class="block">Returns the favicon of the resource.</div> +</td> +</tr> +<tr id="i18" class="altColor"> +<td class="colFirst"><code>protected <a href="../../../../org/apache/juneau/rest/RestGuard.html" title="class in org.apache.juneau.rest">RestGuard</a>[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getGuards--">getGuards</a></span>()</code> +<div class="block">Returns the guards associated with this resource at the class level.</div> +</td> +</tr> +<tr id="i19" class="rowColor"> +<td class="colFirst"><code><a href="../../../../org/apache/juneau/rest/RestInfoProvider.html" title="class in org.apache.juneau.rest">RestInfoProvider</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getInfoProvider--">getInfoProvider</a></span>()</code> +<div class="block">Returns the REST information provider used by this resource.</div> +</td> +</tr> +<tr id="i20" class="altColor"> +<td class="colFirst"><code><a href="../../../../org/apache/juneau/rest/RestLogger.html" title="class in org.apache.juneau.rest">RestLogger</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getLogger--">getLogger</a></span>()</code> +<div class="block">Returns the logger to use for this resource.</div> +</td> +</tr> +<tr id="i21" class="rowColor"> +<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getMediaTypeForName-java.lang.String-">getMediaTypeForName</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Returns the media type for the specified file name.</div> +</td> +</tr> +<tr id="i22" class="altColor"> +<td class="colFirst"><code><a href="../../../../org/apache/juneau/utils/MessageBundle.html" title="class in org.apache.juneau.utils">MessageBundle</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getMessages--">getMessages</a></span>()</code> +<div class="block">Returns the resource bundle used by this resource.</div> +</td> +</tr> +<tr id="i23" class="rowColor"> +<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getParamFormat--">getParamFormat</a></span>()</code> +<div class="block">Returns the value of the <a href="../../../../org/apache/juneau/rest/RestContext.html#REST_paramFormat"><code>REST_paramFormat</code></a> setting.</div> +</td> +</tr> +<tr id="i24" class="altColor"> +<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ParserGroup.html" title="class in org.apache.juneau.parser">ParserGroup</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getParsers--">getParsers</a></span>()</code> +<div class="block">Returns the parsers registered with this resource.</div> +</td> +</tr> +<tr id="i25" class="rowColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getPath--">getPath</a></span>()</code> +<div class="block">Returns the path for this resource as defined by the <a href="../../../../org/apache/juneau/rest/annotation/RestResource.html#path--"><code>RestResource.path()</code></a> annotation or <a href="../../../../org/apache/juneau/rest/RestConfig.html#setPath-java.lang.String-"><code>RestConfig.setPath(String)</code></a> method + concatenated with those on all parent classes.</div> +</td> +</tr> +<tr id="i26" class="altColor"> +<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getPojoSwaps--">getPojoSwaps</a></span>()</code> +<div class="block">Returns the POJO swaps associated with this resource.</div> +</td> +</tr> +<tr id="i27" class="rowColor"> +<td class="colFirst"><code><a href="../../../../org/apache/juneau/ObjectMap.html" title="class in org.apache.juneau">ObjectMap</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getProperties--">getProperties</a></span>()</code> +<div class="block">Returns the class-level properties associated with this servlet.</div> +</td> +</tr> +<tr id="i28" class="altColor"> +<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getResource--">getResource</a></span>()</code> +<div class="block">Returns the resource object.</div> +</td> +</tr> +<tr id="i29" class="rowColor"> +<td class="colFirst"><code><T> T</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getResource-java.lang.Class-org.apache.juneau.MediaType-java.lang.String-java.util.Locale-">getResource</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c, + <a href="../../../../org/apache/juneau/MediaType.html" title="class in org.apache.juneau">MediaType</a> mediaType, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> locale)</code> +<div class="block">Reads the input stream from <a href="../../../../org/apache/juneau/rest/RestContext.html#getResource-java.lang.String-java.util.Locale-"><code>getResource(String, Locale)</code></a> and parses it into a POJO + using the parser matched by the specified media type.</div> +</td> +</tr> +<tr id="i30" class="altColor"> +<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getResource-java.lang.String-java.util.Locale-">getResource</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> locale)</code> +<div class="block">Same as <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true#getResourceAsStream-java.lang.String-" title="class or interface in java.lang"><code>Class.getResourceAsStream(String)</code></a> except if it doesn't find the resource + on this class, searches up the parent hierarchy chain.</div> +</td> +</tr> +<tr id="i31" class="rowColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getResourceAsString-java.lang.String-java.util.Locale-">getResourceAsString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> locale)</code> +<div class="block">Reads the input stream from <a href="../../../../org/apache/juneau/rest/RestContext.html#getResource-java.lang.String-java.util.Locale-"><code>getResource(String, Locale)</code></a> into a String.</div> +</td> +</tr> +<tr id="i32" class="altColor"> +<td class="colFirst"><code>protected <a href="../../../../org/apache/juneau/rest/ResponseHandler.html" title="interface in org.apache.juneau.rest">ResponseHandler</a>[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getResponseHandlers--">getResponseHandlers</a></span>()</code> +<div class="block">Returns the response handlers associated with this resource.</div> +</td> +</tr> +<tr id="i33" class="rowColor"> +<td class="colFirst"><code>protected <a href="../../../../org/apache/juneau/rest/RestServlet.html" title="class in org.apache.juneau.rest">RestServlet</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getRestServlet--">getRestServlet</a></span>()</code> +<div class="block">Returns the resource object as a <a href="../../../../org/apache/juneau/rest/RestServlet.html" title="class in org.apache.juneau.rest"><code>RestServlet</code></a>.</div> +</td> +</tr> +<tr id="i34" class="altColor"> +<td class="colFirst"><code><a href="../../../../org/apache/juneau/serializer/SerializerGroup.html" title="class in org.apache.juneau.serializer">SerializerGroup</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getSerializers--">getSerializers</a></span>()</code> +<div class="block">Returns the serializers registered with this resource.</div> +</td> +</tr> +<tr id="i35" class="rowColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getServletInitParameter-java.lang.String-">getServletInitParameter</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Returns the servlet init parameter returned by <a href="http://docs.oracle.com/javaee/5/api/javax/servlet/ServletConfig.html?is-external=true#getInitParameter-java.lang.String-" title="class or interface in javax.servlet"><code>ServletConfig.getInitParameter(String)</code></a>.</div> +</td> +</tr> +<tr id="i36" class="altColor"> +<td class="colFirst"><code>protected int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getStackTraceOccurrence-java.lang.Throwable-">getStackTraceOccurrence</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a> e)</code> +<div class="block">Returns the number of times this exception was thrown based on a hash of its stacktrace.</div> +</td> +</tr> +<tr id="i37" class="rowColor"> +<td class="colFirst"><code>protected <a href="../../../../org/apache/juneau/rest/StreamResource.html" title="class in org.apache.juneau.rest">StreamResource</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getStyleSheet--">getStyleSheet</a></span>()</code> +<div class="block">Returns the stylesheet for use in the HTML views of the resource.</div> +</td> +</tr> +<tr id="i38" class="altColor"> +<td class="colFirst"><code>protected <a href="../../../../org/apache/juneau/MediaType.html" title="class in org.apache.juneau">MediaType</a>[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getSupportedAcceptTypes--">getSupportedAcceptTypes</a></span>()</code> +<div class="block">Returns the explicit list of supported accept types for this resource.</div> +</td> +</tr> +<tr id="i39" class="rowColor"> +<td class="colFirst"><code>protected <a href="../../../../org/apache/juneau/MediaType.html" title="class in org.apache.juneau">MediaType</a>[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getSupportedContentTypes--">getSupportedContentTypes</a></span>()</code> +<div class="block">Returns the explicit list of supported content types for this resource.</div> +</td> +</tr> +<tr id="i40" class="altColor"> +<td class="colFirst"><code>protected <a href="../../../../org/apache/juneau/urlencoding/UrlEncodingParser.html" title="class in org.apache.juneau.urlencoding">UrlEncodingParser</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getUrlEncodingParser--">getUrlEncodingParser</a></span>()</code> +<div class="block">Returns the URL-encoding parser associated with this resource.</div> +</td> +</tr> +<tr id="i41" class="rowColor"> +<td class="colFirst"><code>protected <a href="../../../../org/apache/juneau/urlencoding/UrlEncodingSerializer.html" title="class in org.apache.juneau.urlencoding">UrlEncodingSerializer</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getUrlEncodingSerializer--">getUrlEncodingSerializer</a></span>()</code> +<div class="block">Returns the URL-encoding serializer associated with this resource.</div> +</td> +</tr> +<tr id="i42" class="altColor"> +<td class="colFirst"><code><a href="../../../../org/apache/juneau/svl/VarResolver.html" title="class in org.apache.juneau.svl">VarResolver</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#getVarResolver--">getVarResolver</a></span>()</code> +<div class="block">Returns the variable resolver for this servlet.</div> +</td> +</tr> +<tr id="i43" class="rowColor"> +<td class="colFirst"><code>protected boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#hasChildResources--">hasChildResources</a></span>()</code> +<div class="block">Returns <jk>true</jk> if this resource has any child resources associated with it.</div> +</td> +</tr> +<tr id="i44" class="altColor"> +<td class="colFirst"><code>protected boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#isAllowBodyParam--">isAllowBodyParam</a></span>()</code> +<div class="block">Returns the value of the <a href="../../../../org/apache/juneau/rest/RestContext.html#REST_allowBodyParam"><code>REST_allowBodyParam</code></a> setting.</div> +</td> +</tr> +<tr id="i45" class="rowColor"> +<td class="colFirst"><code>protected boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#isAllowHeaderParams--">isAllowHeaderParams</a></span>()</code> +<div class="block">Returns the value of the <a href="../../../../org/apache/juneau/rest/RestContext.html#REST_allowHeaderParams"><code>REST_allowHeaderParams</code></a> setting.</div> +</td> +</tr> +<tr id="i46" class="altColor"> +<td class="colFirst"><code>protected boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#isRenderResponseStackTraces--">isRenderResponseStackTraces</a></span>()</code> +<div class="block">Returns the value of the <a href="../../../../org/apache/juneau/rest/RestContext.html#REST_renderResponseStackTraces"><code>REST_renderResponseStackTraces</code></a> setting.</div> +</td> +</tr> +<tr id="i47" class="rowColor"> +<td class="colFirst"><code>protected boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#isStaticFile-java.lang.String-">isStaticFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> p)</code> +<div class="block">Returns <jk>true</jk> if the specified path refers to a static file.</div> +</td> +</tr> +<tr id="i48" class="altColor"> +<td class="colFirst"><code><a href="../../../../org/apache/juneau/rest/StreamResource.html" title="class in org.apache.juneau.rest">StreamResource</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/rest/RestContext.html#resolveStaticFile-java.lang.String-">resolveStaticFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> pathInfo)</code> +<div class="block">Resolve a static resource file.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.juneau.Context"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.juneau.<a href="../../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">Context</a></h3> +<code><a href="../../../../org/apache/juneau/Context.html#asMap--">asMap</a>, <a href="../../../../org/apache/juneau/Context.html#toString--">toString</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang /Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="REST_allowHeaderParams"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_allowHeaderParams</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.64">REST_allowHeaderParams</a></pre> +<div class="block"><b>Configuration property:</b> Enable header URL parameters. + <p> + <ul> + <li><b>Name:</b> <js>"RestServlet.allowHeaderParams"</js> + <li><b>Data type:</b> <code>Boolean</code> + <li><b>Default:</b> <jk>true</jk> + </ul> + <p> + When enabled, headers such as <js>"Accept"</js> and <js>"Content-Type"</js> to be passed in as URL query parameters. + For example: <js>"?Accept=text/json&Content-Type=text/json"</js> + <p> + Parameter names are case-insensitive. + <p> + Useful for debugging REST interface using only a browser. + <p> + Applicable to servlet class only.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_allowHeaderParams">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_allowMethodParam"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_allowMethodParam</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.90">REST_allowMethodParam</a></pre> +<div class="block"><b>Configuration property:</b> Enable <js>"method"</js> URL parameter for specific HTTP methods. + <p> + <ul> + <li><b>Name:</b> <js>"RestServlet.allowMethodParam"</js> + <li><b>Data type:</b> <code>String</code> + <li><b>Default:</b> <js>""</js> + </ul> + <p> + When specified, the HTTP method can be overridden by passing in a <js>"method"</js> URL parameter on a regular GET request. + For example: <js>"?method=OPTIONS"</js> + <p> + Format is a comma-delimited list of HTTP method names that can be passed in as a method parameter. + Parameter name is case-insensitive. + Use "*" to represent all methods. + For backwards compatibility, "true" also means "*". + <p> + Note that per the <a class="doclink" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html">HTTP specification</a>, special care should + be taken when allowing non-safe (POST, PUT, DELETE) methods to be invoked through GET requests. + <p> + Applicable to servlet class only. + <p> + Example: <js>"HEAD,OPTIONS"</js></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_allowMethodParam">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_allowBodyParam"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_allowBodyParam</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.110">REST_allowBodyParam</a></pre> +<div class="block"><b>Configuration property:</b> Enable <js>"body"</js> URL parameter. + <p> + <ul> + <li><b>Name:</b> <js>"RestServlet.allowBodyParam"</js> + <li><b>Data type:</b> <code>Boolean</code> + <li><b>Default:</b> <jk>true</jk> + </ul> + <p> + When enabled, the HTTP body content on PUT and POST requests can be passed in as text using the <js>"body"</js> URL parameter. + For example: <js>"?body={name:'John%20Smith',age:45}"</js> + <p> + Parameter name is case-insensitive. + <p> + Useful for debugging PUT and POST methods using only a browser. + <p> + Applicable to servlet class only.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_allowBodyParam">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_renderResponseStackTraces"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_renderResponseStackTraces</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.128">REST_renderResponseStackTraces</a></pre> +<div class="block"><b>Configuration property:</b> Render stack traces. + <p> + <ul> + <li><b>Name:</b> <js>"RestServlet.renderResponseStackTraces"</js> + <li><b>Data type:</b> <code>Boolean</code> + <li><b>Default:</b> <jk>false</jk> + </ul> + <p> + Render stack traces in HTTP response bodies when errors occur. + <p> + When enabled, Java stack traces will be rendered in the output response. + Useful for debugging, although allowing stack traces to be rendered may cause security concerns. + <p> + Applicable to servlet class only.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_renderResponseStackTraces">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_useStackTraceHashes"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_useStackTraceHashes</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.144">REST_useStackTraceHashes</a></pre> +<div class="block"><b>Configuration property:</b> Use stack trace hashes. + <p> + <ul> + <li><b>Name:</b> <js>"RestServlet.useStackTraceHashes"</js> + <li><b>Data type:</b> <code>Boolean</code> + <li><b>Default:</b> <jk>true</jk> + </ul> + <p> + When enabled, the number of times an exception has occurred will be determined based on stack trace hashsums, + made available through the <a href="../../../../org/apache/juneau/rest/RestException.html#getOccurrence--"><code>RestException.getOccurrence()</code></a> method. + <p> + Applicable to servlet class only.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_useStackTraceHashes">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_defaultCharset"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_defaultCharset</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.159">REST_defaultCharset</a></pre> +<div class="block"><b>Configuration property:</b> Default character encoding. + <p> + <ul> + <li><b>Name:</b> <js>"RestServlet.defaultCharset"</js> + <li><b>Data type:</b> <code>String</code> + <li><b>Default:</b> <js>"utf-8"</js> + </ul> + <p> + The default character encoding for the request and response if not specified on the request. + <p> + Applicable to servlet class and methods.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_defaultCharset">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_paramFormat"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_paramFormat</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.187">REST_paramFormat</a></pre> +<div class="block"><b>Configuration property:</b> Expected format of request parameters. + <p> + <ul> + <li><b>Name:</b> <js>"RestServlet.paramFormat"</js> + <li><b>Data type:</b> <code>String</code> + <li><b>Default:</b> <js>"UON"</js> + </ul> + <p> + Possible values: + <ul class='spaced-list'> + <li><js>"UON"</js> - URL-Encoded Object Notation.<br> + This notation allows for request parameters to contain arbitrarily complex POJOs. + <li><js>"PLAIN"</js> - Plain text.<br> + This treats request parameters as plain text.<br> + Only POJOs directly convertable from <l>Strings</l> can be represented in parameters when using this mode. + </ul> + <p> + Note that the parameter value <js>"(foo)"</js> is interpreted as <js>"(foo)"</js> when using plain mode, but + <js>"foo"</js> when using UON mode. + <p> + The format can also be specified per-parameter using the <a href="../../../../org/apache/juneau/rest/annotation/FormData.html#format--"><code>@FormData.format()</code></a> and <a href="../../../../org/apache/juneau/rest/annotation/Query.html#format--"><code>@Query.format()</code></a> + annotations. + <p> + Applicable to servlet class and methods.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_paramFormat">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_servletPath"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_servletPath</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.201">REST_servletPath</a></pre> +<div class="block">The request servlet path. + <p> + Automatically added to properties returned by <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a> and <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a>. + <p> + Equivalent to the value returned by <a href="http://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequestWrapper.html?is-external=true#getServletPath--" title="class or interface in javax.servlet.http"><code>HttpServletRequestWrapper.getServletPath()</code></a></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_servletPath">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_servletURI"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_servletURI</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.208">REST_servletURI</a></pre> +<div class="block">The request servlet URI. + <p> + Equivalent to the value returned by <a href="../../../../org/apache/juneau/rest/RestRequest.html#getServletURI--"><code>RestRequest.getServletURI()</code></a></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_servletURI">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_relativeServletURI"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_relativeServletURI</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.215">REST_relativeServletURI</a></pre> +<div class="block">The request servlet URI. + <p> + Equivalent to the value returned by <a href="../../../../org/apache/juneau/rest/RestRequest.html#getRelativeServletURI--"><code>RestRequest.getRelativeServletURI()</code></a></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_relativeServletURI">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_pathInfo"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_pathInfo</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.224">REST_pathInfo</a></pre> +<div class="block">The request URI path info. + <p> + Automatically added to properties returned by <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a> and <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a>. + <p> + Equivalent to the value returned by <a href="http://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequestWrapper.html?is-external=true#getPathInfo--" title="class or interface in javax.servlet.http"><code>HttpServletRequestWrapper.getPathInfo()</code></a></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_pathInfo">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_requestURI"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_requestURI</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.233">REST_requestURI</a></pre> +<div class="block">The request URI. + <p> + Automatically added to properties returned by <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a> and <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a>. + <p> + Equivalent to the value returned by <a href="http://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequestWrapper.html?is-external=true#getRequestURI--" title="class or interface in javax.servlet.http"><code>HttpServletRequestWrapper.getRequestURI()</code></a></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_requestURI">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_method"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_method</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.242">REST_method</a></pre> +<div class="block">The request method. + <p> + Automatically added to properties returned by <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a> and <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a>. + <p> + Equivalent to the value returned by <a href="../../../../org/apache/juneau/rest/RestRequest.html#getMethod--"><code>RestRequest.getMethod()</code></a></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_method">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_servletTitle"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_servletTitle</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.251">REST_servletTitle</a></pre> +<div class="block">The localized servlet title. + <p> + Automatically added to properties returned by <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a> and <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a>. + <p> + Equivalent to the value returned by <a href="../../../../org/apache/juneau/rest/RestRequest.html#getServletTitle--"><code>RestRequest.getServletTitle()</code></a></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_servletTitle">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_servletDescription"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_servletDescription</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.260">REST_servletDescription</a></pre> +<div class="block">The localized servlet description. + <p> + Automatically added to properties returned by <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a> and <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a>. + <p> + Equivalent to the value returned by <a href="../../../../org/apache/juneau/rest/RestRequest.html#getServletDescription--"><code>RestRequest.getServletDescription()</code></a></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_servletDescription">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_methodSummary"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>REST_methodSummary</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.269">REST_methodSummary</a></pre> +<div class="block">The localized method summary. + <p> + Automatically added to properties returned by <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a> and <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a>. + <p> + Equivalent to the value returned by <a href="../../../../org/apache/juneau/rest/RestRequest.html#getMethodSummary--"><code>RestRequest.getMethodSummary()</code></a></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_methodSummary">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="REST_methodDescription"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>REST_methodDescription</h4> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.278">REST_methodDescription</a></pre> +<div class="block">The localized method description. + <p> + Automatically added to properties returned by <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a> and <a href="../../../../org/apache/juneau/Session.html#getProperties--"><code>Session.getProperties()</code></a>. + <p> + Equivalent to the value returned by <a href="../../../../org/apache/juneau/rest/RestRequest.html#getMethodDescription--"><code>RestRequest.getMethodDescription()</code></a></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../constant-values.html#org.apache.juneau.rest.RestContext.REST_methodDescription">Constant Field Values</a></dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="RestContext-java.lang.Object-org.apache.juneau.rest.RestConfig-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>RestContext</h4> +<pre>public <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.342">RestContext</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> resource, + <a href="../../../../org/apache/juneau/rest/RestConfig.html" title="class in org.apache.juneau.rest">RestConfig</a> config) + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> +<div class="block">Constructor.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>resource</code> - The resource class (a class annotated with <a href="../../../../org/apache/juneau/rest/annotation/RestResource.html" title="annotation in org.apache.juneau.rest.annotation"><code>@RestResource</code></a>).</dd> +<dd><code>config</code> - The servlet configuration object.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - If any initialization problems were encountered.</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="getVarResolver--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getVarResolver</h4> +<pre>public <a href="../../../../org/apache/juneau/svl/VarResolver.html" title="class in org.apache.juneau.svl">VarResolver</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.678">getVarResolver</a>()</pre> +<div class="block">Returns the variable resolver for this servlet. + <p> + Variable resolvers are used to replace variables in property values. + </p> + <h6 class='figure'>Example:</h6> + <p class='bcode'> + <ja>@RestResource</ja>( + messages=<js>"nls/Messages"</js>, + properties={ + <ja>@Property</ja>(name=<js>"title"</js>,value=<js>"$L{title}"</js>), <jc>// Localized variable in Messages.properties</jc> + <ja>@Property</ja>(name=<js>"javaVendor"</js>,value=<js>"$S{java.vendor,Oracle}"</js>), <jc>// System property with default value</jc> + <ja>@Property</ja>(name=<js>"foo"</js>,value=<js>"bar"</js>), + <ja>@Property</ja>(name=<js>"bar"</js>,value=<js>"baz"</js>), + <ja>@Property</ja>(name=<js>"v1"</js>,value=<js>"$R{foo}"</js>), <jc>// Request variable. value="bar"</jc> + <ja>@Property</ja>(name=<js>"v2"</js>,value=<js>"$R{$R{foo}}"</js>) <jc>// Nested request variable. value="baz"</jc> + } + ) + <jk>public class</jk> MyRestResource <jk>extends</jk> RestServletDefault { + </p> + <p> + A typical usage pattern is using variables for resolving URL links when rendering HTML: + </p> + <p class='bcode'> + <ja>@RestMethod</ja>( + name=<js>"GET"</js>, path=<js>"/{name}/*"</js>, + properties={ + <ja>@Property</ja>( + name=<jsf>HTMLDOC_links</jsf>, + value=<js>"{up:'$R{requestParentURI}', options:'?method=OPTIONS', editLevel:'$R{servletURI}/editLevel?logger=$R{attribute.name}'}"</js> + ) + } + ) + <jk>public</jk> LoggerEntry getLogger(RestRequest req, <ja>@Path</ja> String name) <jk>throws</jk> Exception { + </p> + <p> + Calls to <code>req.getProperties().getString(<js>"key"</js>)</code> returns strings with variables resolved.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The var resolver in use by this resource.</dd> +</dl> +</li> +</ul> +<a name="getConfigFile--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getConfigFile</h4> +<pre>public <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.693">getConfigFile</a>()</pre> +<div class="block">Returns the config file associated with this servlet. + <p> + The config file is identified via one of the following: + <ul> + <li><a href="../../../../org/apache/juneau/rest/annotation/RestResource.html#config--"><code>@RestResource.config()</code></a> annotation. + <li><a href="../../../../org/apache/juneau/rest/RestConfig.html#setConfigFile-org.apache.juneau.ini.ConfigFile-"><code>RestConfig.setConfigFile(ConfigFile)</code></a> method. + </ul></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The resolving config file associated with this servlet. Never <jk>null</jk>.</dd> +</dl> +</li> +</ul> +<a name="resolveStaticFile-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>resolveStaticFile</h4> +<pre>public <a href="../../../../org/apache/juneau/rest/StreamResource.html" title="class in org.apache.juneau.rest">StreamResource</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.710">resolveStaticFile</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> pathInfo) + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Resolve a static resource file. + <p> + The location of static resources are defined via one of the following: + <ul> + <li><a href="../../../../org/apache/juneau/rest/annotation/RestResource.html#staticFiles--"><code>@RestResource.staticFiles()</code></a> annotation. + <li><a href="../../../../org/apache/juneau/rest/RestConfig.html#addStaticFiles-java.lang.Class-java.lang.String-"><code>RestConfig.addStaticFiles(Class, String)</code></a> method. + </ul></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>pathInfo</code> - The unencoded path info.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The resource, or <jk>null</jk> if the resource could not be resolved.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> +</dl> +</li> +</ul> +<a name="getResource-java.lang.String-java.util.Locale-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getResource</h4> +<pre>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.762">getResource</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> locale) + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Same as <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true#getResourceAsStream-java.lang.String-" title="class or interface in java.lang"><code>Class.getResourceAsStream(String)</code></a> except if it doesn't find the resource + on this class, searches up the parent hierarchy chain. + <p> + If the resource cannot be found in the classpath, then an attempt is made to look in the + JVM working directory. + <p> + If the <code>locale</code> is specified, then we look for resources whose name matches that locale. + For example, if looking for the resource <js>"MyResource.txt"</js> for the Japanese locale, we will + look for files in the following order: + <ol> + <li><js>"MyResource_ja_JP.txt"</js> + <li><js>"MyResource_ja.txt"</js> + <li><js>"MyResource.txt"</js> + </ol></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - The resource name.</dd> +<dd><code>locale</code> - Optional locale.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An input stream of the resource, or <jk>null</jk> if the resource could not be found.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> +</dl> +</li> +</ul> +<a name="getResourceAsString-java.lang.String-java.util.Locale-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getResourceAsString</h4> +<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.795">getResourceAsString</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> locale) + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads the input stream from <a href="../../../../org/apache/juneau/rest/RestContext.html#getResource-java.lang.String-java.util.Locale-"><code>getResource(String, Locale)</code></a> into a String.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - The resource name.</dd> +<dd><code>locale</code> - Optional locale.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The contents of the stream as a string, or <jk>null</jk> if the resource could not be found.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If resource could not be found.</dd> +</dl> +</li> +</ul> +<a name="getResource-java.lang.Class-org.apache.juneau.MediaType-java.lang.String-java.util.Locale-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getResource</h4> +<pre>public <T> T <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.820">getResource</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c, + <a href="../../../../org/apache/juneau/MediaType.html" title="class in org.apache.juneau">MediaType</a> mediaType, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> locale) + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, + <a href="http://docs.oracle.com/javaee/5/api/javax/servlet/ServletException.html?is-external=true" title="class or interface in javax.servlet">ServletException</a></pre> +<div class="block">Reads the input stream from <a href="../../../../org/apache/juneau/rest/RestContext.html#getResource-java.lang.String-java.util.Locale-"><code>getResource(String, Locale)</code></a> and parses it into a POJO + using the parser matched by the specified media type. + <p> + Useful if you want to load predefined POJOs from JSON files in your classpath.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>c</code> - The class type of the POJO to create.</dd> +<dd><code>mediaType</code> - The media type of the data in the stream (e.g. <js>"text/json"</js>)</dd> +<dd><code>name</code> - The resource name (e.g. "htdocs/styles.css").</dd> +<dd><code>locale</code> - Optional locale.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The parsed resource, or <jk>null</jk> if the resource could not be found.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> +<dd><code><a href="http://docs.oracle.com/javaee/5/api/javax/servlet/ServletException.html?is-external=true" title="class or interface in javax.servlet">ServletException</a></code> - If the media type was unknown or the input could not be parsed into a POJO.</dd> +</dl> +</li> +</ul> +<a name="getPath--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getPath</h4> +<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.851">getPath</a>()</pre> +<div class="block">Returns the path for this resource as defined by the <a href="../../../../org/apache/juneau/rest/annotation/RestResource.html#path--"><code>RestResource.path()</code></a> annotation or <a href="../../../../org/apache/juneau/rest/RestConfig.html#setPath-java.lang.String-"><code>RestConfig.setPath(String)</code></a> method + concatenated with those on all parent classes. + <p> + If path is not specified, returns <js>"/"</js>. + <p> + Path always starts with <js>"/"</js>.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The servlet path.</dd> +</dl> +</li> +</ul> +<a name="getLogger--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getLogger</h4> +<pre>public <a href="../../../../org/apache/juneau/rest/RestLogger.html" title="class in org.apache.juneau.rest">RestLogger</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.866">getLogger</a>()</pre> +<div class="block">Returns the logger to use for this resource. + <p> + The logger for a resource is defined via one of the following: + <ul> + <li><a href="../../../../org/apache/juneau/rest/annotation/RestResource.html#logger--"><code>@RestResource.logger()</code></a> annotation. + <li><a href="../../../../org/apache/juneau/rest/RestConfig.html#setLogger-java.lang.Class-"><code>RestConfig.setLogger(Class)</code></a>/<a href="../../../../org/apache/juneau/rest/RestConfig.html#setLogger-org.apache.juneau.rest.RestLogger-"><code>RestConfig.setLogger(RestLogger)</code></a> methods. + </ul></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The logger to use for this resource. Never <jk>null</jk>.</dd> +</dl> +</li> +</ul> +<a name="getMessages--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getMessages</h4> +<pre>public <a href="../../../../org/apache/juneau/utils/MessageBundle.html" title="class in org.apache.juneau.utils">MessageBundle</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.880">getMessages</a>()</pre> +<div class="block">Returns the resource bundle used by this resource. + <p> + The resource bundle is defined via one of the following: + <ul> + <li><a href="../../../../org/apache/juneau/rest/annotation/RestResource.html#messages--"><code>@RestResource.messages()</code></a> annotation. + </ul></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The resource bundle for this resource. Never <jk>null</jk>.</dd> +</dl> +</li> +</ul> +<a name="getInfoProvider--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getInfoProvider</h4> +<pre>public <a href="../../../../org/apache/juneau/rest/RestInfoProvider.html" title="class in org.apache.juneau.rest">RestInfoProvider</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.895">getInfoProvider</a>()</pre> +<div class="block">Returns the REST information provider used by this resource. + <p> + The information provider is defined via one of the following: + <ul> + <li><a href="../../../../org/apache/juneau/rest/annotation/RestResource.html#infoProvider--"><code>@RestResource.infoProvider()</code></a> annotation. + <li><a href="../../../../org/apache/juneau/rest/RestConfig.html#setInfoProvider-java.lang.Class-"><code>RestConfig.setInfoProvider(Class)</code></a>/<a href="../../../../org/apache/juneau/rest/RestConfig.html#setInfoProvider-org.apache.juneau.rest.RestInfoProvider-"><code>RestConfig.setInfoProvider(RestInfoProvider)</code></a> methods. + </ul></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The information provider for this resource. Never <jk>null</jk>.</dd> +</dl> +</li> +</ul> +<a name="getCallHandler--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getCallHandler</h4> +<pre>protected <a href="../../../../org/apache/juneau/rest/RestCallHandler.html" title="class in org.apache.juneau.rest">RestCallHandler</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.910">getCallHandler</a>()</pre> +<div class="block">Returns the REST call handler used by this resource. + <p> + The call handler is defined via one of the following: + <ul> + <li><a href="../../../../org/apache/juneau/rest/annotation/RestResource.html#callHandler--"><code>@RestResource.callHandler()</code></a> annotation. + <li><a href="../../../../org/apache/juneau/rest/RestConfig.html#setCallHandler-java.lang.Class-"><code>RestConfig.setCallHandler(Class)</code></a>/<a href="../../../../org/apache/juneau/rest/RestConfig.html#setCallHandler-org.apache.juneau.rest.RestCallHandler-"><code>RestConfig.setCallHandler(RestCallHandler)</code></a> methods. + </ul></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The call handler for this resource. Never <jk>null</jk>.</dd> +</dl> +</li> +</ul> +<a name="getCallRouters--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getCallRouters</h4> +<pre>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,org.apache.juneau.rest.CallRouter> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.919">getCallRouters</a>()</pre> +<div class="block">Returns a map of HTTP method names to call routers.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A map with HTTP method names uppercased as the keys, and call routers as the values.</dd> +</dl> +</li> +</ul> +<a name="getResource--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getResource</h4> +<pre>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.931">getResource</a>()</pre> +<div class="block">Returns the resource object. + <p> + This is the instance of the class annotated with the <a href="../../../../org/apache/juneau/rest/annotation/RestResource.html" title="annotation in org.apache.juneau.rest.annotation"><code>@RestResource</code></a> annotation, usually + an instance of <a href="../../../../org/apache/juneau/rest/RestServlet.html" title="class in org.apache.juneau.rest"><code>RestServlet</code></a>.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The resource object. Never <jk>null</jk>.</dd> +</dl> +</li> +</ul> +<a name="getRestServlet--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getRestServlet</h4> +<pre>protected <a href="../../../../org/apache/juneau/rest/RestServlet.html" title="class in org.apache.juneau.rest">RestServlet</a> <a href="../../../../src-html/org/apache/juneau/rest/RestContext.html#line.941">getRestServlet</a>()</pre> +<div class="block">Returns the resource object as a <a href="../../../../org/apache/juneau/rest/RestServlet.html" title="class in org.apache.juneau.rest"><code>RestServlet</code></a>.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The resource object cast to <a href="../../../../org/apache/juneau/rest/RestServlet.html" title="class in org.apache.juneau.rest"><code>RestServlet</code></a>, or + <jk>null</jk> if the resource doesn't subclass from <a href="../../../../org/apache/juneau/rest/RestServlet.html" title="class in org.apache.juneau.rest"><code>RestServlet</code></a></dd> +</dl> +</li> +</ul> +<a name="checkForInitException--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>checkForInitException</h4> +<pre>protected void <
<TRUNCATED>
