public class IDFFMetaUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Debug |
debug
IDFF Meta Debug
|
protected static String |
IDFF_BUNDLE_NAME
Bundle Name
|
static String |
IDFF_META_SERVICE
IDFF Meta Data Configuration Name
|
Modifier | Constructor and Description |
---|---|
protected |
IDFFMetaUtils()
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
protected static Map |
convertJAXBToAttrMap(String attrName,
Object jaxbObj)
Converts a JAXB object to a
String object and creates a
Map . |
static String |
convertJAXBToString(Object jaxbObj)
Converts a JAXB object to a
String object. |
static Object |
convertNodeToJAXB(Node node)
Converts a
Node object to a JAXB object. |
static Object |
convertStringToJAXB(String str)
Converts a
String object to a JAXB object. |
static Map |
getAttributes(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType config)
Gets attribute value pairs from
BaseConfigType and
put in a Map . |
static List |
getAttributeValueFromConfig(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType config,
String attrName) |
static boolean |
getBooleanAttributeValueFromConfig(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType config,
String attrName) |
static com.sun.identity.federation.jaxb.entityconfig.BaseConfigType |
getExtendedConfig(String realm,
String providerId,
String providerRole,
IDFFMetaManager metaManager)
Obtains provider's extended meta.
|
static String |
getFirstAttributeValue(Map attrMap,
String key)
Gets the first value of list by given key searching in the given map.
|
static String |
getFirstAttributeValueFromConfig(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType config,
String attrName) |
static String |
getFirstAttributeValueFromIDPConfig(IDFFMetaManager metaManager,
String realm,
String idpEntityID,
String attrName) |
static com.sun.identity.liberty.ws.meta.jaxb.IDPDescriptorType |
getIDPDescriptor(com.sun.identity.liberty.ws.meta.jaxb.EntityDescriptorElement entityDescriptor)
Returns the
IDPDescriptor in the Entity Descriptor. |
static com.sun.identity.federation.jaxb.entityconfig.IDPDescriptorConfigElement |
getIDPDescriptorConfig(com.sun.identity.federation.jaxb.entityconfig.EntityConfigElement entityConfig)
Returns the Identity Provider Entity Configuration.
|
static String |
getMetaAlias(String realm,
String providerID,
String providerRole,
Object session)
Obtains provider's meta alias.
|
static String |
getMetaAliasByUri(String uri)
Returns metaAlias embedded in uri.
|
static String |
getRealmByMetaAlias(String metaAlias)
Returns the realm by parsing the metaAlias.
|
static com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorType |
getSPDescriptor(com.sun.identity.liberty.ws.meta.jaxb.EntityDescriptorElement entityDescriptor)
Returns the SPDescriptor in the Entity Descriptor.
|
static com.sun.identity.federation.jaxb.entityconfig.SPDescriptorConfigElement |
getSPDescriptorConfig(com.sun.identity.federation.jaxb.entityconfig.EntityConfigElement entityConfig)
Returns the Service Provider Entity Configuration.
|
static boolean |
isAutoFedEnabled(Map attributes) |
public static final String IDFF_META_SERVICE
public static Debug debug
protected static String IDFF_BUNDLE_NAME
public static String convertJAXBToString(Object jaxbObj) throws JAXBException
String
object.jaxbObj
- a JAXB objectString
representing the JAXB object.JAXBException
- if an error occurs while converting JAXB objectprotected static Map convertJAXBToAttrMap(String attrName, Object jaxbObj) throws JAXBException
String
object and creates a
Map
. The key is 'attrName' and the value is a
Set
which contains the String
object.attrName
- attribute namejaxbObj
- a JAXB objectMap
. The key is 'attrName' and the value is a
Set
contains the String
object
converted from the JAXB object.JAXBException
- if an error occurs while converting JAXB objectpublic static Object convertNodeToJAXB(Node node) throws JAXBException
Node
object to a JAXB object.node
- a Node
objectNode
objectJAXBException
- if an error occurs while converting
Node
objectpublic static Object convertStringToJAXB(String str) throws JAXBException
String
object to a JAXB object.str
- a String
objectString
object.JAXBException
- if an error occurs while converting
String
objectpublic static com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorType getSPDescriptor(com.sun.identity.liberty.ws.meta.jaxb.EntityDescriptorElement entityDescriptor)
entityDescriptor
- the EntityDescriptor element.SPDescriptorType
object.public static com.sun.identity.liberty.ws.meta.jaxb.IDPDescriptorType getIDPDescriptor(com.sun.identity.liberty.ws.meta.jaxb.EntityDescriptorElement entityDescriptor)
IDPDescriptor
in the Entity Descriptor.
If there multiple descriptors then the first retreived
descriptor is returned.entityDescriptor
- the EntityDescriptor element.IDPDescriptorType
object.public static com.sun.identity.federation.jaxb.entityconfig.SPDescriptorConfigElement getSPDescriptorConfig(com.sun.identity.federation.jaxb.entityconfig.EntityConfigElement entityConfig)
entityConfig
- the EntityConfigElement
object.SPDescriptorEntityConfigElement
object.public static com.sun.identity.federation.jaxb.entityconfig.IDPDescriptorConfigElement getIDPDescriptorConfig(com.sun.identity.federation.jaxb.entityconfig.EntityConfigElement entityConfig)
entityConfig
- the EntityConfigElement
object.IDPDescriptorEntityConfigElement
object.public static Map getAttributes(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType config)
BaseConfigType
and
put in a Map
. The key is attribute name and the value is
a List
of attribute values.config
- the BaseConfigType
objectMap
public static String getFirstAttributeValue(Map attrMap, String key)
attrMap
- Map of which list is to be retrieved.key
- Key of the entry to be retrieved.null
if attrMap
is null or key
is null
.public static boolean isAutoFedEnabled(Map attributes)
public static String getFirstAttributeValueFromIDPConfig(IDFFMetaManager metaManager, String realm, String idpEntityID, String attrName)
public static boolean getBooleanAttributeValueFromConfig(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType config, String attrName)
public static String getFirstAttributeValueFromConfig(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType config, String attrName)
public static List getAttributeValueFromConfig(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType config, String attrName)
public static String getRealmByMetaAlias(String metaAlias)
<realm>/<any string without '/'> for non-root realm or /<any string without '/'> for root realm.
metaAlias
- The metaAlias.public static String getMetaAliasByUri(String uri)
uri
- The uri string.public static String getMetaAlias(String realm, String providerID, String providerRole, Object session)
realm
- the realm in which the provider residesproviderID
- provider's entity IDproviderRole
- provider's rolesession
- user session objectnull
if an error
occurs.public static com.sun.identity.federation.jaxb.entityconfig.BaseConfigType getExtendedConfig(String realm, String providerId, String providerRole, IDFFMetaManager metaManager)
realm
- the realm in which the provider residesproviderId
- provider's entity IDproviderRole
- provider's rolemetaManager
- IDFFMetaManager
instance.null
if an error
occurs.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.