public abstract class VDSFunction
extends java.lang.Object
Some of the functions: rdn(param) //rdn a=1 rdnval(param) //rdnval 1 parent(param) //dn parent left(param,nbchar) //left substring leftsubstring(param,'string') //left substring + trim() right(param,nbchar)//right substring rightsubstring(param,'string') //right substring + trim() upper(param) //to upper case lower(param) //to lower case Example: parent(refdn) left(middlename,1) left(name,"@")
| Modifier and Type | Class and Description |
|---|---|
static interface |
VDSFunction.FunctionAnnotation |
static class |
VDSFunction.TypeParameter |
| Modifier and Type | Field and Description |
|---|---|
protected static int |
base |
protected CompoundObject |
compoundObject |
javax.naming.directory.Attribute |
dn |
java.lang.String |
dnstr |
static java.lang.String |
GETANCESTORATTR_METHODENAME |
static java.lang.String |
GETCACHE_OBJECTGUID |
static java.lang.String |
GETIDENTITYURL_METHODENAME |
static java.lang.String |
GETMETADN_METHODENAME |
static java.lang.String |
GETPRIMARYIDENTITYURL_METHODENAME |
static java.lang.String |
GETURL_METHODENAME |
protected static int |
one |
protected javax.naming.directory.Attribute |
sharedAttribute |
protected javax.naming.directory.SearchResult |
sr |
protected static int |
sub |
| Constructor and Description |
|---|
VDSFunction() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
addMultiValues(java.lang.String values,
java.lang.String separator)
add a set of values to the computed attribute
|
java.lang.String |
addValue(java.lang.Object value)
add a value to the computed attribute
e.g., addValue(val1);addValue(val2);addValue(attr1) |
java.lang.String |
addValues(javax.naming.directory.Attribute attribute)
add all the attribute values to the computed attribute
addValues(attr1); |
static java.lang.String |
avg(javax.naming.directory.Attribute attr)
Return average from attribute values.
|
static java.lang.String |
caverphone1(java.lang.String attribute)
Encodes a string into a Caverphone 1.0 value.
|
static java.lang.String |
caverphone2(java.lang.String attribute)
Encodes a string into a Caverphone 2.0 value.
|
java.lang.String |
checkQuote(VDSFunction.TypeParameter typeP,
java.lang.String value)
Add or remove quote for value to be valid regarding is type.
|
static java.lang.String |
colognePhonetic(java.lang.String attribute)
Encodes a string into a Cologne Phonetic value.
|
static VDSFunction |
createDefaultInstance(CompoundObject co)
basic implementation for GUI, to be able to access VDSFunction method
|
java.lang.String |
DNremapLookup(javax.naming.directory.Attribute attr,
java.lang.String baseDN1,
java.lang.String baseDN2,
java.lang.String dnAttr) |
java.lang.String |
DNremapLookupForeign(javax.naming.directory.Attribute attr,
java.lang.String baseDN1,
java.lang.String baseDN2) |
java.lang.String |
DNremapLookupUnnest(javax.naming.directory.Attribute Groupattr,
java.lang.String UserbaseDN,
java.lang.String GroupbaseDN,
java.lang.String dnAttr) |
static java.lang.String |
doubleMetaphone(java.lang.String attribute)
Encodes a string into a double metaphone value.
|
boolean |
filtermatch(java.lang.String attrValue)
Help Support of conditional expressions (if then else) .
|
static java.lang.String |
firstValue(javax.naming.directory.Attribute attr)
Returns first value from the attribute values.
|
java.lang.String |
getactualDN()
Get the actualDN
|
java.lang.String |
getADPassword()
Get the AD password (defaults to ORGID) from the compound object source and
the entry's through websocket server saMAccountname
|
java.lang.String |
getADPasswordHistory()
Get the AD password History (defaults to ORGID) from the compound object source and the entry's through
websocket server
saMAccountname
|
java.lang.String |
getADPasswordMD4()
Get the AD password (MD4) from the compound object source and the entry's
through websocket server saMAccountname
|
java.lang.String |
getAncestorAttributeValues(java.lang.String attributeName,
java.lang.String dn) |
java.lang.String |
getBinary(javax.naming.directory.Attribute AttrName)
Return the values of an attribute in binary .
|
java.lang.String |
getCacheObjectGUID(java.lang.String guidAttrName) |
java.lang.String |
getDateFromADTimestamp(javax.naming.directory.Attribute attribute,
java.lang.String OutputFormat)
Translate a Microsoft AD timestamp into a formatted date/time
|
java.lang.String |
getHexGUIDForDn(java.lang.String datasourceName,
java.lang.String dnValue) |
java.lang.String |
getIdentityUrls() |
static java.util.Map<java.lang.String,java.lang.String> |
getMapFromDictionaryFile(java.lang.String fileName)
Get a map of all key and values of a dictionary.
|
java.lang.String |
getMetaDN()
Get the meta DN
|
java.lang.String |
getParentRdnValues(java.lang.String rdnAttrName)
Extract parent rdn values from entry DN.
|
java.lang.String |
getPrimaryIdentityUrl() |
java.lang.String |
getStringGUIDForDn(java.lang.String datasourceName,
java.lang.String dnValue) |
java.lang.String |
getTypeParameterDefaultValue(VDSFunction.TypeParameter typeP) |
java.lang.String |
getTypeParameterDescription(VDSFunction.TypeParameter typeP)
return description for type parameter.
|
java.lang.String[] |
getTypeParameterValues(VDSFunction.TypeParameter typeP)
Return values allowed for parameter.
|
java.lang.String |
getUrl()
get the instance URL of the virtualized backend
|
java.lang.String |
getUUIDfromDN()
Creates UUID from DN value.
|
boolean |
has(java.lang.String attrValue)
Help Support of conditional expressions (if then else) .
|
static boolean |
isTypeParameterOptional(VDSFunction.TypeParameter typeP)
Return true if parameter is optional in function.
|
boolean |
isTypeParameterValid(VDSFunction.TypeParameter typeP,
java.lang.String value)
Return true if value is valid for current parameter type.
|
static java.lang.String |
lastValue(javax.naming.directory.Attribute attr)
Returns last value from the attribute values.
|
static java.lang.String |
left(java.lang.String value,
int size)
Leftmost characters of the replace string are returned.
|
static java.lang.String |
left(java.lang.String value,
java.lang.String separ)
Leftmost characters of the replace string are returned before the separator
string.
|
java.lang.String |
lookup(java.lang.String vdQuery)
Execute a LDAP lookup and store value(s) in attribute returned.
|
java.lang.String |
lookup(java.lang.String dataSourceID,
java.lang.String baseDn,
int scope,
java.lang.String filter,
java.lang.String attrName,
int sizeLimit)
execute a LDAP lookup and store value(s) in attribute returned.
|
java.lang.String |
lookup(VDQuery vdQuery)
Execute a LDAP lookup and store value(s) in attribute returned.
|
static java.lang.String |
lower(java.lang.String value)
Converts all of the characters in the replace string to lower case.
|
static java.lang.String |
max(javax.naming.directory.Attribute attr)
Return maximum value from attribute values.
|
static java.lang.String |
metaphone(java.lang.String attribute)
Encodes a string into a Metaphone value.
|
static java.lang.String |
min(javax.naming.directory.Attribute attr)
Return minimum value from attribute values.
|
static java.lang.String |
normalizeAttribute(java.lang.String attribute,
java.lang.String normalizedFileName)
Normalizes the non-standard attribute into standard attribute using
normalization file normalizedFileName which must be located in
RLI_HOME/vds/ontology/normalization directory.
|
static java.lang.String |
normalizeFirstName(java.lang.String attribute)
Normalizes the non-standard first name attribute into standard first name
using normalization file firstname.dat which located in
RLI_HOME/vds/ontology/normalization directory.
|
static java.lang.String |
normalizeGeneration(java.lang.String attribute)
Normalizes the non-standard generation attribute into standard generation
using normalization file generation.dat which located in
RLI_HOME/vds/ontology/normalization directory.
|
static java.lang.String |
normalizeLastName(java.lang.String attribute)
Normalizes the non-standard last name attribute into standard first name
using normalization file lastname.dat which located in
RLI_HOME/vds/ontology/normalization directory.
|
static java.lang.String |
normalizePhoneNumber(java.lang.String s)
Normalizies phone number by removing all non-digit characters
|
static java.lang.String |
normalizeSalutation(java.lang.String attribute)
Normalizes the non-standard salutation attribute into standard salutation
using normalization file salutation.dat which located in
RLI_HOME/vds/ontology/normalization directory.
|
static java.lang.String |
normalizeSpace(java.lang.String attribute)
Removes leading and trailing white space from the attribute and changes
multiple spaces in the middle of the attribute to a single space.
|
static java.lang.String |
normalizeString(java.lang.String attribute)
1.
|
static java.lang.String |
normalizeTitle(java.lang.String attribute)
Normalizes the non-standard title attribute into standard title using
normalization file title.dat which located in
RLI_HOME/vds/ontology/normalization directory.
|
static java.lang.String |
normilizePhone(java.lang.String s)
Normalizies phone number by removing all non-digit characters
|
static java.lang.String |
parent(java.lang.String value)
Returns the parent DN of a given dnAttribute.
|
static java.lang.String |
randomAlpanumeric(int count)
Creates a random string whose length is the number of characters specified.
|
static java.lang.String |
randomAlphabetic(int count)
Creates a random string whose length is the number of characters specified.
|
static java.lang.String |
randomAscii(int count)
Creates a random string whose length is the number of characters specified.
|
static java.lang.String |
randomNumeric(int count)
Creates a random string whose length is the number of characters specified.
|
static java.lang.String |
randomUUID()
Creates a random UUID.
|
static java.lang.String |
rdn(java.lang.String value)
Returns the RDN part of a given dnAttribute.
|
static java.lang.String |
rdnval(java.lang.String value)
Returns the RDN value of a given dnAttribute.
|
static java.lang.String |
refinedSoundex(java.lang.String attribute)
Encodes a string into a Refined Soundex value.
|
static java.lang.String |
remapDN(java.lang.String dn,
java.lang.String dnTemplate)
Re-map original DN attribute using a DN template.
|
static java.lang.String |
remapDN(java.lang.String dn,
java.lang.String srcSuffix,
java.lang.String destSuffix)
Replace in the dn the old suffix (if present) to the new suffix.
|
java.lang.String |
remapDN(java.lang.String attr2remap,
java.lang.String dataSourceID,
java.lang.String externalBaseDN,
int scope,
java.lang.String externalIdAttr)
The function will extract the rdn Value of the DN to remap, and will issue a
lookup.
|
static java.lang.String |
replace(java.lang.String replace,
java.lang.String pattern,
java.lang.String replacement)
Replaces the first substring of the replace string that matches the given
regular expression pattern with the given replacement.
|
static java.lang.String |
replaceAll(java.lang.String replace,
java.lang.String pattern,
java.lang.String replacement)
Replaces each substring of the replace string that matches the given regular
expression pattern with the given replacement.
|
static java.lang.String |
replaceChars(java.lang.String str,
java.lang.String searchChars,
java.lang.String replaceChars)
This method is wrapper of org.apache.commons.lang.StringUtils.replaceChars
with one change: A null string input returns an empty ("") string.
|
static java.lang.String |
replaceEmpty(java.lang.String attribute,
java.lang.String replacement)
If attribute is empty string ("") or null, returns replacement string;
otherwise, returns attribute.
|
static java.lang.String |
replaceFromDictionary(java.lang.String attribute,
java.lang.String dictionaryFileName,
java.lang.String defaultValue)
Normalizes the non-standard attribute into standard attribute using
normalization file normalizedFileName which must be located in
RLI_HOME/vds/ontology/normalization directory.
|
static java.lang.String |
replaceFromDictionary(java.lang.String attribute,
java.lang.String dictionaryFileName,
java.lang.String defaultValue,
boolean caseSensitive) |
static java.lang.String |
replaceNull(java.lang.String attribute)
If attribute is null, returns empty string (""); otherwise, returns
attribute.
|
static java.lang.String |
replaceNull(java.lang.String attribute,
java.lang.String defaultValue)
If attribute is null, returns the replacement string; otherwise, returns
attribute.
|
static java.lang.String |
replaceX(java.lang.String toreplace,
java.lang.String rules)
Replaces each substring of the attribute values that matches the given
regular expression pattern with the given replacement.
|
static java.lang.String |
replaceXnull(java.lang.String toreplace,
java.lang.String rules)
Replaces each substring of the attribute values that matches the given
regular expression pattern with the given replacement.
|
static java.lang.String |
right(java.lang.String value,
int size)
Rightmost characters of the replace string are returned.
|
static java.lang.String |
right(java.lang.String value,
java.lang.String separ)
Rightmost characters of the replace string are returned after the separator
string.
|
static java.lang.String |
sortAsc(javax.naming.directory.Attribute attr)
Sort the specified attribute values in ascending order.
|
static java.lang.String |
sortDesc(javax.naming.directory.Attribute attr)
Sort the specified attribute values in descending order.
|
static java.lang.String |
soundex(java.lang.String attribute)
Encodes a string into a Soundex value.
|
java.lang.String |
StringFromGUID(javax.naming.directory.Attribute guidAttrName)
Return the ascii 'formatted' representation of a GUID (internally represented
by a byte array )Example: StringFromGUID(objectGUID) returns
"ac642e6e-6ab5-425a-bcc9-9f5067d46e3f".
|
java.lang.String |
StringFromSID(javax.naming.directory.Attribute sidAttrName)
Return the ascii 'formatted' representation of a SID (internally represented
by a byte array )Example: StringFromSID(objectSID) returns
"S-1-5-21-1698188384-1693678267-1543859470-6637".
|
static java.lang.String |
sum(javax.naming.directory.Attribute attr)
Return total sum from attribute values.
|
static java.lang.String |
upper(java.lang.String value)
Converts all of the characters in the replace string to upper case.
|
static java.lang.String |
upperTrim(java.lang.String attribute)
Applies normalizeSpace() and upper() functions; if string is null, returns
empty string.
|
protected javax.naming.directory.SearchResult sr
protected CompoundObject compoundObject
protected javax.naming.directory.Attribute sharedAttribute
protected static final int base
protected static final int one
protected static final int sub
public javax.naming.directory.Attribute dn
public java.lang.String dnstr
public static final java.lang.String GETPRIMARYIDENTITYURL_METHODENAME
public static final java.lang.String GETIDENTITYURL_METHODENAME
public static final java.lang.String GETMETADN_METHODENAME
public static final java.lang.String GETURL_METHODENAME
public static final java.lang.String GETCACHE_OBJECTGUID
public static final java.lang.String GETANCESTORATTR_METHODENAME
public java.lang.String getTypeParameterDescription(VDSFunction.TypeParameter typeP)
typeP - type parameterpublic java.lang.String[] getTypeParameterValues(VDSFunction.TypeParameter typeP)
typeP - type parameterpublic java.lang.String getTypeParameterDefaultValue(VDSFunction.TypeParameter typeP)
public java.lang.String getCacheObjectGUID(java.lang.String guidAttrName)
public java.lang.String checkQuote(VDSFunction.TypeParameter typeP, java.lang.String value)
typeP - type parametervalue - input valuepublic boolean isTypeParameterValid(VDSFunction.TypeParameter typeP, java.lang.String value)
typeP - type parametervalue - value for checkingpublic static boolean isTypeParameterOptional(VDSFunction.TypeParameter typeP)
typeP - type parameterpublic static java.lang.String rdn(java.lang.String value)
Example: rdn("uid=me,ou=myorg,o=companydirectory") returns "uid=me"
value - value of DNpublic static java.lang.String rdnval(java.lang.String value)
Example: rdnval("uid=me") returns "me"
value - value of DNpublic static java.lang.String parent(java.lang.String value)
Example: parent("uid=me,ou=myorg,o=companydirectory") returns "ou=myorg,o=companydirectory"
value - value of DNpublic static java.lang.String left(java.lang.String value,
int size)
Example:
left("123456789",5) returns "12345"
left("123456789",15) returns "123456789"
value - the replace stringsize - how many leftmost characters should be returned. If size bigger
than the size of the replace string, the replace string is
returned.public static java.lang.String right(java.lang.String value,
int size)
Example:
right("123456789",5) returns "56789"
right("123456789",15) returns "123456789"
value - the replace stringsize - how many rightmost characters should be returned. If size bigger
than the size of the replace string, the replace string is
returned.public static java.lang.String right(java.lang.String value,
java.lang.String separ)
Example:
right("name@domain.com","@") returns "domain.com";
right("name@domain.com","#") returns "name@domain.com";
value - the replace stringsepar - separatorpublic static java.lang.String left(java.lang.String value,
java.lang.String separ)
Example:
left("name@domain.com","@") returns "name";
left("name@domain.com","#") returns "name@domain.com";
value - the replace stringsepar - separatorpublic static java.lang.String upper(java.lang.String value)
Example: upper("abCD") returns "ABCD"
value - the replace stringpublic static java.lang.String lower(java.lang.String value)
Example: upper("abCD") returns "abcd"
value - the replace stringpublic java.lang.String lookup(java.lang.String dataSourceID,
java.lang.String baseDn,
int scope,
java.lang.String filter,
java.lang.String attrName,
int sizeLimit)
throws javax.naming.NamingException,
java.io.IOException,
LDAPException
dataSourceID - Data Source Name as defined in "Data Sources" configurationbaseDn - Base DN to use, could be an attribute or a static DN valuescope - 0:base, 1:one or 2:subfilter - filter to apply on external source, could be a combination of
attributes and static string valuesattrName - attrName to return from external entries, if not specified (null),
then will store DN in resultsizeLimit - number of external entries returnedLDAPExceptionjava.io.IOExceptionjavax.naming.NamingExceptionpublic java.lang.String lookup(java.lang.String vdQuery)
throws javax.naming.NamingException,
java.io.IOException,
LDAPException
vdQuery - javax.naming.NamingExceptionjava.io.IOExceptionLDAPExceptionpublic java.lang.String getMetaDN()
javax.naming.NamingExceptionjava.io.IOExceptionLDAPExceptionpublic java.lang.String getactualDN()
public java.lang.String getPrimaryIdentityUrl()
public java.lang.String getIdentityUrls()
public java.lang.String getUrl()
public java.lang.String getAncestorAttributeValues(java.lang.String attributeName,
java.lang.String dn)
throws java.lang.Exception
attributeName - dn - java.lang.Exceptionpublic java.lang.String addValue(java.lang.Object value)
value - String with all the values ,public java.lang.String addMultiValues(java.lang.String values,
java.lang.String separator)
e.g., addMultiValues("v1 # v2 #v3"," # ");
values - : string representing the values, separated with 'separator'separator - public java.lang.String addValues(javax.naming.directory.Attribute attribute)
attribute - public java.lang.String DNremapLookup(javax.naming.directory.Attribute attr,
java.lang.String baseDN1,
java.lang.String baseDN2,
java.lang.String dnAttr)
throws LDAPException
LDAPExceptionpublic java.lang.String DNremapLookupUnnest(javax.naming.directory.Attribute Groupattr,
java.lang.String UserbaseDN,
java.lang.String GroupbaseDN,
java.lang.String dnAttr)
throws LDAPException
LDAPExceptionpublic java.lang.String DNremapLookupForeign(javax.naming.directory.Attribute attr,
java.lang.String baseDN1,
java.lang.String baseDN2)
throws LDAPException
LDAPExceptionpublic java.lang.String lookup(VDQuery vdQuery)
throws javax.naming.NamingException,
java.io.IOException,
LDAPException
vdQuery - javax.naming.NamingExceptionjava.io.IOExceptionLDAPExceptionpublic static java.lang.String remapDN(java.lang.String dn,
java.lang.String dnTemplate)
Example: remapDN(memberOf,"uid=%rdn,dc=my_users"). %rdn will be replaced with the rdn value extracted from the memberof attribute.
Example: remapDN(memberOf,"%dn,dc=my_users") will add a suffix to the original dn
dn - DN type attribute. Example: cn=test,ou=mycompany,dc=comdnTemplate - DN Template representation of re-mapped value. Example:
uid=%rdn,dv=ad_10_11_12_203_389_userspublic static java.lang.String remapDN(java.lang.String dn,
java.lang.String srcSuffix,
java.lang.String destSuffix)
Example: remapDN(originalDNattribute,"o=mycompany","dc=mycomp")
dn - DN type attributesrcSuffix - old suffix to be updateddestSuffix - new suffix valuepublic java.lang.String remapDN(java.lang.String attr2remap,
java.lang.String dataSourceID,
java.lang.String externalBaseDN,
int scope,
java.lang.String externalIdAttr)
throws javax.naming.NamingException,
java.io.IOException,
LDAPException
attr2remap - Name of the Attribute containing the DN to remap.dataSourceID - Data Source Name as defined in \"Data Sources\" configurationexternalBaseDN - Base DN to use for lookup.scope - 0:base, 1:one or 2:subexternalIdAttr - Name of the attribute to look for.javax.naming.NamingExceptionjava.io.IOExceptionLDAPExceptionpublic static java.lang.String max(javax.naming.directory.Attribute attr)
Example: max(this.uid), uid with values = [1,2,3] returns 3
attr - Attributepublic static java.lang.String min(javax.naming.directory.Attribute attr)
Example: min(this.uid), uid with values = [1,2,3] returns 1
attr - Attributepublic static java.lang.String avg(javax.naming.directory.Attribute attr)
Example: avg(this.uid), uid with values = [1,2,3] returns 2
attr - Attributepublic static java.lang.String sum(javax.naming.directory.Attribute attr)
Example: sum(this.uid), uid with values=[1,2,3] returns 6
attr - Attributepublic static java.lang.String sortAsc(javax.naming.directory.Attribute attr)
Example: sortAsc(this.uid), uid with values = [1,3,2] returns [1,2,3]
attr - Attributepublic static java.lang.String sortDesc(javax.naming.directory.Attribute attr)
Example: sortDesc(this.uid), uid with values = [1,3,2] returns [3,2,1]
attr - Attributepublic static java.lang.String firstValue(javax.naming.directory.Attribute attr)
Example: firstValue(this.uid), uid with values = [1,2,3] returns 1
attr - Attributepublic static java.lang.String lastValue(javax.naming.directory.Attribute attr)
Example: lastValue(this.uid), uid with values = [1,2,3] returns 3
attr - Attributepublic java.lang.String getParentRdnValues(java.lang.String rdnAttrName)
Example: getParentRdnValues("ou") with values = [uid=1,ou=hr,ou=mycompany] returns [hr,mycompany]
rdnAttrName - rdnAttrNamepublic static java.lang.String replace(java.lang.String replace,
java.lang.String pattern,
java.lang.String replacement)
Example: replace("abCDab","ab","AB") returns "ABCDab"
replace - the replace stringpattern - the regular expression to which the replace string is to be
matchedreplacement - the string to be substituted for the first matchpublic static java.lang.String replaceAll(java.lang.String replace,
java.lang.String pattern,
java.lang.String replacement)
Example: replace("abCDab","ab","AB") returns "ABCDAB"
replace - the replace stringpattern - the regular expression to which the replace string is to be
matchedreplacement - the string to be substituted for each matchpublic static java.lang.String replaceX(java.lang.String toreplace,
java.lang.String rules)
Example: replaceX("San Francisco",{"San"} --> {"SAN"}) returns "SAN Francisco"
toreplace - the string to be replacedrules - rules: regular expressions to which the string to replace is to be
matched with . regular expression1public static java.lang.String replaceXnull(java.lang.String toreplace,
java.lang.String rules)
Example: replaceXnull("Francisco",{"San"} --> {"SAN"}) returns null
toreplace - the string to be replacedrules - rules: regular expressions to which the string to replace is to be
matched with . regular expression1public static java.lang.String normalizeSpace(java.lang.String attribute)
Example: normalizeSpace( " ab CDab ") returns "ab CDab"
attribute - the replaced stringpublic static java.lang.String upperTrim(java.lang.String attribute)
attribute - the replaced stringpublic static java.lang.String normalizeString(java.lang.String attribute)
attribute - the replaced stringpublic static java.lang.String replaceChars(java.lang.String str,
java.lang.String searchChars,
java.lang.String replaceChars)
Replaces multiple characters in a String in one go. This method can also be used to delete characters.
For example: replaceChars("hello", "ho", "jy") = jelly.
A null string input returns an empty ("") string. An empty ("") string input returns an empty string. A null or empty set of search characters returns the input string.
The length of the search characters should normally equal the length of the replace characters. If the search characters is longer, then the extra search characters are deleted. If the search characters is shorter, then the extra replace characters are ignored.
str - - String to replace characters in, may be nullsearchChars - - a set of characters to search for, may be nullreplaceChars - - a set of characters to replace, may be nullpublic static java.lang.String normalizePhoneNumber(java.lang.String s)
s - input stringpublic static java.lang.String normilizePhone(java.lang.String s)
s - input stringpublic static java.lang.String replaceEmpty(java.lang.String attribute,
java.lang.String replacement)
Example: replaceEmpty(null,"ABC") ) returns "ABC"
Example: replaceEmpty("","ABC") ) returns "ABC"
attribute - input stringreplacement - replacement stringpublic static java.lang.String replaceNull(java.lang.String attribute)
Example: replaceNull(null) returns ""
attribute - input stringpublic static java.lang.String replaceNull(java.lang.String attribute,
java.lang.String defaultValue)
Example: replaceNull(null, "ABC") returns "ABC"
attribute - input stringpublic java.lang.String getUUIDfromDN()
This is a wrapper of java.util.UUID.method
Example of UUID: 7f5922e8-bb2f-4e97-841c-9bdd651b9705
public static java.lang.String randomUUID()
This is a wrapper of java.util.UUID.randomUUID().toString() method
Example of UUID: 7f5922e8-bb2f-4e97-841c-9bdd651b9705
public static java.lang.String randomAscii(int count)
This is a wrapper of org.apache.commons.lang.RandomStringUtils.randomAscii(count) method with one change: if count<=0, a random string of length 1 is returned. ( Apache method throws an exception if count<0, or returns empty string if count=0. )
Example: randomAscii(10) returns random string of length 10.
count - the length of random string to createpublic static java.lang.String randomAlphabetic(int count)
This is a wrapper of org.apache.commons.lang.RandomStringUtils.randomAlphabetic(count) method with one change: if count<=0, a random string of length 1 is returned. ( Apache method throws an exception if count<0, or returns empty string if count=0. )
Example: randomAlphabetic(10) returns random string of length 10.
count - the length of random string to createpublic static java.lang.String randomAlpanumeric(int count)
This is a wrapper of org.apache.commons.lang.RandomStringUtils.randomAlphanumeric(count) method with one change: if count<=0, a random string of length 1 is returned. ( Apache method throws an exception if count<0, or returns empty string if count=0. )
Example: randomAlpanumeric(10) returns random string of length 10.
count - the length of random string to createpublic static java.lang.String randomNumeric(int count)
This is a wrapper of org.apache.commons.lang.RandomStringUtils.randomNumeric(count) method with one change: if count<=0, a random string of length 1 is returned. ( Apache method throws an exception if count<0, or returns empty string if count=0. )
Example: randomNumeric(10) returns random string of length 10.
count - the length of random string to createpublic static java.lang.String soundex(java.lang.String attribute)
attribute - the input stringpublic static java.lang.String refinedSoundex(java.lang.String attribute)
attribute - the input stringpublic static java.lang.String metaphone(java.lang.String attribute)
attribute - the input stringpublic static java.lang.String doubleMetaphone(java.lang.String attribute)
attribute - the input stringpublic static java.lang.String caverphone1(java.lang.String attribute)
attribute - the input stringpublic static java.lang.String caverphone2(java.lang.String attribute)
attribute - the input stringpublic static java.lang.String colognePhonetic(java.lang.String attribute)
attribute - the input stringpublic static java.lang.String normalizeFirstName(java.lang.String attribute)
Example: normalizeFirstName("BOB") ) returns "ROBERT"
attribute - first name attributepublic static java.lang.String normalizeLastName(java.lang.String attribute)
Example: normalizeLastName("ALLYSON") ) returns "ALLISON"
attribute - last name attributepublic static java.lang.String normalizeSalutation(java.lang.String attribute)
Example: normalizeSalutation("DR") ) returns "DOCTOR"
attribute - salutation attributepublic static java.lang.String normalizeTitle(java.lang.String attribute)
Example: normalizeTitle("CEO") ) returns "CHIEF EXECUTIVE OFFICER"
attribute - title attributepublic static java.lang.String normalizeGeneration(java.lang.String attribute)
Example: normalizeGeneration("JR") ) returns "JUNIOR"
attribute - generation attributepublic static java.lang.String normalizeAttribute(java.lang.String attribute,
java.lang.String normalizedFileName)
NON_NORMALIZED_VALUE_1|NORMALIZED_VALUE_1 NON_NORMALIZED_VALUE_2|NORMALIZED_VALUE_2 NON_NORMALIZED_VALUE_3|NORMALIZED_VALUE_3 ....
I.e. each pair (non-normilized value and normalized value) should be on a separate line, non-normalized value goes first, then separator - |, then normilized value.
Example (from firstname.dat):
ALAINA|ALANA ALAINE|ALANA ALANE|ALANA
If no match is found, the input attribute is returned.
Example: normalizeAttribute("BOB","firstname.dat") ) returns "ROBERT"
attribute - attribute that should be normalizednormalizedFileName - the name of the file where normalization data is described.public static java.lang.String replaceFromDictionary(java.lang.String attribute,
java.lang.String dictionaryFileName,
java.lang.String defaultValue)
NON_NORMALIZED_VALUE_1|NORMALIZED_VALUE_1 NON_NORMALIZED_VALUE_2|NORMALIZED_VALUE_2 NON_NORMALIZED_VALUE_3|NORMALIZED_VALUE_3 ....
I.e. each pair (non-normalized value and normalized value) should be on a separate line, non-normalized value goes first, then separator - |, then normalized value.
Example (from firstname.dat):
ALAINA|ALANA ALAINE|ALANA ALANE|ALANA
If no match is found, the default value is returned. If no default value is given, the original attribute value is returned.
Example: replaceFromDictionnary("BOB","firstname.dat") ) returns "ROBERT"
attribute - attribute that should be normalized.dictionaryFileName - the name of the file where normalization data is described.defaultValue - default value if the attribute is not found.public static java.lang.String replaceFromDictionary(java.lang.String attribute,
java.lang.String dictionaryFileName,
java.lang.String defaultValue,
boolean caseSensitive)
public static java.util.Map<java.lang.String,java.lang.String> getMapFromDictionaryFile(java.lang.String fileName)
fileName - Name of the dictionary.public boolean has(java.lang.String attrValue)
attrValue - public boolean filtermatch(java.lang.String attrValue)
filtercondition - - ldap filterpublic java.lang.String getHexGUIDForDn(java.lang.String datasourceName,
java.lang.String dnValue)
public java.lang.String getStringGUIDForDn(java.lang.String datasourceName,
java.lang.String dnValue)
public java.lang.String StringFromGUID(javax.naming.directory.Attribute guidAttrName)
guidAttrName - the input attribute namepublic java.lang.String StringFromSID(javax.naming.directory.Attribute sidAttrName)
attributename - the input attribute namepublic java.lang.String getDateFromADTimestamp(javax.naming.directory.Attribute attribute,
java.lang.String OutputFormat)
ADattribute - - Attribute containing the timestamp - for instance :
"131220409910000000"OutputFormat - - string containing the template to format the date - for instance
: "yyyy-MM-dd hh:mm:ss.SSS" - if null a default format is assumedpublic java.lang.String getBinary(javax.naming.directory.Attribute AttrName)
getBinary(userCertificate) Actual values are in sharedAttribute
attributename - the input attribute namepublic java.lang.String getADPassword()
public java.lang.String getADPasswordMD4()
public java.lang.String getADPasswordHistory()
public static VDSFunction createDefaultInstance(CompoundObject co)
co -