热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.opensaml.core.xml.util.AttributeMap.get()方法的使用及代码示例

本文整理了Java中org.opensaml.core.xml.util.AttributeMap.get()方法的一些代码示例,展示了AttributeM

本文整理了Java中org.opensaml.core.xml.util.AttributeMap.get()方法的一些代码示例,展示了AttributeMap.get()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AttributeMap.get()方法的具体详情如下:
包路径:org.opensaml.core.xml.util.AttributeMap
类名称:AttributeMap
方法名:get

AttributeMap.get介绍

暂无

代码示例

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml

/**
* Deregister an attribute as having a type of ID.
*
* @param attributeName the QName of the ID attribute to be de-registered
*/
public void deregisterID(QName attributeName) {
if (idAttribNames.contains(attributeName)) {
idAttribNames.remove(attributeName);
}

// In case attribute already has a value,
// deregister the current value mapping with the XMLObject owner.
if (containsKey(attributeName)) {
attributeOwner.getIDIndex().deregisterIDMapping(get(attributeName));
}
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml

/**
* Register an attribute as having a type of ID.
*
* @param attributeName the QName of the ID attribute to be registered
*/
public void registerID(QName attributeName) {
if (! idAttribNames.contains(attributeName)) {
idAttribNames.add(attributeName);
}

// In case attribute already has a value,
// register the current value mapping with the XMLObject owner.
if (containsKey(attributeName)) {
attributeOwner.getIDIndex().registerIDMapping(get(attributeName), attributeOwner);
}
}

代码示例来源:origin: org.opensaml/opensaml-core

/**
* Deregister an attribute as having a type of ID.
*
* @param attributeName the QName of the ID attribute to be de-registered
*/
public void deregisterID(QName attributeName) {
if (idAttribNames.contains(attributeName)) {
idAttribNames.remove(attributeName);
}

// In case attribute already has a value,
// deregister the current value mapping with the XMLObject owner.
if (containsKey(attributeName)) {
attributeOwner.getIDIndex().deregisterIDMapping(get(attributeName));
}
}

代码示例来源:origin: org.opensaml/opensaml-core

/**
* Register an attribute as having a type of ID.
*
* @param attributeName the QName of the ID attribute to be registered
*/
public void registerID(QName attributeName) {
if (! idAttribNames.contains(attributeName)) {
idAttribNames.add(attributeName);
}

// In case attribute already has a value,
// register the current value mapping with the XMLObject owner.
if (containsKey(attributeName)) {
attributeOwner.getIDIndex().registerIDMapping(get(attributeName), attributeOwner);
}
}

代码示例来源:origin: org.opensaml/opensaml-soap-api

/**
* Gets the soap12:encodingStyle.
*
* @param soapObject the SOAP object which may contain the encoding style
*
* @return the encoding style or null if it is not set on the object
*/
@Nullable public static String getSOAP12EncodingStyleAttribute(@Nonnull final XMLObject soapObject) {
String style = null;
if (soapObject instanceof org.opensaml.soap.soap12.EncodingStyleBearing) {
style = ((org.opensaml.soap.soap12.EncodingStyleBearing) soapObject).getSOAP12EncodingStyle();
}
if (style == null && soapObject instanceof AttributeExtensibleXMLObject) {
style = StringSupport.trimOrNull(((AttributeExtensibleXMLObject) soapObject)
.getUnknownAttributes().get(
org.opensaml.soap.soap12.EncodingStyleBearing.SOAP12_ENCODING_STYLE_ATTR_NAME));
}
return style;
}

代码示例来源:origin: org.opensaml/opensaml-soap-api

/**
* Gets the soap12:role.
*
* @param soapObject the SOAP object which may contain the role
*
* @return the role or null if it is not set on the object
*/
@Nullable public static String getSOAP12RoleAttribute(@Nonnull final XMLObject soapObject) {
String role = null;
if (soapObject instanceof org.opensaml.soap.soap12.RoleBearing) {
role = ((org.opensaml.soap.soap12.RoleBearing) soapObject).getSOAP12Role();
}
if (role == null && soapObject instanceof AttributeExtensibleXMLObject) {
role = StringSupport.trimOrNull(((AttributeExtensibleXMLObject) soapObject)
.getUnknownAttributes().get(
org.opensaml.soap.soap12.RoleBearing.SOAP12_ROLE_ATTR_LOCAL_NAME));
}
return role;
}

代码示例来源:origin: org.opensaml/opensaml-soap-api

/**
* Get the soap11:mustUnderstand attribute from a given SOAP object.
*
* @param soapObject the SOAP object to add the attribute to
*
* @return value of the mustUnderstand attribute, or false if not present
*/
public static boolean getSOAP11MustUnderstandAttribute(@Nonnull final XMLObject soapObject) {
if (soapObject instanceof MustUnderstandBearing) {
XSBooleanValue value = ((MustUnderstandBearing) soapObject).isSOAP11MustUnderstandXSBoolean();
if (value != null) {
return value.getValue();
}
}
if (soapObject instanceof AttributeExtensibleXMLObject) {
String value = StringSupport.trimOrNull(((AttributeExtensibleXMLObject) soapObject)
.getUnknownAttributes().get(MustUnderstandBearing.SOAP11_MUST_UNDERSTAND_ATTR_NAME));
return Objects.equals("1", value) || Objects.equals("true", value);
}
return false;
}

代码示例来源:origin: org.opensaml/opensaml-soap-api

/**
* Get the soap12:relay attribute from a given SOAP object.
*
* @param soapObject the SOAP object to add the attribute to
*
* @return value of the relay attribute, or false if not present
*/
public static boolean getSOAP12RelayAttribute(@Nonnull final XMLObject soapObject) {
if (soapObject instanceof org.opensaml.soap.soap12.RelayBearing) {
XSBooleanValue value = ((org.opensaml.soap.soap12.RelayBearing) soapObject).isSOAP12RelayXSBoolean();
if (value != null) {
return value.getValue();
}
}
if (soapObject instanceof AttributeExtensibleXMLObject) {
String value = StringSupport.trimOrNull(((AttributeExtensibleXMLObject) soapObject)
.getUnknownAttributes().get(org.opensaml.soap.soap12.RelayBearing.SOAP12_RELAY_ATTR_LOCAL_NAME));
return Objects.equals("1", value) || Objects.equals("true", value);
}
return false;
}

代码示例来源:origin: org.opensaml/opensaml-soap-api

/**
* Gets the list value of the soap11:encodingStyle attribute from the given SOAP object.
*
* @param soapObject the SOAP object to add the attribute to
*
* @return the list of encoding styles, or null if not present
*/
@Nullable public static List getSOAP11EncodingStyles(@Nonnull final XMLObject soapObject) {
if (soapObject instanceof EncodingStyleBearing) {
List value = ((EncodingStyleBearing) soapObject).getSOAP11EncodingStyles();
if (value != null) {
return value;
}
}
if (soapObject instanceof AttributeExtensibleXMLObject) {
String value = StringSupport.trimOrNull(((AttributeExtensibleXMLObject) soapObject)
.getUnknownAttributes().get(EncodingStyleBearing.SOAP11_ENCODING_STYLE_ATTR_NAME));
if (value != null) {
StringSupport.stringToList(value, XMLConstants.LIST_DELIMITERS);
}
}
return null;
}

代码示例来源:origin: org.opensaml/opensaml-soap-api

/**
* Get the wsa:IsReferenceParameter attribute from a given SOAP object.
*
* @param soapObject the SOAP object to add the attribute to
*
* @return value of the IsReferenceParameter attribute, or false if not present
*/
public static boolean getWSAIsReferenceParameter(XMLObject soapObject) {
if (soapObject instanceof IsReferenceParameterBearing) {
XSBooleanValue value = ((IsReferenceParameterBearing)soapObject).isWSAIsReferenceParameterXSBoolean();
if (value != null) {
return value.getValue();
}
}
if (soapObject instanceof AttributeExtensibleXMLObject) {
String valueStr = StringSupport.trimOrNull(((AttributeExtensibleXMLObject)soapObject)
.getUnknownAttributes().get(IsReferenceParameterBearing.WSA_IS_REFERENCE_PARAMETER_ATTR_NAME));
return Objects.equals("1", valueStr) || Objects.equals("true", valueStr);
}
return false;
}

代码示例来源:origin: org.opensaml/opensaml-soap-api

/**
* Gets the soap11:actor attribute from a given SOAP object.
*
* @param soapObject the SOAP object to add the attribute to
*
* @return the value of the actor attribute, or null if not present
*/
@Nullable public static String getSOAP11ActorAttribute(@Nonnull final XMLObject soapObject) {
String value = null;
if (soapObject instanceof ActorBearing) {
value = StringSupport.trimOrNull(((ActorBearing) soapObject).getSOAP11Actor());
if (value != null) {
return value;
}
}
if (soapObject instanceof AttributeExtensibleXMLObject) {
value = StringSupport.trimOrNull(((AttributeExtensibleXMLObject) soapObject)
.getUnknownAttributes().get(ActorBearing.SOAP11_ACTOR_ATTR_NAME));
return value;
}
return null;
}

代码示例来源:origin: org.opensaml/opensaml-soap-api

/**
* Adds a single wsse:Usage value to the given SOAP object. If an existing wsse:Usage
* attribute is present, the given usage will be added to the existing list.
*
* @param soapObject the SOAP object to add the attribute to
* @param usage the usage to add
*/
public static void addWSSEUsage(XMLObject soapObject, String usage) {
if (soapObject instanceof UsageBearing) {
UsageBearing usageBearing = (UsageBearing) soapObject;
List list = usageBearing.getWSSEUsages();
if (list == null) {
list = new LazyList<>();
usageBearing.setWSSEUsages(list);
}
list.add(usage);
} else if (soapObject instanceof AttributeExtensibleXMLObject) {
AttributeMap am = ((AttributeExtensibleXMLObject)soapObject).getUnknownAttributes();
String list = am.get(UsageBearing.WSSE_USAGE_ATTR_NAME);
if (list == null) {
list = usage;
} else {
list = list + " " + usage;
}
am.put(UsageBearing.WSSE_USAGE_ATTR_NAME, list);
} else {
throw new IllegalArgumentException("Specified object was neither UsageBearing nor AttributeExtensible");
}
}

代码示例来源:origin: org.opensaml/opensaml-soap-api

/**
* Gets the wsse11:TokenType attribute from a given SOAP object.
*
* @param soapObject the SOAP object to add the attribute to
*
* @return the value of the tokenType attribute, or null if not present
*/
public static String getWSSE11TokenType(XMLObject soapObject) {
String value = null;
if (soapObject instanceof TokenTypeBearing) {
value = StringSupport.trimOrNull(((TokenTypeBearing)soapObject).getWSSE11TokenType());
if (value != null) {
return value;
}
}
if (soapObject instanceof AttributeExtensibleXMLObject) {
value = StringSupport.trimOrNull(((AttributeExtensibleXMLObject)soapObject)
.getUnknownAttributes().get(TokenTypeBearing.WSSE11_TOKEN_TYPE_ATTR_NAME));
return value;
}
return null;
}

代码示例来源:origin: org.opensaml/opensaml-soap-api

/**
* Gets the list value of the wsse:Usage attribute from the given SOAP object.
*
* @param soapObject the SOAP object to add the attribute to
*
* @return the list of usages, or null if not present
*/
public static List getWSSEUsages(XMLObject soapObject) {
if (soapObject instanceof UsageBearing) {
List value = ((UsageBearing)soapObject).getWSSEUsages();
if (value != null) {
return value;
}
}
if (soapObject instanceof AttributeExtensibleXMLObject) {
String value = StringSupport.trimOrNull(((AttributeExtensibleXMLObject)soapObject)
.getUnknownAttributes().get(UsageBearing.WSSE_USAGE_ATTR_NAME));
if (value != null) {
StringSupport.stringToList(value, XMLConstants.LIST_DELIMITERS);
}
}
return null;
}
}

代码示例来源:origin: org.opensaml/opensaml-core

/**
* Gets the xml:lang attribute from a given XML object.
*
* @param xmlObject the XML object from which to extract the attribute
*
* @return the value of the xml:lang attribute, or null if not present
*/
public static String getXMLLang(XMLObject xmlObject) {
String value = null;
if (xmlObject instanceof LangBearing) {
value = StringSupport.trimOrNull(((LangBearing)xmlObject).getXMLLang());
if (value != null) {
return value;
}
}
if (xmlObject instanceof AttributeExtensibleXMLObject) {
value = StringSupport.trimOrNull(((AttributeExtensibleXMLObject)xmlObject)
.getUnknownAttributes().get(LangBearing.XML_LANG_ATTR_NAME));
return value;
}
return null;
}

代码示例来源:origin: org.opensaml/opensaml-core

/**
* Gets the xml:id attribute from a given XML object.
*
* @param xmlObject the XML object from which to extract the attribute
*
* @return the value of the xml:id attribute, or null if not present
*/
public static String getXMLId(XMLObject xmlObject) {
String value = null;
if (xmlObject instanceof IdBearing) {
value = StringSupport.trimOrNull(((IdBearing)xmlObject).getXMLId());
if (value != null) {
return value;
}
}
if (xmlObject instanceof AttributeExtensibleXMLObject) {
value = StringSupport.trimOrNull(((AttributeExtensibleXMLObject)xmlObject)
.getUnknownAttributes().get(IdBearing.XML_ID_ATTR_NAME));
return value;
}
return null;
}

代码示例来源:origin: org.opensaml/opensaml-core

/**
* Gets the xml:base attribute from a given XML object.
*
* @param xmlObject the XML object from which to extract the attribute
*
* @return the value of the xml:base attribute, or null if not present
*/
public static String getXMLBase(XMLObject xmlObject) {
String value = null;
if (xmlObject instanceof BaseBearing) {
value = StringSupport.trimOrNull(((BaseBearing)xmlObject).getXMLBase());
if (value != null) {
return value;
}
}
if (xmlObject instanceof AttributeExtensibleXMLObject) {
value = StringSupport.trimOrNull(((AttributeExtensibleXMLObject)xmlObject)
.getUnknownAttributes().get(BaseBearing.XML_BASE_ATTR_NAME));
return value;
}
return null;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml

/**
* Gets the xml:lang attribute from a given XML object.
*
* @param xmlObject the XML object from which to extract the attribute
*
* @return the value of the xml:lang attribute, or null if not present
*/
public static String getXMLLang(XMLObject xmlObject) {
String value = null;
if (xmlObject instanceof LangBearing) {
value = StringSupport.trimOrNull(((LangBearing)xmlObject).getXMLLang());
if (value != null) {
return value;
}
}
if (xmlObject instanceof AttributeExtensibleXMLObject) {
value = StringSupport.trimOrNull(((AttributeExtensibleXMLObject)xmlObject)
.getUnknownAttributes().get(LangBearing.XML_LANG_ATTR_NAME));
return value;
}
return null;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml

/**
* Gets the xml:base attribute from a given XML object.
*
* @param xmlObject the XML object from which to extract the attribute
*
* @return the value of the xml:base attribute, or null if not present
*/
public static String getXMLBase(XMLObject xmlObject) {
String value = null;
if (xmlObject instanceof BaseBearing) {
value = StringSupport.trimOrNull(((BaseBearing)xmlObject).getXMLBase());
if (value != null) {
return value;
}
}
if (xmlObject instanceof AttributeExtensibleXMLObject) {
value = StringSupport.trimOrNull(((AttributeExtensibleXMLObject)xmlObject)
.getUnknownAttributes().get(BaseBearing.XML_BASE_ATTR_NAME));
return value;
}
return null;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml

/** {@inheritDoc} */
public String put(QName attributeName, String value) {
Constraint.isNotNull(attributeName, "Attribute name cannot be null");
String oldValue = get(attributeName);
if (!Objects.equals(value, oldValue)) {
releaseDOM();
attributes.put(attributeName, value);
if (isIDAttribute(attributeName) || XMLObjectProviderRegistrySupport.isIDAttribute(attributeName)) {
attributeOwner.getIDIndex().deregisterIDMapping(oldValue);
attributeOwner.getIDIndex().registerIDMapping(value, attributeOwner);
}
if (!Strings.isNullOrEmpty(attributeName.getNamespaceURI())) {
if (value == null) {
attributeOwner.getNamespaceManager().deregisterAttributeName(attributeName);
} else {
attributeOwner.getNamespaceManager().registerAttributeName(attributeName);
}
}
checkAndDeregisterQNameValue(attributeName, oldValue);
checkAndRegisterQNameValue(attributeName, value);
}

return oldValue;
}

推荐阅读
  • Java容器中的compareto方法排序原理解析
    本文从源码解析Java容器中的compareto方法的排序原理,讲解了在使用数组存储数据时的限制以及存储效率的问题。同时提到了Redis的五大数据结构和list、set等知识点,回忆了作者大学时代的Java学习经历。文章以作者做的思维导图作为目录,展示了整个讲解过程。 ... [详细]
  • Iamtryingtomakeaclassthatwillreadatextfileofnamesintoanarray,thenreturnthatarra ... [详细]
  • Spring特性实现接口多类的动态调用详解
    本文详细介绍了如何使用Spring特性实现接口多类的动态调用。通过对Spring IoC容器的基础类BeanFactory和ApplicationContext的介绍,以及getBeansOfType方法的应用,解决了在实际工作中遇到的接口及多个实现类的问题。同时,文章还提到了SPI使用的不便之处,并介绍了借助ApplicationContext实现需求的方法。阅读本文,你将了解到Spring特性的实现原理和实际应用方式。 ... [详细]
  • 本文讨论了一个关于cuowu类的问题,作者在使用cuowu类时遇到了错误提示和使用AdjustmentListener的问题。文章提供了16个解决方案,并给出了两个可能导致错误的原因。 ... [详细]
  • Java太阳系小游戏分析和源码详解
    本文介绍了一个基于Java的太阳系小游戏的分析和源码详解。通过对面向对象的知识的学习和实践,作者实现了太阳系各行星绕太阳转的效果。文章详细介绍了游戏的设计思路和源码结构,包括工具类、常量、图片加载、面板等。通过这个小游戏的制作,读者可以巩固和应用所学的知识,如类的继承、方法的重载与重写、多态和封装等。 ... [详细]
  • 本文分享了一个关于在C#中使用异步代码的问题,作者在控制台中运行时代码正常工作,但在Windows窗体中却无法正常工作。作者尝试搜索局域网上的主机,但在窗体中计数器没有减少。文章提供了相关的代码和解决思路。 ... [详细]
  • Java序列化对象传给PHP的方法及原理解析
    本文介绍了Java序列化对象传给PHP的方法及原理,包括Java对象传递的方式、序列化的方式、PHP中的序列化用法介绍、Java是否能反序列化PHP的数据、Java序列化的原理以及解决Java序列化中的问题。同时还解释了序列化的概念和作用,以及代码执行序列化所需要的权限。最后指出,序列化会将对象实例的所有字段都进行序列化,使得数据能够被表示为实例的序列化数据,但只有能够解释该格式的代码才能够确定数据的内容。 ... [详细]
  • 阿,里,云,物,联网,net,core,客户端,czgl,aliiotclient, ... [详细]
  • JavaSE笔试题-接口、抽象类、多态等问题解答
    本文解答了JavaSE笔试题中关于接口、抽象类、多态等问题。包括Math类的取整数方法、接口是否可继承、抽象类是否可实现接口、抽象类是否可继承具体类、抽象类中是否可以有静态main方法等问题。同时介绍了面向对象的特征,以及Java中实现多态的机制。 ... [详细]
  • ZSI.generate.Wsdl2PythonError: unsupported local simpleType restriction ... [详细]
  • XML介绍与使用的概述及标签规则
    本文介绍了XML的基本概念和用途,包括XML的可扩展性和标签的自定义特性。同时还详细解释了XML标签的规则,包括标签的尖括号和合法标识符的组成,标签必须成对出现的原则以及特殊标签的使用方法。通过本文的阅读,读者可以对XML的基本知识有一个全面的了解。 ... [详细]
  • 本文详细介绍了Spring的JdbcTemplate的使用方法,包括执行存储过程、存储函数的call()方法,执行任何SQL语句的execute()方法,单个更新和批量更新的update()和batchUpdate()方法,以及单查和列表查询的query()和queryForXXX()方法。提供了经过测试的API供使用。 ... [详细]
  • 个人学习使用:谨慎参考1Client类importcom.thoughtworks.gauge.Step;importcom.thoughtworks.gauge.T ... [详细]
  • 本文详细介绍了Java中vector的使用方法和相关知识,包括vector类的功能、构造方法和使用注意事项。通过使用vector类,可以方便地实现动态数组的功能,并且可以随意插入不同类型的对象,进行查找、插入和删除操作。这篇文章对于需要频繁进行查找、插入和删除操作的情况下,使用vector类是一个很好的选择。 ... [详细]
  • Java学习笔记之面向对象编程(OOP)
    本文介绍了Java学习笔记中的面向对象编程(OOP)内容,包括OOP的三大特性(封装、继承、多态)和五大原则(单一职责原则、开放封闭原则、里式替换原则、依赖倒置原则)。通过学习OOP,可以提高代码复用性、拓展性和安全性。 ... [详细]
author-avatar
-而我知道阿信很忙
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有