Package org.zkoss.util.resource
Interface XMLResourcesLocator
-
- All Superinterfaces:
Locator
- All Known Implementing Classes:
ClassLocator
public interface XMLResourcesLocator extends Locator
Represents a locator used to locate XML resources.- Since:
- 6.0.0
- Author:
- tomyeh
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
XMLResourcesLocator.Resource
An item of the list returned bygetDependentXMLResources(java.lang.String, java.lang.String, java.lang.String)
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<XMLResourcesLocator.Resource>
getDependentXMLResources(java.lang.String name, java.lang.String elName, java.lang.String elDepends)
Returns a list of resources (XMLResourcesLocator.Resource
) after resolving the dependence.java.util.Enumeration<java.net.URL>
getResources(java.lang.String name)
Returns an enumeration of resources.-
Methods inherited from interface org.zkoss.util.resource.Locator
getDirectory, getResource, getResourceAsStream
-
-
-
-
Method Detail
-
getResources
java.util.Enumeration<java.net.URL> getResources(java.lang.String name) throws java.io.IOException
Returns an enumeration of resources. UnlikegetDependentXMLResources(java.lang.String, java.lang.String, java.lang.String)
, it doesn't resolve the dependence among the resources.- Parameters:
name
- the resource name, such as "metainfo/config.xml".- Throws:
java.io.IOException
-
getDependentXMLResources
java.util.List<XMLResourcesLocator.Resource> getDependentXMLResources(java.lang.String name, java.lang.String elName, java.lang.String elDepends) throws java.io.IOException
Returns a list of resources (XMLResourcesLocator.Resource
) after resolving the dependence. The resource is returned in the format ofXMLResourcesLocator.Resource
To resolve the dependence, it assumes each resource has two element whose name is identified by elName and elDepends. The elName element specifies the unique name of each resource. The elDepends element specifies a list of names of resources that this resource depends on. If not found, it assumes it could be loaded first.
- Parameters:
name
- the resource name, such as "metainfo/config.xml".elName
- the element used to specify the name.elDepends
- the element used to specify the dependence.- Returns:
- a list of
XMLResourcesLocator.Resource
of the specified name. - Throws:
java.io.IOException
-
-