当前位置: 首页>>代码示例>>Java>>正文


Java Configuration.isIDAttribute方法代码示例

本文整理汇总了Java中org.opensaml.xml.Configuration.isIDAttribute方法的典型用法代码示例。如果您正苦于以下问题:Java Configuration.isIDAttribute方法的具体用法?Java Configuration.isIDAttribute怎么用?Java Configuration.isIDAttribute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.opensaml.xml.Configuration的用法示例。


在下文中一共展示了Configuration.isIDAttribute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: marshallAttributes

import org.opensaml.xml.Configuration; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    EncryptionProperty ep = (EncryptionProperty) xmlObject;

    if (ep.getID() != null) {
        domElement.setAttributeNS(null, EncryptionProperty.ID_ATTRIB_NAME, ep.getID());
        domElement.setIdAttributeNS(null, EncryptionProperty.ID_ATTRIB_NAME, true);
    }
    if (ep.getTarget() != null) {
        domElement.setAttributeNS(null, EncryptionProperty.TARGET_ATTRIB_NAME, ep.getTarget());
    }

    Attr attribute;
    for (Entry<QName, String> entry : ep.getUnknownAttributes().entrySet()) {
        attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
        attribute.setValue(entry.getValue());
        domElement.setAttributeNodeNS(attribute);
        if (Configuration.isIDAttribute(entry.getKey()) || ep.getUnknownAttributes().isIDAttribute(entry.getKey())) {
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:23,代码来源:EncryptionPropertyMarshaller.java

示例2: put

import org.opensaml.xml.Configuration; //导入方法依赖的package包/类
/** {@inheritDoc} */
public String put(QName attributeName, String value) {
    String oldValue = get(attributeName);
    if (value != oldValue) {
        releaseDOM();
        attributes.put(attributeName, value);
        if (isIDAttribute(attributeName) || Configuration.isIDAttribute(attributeName)) {
            attributeOwner.getIDIndex().deregisterIDMapping(oldValue);
            attributeOwner.getIDIndex().registerIDMapping(value, attributeOwner);
        }
        if (!DatatypeHelper.isEmpty(attributeName.getNamespaceURI())) {
            if (value == null) {
                attributeOwner.getNamespaceManager().deregisterAttributeName(attributeName);
            } else {
                attributeOwner.getNamespaceManager().registerAttributeName(attributeName);
            }
        }
        checkAndDeregisterQNameValue(attributeName, oldValue);
        checkAndRegisterQNameValue(attributeName, value);
    }
    
    return oldValue;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:24,代码来源:AttributeMap.java

示例3: marshallAttributes

import org.opensaml.xml.Configuration; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException {
    ContactPerson person = (ContactPerson) samlObject;

    if (person.getType() != null) {
        domElement.setAttributeNS(null, ContactPerson.CONTACT_TYPE_ATTRIB_NAME, person.getType().toString());
    }

    Attr attribute;
    for (Entry<QName, String> entry : person.getUnknownAttributes().entrySet()) {
        attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
        attribute.setValue(entry.getValue());
        domElement.setAttributeNodeNS(attribute);
        if (Configuration.isIDAttribute(entry.getKey())
                || person.getUnknownAttributes().isIDAttribute(entry.getKey())) {
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:20,代码来源:ContactPersonMarshaller.java

示例4: marshallAttributes

import org.opensaml.xml.Configuration; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException {
    ContactPerson person = (ContactPerson) samlObject;

    if (person.getType() != null) {
        domElement.setAttributeNS(null, ContactPerson.CONTACT_TYPE_ATTRIB_NAME, person.getType().toString());
    }
    
    Attr attribute;
    for(Entry<QName, String> entry: person.getUnknownAttributes().entrySet()){
        attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
        attribute.setValue(entry.getValue());
        domElement.setAttributeNodeNS(attribute);
        if (Configuration.isIDAttribute(entry.getKey()) 
                || person.getUnknownAttributes().isIDAttribute(entry.getKey())) {
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        }
    }
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:20,代码来源:ContactPersonMarshaller.java

示例5: marshallAttributes

import org.opensaml.xml.Configuration; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    Body body = (Body) xmlObject;

    Attr attribute;
    for (Entry<QName, String> entry : body.getUnknownAttributes().entrySet()) {
        attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
        attribute.setValue(entry.getValue());
        domElement.setAttributeNodeNS(attribute);
        if (Configuration.isIDAttribute(entry.getKey()) 
                || body.getUnknownAttributes().isIDAttribute(entry.getKey())) {
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:BodyMarshaller.java

示例6: marshallAttributes

import org.opensaml.xml.Configuration; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    Envelope envelope = (Envelope) xmlObject;

    Attr attribute;
    for (Entry<QName, String> entry : envelope.getUnknownAttributes().entrySet()) {
        attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
        attribute.setValue(entry.getValue());
        domElement.setAttributeNodeNS(attribute);
        if (Configuration.isIDAttribute(entry.getKey()) 
                || envelope.getUnknownAttributes().isIDAttribute(entry.getKey())) {
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:EnvelopeMarshaller.java

示例7: marshallAttributes

import org.opensaml.xml.Configuration; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    Header header = (Header) xmlObject;

    Attr attribute;
    for (Entry<QName, String> entry : header.getUnknownAttributes().entrySet()) {
        attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
        attribute.setValue(entry.getValue());
        domElement.setAttributeNodeNS(attribute);
        if (Configuration.isIDAttribute(entry.getKey()) 
                || header.getUnknownAttributes().isIDAttribute(entry.getKey())) {
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:HeaderMarshaller.java

示例8: marshallAttributes

import org.opensaml.xml.Configuration; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    Detail detail = (Detail) xmlObject;

    Attr attribute;
    for (Entry<QName, String> entry : detail.getUnknownAttributes().entrySet()) {
        attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
        attribute.setValue(entry.getValue());
        domElement.setAttributeNodeNS(attribute);
        if (Configuration.isIDAttribute(entry.getKey()) 
                || detail.getUnknownAttributes().isIDAttribute(entry.getKey())) {
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:DetailMarshaller.java

示例9: remove

import org.opensaml.xml.Configuration; //导入方法依赖的package包/类
/** {@inheritDoc} */
public String remove(Object key) {
    String removedValue = attributes.remove(key);
    if (removedValue != null) {
        releaseDOM();
        QName attributeName = (QName) key;
        if (isIDAttribute(attributeName) || Configuration.isIDAttribute(attributeName)) {
            attributeOwner.getIDIndex().deregisterIDMapping(removedValue);
        }
        attributeOwner.getNamespaceManager().deregisterAttributeName(attributeName);
        checkAndDeregisterQNameValue(attributeName, removedValue);
    }

    return removedValue;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:AttributeMap.java

示例10: marshallAttributeMap

import org.opensaml.xml.Configuration; //导入方法依赖的package包/类
/**
 * Marshall the attributes represented by the indicated AttributeMap into the indicated DOM Element.
 * 
 * @param attributeMap the AttributeMap
 * @param domElement the target Element
 */
public static void marshallAttributeMap(AttributeMap attributeMap, Element domElement) {
    Document document = domElement.getOwnerDocument();
    Attr attribute = null;
    for (Entry<QName, String> entry : attributeMap.entrySet()) {
        attribute = XMLHelper.constructAttribute(document, entry.getKey());
        attribute.setValue(entry.getValue());
        domElement.setAttributeNodeNS(attribute);
        if (Configuration.isIDAttribute(entry.getKey()) || attributeMap.isIDAttribute(entry.getKey())) {
            domElement.setIdAttributeNode(attribute, true);
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:XMLHelper.java

示例11: unmarshallToAttributeMap

import org.opensaml.xml.Configuration; //导入方法依赖的package包/类
/**
 * Unmarshall a DOM Attr to an AttributeMap.
 * 
 * @param attributeMap the target AttributeMap
 * @param attribute the target DOM Attr
 */
public static void unmarshallToAttributeMap(AttributeMap attributeMap, Attr attribute) {
    QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute
            .getPrefix());
    attributeMap.put(attribQName, attribute.getValue());
    if (attribute.isId() || Configuration.isIDAttribute(attribQName)) {
        attributeMap.registerID(attribQName);
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:XMLHelper.java

示例12: marshallAttributes

import org.opensaml.xml.Configuration; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    XSAny xsAny = (XSAny) xmlObject;

    Attr attribute;
    for (Entry<QName, String> entry : xsAny.getUnknownAttributes().entrySet()) {
        attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
        attribute.setValue(entry.getValue());
        domElement.setAttributeNodeNS(attribute);
        if (Configuration.isIDAttribute(entry.getKey())
                || xsAny.getUnknownAttributes().isIDAttribute(entry.getKey())) {
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:XSAnyMarshaller.java

示例13: marshallAttributes

import org.opensaml.xml.Configuration; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void marshallAttributes(XMLObject samlElement, Element domElement) {
    Endpoint endpoint = (Endpoint) samlElement;

    if (endpoint.getBinding() != null) {
        domElement.setAttributeNS(null, Endpoint.BINDING_ATTRIB_NAME, endpoint.getBinding().toString());
    }
    if (endpoint.getLocation() != null) {
        domElement.setAttributeNS(null, Endpoint.LOCATION_ATTRIB_NAME, endpoint.getLocation().toString());
    }

    if (endpoint.getResponseLocation() != null) {
        domElement.setAttributeNS(null, Endpoint.RESPONSE_LOCATION_ATTRIB_NAME, endpoint.getResponseLocation()
                .toString());
    }

    Attr attribute;
    for (Entry<QName, String> entry : endpoint.getUnknownAttributes().entrySet()) {
        attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
        attribute.setValue(entry.getValue());
        domElement.setAttributeNodeNS(attribute);
        if (Configuration.isIDAttribute(entry.getKey())
                || endpoint.getUnknownAttributes().isIDAttribute(entry.getKey())) {
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:28,代码来源:EndpointMarshaller.java

示例14: marshallAttributes

import org.opensaml.xml.Configuration; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    Organization org = (Organization) xmlObject;

    Attr attribute;
    for (Entry<QName, String> entry : org.getUnknownAttributes().entrySet()) {
        attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
        attribute.setValue(entry.getValue());
        domElement.setAttributeNodeNS(attribute);
        if (Configuration.isIDAttribute(entry.getKey()) || org.getUnknownAttributes().isIDAttribute(entry.getKey())) {
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:17,代码来源:OrganizationMarshaller.java

示例15: marshallAttributes

import org.opensaml.xml.Configuration; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    AuthnContextDecl authnCtxDecl = (AuthnContextDecl) xmlObject;

    Attr attribute;
    for (Entry<QName, String> entry : authnCtxDecl.getUnknownAttributes().entrySet()) {
        attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
        attribute.setValue(entry.getValue());
        domElement.setAttributeNodeNS(attribute);
        if (Configuration.isIDAttribute(entry.getKey())
                || authnCtxDecl.getUnknownAttributes().isIDAttribute(entry.getKey())) {
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:AuthnContextDeclMarshaller.java


注:本文中的org.opensaml.xml.Configuration.isIDAttribute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。