|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.twss.common.siputils.URIComparison
public class URIComparison
Provides SIP, SIPS, and TEL URI normalization and comparison functions. Functionality originated in the CallNotification_IMS service.
Method Summary | |
---|---|
static boolean |
areEquivalent(java.lang.String uriString1,
java.lang.String uriString2,
javax.servlet.sip.SipFactory sipFactory)
Checks if two String URI representations are equivalent using a robust comparison algorithm. |
static java.lang.String |
convertToSipURIString(javax.servlet.sip.TelURL telURL)
Convert a TelURL to a String representing a semantically equivalent SIP URI. |
static java.lang.String |
normalizeURIForSQLSelect(java.lang.String uriToNormalize,
javax.servlet.sip.SipFactory sipFactory)
Normalize the given URI according to section 5.2.1 of the CallNotification CDD. |
static boolean |
startsWithTelScheme(java.lang.String uriString)
Returns true if the input begins with the TEL URI scheme. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String normalizeURIForSQLSelect(java.lang.String uriToNormalize, javax.servlet.sip.SipFactory sipFactory) throws InvalidNormalizationInputException, java.lang.NullPointerException
scheme :userinfo
. For a TEL
URI, normalization will leave only
tel:global-number-digits
or
tel:local-number-digits
with any visual
separators removed from the digit portions.
The normalization process is designed so that normalized URIs,
once stored in a database, can be quickly scanned for potential
equality matches using traditional SQL SELECTs. Usually the normalized
form and the non-normalized form will be stored in the same table.
Once a candidate set of URIs is found via SQL SELECT WHERE clauses
against the normalized form, a final equality
checks should be performed against the non-normalized version
using the areEquivalent(String, String, SipFactory)
method to handle full comparison details.
uriToNormalize
- to normalize for database INSERT and SELECTsipFactory
- to use during the normalization process.
InvalidNormalizationInputException
- if uriToNormalize is not a
valid SIP, SIPS, or TEL URI.
java.lang.NullPointerException
- if sipFactory is null.areEquivalent(String, String, SipFactory)
public static boolean areEquivalent(java.lang.String uriString1, java.lang.String uriString2, javax.servlet.sip.SipFactory sipFactory) throws ComparisonParsingException, UnsupportedComparisonSchemeException, CompactHeaderExpansionException
uriString1
- to compare.uriString2
- to compare.sipFactory
- to use during the normalization process.
ComparisonParsingException
- if either URI cannot be parsed.
UnsupportedComparisonSchemeException
- if either URI uses
an unsupported scheme.
CompactHeaderExpansionException
- if the compact header
expansion process encounters unrecoverable errors.public static boolean startsWithTelScheme(java.lang.String uriString)
uriString
- to check.
public static java.lang.String convertToSipURIString(javax.servlet.sip.TelURL telURL)
telURL
- to convert.
java.lang.NullPointerException
- if telURl is null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |