Adding support for secured channels.

This commit is contained in:
Mark Fisher
2008-06-05 23:57:49 +00:00
parent 722b9c4f1c
commit 0300168c82
2 changed files with 30 additions and 0 deletions

View File

@@ -49,6 +49,8 @@ public abstract class AbstractChannelParser extends AbstractSingleBeanDefinition
private static final String INTERCEPTORS_PROPERTY = "interceptors";
private static final String SECURED_ELEMENT ="secured";
@Override
protected boolean shouldGenerateId() {
@@ -83,6 +85,10 @@ public abstract class AbstractChannelParser extends AbstractSingleBeanDefinition
String ref = ((Element) child).getAttribute("ref");
interceptors.add(new RuntimeBeanReference(ref));
}
else if (SECURED_ELEMENT.equals(localName)) {
parserContext.getReaderContext().getNamespaceHandlerResolver().resolve(
element.getNamespaceURI()).parse((Element)child, parserContext);
}
}
}
String datatypeAttr = element.getAttribute(DATATYPE_ATTRIBUTE);

View File

@@ -119,6 +119,7 @@
<xsd:sequence>
<xsd:element ref="dispatcher-policy" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="interceptor" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="secured" type="securedType" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" use="required"/>
<xsd:attribute name="publish-subscribe" type="xsd:boolean" default="false"/>
@@ -411,4 +412,27 @@
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="secure-channels" type="secureChannelsType"/>
<xsd:complexType name="securedType">
<xsd:annotation>
<xsd:documentation>
Defines a security interceptor.
</xsd:documentation>
</xsd:annotation>
<xsd:attribute name="receive-access" type="xsd:string"/>
<xsd:attribute name="send-access" type="xsd:string"/>
<xsd:attribute name="access-decision-manager" type="xsd:string"/>
<xsd:attribute name="propagate" type="xsd:boolean" default="true"/>
</xsd:complexType>
<xsd:complexType name="secureChannelsType">
<xsd:annotation>
<xsd:documentation>
Defines a bean post processor which propagates the security context.
</xsd:documentation>
</xsd:annotation>
<xsd:attribute name="propagate" type="xsd:boolean" default="true"/>
</xsd:complexType>
</xsd:schema>