public class MiscUtils extends Object
Modifier and Type | Field and Description |
---|---|
protected static boolean |
integrateLocale |
Constructor and Description |
---|
MiscUtils() |
Modifier and Type | Method and Description |
---|---|
static Map |
attrSetToMap(AttrSet attrSet) |
static Map |
attrSetToMap(AttrSet attrSet,
boolean fetchByteValues)
Method to convert a AttrSet object to Map.
|
static AttrSet |
combineAttrSets(AttrSet attrSet1,
AttrSet attrSet2)
Combines 2 AttrSets and returns the result set.
|
static Set |
combineOCs(Set one,
Set two)
Combines two sets which contains objectclass values of an entry in a case
insensitive manner.
|
static Debug |
getDebugInstance() |
static Guid[] |
getGuidArray(Set set)
Convert a Set to Guid object array
|
static SSOToken |
getInternalToken()
Gets the internal Access Manager user token (dsameuser)
|
static String |
getPrincipalDN(SSOToken token)
Gets the principal DN String in RFC lowercase format from the SSOToken
|
static Set |
getSetCopy(Set values) |
static String |
getUserLocale(SSOToken token)
Method to get the user locale.
|
static boolean |
isObjectClassPresent(Set objectClasses,
String objectClass)
Method to compare all the object classes in the Set with the specfied
object class.
|
static String |
mapByteToString(Map map) |
static String |
mapSetToString(Map map) |
static AttrSet |
mapToAttrSet(Map map)
Method to convert a Map to AttrSet.
|
static AttrSet |
mapToAttrSet(Map map,
boolean byteValues)
Method to convert a Map to AttrSet.
|
static Map |
mergeMaps(Map mapA,
Map mapB)
Merge the values in two maps and return the result map.
|
static Map |
removeEmptyValues(Map attrMap)
Removes Empty sets from attribute-value maps.
|
static Set |
stringArrayToSet(String[] strs)
Method to convert a String array to a set
|
static Guid[] |
toGuidArray(Set set)
Convert a Set to Guid object array
|
static Set |
updateAndGetRemovableOCs(Set origSet,
Set removeOCs)
Method which removes the specified object class from original set and
returns the set of object classes that were removed.
|
public static Debug getDebugInstance()
public static SSOToken getInternalToken()
public static String getUserLocale(SSOToken token)
token
- SSOToken of the authenticated userpublic static AttrSet combineAttrSets(AttrSet attrSet1, AttrSet attrSet2)
attrSet1
- the first AttrSetattrSet2
- the second AttrSetpublic static Map mergeMaps(Map mapA, Map mapB)
mapA
- the first mapmapB
- the second mappublic static Set stringArrayToSet(String[] strs)
strs
- the String arraypublic static Map attrSetToMap(AttrSet attrSet, boolean fetchByteValues)
attrSet
- the AttrSet to be converted to a MapfetchByteValues
- if false stringValues are added, if true byteValues are added.public static AttrSet mapToAttrSet(Map map)
map
- a map contaning attribute names as keys and a Set of attribute
values corresponding to each map key.public static AttrSet mapToAttrSet(Map map, boolean byteValues)
map
- a map contaning attribute names as keys and a Set of attribute
values corresponding to each map key.byteValues
- if true then values are bytes otherwise stringspublic static String getPrincipalDN(SSOToken token) throws SSOException
token
- a valid SSOTokenSSOException
- if the token is not validpublic static Set combineOCs(Set one, Set two)
public static boolean isObjectClassPresent(Set objectClasses, String objectClass)
objectClasses
- Set of object classesobjectClass
- the specified object classpublic static Set updateAndGetRemovableOCs(Set origSet, Set removeOCs)
origSet
- the original SetremoveOCs
- the Set of object classes to be removedpublic static Map removeEmptyValues(Map attrMap)
attrMap
- public static Guid[] toGuidArray(Set set)
set
- the Set to be convertedCopyright © 2010–2025 Open Identity Platform Community. All rights reserved.