|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.docmosis.document.ExternalResourcePermissions
public class ExternalResourcePermissions
Specification of allowed external resources in the form of a white list of urls or url-prefixes. These permissions are applied against templates and converted documents to control whether external resources (such as embedded OLE objects) can reference external objects (like urls or file references). The permission is simply a true/false test and typically is applied to reading a url but could apply to any operation with a url.
Matching is done with the white list items as a prefix, so:
Field Summary | |
---|---|
static ExternalResourcePermissions |
ALL
All permission granted |
static ExternalResourcePermissions |
NONE
No permission granted |
Method Summary | |
---|---|
com.docmosis.document.ExternalResourcePermissionsCheckResult |
permitted(ExternalResourceCollection resources,
boolean compareCaseInsensitive,
boolean compareDecodeUrls)
Determine whether the given resource urls are permitted based on this instances prefixes. |
static com.docmosis.document.ExternalResourcePermissionsCheckResult |
permitted(ExternalResourcePermissions permission,
ExternalResourceCollection resources,
boolean compareCaseInsensitive,
boolean compareDecodeUrls)
Check whether permission is granted for all given resources. |
boolean |
permitted(String url,
boolean compareCaseInsensitive,
boolean compareDecodeUrls)
Determine whether the given url is permitted based on this instances prefixes. |
static ExternalResourcePermissions |
whitelist(String[] prefixes)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ExternalResourcePermissions ALL
public static final ExternalResourcePermissions NONE
Method Detail |
---|
public static ExternalResourcePermissions whitelist(String[] prefixes)
public static com.docmosis.document.ExternalResourcePermissionsCheckResult permitted(ExternalResourcePermissions permission, ExternalResourceCollection resources, boolean compareCaseInsensitive, boolean compareDecodeUrls)
permission
- resources
- compareCaseInsensitive
- compareDecodeUrls
-
public com.docmosis.document.ExternalResourcePermissionsCheckResult permitted(ExternalResourceCollection resources, boolean compareCaseInsensitive, boolean compareDecodeUrls)
resources
- the resources to testcompareCaseInsensitive
- whether to ignore differences in character-case (true is more forgiving).compareDecodeUrls
- whether to apply decoding (eg %20 == space) when comparing
(true is more forgiving).
public boolean permitted(String url, boolean compareCaseInsensitive, boolean compareDecodeUrls)
url
- the url to testcompareCaseInsensitive
- whether to ignore differences in character-case (true is more forgiving).compareDecodeUrls
- whether to apply decoding (eg %20 == space) when comparing
(true is more forgiving).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |