|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.multisite.SiteURLManager.SiteURLComparator
public class SiteURLManager.SiteURLComparator
a comparator to sort URLs using the following priority: 1. Full URLs containing domain name and path, are more specific than domain names alone, are more specific than paths alone. 2. Paths with more directory levels are considered more specific than paths with fewer directory levels 3. domain names all share the same level of specificity. A domain name with fewer name levels is not less specific than a domain name with more name levels. Example: foobar.com is the same level of specificity as example.foobar.com 4. If a URL comes in with domain name and path, and there is no match based on domain name plus path, but both domain name and path have separate matches for different sites, then domain name wins out.
Constructor Summary | |
---|---|
SiteURLManager.SiteURLComparator()
public constructor |
Method Summary | |
---|---|
int |
compare(java.lang.Object p1,
java.lang.Object p2)
compare two URLs |
protected int |
compareLevels(java.lang.String pURL1,
java.lang.String pURL2)
compare level counts for two URLs |
boolean |
equals(java.lang.Object pComparator)
see if another comparator is equal to this one |
protected java.lang.String |
getDomainPortion(java.lang.String pURL)
get the domain name portion of a url |
protected int |
getLevelCount(java.lang.String pURL)
get the number of levels in a URL |
protected int |
getPriority(java.lang.String pURL)
get the priority of a given URL |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SiteURLManager.SiteURLComparator()
Method Detail |
---|
public int compare(java.lang.Object p1, java.lang.Object p2)
compare
in interface java.util.Comparator
protected int compareLevels(java.lang.String pURL1, java.lang.String pURL2)
pURL1
- the first URLpURL2
- the second URL
protected java.lang.String getDomainPortion(java.lang.String pURL)
pURL
- the url
protected int getLevelCount(java.lang.String pURL)
pURL
- the url to count levels in
protected int getPriority(java.lang.String pURL)
pURL
- the url to get the int priority for
public boolean equals(java.lang.Object pComparator)
equals
in interface java.util.Comparator
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |