Class DomainNameFinderImpl
- java.lang.Object
-
- jetbrains.buildServer.notification.impl.DomainNameFinderImpl
-
- All Implemented Interfaces:
DomainNameFinder
public class DomainNameFinderImpl extends Object implements DomainNameFinder
-
-
Constructor Summary
Constructors Constructor Description DomainNameFinderImpl(ServerRootUrlHolder serverRootUrlHolder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
domainMatchesAnyPattern(String s, List<String> wildcardPatterns)
Accepts one or more wildcard patterns and a string; returns true if string matches at least one of the patterns, or false otherwise.List<String>
findDomains(String s)
Find all substrings that may be domain names/URLs and return them as a list.List<String>
findExternalDomains(String s, List<String> wildcardPatterns)
Accepts one or more wildcard patterns and a string; returns a list of found external domains, where external domain is a domain that does NOT match any of supplied patterns.List<String>
getPatterns(String rawPatterns, Boolean includeServerHostname)
Accepts comma-separated list of wildcard patterns and returns a list of pattern strings.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.notification.DomainNameFinder
getPatterns
-
-
-
-
Constructor Detail
-
DomainNameFinderImpl
public DomainNameFinderImpl(ServerRootUrlHolder serverRootUrlHolder)
-
-
Method Detail
-
getPatterns
public List<String> getPatterns(String rawPatterns, Boolean includeServerHostname)
Description copied from interface:DomainNameFinder
Accepts comma-separated list of wildcard patterns and returns a list of pattern strings. If includeServerUrl property is set to true, will also append server URL to the list.- Specified by:
getPatterns
in interfaceDomainNameFinder
- Parameters:
rawPatterns
- comma-separated list of wildcard patterns.includeServerHostname
- defines whether server hostname should be included.
-
domainMatchesAnyPattern
public Boolean domainMatchesAnyPattern(String s, List<String> wildcardPatterns)
Description copied from interface:DomainNameFinder
Accepts one or more wildcard patterns and a string; returns true if string matches at least one of the patterns, or false otherwise.- Specified by:
domainMatchesAnyPattern
in interfaceDomainNameFinder
- Parameters:
s
- a string to be checked.wildcardPatterns
- list of wildcard pattern strings.
-
findDomains
public List<String> findDomains(String s)
Description copied from interface:DomainNameFinder
Find all substrings that may be domain names/URLs and return them as a list.- Specified by:
findDomains
in interfaceDomainNameFinder
- Parameters:
s
- a string that may be containing domain names or URLs.
-
findExternalDomains
public List<String> findExternalDomains(String s, List<String> wildcardPatterns)
Description copied from interface:DomainNameFinder
Accepts one or more wildcard patterns and a string; returns a list of found external domains, where external domain is a domain that does NOT match any of supplied patterns.- Specified by:
findExternalDomains
in interfaceDomainNameFinder
- Parameters:
s
- a string to be checked.wildcardPatterns
- list of wildcard pattern strings.
-
-