-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For #18 - Further work on the pluggable URI resolver and cache. Also,…
… explanation in readme.
- Loading branch information
Showing
6 changed files
with
110 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 22 additions & 9 deletions
31
openhtmltopdf-core/src/main/java/com/openhtmltopdf/extend/FSUriResolver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
package com.openhtmltopdf.extend; | ||
|
||
|
||
/** | ||
* Used to find a uri that may be relative to the BaseURL. | ||
* The returned value will always only be used via methods in the same | ||
* implementation of this interface, therefore may be a private uri-space. | ||
* | ||
* @param uri an absolute or relative (to baseURL) uri to be resolved. | ||
* @return the full uri in uri-spaces known to the current implementation. | ||
*/ | ||
public interface FSUriResolver { | ||
|
||
/** | ||
* Used to find a uri that may be relative to the BaseURL. | ||
* The returned value will always only be used via methods in the same | ||
* implementation of this interface, therefore may be a private uri-space. | ||
* | ||
* @param uri an absolute or relative (to baseURL) uri to be resolved. | ||
* @return the full uri in uri-spaces known to the current implementation. | ||
*/ | ||
public String resolveURI(String uri); | ||
|
||
/** | ||
* Does not need to be a correct URL, only an identifier that the | ||
* implementation can resolve. | ||
* | ||
* @param url A URL against which relative references can be resolved. | ||
*/ | ||
public void setBaseURL(String uri); | ||
|
||
/** | ||
* @return the base uri, possibly in the implementations private uri-space | ||
*/ | ||
public String getBaseURL(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters