http://git-wip-us.apache.org/repos/asf/sling-site/blob/757222a6/assets/apidocs/sling5/org/apache/sling/api/resource/ResourceUtil.html ---------------------------------------------------------------------- diff --git a/assets/apidocs/sling5/org/apache/sling/api/resource/ResourceUtil.html b/assets/apidocs/sling5/org/apache/sling/api/resource/ResourceUtil.html new file mode 100644 index 0000000..ca324f9 --- /dev/null +++ b/assets/apidocs/sling5/org/apache/sling/api/resource/ResourceUtil.html @@ -0,0 +1,534 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!--NewPage--> +<HTML> +<HEAD> +<!-- Generated by javadoc (build 1.6.0_10) on Mon May 11 08:55:04 CEST 2009 --> +<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<TITLE> +ResourceUtil (Apache Sling Aggregate 5-incubator API) +</TITLE> + +<META NAME="date" CONTENT="2009-05-11"> + +<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> + +<SCRIPT type="text/javascript"> +function windowTitle() +{ + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="ResourceUtil (Apache Sling Aggregate 5-incubator API)"; + } +} +</SCRIPT> +<NOSCRIPT> +</NOSCRIPT> + +</HEAD> + +<BODY BGCOLOR="white" onload="windowTitle();"> +<HR> + + +<!-- ========= START OF TOP NAVBAR ======= --> +<A NAME="navbar_top"><!-- --></A> +<A HREF="#skip-navbar_top" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_top_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ResourceUtil.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource"><B>PREV CLASS</B></A> + <A HREF="../../../../../org/apache/sling/api/resource/ResourceWrapper.html" title="class in org.apache.sling.api.resource"><B>NEXT CLASS</B></A></FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../index.html?org/apache/sling/api/resource/ResourceUtil.html" target="_top"><B>FRAMES</B></A> + <A HREF="ResourceUtil.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_top"></A> +<!-- ========= END OF TOP NAVBAR ========= --> + +<HR> +<!-- ======== START OF CLASS DATA ======== --> +<H2> +<FONT SIZE="-1"> +org.apache.sling.api.resource</FONT> +<BR> +Class ResourceUtil</H2> +<PRE> +java.lang.Object + <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.sling.api.resource.ResourceUtil</B> +</PRE> +<HR> +<DL> +<DT><PRE>public class <B>ResourceUtil</B><DT>extends java.lang.Object</DL> +</PRE> + +<P> +The <code>ResourceUtil</code> class provides helper methods dealing + with resources. +<P> + +<P> +<HR> + +<P> + +<!-- ======== CONSTRUCTOR SUMMARY ======== --> + +<A NAME="constructor_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Constructor Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#ResourceUtil()">ResourceUtil</A></B>()</CODE> + +<BR> + </TD> +</TR> +</TABLE> + +<!-- ========== METHOD SUMMARY =========== --> + +<A NAME="method_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Method Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#getName(org.apache.sling.api.resource.Resource)">getName</A></B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> rsrc)</CODE> + +<BR> + Utility method returns the parent resource of the resource.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#getName(java.lang.String)">getName</A></B>(java.lang.String path)</CODE> + +<BR> + Utility method returns the name of the given <code>path</code>, which + is normalized by <A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#normalize(java.lang.String)"><CODE>normalize(String)</CODE></A> before resolving the name.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static <A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#getParent(org.apache.sling.api.resource.Resource)">getParent</A></B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> rsrc)</CODE> + +<BR> + Utility method returns the parent resource of the resource.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#getParent(java.lang.String)">getParent</A></B>(java.lang.String path)</CODE> + +<BR> + Utility method returns the parent path of the given <code>path</code>, + which is normalized by <A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#normalize(java.lang.String)"><CODE>normalize(String)</CODE></A> before resolving the + parent.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static <A HREF="../../../../../org/apache/sling/api/resource/ValueMap.html" title="interface in org.apache.sling.api.resource">ValueMap</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#getValueMap(org.apache.sling.api.resource.Resource)">getValueMap</A></B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> res)</CODE> + +<BR> + Returns an <code>ValueMap</code> object for the given + <code>Resource</code>.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#isNonExistingResource(org.apache.sling.api.resource.Resource)">isNonExistingResource</A></B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> res)</CODE> + +<BR> + Returns <code>true</code> if the resource <code>res</code> is a + non-existing resource.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#isStarResource(org.apache.sling.api.resource.Resource)">isStarResource</A></B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> res)</CODE> + +<BR> + Returns <code>true</code> if the resource <code>res</code> is a "star + resource".</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#isSyntheticResource(org.apache.sling.api.resource.Resource)">isSyntheticResource</A></B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> res)</CODE> + +<BR> + Returns <code>true</code> if the resource <code>res</code> is a + synthetic resource.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.util.Iterator<<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A>></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#listChildren(org.apache.sling.api.resource.Resource)">listChildren</A></B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> parent)</CODE> + +<BR> + Returns an <code>Iterator</code> of <A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource"><CODE>Resource</CODE></A> objects loaded + from the children of the given <code>Resource</code>.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#normalize(java.lang.String)">normalize</A></B>(java.lang.String path)</CODE> + +<BR> + Resolves relative path segments '.' and '..' in the absolute path.</TD> +</TR> +</TABLE> + <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> +<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> +</TR> +</TABLE> + +<P> + +<!-- ========= CONSTRUCTOR DETAIL ======== --> + +<A NAME="constructor_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Constructor Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="ResourceUtil()"><!-- --></A><H3> +ResourceUtil</H3> +<PRE> +public <B>ResourceUtil</B>()</PRE> +<DL> +</DL> + +<!-- ============ METHOD DETAIL ========== --> + +<A NAME="method_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Method Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="normalize(java.lang.String)"><!-- --></A><H3> +normalize</H3> +<PRE> +public static java.lang.String <B>normalize</B>(java.lang.String path)</PRE> +<DL> +<DD>Resolves relative path segments '.' and '..' in the absolute path. + Returns null if not possible (.. points above root) or if path is not + absolute. +<P> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="getParent(java.lang.String)"><!-- --></A><H3> +getParent</H3> +<PRE> +public static java.lang.String <B>getParent</B>(java.lang.String path)</PRE> +<DL> +<DD>Utility method returns the parent path of the given <code>path</code>, + which is normalized by <A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#normalize(java.lang.String)"><CODE>normalize(String)</CODE></A> before resolving the + parent. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>path</CODE> - The path whose parent is to be returned. +<DT><B>Returns:</B><DD><code>null</code> if <code>path</code> is the root path (<code>/</code>) + or if <code>path</code> is a single name containing no slash (<code>/</code>) + characters. +<DT><B>Throws:</B> +<DD><CODE>java.lang.IllegalArgumentException</CODE> - If the path cannot be normalized by the + <A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#normalize(java.lang.String)"><CODE>normalize(String)</CODE></A> method. +<DD><CODE>java.lang.NullPointerException</CODE> - If <code>path</code> is <code>null</code>.</DL> +</DD> +</DL> +<HR> + +<A NAME="getParent(org.apache.sling.api.resource.Resource)"><!-- --></A><H3> +getParent</H3> +<PRE> +public static <A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> <B>getParent</B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> rsrc)</PRE> +<DL> +<DD>Utility method returns the parent resource of the resource. +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>The parent resource or null if the rsrc is the root. +<DT><B>Throws:</B> +<DD><CODE>java.lang.NullPointerException</CODE> - If <code>rsrc</code> is <code>null</code>.</DL> +</DD> +</DL> +<HR> + +<A NAME="getName(org.apache.sling.api.resource.Resource)"><!-- --></A><H3> +getName</H3> +<PRE> +public static java.lang.String <B>getName</B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> rsrc)</PRE> +<DL> +<DD>Utility method returns the parent resource of the resource. +<P> +<DD><DL> + +<DT><B>Throws:</B> +<DD><CODE>java.lang.NullPointerException</CODE> - If <code>rsrc</code> is <code>null</code>.</DL> +</DD> +</DL> +<HR> + +<A NAME="getName(java.lang.String)"><!-- --></A><H3> +getName</H3> +<PRE> +public static java.lang.String <B>getName</B>(java.lang.String path)</PRE> +<DL> +<DD>Utility method returns the name of the given <code>path</code>, which + is normalized by <A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#normalize(java.lang.String)"><CODE>normalize(String)</CODE></A> before resolving the name. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>path</CODE> - The path whose name (the last path element) is to be + returned. +<DT><B>Returns:</B><DD>The empty string if <code>path</code> is the root path (<code>/</code>) + or if <code>path</code> is a single name containing no slash (<code>/</code>) + characters. +<DT><B>Throws:</B> +<DD><CODE>java.lang.IllegalArgumentException</CODE> - If the path cannot be normalized by the + <A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html#normalize(java.lang.String)"><CODE>normalize(String)</CODE></A> method. +<DD><CODE>java.lang.NullPointerException</CODE> - If <code>path</code> is <code>null</code>.</DL> +</DD> +</DL> +<HR> + +<A NAME="isSyntheticResource(org.apache.sling.api.resource.Resource)"><!-- --></A><H3> +isSyntheticResource</H3> +<PRE> +public static boolean <B>isSyntheticResource</B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> res)</PRE> +<DL> +<DD>Returns <code>true</code> if the resource <code>res</code> is a + synthetic resource. + <p> + This method checks whether the resource is an instance of the + <code>org.apache.sling.resource.SyntheticResource</code> class. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>res</CODE> - The <code>Resource</code> to check whether it is a synthetic + resource. +<DT><B>Returns:</B><DD><code>true</code> if <code>res</code> is a synthetic + resource. <code>false</code> is returned if <code>res</code> + is <code>null</code> or not an instance of the + <code>org.apache.sling.resource.SyntheticResource</code> class.</DL> +</DD> +</DL> +<HR> + +<A NAME="isStarResource(org.apache.sling.api.resource.Resource)"><!-- --></A><H3> +isStarResource</H3> +<PRE> +public static boolean <B>isStarResource</B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> res)</PRE> +<DL> +<DD>Returns <code>true</code> if the resource <code>res</code> is a "star + resource". A <i>star resource</i> is a resource returned from the + <code>ResourceResolver.resolve(HttpServletRequest)</code> whose path + terminates in a <code>/*</code>. Generally such resource result from + requests to something like <code>/some/path/*</code> or + <code>/some/path/*.html</code> which may be used web applications to + uniformly handle resources to be created. + <p> + This method checks whether the resource path ends with a <code>/*</code> + indicating such a star resource. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>res</CODE> - The <code>Resource</code> to check whether it is a star + resource. +<DT><B>Returns:</B><DD><code>true</code> if <code>res</code> is to be considered a + star resource. +<DT><B>Throws:</B> +<DD><CODE>java.lang.NullPointerException</CODE> - if <code>res</code> is <code>null</code>.</DL> +</DD> +</DL> +<HR> + +<A NAME="isNonExistingResource(org.apache.sling.api.resource.Resource)"><!-- --></A><H3> +isNonExistingResource</H3> +<PRE> +public static boolean <B>isNonExistingResource</B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> res)</PRE> +<DL> +<DD>Returns <code>true</code> if the resource <code>res</code> is a + non-existing resource. + <p> + This method checks the resource type of the resource to match the + well-known resource type <code>sling:nonexisting</code> of the + <code>NonExistingResource</code> class defined in the Sling API. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>res</CODE> - The <code>Resource</code> to check whether it is a + non-existing resource. +<DT><B>Returns:</B><DD><code>true</code> if <code>res</code> is to be considered a + non-existing resource. +<DT><B>Throws:</B> +<DD><CODE>java.lang.NullPointerException</CODE> - if <code>res</code> is <code>null</code>.</DL> +</DD> +</DL> +<HR> + +<A NAME="listChildren(org.apache.sling.api.resource.Resource)"><!-- --></A><H3> +listChildren</H3> +<PRE> +public static java.util.Iterator<<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A>> <B>listChildren</B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> parent)</PRE> +<DL> +<DD>Returns an <code>Iterator</code> of <A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource"><CODE>Resource</CODE></A> objects loaded + from the children of the given <code>Resource</code>. + <p> + This is a convenience method for <A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html#listChildren(org.apache.sling.api.resource.Resource)"><CODE>ResourceResolver.listChildren(Resource)</CODE></A>. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>parent</CODE> - The <A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource"><CODE>Resource</CODE></A> whose children are requested. +<DT><B>Returns:</B><DD>An <code>Iterator</code> of <A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource"><CODE>Resource</CODE></A> objects. +<DT><B>Throws:</B> +<DD><CODE>java.lang.NullPointerException</CODE> - If <code>parent</code> is + <code>null</code>. +<DD><CODE><A HREF="../../../../../org/apache/sling/api/SlingException.html" title="class in org.apache.sling.api">SlingException</A></CODE> - If any error occurs acquiring + the child resource iterator.<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html#listChildren(org.apache.sling.api.resource.Resource)"><CODE>ResourceResolver.listChildren(Resource)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="getValueMap(org.apache.sling.api.resource.Resource)"><!-- --></A><H3> +getValueMap</H3> +<PRE> +public static <A HREF="../../../../../org/apache/sling/api/resource/ValueMap.html" title="interface in org.apache.sling.api.resource">ValueMap</A> <B>getValueMap</B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> res)</PRE> +<DL> +<DD>Returns an <code>ValueMap</code> object for the given + <code>Resource</code>. + This method calls <A HREF="../../../../../org/apache/sling/api/adapter/Adaptable.html#adaptTo(java.lang.Class)"><CODE>Adaptable.adaptTo(Class)</CODE></A> with the + <A HREF="../../../../../org/apache/sling/api/resource/ValueMap.html" title="interface in org.apache.sling.api.resource"><CODE>ValueMap</CODE></A> class as an argument. If the <code>adaptTo</code> + method returns a map, this map is returned. If the resource is not + adaptable to a value map, next an adaption to <CODE>Map</CODE> is tried + and if this is successful the map is wrapped as a value map. + If the adaptions are not successful an empty value map is returned. + If <code>null</code> is provided as the resource an empty map is + returned as well. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>res</CODE> - The <code>Resource</code> to adapt to the value map. +<DT><B>Returns:</B><DD>A value map.</DL> +</DD> +</DL> +<!-- ========= END OF CLASS DATA ========= --> +<HR> + + +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<A NAME="navbar_bottom"><!-- --></A> +<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_bottom_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ResourceUtil.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource"><B>PREV CLASS</B></A> + <A HREF="../../../../../org/apache/sling/api/resource/ResourceWrapper.html" title="class in org.apache.sling.api.resource"><B>NEXT CLASS</B></A></FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../index.html?org/apache/sling/api/resource/ResourceUtil.html" target="_top"><B>FRAMES</B></A> + <A HREF="ResourceUtil.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_bottom"></A> +<!-- ======== END OF BOTTOM NAVBAR ======= --> + +<HR> +Copyright © 2007-2009. All Rights Reserved. +</BODY> +</HTML>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/757222a6/assets/apidocs/sling5/org/apache/sling/api/resource/ResourceWrapper.html ---------------------------------------------------------------------- diff --git a/assets/apidocs/sling5/org/apache/sling/api/resource/ResourceWrapper.html b/assets/apidocs/sling5/org/apache/sling/api/resource/ResourceWrapper.html new file mode 100644 index 0000000..3930833 --- /dev/null +++ b/assets/apidocs/sling5/org/apache/sling/api/resource/ResourceWrapper.html @@ -0,0 +1,493 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!--NewPage--> +<HTML> +<HEAD> +<!-- Generated by javadoc (build 1.6.0_10) on Mon May 11 08:55:04 CEST 2009 --> +<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<TITLE> +ResourceWrapper (Apache Sling Aggregate 5-incubator API) +</TITLE> + +<META NAME="date" CONTENT="2009-05-11"> + +<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> + +<SCRIPT type="text/javascript"> +function windowTitle() +{ + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="ResourceWrapper (Apache Sling Aggregate 5-incubator API)"; + } +} +</SCRIPT> +<NOSCRIPT> +</NOSCRIPT> + +</HEAD> + +<BODY BGCOLOR="white" onload="windowTitle();"> +<HR> + + +<!-- ========= START OF TOP NAVBAR ======= --> +<A NAME="navbar_top"><!-- --></A> +<A HREF="#skip-navbar_top" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_top_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ResourceWrapper.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html" title="class in org.apache.sling.api.resource"><B>PREV CLASS</B></A> + <A HREF="../../../../../org/apache/sling/api/resource/SyntheticResource.html" title="class in org.apache.sling.api.resource"><B>NEXT CLASS</B></A></FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../index.html?org/apache/sling/api/resource/ResourceWrapper.html" target="_top"><B>FRAMES</B></A> + <A HREF="ResourceWrapper.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_top"></A> +<!-- ========= END OF TOP NAVBAR ========= --> + +<HR> +<!-- ======== START OF CLASS DATA ======== --> +<H2> +<FONT SIZE="-1"> +org.apache.sling.api.resource</FONT> +<BR> +Class ResourceWrapper</H2> +<PRE> +java.lang.Object + <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.sling.api.resource.ResourceWrapper</B> +</PRE> +<DL> +<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/sling/api/adapter/Adaptable.html" title="interface in org.apache.sling.api.adapter">Adaptable</A>, <A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></DD> +</DL> +<HR> +<DL> +<DT><PRE>public class <B>ResourceWrapper</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></DL> +</PRE> + +<P> +The <code>ResourceWrapper</code> is a wrapper for any <code>Resource</code> + delegating all method calls to the wrapped resource by default. Extensions of + this class may overwrite any method to return different values as + appropriate. +<P> + +<P> +<HR> + +<P> +<!-- =========== FIELD SUMMARY =========== --> + +<A NAME="field_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Field Summary</B></FONT></TH> +</TR> +</TABLE> + <A NAME="fields_inherited_from_class_org.apache.sling.api.resource.Resource"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> +<TH ALIGN="left"><B>Fields inherited from interface org.apache.sling.api.resource.<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></B></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#RESOURCE_TYPE_NON_EXISTING">RESOURCE_TYPE_NON_EXISTING</A></CODE></TD> +</TR> +</TABLE> + +<!-- ======== CONSTRUCTOR SUMMARY ======== --> + +<A NAME="constructor_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Constructor Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceWrapper.html#ResourceWrapper(org.apache.sling.api.resource.Resource)">ResourceWrapper</A></B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> resource)</CODE> + +<BR> + Creates a new wrapper instance delegating all method calls to the given + <code>resource</code>.</TD> +</TR> +</TABLE> + +<!-- ========== METHOD SUMMARY =========== --> + +<A NAME="method_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Method Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> +<TR ALIGN="right" VALIGN=""> +<TD NOWRAP><FONT SIZE="-1"> +<CODE><AdapterType> +<BR> +AdapterType</CODE></FONT></TD> +</TR> +</TABLE> +</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceWrapper.html#adaptTo(java.lang.Class)">adaptTo</A></B>(java.lang.Class<AdapterType> type)</CODE> + +<BR> + Adapts the adaptable to another type.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceWrapper.html#getPath()">getPath</A></B>()</CODE> + +<BR> + This resource's path - for now that could be a JCR path.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceWrapper.html#getResource()">getResource</A></B>()</CODE> + +<BR> + Returns the <code>Resource</code> wrapped by this instance.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../../../org/apache/sling/api/resource/ResourceMetadata.html" title="class in org.apache.sling.api.resource">ResourceMetadata</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceWrapper.html#getResourceMetadata()">getResourceMetadata</A></B>()</CODE> + +<BR> + Returns the metadata of this resource.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource">ResourceResolver</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceWrapper.html#getResourceResolver()">getResourceResolver</A></B>()</CODE> + +<BR> + Returns the <A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource"><CODE>ResourceResolver</CODE></A> from which this resource has been + retrieved.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceWrapper.html#getResourceSuperType()">getResourceSuperType</A></B>()</CODE> + +<BR> + Returns the super type of the type of the resource or <code>null</code> + if the <A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getResourceType()"><CODE>Resource.getResourceType()</CODE></A> has no supertype.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceWrapper.html#getResourceType()">getResourceType</A></B>()</CODE> + +<BR> + The resource type is meant to point to rendering/processing scripts, + editing dialogs, etc.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/ResourceWrapper.html#toString()">toString</A></B>()</CODE> + +<BR> + </TD> +</TR> +</TABLE> + <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> +<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD> +</TR> +</TABLE> + +<P> + +<!-- ========= CONSTRUCTOR DETAIL ======== --> + +<A NAME="constructor_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Constructor Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="ResourceWrapper(org.apache.sling.api.resource.Resource)"><!-- --></A><H3> +ResourceWrapper</H3> +<PRE> +public <B>ResourceWrapper</B>(<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> resource)</PRE> +<DL> +<DD>Creates a new wrapper instance delegating all method calls to the given + <code>resource</code>. +<P> +</DL> + +<!-- ============ METHOD DETAIL ========== --> + +<A NAME="method_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Method Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="getResource()"><!-- --></A><H3> +getResource</H3> +<PRE> +public <A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A> <B>getResource</B>()</PRE> +<DL> +<DD>Returns the <code>Resource</code> wrapped by this instance. +<P> +<DD><DL> +</DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="getPath()"><!-- --></A><H3> +getPath</H3> +<PRE> +public java.lang.String <B>getPath</B>()</PRE> +<DL> +<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getPath()">Resource</A></CODE></B></DD> +<DD>This resource's path - for now that could be a JCR path. It's also + possible to have an URI for other data sources. +<P> +<DD><DL> +<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getPath()">getPath</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></CODE></DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="getResourceMetadata()"><!-- --></A><H3> +getResourceMetadata</H3> +<PRE> +public <A HREF="../../../../../org/apache/sling/api/resource/ResourceMetadata.html" title="class in org.apache.sling.api.resource">ResourceMetadata</A> <B>getResourceMetadata</B>()</PRE> +<DL> +<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getResourceMetadata()">Resource</A></CODE></B></DD> +<DD>Returns the metadata of this resource. The concrete data contained in the + <A HREF="../../../../../org/apache/sling/api/resource/ResourceMetadata.html" title="class in org.apache.sling.api.resource"><CODE>ResourceMetadata</CODE></A> object returned is implementation specific + except for the <A HREF="../../../../../org/apache/sling/api/resource/ResourceMetadata.html#RESOLUTION_PATH"><CODE>ResourceMetadata.RESOLUTION_PATH</CODE></A> property which is + required to be set to the part of the request URI used to resolve the + resource. +<P> +<DD><DL> +<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getResourceMetadata()">getResourceMetadata</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></CODE></DL> +</DD> +<DD><DL> +<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/sling/api/resource/ResourceMetadata.html" title="class in org.apache.sling.api.resource"><CODE>ResourceMetadata</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="getResourceResolver()"><!-- --></A><H3> +getResourceResolver</H3> +<PRE> +public <A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource">ResourceResolver</A> <B>getResourceResolver</B>()</PRE> +<DL> +<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getResourceResolver()">Resource</A></CODE></B></DD> +<DD>Returns the <A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource"><CODE>ResourceResolver</CODE></A> from which this resource has been + retrieved. +<P> +<DD><DL> +<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getResourceResolver()">getResourceResolver</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></CODE></DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="getResourceType()"><!-- --></A><H3> +getResourceType</H3> +<PRE> +public java.lang.String <B>getResourceType</B>()</PRE> +<DL> +<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getResourceType()">Resource</A></CODE></B></DD> +<DD>The resource type is meant to point to rendering/processing scripts, + editing dialogs, etc. It is usually a path in the repository, where + scripts and other tools definitions are found, but the + <A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource"><CODE>ResourceResolver</CODE></A> is free to set this to any suitable value such + as the primary node type of the JCR node from which the resource is + created. + <p> + If the resource instance represents a resource which is not actually + existing, this method returns the <A HREF="../../../../../org/apache/sling/api/resource/Resource.html#RESOURCE_TYPE_NON_EXISTING"><CODE>Resource.RESOURCE_TYPE_NON_EXISTING</CODE></A>. +<P> +<DD><DL> +<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getResourceType()">getResourceType</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></CODE></DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="getResourceSuperType()"><!-- --></A><H3> +getResourceSuperType</H3> +<PRE> +public java.lang.String <B>getResourceSuperType</B>()</PRE> +<DL> +<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getResourceSuperType()">Resource</A></CODE></B></DD> +<DD>Returns the super type of the type of the resource or <code>null</code> + if the <A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getResourceType()"><CODE>Resource.getResourceType()</CODE></A> has no supertype. +<P> +<DD><DL> +<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getResourceSuperType()">getResourceSuperType</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></CODE></DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="adaptTo(java.lang.Class)"><!-- --></A><H3> +adaptTo</H3> +<PRE> +public <AdapterType> AdapterType <B>adaptTo</B>(java.lang.Class<AdapterType> type)</PRE> +<DL> +<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/sling/api/adapter/Adaptable.html#adaptTo(java.lang.Class)">Adaptable</A></CODE></B></DD> +<DD>Adapts the adaptable to another type. +<P> +<DD><DL> +<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/sling/api/adapter/Adaptable.html#adaptTo(java.lang.Class)">adaptTo</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/sling/api/adapter/Adaptable.html" title="interface in org.apache.sling.api.adapter">Adaptable</A></CODE></DL> +</DD> +<DD><DL> +<DT><B>Type Parameters:</B><DD><CODE>AdapterType</CODE> - The generic type to which this resource is adapted + to<DT><B>Parameters:</B><DD><CODE>type</CODE> - The Class object of the target type, such as + <code>Node.class</code> +<DT><B>Returns:</B><DD>The adapter target or <code>null</code> if the resource cannot + adapt to the requested type</DL> +</DD> +</DL> +<HR> + +<A NAME="toString()"><!-- --></A><H3> +toString</H3> +<PRE> +public java.lang.String <B>toString</B>()</PRE> +<DL> +<DD><DL> +<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<!-- ========= END OF CLASS DATA ========= --> +<HR> + + +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<A NAME="navbar_bottom"><!-- --></A> +<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_bottom_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ResourceWrapper.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../org/apache/sling/api/resource/ResourceUtil.html" title="class in org.apache.sling.api.resource"><B>PREV CLASS</B></A> + <A HREF="../../../../../org/apache/sling/api/resource/SyntheticResource.html" title="class in org.apache.sling.api.resource"><B>NEXT CLASS</B></A></FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../index.html?org/apache/sling/api/resource/ResourceWrapper.html" target="_top"><B>FRAMES</B></A> + <A HREF="ResourceWrapper.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_bottom"></A> +<!-- ======== END OF BOTTOM NAVBAR ======= --> + +<HR> +Copyright © 2007-2009. All Rights Reserved. +</BODY> +</HTML> http://git-wip-us.apache.org/repos/asf/sling-site/blob/757222a6/assets/apidocs/sling5/org/apache/sling/api/resource/SyntheticResource.html ---------------------------------------------------------------------- diff --git a/assets/apidocs/sling5/org/apache/sling/api/resource/SyntheticResource.html b/assets/apidocs/sling5/org/apache/sling/api/resource/SyntheticResource.html new file mode 100644 index 0000000..c181e1c --- /dev/null +++ b/assets/apidocs/sling5/org/apache/sling/api/resource/SyntheticResource.html @@ -0,0 +1,511 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!--NewPage--> +<HTML> +<HEAD> +<!-- Generated by javadoc (build 1.6.0_10) on Mon May 11 08:55:05 CEST 2009 --> +<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<TITLE> +SyntheticResource (Apache Sling Aggregate 5-incubator API) +</TITLE> + +<META NAME="date" CONTENT="2009-05-11"> + +<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> + +<SCRIPT type="text/javascript"> +function windowTitle() +{ + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="SyntheticResource (Apache Sling Aggregate 5-incubator API)"; + } +} +</SCRIPT> +<NOSCRIPT> +</NOSCRIPT> + +</HEAD> + +<BODY BGCOLOR="white" onload="windowTitle();"> +<HR> + + +<!-- ========= START OF TOP NAVBAR ======= --> +<A NAME="navbar_top"><!-- --></A> +<A HREF="#skip-navbar_top" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_top_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SyntheticResource.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../org/apache/sling/api/resource/ResourceWrapper.html" title="class in org.apache.sling.api.resource"><B>PREV CLASS</B></A> + <A HREF="../../../../../org/apache/sling/api/resource/ValueMap.html" title="interface in org.apache.sling.api.resource"><B>NEXT CLASS</B></A></FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../index.html?org/apache/sling/api/resource/SyntheticResource.html" target="_top"><B>FRAMES</B></A> + <A HREF="SyntheticResource.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_top"></A> +<!-- ========= END OF TOP NAVBAR ========= --> + +<HR> +<!-- ======== START OF CLASS DATA ======== --> +<H2> +<FONT SIZE="-1"> +org.apache.sling.api.resource</FONT> +<BR> +Class SyntheticResource</H2> +<PRE> +java.lang.Object + <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.sling.api.resource.SyntheticResource</B> +</PRE> +<DL> +<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/sling/api/adapter/Adaptable.html" title="interface in org.apache.sling.api.adapter">Adaptable</A>, <A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></DD> +</DL> +<DL> +<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/sling/commons/testing/sling/MockResource.html" title="class in org.apache.sling.commons.testing.sling">MockResource</A>, <A HREF="../../../../../org/apache/sling/api/resource/NonExistingResource.html" title="class in org.apache.sling.api.resource">NonExistingResource</A></DD> +</DL> +<HR> +<DL> +<DT><PRE>public class <B>SyntheticResource</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></DL> +</PRE> + +<P> +The <code>SyntheticResource</code> class is a simple implementation of the + <code>Resource</code> interface which may be used to provide a resource + object which has no actual resource data. +<P> + +<P> +<HR> + +<P> +<!-- =========== FIELD SUMMARY =========== --> + +<A NAME="field_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Field Summary</B></FONT></TH> +</TR> +</TABLE> + <A NAME="fields_inherited_from_class_org.apache.sling.api.resource.Resource"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> +<TH ALIGN="left"><B>Fields inherited from interface org.apache.sling.api.resource.<A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></B></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#RESOURCE_TYPE_NON_EXISTING">RESOURCE_TYPE_NON_EXISTING</A></CODE></TD> +</TR> +</TABLE> + +<!-- ======== CONSTRUCTOR SUMMARY ======== --> + +<A NAME="constructor_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Constructor Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/SyntheticResource.html#SyntheticResource(org.apache.sling.api.resource.ResourceResolver, org.apache.sling.api.resource.ResourceMetadata, java.lang.String)">SyntheticResource</A></B>(<A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource">ResourceResolver</A> resourceResolver, + <A HREF="../../../../../org/apache/sling/api/resource/ResourceMetadata.html" title="class in org.apache.sling.api.resource">ResourceMetadata</A> rm, + java.lang.String resourceType)</CODE> + +<BR> + Creates a synthetic resource with the given <code>ResourceMetadata</code> + and <code>resourceType</code>.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/SyntheticResource.html#SyntheticResource(org.apache.sling.api.resource.ResourceResolver, java.lang.String, java.lang.String)">SyntheticResource</A></B>(<A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource">ResourceResolver</A> resourceResolver, + java.lang.String path, + java.lang.String resourceType)</CODE> + +<BR> + Creates a synthetic resource with the given <code>path</code> and + <code>resourceType</code>.</TD> +</TR> +</TABLE> + +<!-- ========== METHOD SUMMARY =========== --> + +<A NAME="method_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Method Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> +<TR ALIGN="right" VALIGN=""> +<TD NOWRAP><FONT SIZE="-1"> +<CODE><Type> Type</CODE></FONT></TD> +</TR> +</TABLE> +</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/SyntheticResource.html#adaptTo(java.lang.Class)">adaptTo</A></B>(java.lang.Class<Type> type)</CODE> + +<BR> + Returns <code>null</code> because synthetic resources have no actual + data and thus may not adapt to anything else.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/SyntheticResource.html#getPath()">getPath</A></B>()</CODE> + +<BR> + This resource's path - for now that could be a JCR path.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../../../org/apache/sling/api/resource/ResourceMetadata.html" title="class in org.apache.sling.api.resource">ResourceMetadata</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/SyntheticResource.html#getResourceMetadata()">getResourceMetadata</A></B>()</CODE> + +<BR> + Returns a resource metadata object containing just the path of this + resource as the <A HREF="../../../../../org/apache/sling/api/resource/ResourceMetadata.html#RESOLUTION_PATH"><CODE>ResourceMetadata.RESOLUTION_PATH</CODE></A> property.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource">ResourceResolver</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/SyntheticResource.html#getResourceResolver()">getResourceResolver</A></B>()</CODE> + +<BR> + Returns the <A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource"><CODE>ResourceResolver</CODE></A> with which this synthetic resource + is related or <code>null</code> if none.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/SyntheticResource.html#getResourceSuperType()">getResourceSuperType</A></B>()</CODE> + +<BR> + Synthetic resources by default do not have a resource super type.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/SyntheticResource.html#getResourceType()">getResourceType</A></B>()</CODE> + +<BR> + The resource type is meant to point to rendering/processing scripts, + editing dialogs, etc.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/SyntheticResource.html#setResourceType(java.lang.String)">setResourceType</A></B>(java.lang.String resourceType)</CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../../../org/apache/sling/api/resource/SyntheticResource.html#toString()">toString</A></B>()</CODE> + +<BR> + </TD> +</TR> +</TABLE> + <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> +<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD> +</TR> +</TABLE> + +<P> + +<!-- ========= CONSTRUCTOR DETAIL ======== --> + +<A NAME="constructor_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Constructor Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="SyntheticResource(org.apache.sling.api.resource.ResourceResolver, java.lang.String, java.lang.String)"><!-- --></A><H3> +SyntheticResource</H3> +<PRE> +public <B>SyntheticResource</B>(<A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource">ResourceResolver</A> resourceResolver, + java.lang.String path, + java.lang.String resourceType)</PRE> +<DL> +<DD>Creates a synthetic resource with the given <code>path</code> and + <code>resourceType</code>. +<P> +</DL> +<HR> + +<A NAME="SyntheticResource(org.apache.sling.api.resource.ResourceResolver, org.apache.sling.api.resource.ResourceMetadata, java.lang.String)"><!-- --></A><H3> +SyntheticResource</H3> +<PRE> +public <B>SyntheticResource</B>(<A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource">ResourceResolver</A> resourceResolver, + <A HREF="../../../../../org/apache/sling/api/resource/ResourceMetadata.html" title="class in org.apache.sling.api.resource">ResourceMetadata</A> rm, + java.lang.String resourceType)</PRE> +<DL> +<DD>Creates a synthetic resource with the given <code>ResourceMetadata</code> + and <code>resourceType</code>. +<P> +</DL> + +<!-- ============ METHOD DETAIL ========== --> + +<A NAME="method_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Method Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="getPath()"><!-- --></A><H3> +getPath</H3> +<PRE> +public java.lang.String <B>getPath</B>()</PRE> +<DL> +<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getPath()">Resource</A></CODE></B></DD> +<DD>This resource's path - for now that could be a JCR path. It's also + possible to have an URI for other data sources. +<P> +<DD><DL> +<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getPath()">getPath</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></CODE></DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="getResourceType()"><!-- --></A><H3> +getResourceType</H3> +<PRE> +public java.lang.String <B>getResourceType</B>()</PRE> +<DL> +<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getResourceType()">Resource</A></CODE></B></DD> +<DD>The resource type is meant to point to rendering/processing scripts, + editing dialogs, etc. It is usually a path in the repository, where + scripts and other tools definitions are found, but the + <A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource"><CODE>ResourceResolver</CODE></A> is free to set this to any suitable value such + as the primary node type of the JCR node from which the resource is + created. + <p> + If the resource instance represents a resource which is not actually + existing, this method returns the <A HREF="../../../../../org/apache/sling/api/resource/Resource.html#RESOURCE_TYPE_NON_EXISTING"><CODE>Resource.RESOURCE_TYPE_NON_EXISTING</CODE></A>. +<P> +<DD><DL> +<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getResourceType()">getResourceType</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></CODE></DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="setResourceType(java.lang.String)"><!-- --></A><H3> +setResourceType</H3> +<PRE> +protected void <B>setResourceType</B>(java.lang.String resourceType)</PRE> +<DL> +<DD><DL> +</DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="getResourceSuperType()"><!-- --></A><H3> +getResourceSuperType</H3> +<PRE> +public java.lang.String <B>getResourceSuperType</B>()</PRE> +<DL> +<DD>Synthetic resources by default do not have a resource super type. +<P> +<DD><DL> +<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getResourceSuperType()">getResourceSuperType</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></CODE></DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="getResourceMetadata()"><!-- --></A><H3> +getResourceMetadata</H3> +<PRE> +public <A HREF="../../../../../org/apache/sling/api/resource/ResourceMetadata.html" title="class in org.apache.sling.api.resource">ResourceMetadata</A> <B>getResourceMetadata</B>()</PRE> +<DL> +<DD>Returns a resource metadata object containing just the path of this + resource as the <A HREF="../../../../../org/apache/sling/api/resource/ResourceMetadata.html#RESOLUTION_PATH"><CODE>ResourceMetadata.RESOLUTION_PATH</CODE></A> property. +<P> +<DD><DL> +<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getResourceMetadata()">getResourceMetadata</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></CODE></DL> +</DD> +<DD><DL> +<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/sling/api/resource/ResourceMetadata.html" title="class in org.apache.sling.api.resource"><CODE>ResourceMetadata</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="getResourceResolver()"><!-- --></A><H3> +getResourceResolver</H3> +<PRE> +public <A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource">ResourceResolver</A> <B>getResourceResolver</B>()</PRE> +<DL> +<DD>Returns the <A HREF="../../../../../org/apache/sling/api/resource/ResourceResolver.html" title="interface in org.apache.sling.api.resource"><CODE>ResourceResolver</CODE></A> with which this synthetic resource + is related or <code>null</code> if none. +<P> +<DD><DL> +<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html#getResourceResolver()">getResourceResolver</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/sling/api/resource/Resource.html" title="interface in org.apache.sling.api.resource">Resource</A></CODE></DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="adaptTo(java.lang.Class)"><!-- --></A><H3> +adaptTo</H3> +<PRE> +public <Type> Type <B>adaptTo</B>(java.lang.Class<Type> type)</PRE> +<DL> +<DD>Returns <code>null</code> because synthetic resources have no actual + data and thus may not adapt to anything else. +<P> +<DD><DL> +<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/sling/api/adapter/Adaptable.html#adaptTo(java.lang.Class)">adaptTo</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/sling/api/adapter/Adaptable.html" title="interface in org.apache.sling.api.adapter">Adaptable</A></CODE></DL> +</DD> +<DD><DL> +<DT><B>Type Parameters:</B><DD><CODE>Type</CODE> - The generic type to which this resource is adapted + to<DT><B>Parameters:</B><DD><CODE>type</CODE> - The Class object of the target type, such as + <code>Node.class</code> +<DT><B>Returns:</B><DD>The adapter target or <code>null</code> if the resource cannot + adapt to the requested type</DL> +</DD> +</DL> +<HR> + +<A NAME="toString()"><!-- --></A><H3> +toString</H3> +<PRE> +public java.lang.String <B>toString</B>()</PRE> +<DL> +<DD><DL> +<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<!-- ========= END OF CLASS DATA ========= --> +<HR> + + +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<A NAME="navbar_bottom"><!-- --></A> +<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_bottom_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SyntheticResource.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../org/apache/sling/api/resource/ResourceWrapper.html" title="class in org.apache.sling.api.resource"><B>PREV CLASS</B></A> + <A HREF="../../../../../org/apache/sling/api/resource/ValueMap.html" title="interface in org.apache.sling.api.resource"><B>NEXT CLASS</B></A></FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../../../index.html?org/apache/sling/api/resource/SyntheticResource.html" target="_top"><B>FRAMES</B></A> + <A HREF="SyntheticResource.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_bottom"></A> +<!-- ======== END OF BOTTOM NAVBAR ======= --> + +<HR> +Copyright © 2007-2009. All Rights Reserved. +</BODY> +</HTML>