| java.lang.Object com.google.gwt.dev.shell.BrowserWidgetHostChecker
BrowserWidgetHostChecker | public class BrowserWidgetHostChecker (Code) | | This class contains utility functions to do whitelist/blacklist handling.
|
Method Summary | |
public static boolean | blacklistRegexes(String regexes) This method blacklists the supplied regexes, separated by comma or space. | public static void | blacklistURL(String url) This method blacklists the supplied URL, and any that share the same host. | public static String | checkHost(String hostUnderConsideration, Set<String> hosts) This method checks the host to see if it is in the supplied set of regexes. | public static String | computeHostRegex(String url) This method computes the host regular expression for the given url. | public static String | formatBlackList() This method formats the blacklist for display in the treeLogger. | public static String | formatRules(Set<String> hosts) This method formats the list of rules for display in the treeLogger. | public static String | formatWhiteList() This method formats the whitelist for display in the treeLogger. | public static boolean | isAlwaysWhitelisted(String url) This method returns true if the host is always admissable, regardless of
the blacklist. | public static String | matchBlacklisted(String url) This method returns true if the host is forbidden. | public static String | matchWhitelisted(String url) This method returns true if the host is admissable, provided it is not on
the blacklist. | public static void | notifyBlacklistedHost(String blacklistRuleFound, String url, TreeLogger header, TreeLogger.Type msgType) This method formats a message, and logs it to the treelogger, stating that
the url was blocked. | public static void | notifyUntrustedHost(String url, TreeLogger header, TreeLogger.Type msgType) This method formats a message, and logs it to the treelogger, stating that
the url was not trusted. | public static boolean | whitelistRegexes(String regexes) This method whitelists the supplied String of regexes, separated by comma
or space. | public static void | whitelistURL(String url) This method whitelists the supplied URL, and any that share the same host. |
blacklistRegexes | public static boolean blacklistRegexes(String regexes)(Code) | | This method blacklists the supplied regexes, separated by comma or space.
Parameters: regexes - the regexes to be forbidden |
blacklistURL | public static void blacklistURL(String url)(Code) | | This method blacklists the supplied URL, and any that share the same host.
Parameters: url - the host to be forbidden |
checkHost | public static String checkHost(String hostUnderConsideration, Set<String> hosts)(Code) | | This method checks the host to see if it is in the supplied set of regexes.
Parameters: hostUnderConsideration - the host to be checked Parameters: hosts - the set of regexes to be checked against true if the host matches |
computeHostRegex | public static String computeHostRegex(String url)(Code) | | This method computes the host regular expression for the given url.
Parameters: url - the url to be allowed or disallowed the regex that matches the host in the url |
formatBlackList | public static String formatBlackList()(Code) | | This method formats the blacklist for display in the treeLogger.
the list of regexes as a String |
formatRules | public static String formatRules(Set<String> hosts)(Code) | | This method formats the list of rules for display in the treeLogger.
Parameters: hosts - the set of regexes that match hosts the list of regexes as a String |
formatWhiteList | public static String formatWhiteList()(Code) | | This method formats the whitelist for display in the treeLogger.
the list of regexes as a String |
isAlwaysWhitelisted | public static boolean isAlwaysWhitelisted(String url)(Code) | | This method returns true if the host is always admissable, regardless of
the blacklist.
Parameters: url - the URL to be verified returns true if the host is always admissable |
matchBlacklisted | public static String matchBlacklisted(String url)(Code) | | This method returns true if the host is forbidden.
Parameters: url - the URL to be verified returns the regex that specified the host matches the blacklist |
matchWhitelisted | public static String matchWhitelisted(String url)(Code) | | This method returns true if the host is admissable, provided it is not on
the blacklist.
Parameters: url - the URL to be verified returns the regex that specified the host matches the whitelist |
notifyBlacklistedHost | public static void notifyBlacklistedHost(String blacklistRuleFound, String url, TreeLogger header, TreeLogger.Type msgType)(Code) | | This method formats a message, and logs it to the treelogger, stating that
the url was blocked.
Parameters: url - the URL that was disallowed Parameters: header - the treelogger under which these messages will be put Parameters: msgType - either a caution or an error |
notifyUntrustedHost | public static void notifyUntrustedHost(String url, TreeLogger header, TreeLogger.Type msgType)(Code) | | This method formats a message, and logs it to the treelogger, stating that
the url was not trusted.
Parameters: url - the URL that provoked the dialog box Parameters: header - the treelogger under which these messages will be put Parameters: msgType - either a caution or an error |
whitelistRegexes | public static boolean whitelistRegexes(String regexes)(Code) | | This method whitelists the supplied String of regexes, separated by comma
or space.
Parameters: regexes - the regexes to be allowed |
whitelistURL | public static void whitelistURL(String url)(Code) | | This method whitelists the supplied URL, and any that share the same host.
Parameters: url - the host to be allowed |
|
|