Package se.conciliate.extensions.publish
Class WebResources
java.lang.Object
se.conciliate.extensions.publish.WebResources
- Author:
- Per-Erik
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds the resource 'resource' with the relative path 'resourcePath' to the resources.addSources
(WebResources other) boolean
getResourceContent
(Path sourceName) int
hashCode()
-
Constructor Details
-
WebResources
public WebResources()
-
-
Method Details
-
addSource
Adds the resource 'resource' with the relative path 'resourcePath' to the resources. The final path to the source as seen from the index file is not known during publishing. Once the publish is complete an ECMAScript can look at the variable MT.pages to get the (relative) root of the resource. The resource will then be available at {MT.pages}/{resourcePath}. That is, the path to the resource can be found with the ECMAScript code:var path = MT.pages + "/" + resourcePath;
Where resourcePath is the path given to this method.- Parameters:
resourcePath
- The relative path that gives a way to locate the resource from the published material. Which path to resolve against is up to the implementation. All that is needed is for the resource to be accessible from pages-{unknown_string}/resourcePath once the resource hits the browser.resource
- A url locating the resource.- Returns:
- The resulting resources.
- Throws:
IllegalArgumentException
- if resourcePath is absolute.
-
addSource
-
addSources
-
getResourcePaths
-
getResourceContent
- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-