本文整理汇总了Java中org.opensaml.saml2.metadata.AttributeService类的典型用法代码示例。如果您正苦于以下问题:Java AttributeService类的具体用法?Java AttributeService怎么用?Java AttributeService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AttributeService类属于org.opensaml.saml2.metadata包,在下文中一共展示了AttributeService类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processChildElement
import org.opensaml.saml2.metadata.AttributeService; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentElement, XMLObject childElement) throws UnmarshallingException {
AttributeAuthorityDescriptor descriptor = (AttributeAuthorityDescriptor) parentElement;
if (childElement instanceof AttributeService) {
descriptor.getAttributeServices().add((AttributeService) childElement);
} else if (childElement instanceof AssertionIDRequestService) {
descriptor.getAssertionIDRequestServices().add((AssertionIDRequestService) childElement);
} else if (childElement instanceof NameIDFormat) {
descriptor.getNameIDFormats().add((NameIDFormat) childElement);
} else if (childElement instanceof AttributeProfile) {
descriptor.getAttributeProfiles().add((AttributeProfile) childElement);
} else if (childElement instanceof Attribute) {
descriptor.getAttributes().add((Attribute) childElement);
} else {
super.processChildElement(parentElement, childElement);
}
}
示例2: AttributeAuthorityDescriptorImpl
import org.opensaml.saml2.metadata.AttributeService; //导入依赖的package包/类
/**
* Constructor.
*
* @param namespaceURI the namespace the element is in
* @param elementLocalName the local name of the XML element this Object represents
* @param namespacePrefix the prefix for the given namespace
*/
protected AttributeAuthorityDescriptorImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
super(namespaceURI, elementLocalName, namespacePrefix);
attributeServices = new XMLObjectChildrenList<AttributeService>(this);
assertionIDRequestServices = new XMLObjectChildrenList<AssertionIDRequestService>(this);
attributeProfiles = new XMLObjectChildrenList<AttributeProfile>(this);
nameFormats = new XMLObjectChildrenList<NameIDFormat>(this);
attributes = new XMLObjectChildrenList<Attribute>(this);
}
示例3: getEndpoints
import org.opensaml.saml2.metadata.AttributeService; //导入依赖的package包/类
/** {@inheritDoc} */
public List<Endpoint> getEndpoints(QName type) {
if(type.equals(AttributeService.DEFAULT_ELEMENT_NAME)){
return Collections.unmodifiableList(new ArrayList<Endpoint>(attributeServices));
}else if(type.equals(AssertionIDRequestService.DEFAULT_ELEMENT_NAME)){
return Collections.unmodifiableList(new ArrayList<Endpoint>(assertionIDRequestServices));
}
return null;
}
示例4: getAttributeQueryServiceLocation
import org.opensaml.saml2.metadata.AttributeService; //导入依赖的package包/类
public String getAttributeQueryServiceLocation(String binding) throws IllegalArgumentException {
AttributeAuthorityDescriptor descriptor = entityDescriptor.getAttributeAuthorityDescriptor(SAMLConstants.SAML20P_NS);
if (descriptor == null) throw new IllegalArgumentException("Metadata does not contain a AttributeAuthorityDescriptor");
for (AttributeService service : descriptor.getAttributeServices()) {
if (binding.equals(service.getBinding())) {
return service.getLocation();
}
}
throw new IllegalArgumentException("Binding " + binding + " not found in AttributeServices");
}
示例5: populateRequiredData
import org.opensaml.saml2.metadata.AttributeService; //导入依赖的package包/类
/** {@inheritDoc} */
protected void populateRequiredData() {
super.populateRequiredData();
AttributeAuthorityDescriptor attributeAuthorityDescriptor = (AttributeAuthorityDescriptor) target;
AttributeService attributeService = (AttributeService) buildXMLObject(new QName(SAMLConstants.SAML20MD_NS,
AttributeService.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX));
attributeAuthorityDescriptor.getAttributeServices().add(attributeService);
}
示例6: testSingleElementUnmarshall
import org.opensaml.saml2.metadata.AttributeService; //导入依赖的package包/类
/** {@inheritDoc} */
public void testSingleElementUnmarshall() {
AttributeService service = (AttributeService) unmarshallElement(singleElementFile);
assertEquals("Binding URI was not expected value", expectedBinding, service.getBinding());
assertEquals("Location was not expected value", expectedLocation, service.getLocation());
}
示例7: testSingleElementOptionalAttributesUnmarshall
import org.opensaml.saml2.metadata.AttributeService; //导入依赖的package包/类
/** {@inheritDoc} */
public void testSingleElementOptionalAttributesUnmarshall() {
AttributeService service = (AttributeService) unmarshallElement(singleElementOptionalAttributesFile);
assertEquals("Binding URI was not expected value", expectedBinding, service.getBinding());
assertEquals("Location was not expected value", expectedLocation, service.getLocation());
assertEquals("ResponseLocation was not expected value", expectedResponseLocation, service.getResponseLocation());;
}
示例8: testSingleElementMarshall
import org.opensaml.saml2.metadata.AttributeService; //导入依赖的package包/类
/** {@inheritDoc} */
public void testSingleElementMarshall() {
QName qname = new QName(SAMLConstants.SAML20MD_NS, AttributeService.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX);
AttributeService service = (AttributeService) buildXMLObject(qname);
service.setBinding(expectedBinding);
service.setLocation(expectedLocation);
assertEquals(expectedDOM, service);
}
示例9: testSingleElementOptionalAttributesMarshall
import org.opensaml.saml2.metadata.AttributeService; //导入依赖的package包/类
/** {@inheritDoc} */
public void testSingleElementOptionalAttributesMarshall() {
QName qname = new QName(SAMLConstants.SAML20MD_NS, AttributeService.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX);
AttributeService service = (AttributeService) buildXMLObject(qname);
service.setBinding(expectedBinding);
service.setLocation(expectedLocation);
service.setResponseLocation(expectedResponseLocation);
assertEquals(expectedOptionalAttributesDOM, service);
}
示例10: buildObject
import org.opensaml.saml2.metadata.AttributeService; //导入依赖的package包/类
/** {@inheritDoc} */
public AttributeService buildObject() {
return buildObject(SAMLConstants.SAML20MD_NS, AttributeService.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX);
}
示例11: getAttributeServices
import org.opensaml.saml2.metadata.AttributeService; //导入依赖的package包/类
/** {@inheritDoc} */
public List<AttributeService> getAttributeServices() {
return attributeServices;
}
示例12: AttributeServiceMarshaller
import org.opensaml.saml2.metadata.AttributeService; //导入依赖的package包/类
/**
* Constructor
*/
public AttributeServiceMarshaller() {
super(SAMLConstants.SAML20MD_NS, AttributeService.DEFAULT_ELEMENT_LOCAL_NAME);
}
示例13: AttributeServiceUnmarshaller
import org.opensaml.saml2.metadata.AttributeService; //导入依赖的package包/类
/**
* Constructor
*/
public AttributeServiceUnmarshaller() {
super(SAMLConstants.SAML20MD_NS, AttributeService.DEFAULT_ELEMENT_LOCAL_NAME);
}
示例14: AttributeServiceSchemaTest
import org.opensaml.saml2.metadata.AttributeService; //导入依赖的package包/类
/** Constructor */
public AttributeServiceSchemaTest() {
targetQName = new QName(SAMLConstants.SAML20MD_NS, AttributeService.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX);
validator = new AttributeServiceSchemaValidator();
}