|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.sesat.search.site.config.AbstractResourceLoader
no.sesat.search.site.config.UrlResourceLoader
public class UrlResourceLoader
Loads resources through URL references.
| Field Summary |
|---|
| Fields inherited from class no.sesat.search.site.config.AbstractResourceLoader |
|---|
builder, document, jarFileName, props |
| Constructor Summary | |
|---|---|
protected |
UrlResourceLoader(SiteContext cxt)
|
| Method Summary | |
|---|---|
static boolean |
doesUrlExist(URL url)
Calls doesUrlExist(url, "localhost") |
static boolean |
doesUrlExist(URL url,
String hostHeader)
Checks that the url (requested with the given host header) exists. |
static String |
getHostHeader(String resource)
|
protected InputStream |
getInputStreamFor(URL url)
|
protected URL |
getResource(Site site)
|
static URL |
getURL(String resource,
Site site)
|
static BytecodeLoader |
newBytecodeLoader(SiteContext siteCxt,
String resource,
String jar)
Creates new BytecodeLoader for the given site and resource. |
static DocumentLoader |
newDocumentLoader(SiteContext siteCxt,
String resource,
DocumentBuilder builder)
Create a new DocumentLoader for the given resource name/path and load it with the given DocumentBuilder. |
static PropertiesLoader |
newPropertiesLoader(SiteContext siteCxt,
String resource,
Properties properties)
Create a new PropertiesLoader for the given resource name/path and load it into the given properties. |
protected String |
readResourceDebug(URL url)
|
boolean |
urlExists(URL url)
|
| Methods inherited from class no.sesat.search.site.config.AbstractResourceLoader |
|---|
abut, getBytecode, getContext, getDocument, getProperties, getResource, init, init, initBytecodeLoader, run |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected UrlResourceLoader(SiteContext cxt)
| Method Detail |
|---|
public static PropertiesLoader newPropertiesLoader(SiteContext siteCxt,
String resource,
Properties properties)
siteCxt - the SiteContext that will tell us which site we are dealing with.resource - the resource name/path.properties - the properties to hold the individual properties loaded.
public static DocumentLoader newDocumentLoader(SiteContext siteCxt,
String resource,
DocumentBuilder builder)
siteCxt - the SiteContext that will tell us which site we are dealing with.resource - the resource name/path.builder - the DocumentBuilder to build the DOM resource with.
public static BytecodeLoader newBytecodeLoader(SiteContext siteCxt,
String resource,
String jar)
siteCxt - context telling us which site to use.resource - the class to load bytecode for.
public static boolean doesUrlExist(URL url)
public static boolean doesUrlExist(URL url,
String hostHeader)
url - the url whom's existence is checkedhostHeader - the host header to use on the request (typically localhost)
public boolean urlExists(URL url)
urlExists in class AbstractResourceLoaderprotected URL getResource(Site site)
getResource in class AbstractResourceLoader
public static URL getURL(String resource,
Site site)
protected InputStream getInputStreamFor(URL url)
getInputStreamFor in class AbstractResourceLoaderpublic static String getHostHeader(String resource)
protected final String readResourceDebug(URL url)
readResourceDebug in class AbstractResourceLoader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||