Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
inc-meta/mdx/uk/mdq-multisign.xml
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
105 lines (91 sloc)
4.25 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Generate and sign per-entity metadata. | |
--> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
default-lazy-init="true" | |
xmlns:c="http://www.springframework.org/schema/c" | |
xmlns:p="http://www.springframework.org/schema/p" | |
xmlns:util="http://www.springframework.org/schema/util" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> | |
<!-- | |
Import commonly used beans. | |
--> | |
<import resource="classpath:common-beans.xml"/> | |
<!-- | |
Import channel-specific beans. | |
--> | |
<import resource="classpath:uk/beans.xml"/> | |
<!-- | |
Generate per-entity metadata. | |
--> | |
<bean id="mdq-multisign" parent="mda.SimplePipeline"> | |
<property name="stages"> | |
<list> | |
<!-- | |
Start with the unsigned production aggregate. | |
--> | |
<bean id="production_aggregate" parent="mda.DOMResourceSourceStage"> | |
<property name="parserPool" ref="parserPool"/> | |
<property name="DOMResource"> | |
<bean parent="FileSystemResource" c:_0="${mdq.input}"/> | |
</property> | |
</bean> | |
<!-- | |
Remove xsi elements and attributes. | |
In practice, this just cleans up the results we get in | |
a development environment, as the normal UKf aggregate | |
already excludes this namespace. | |
--> | |
<ref bean="stripXsiNamespace"/> | |
<!-- | |
Propagate the validUntil attribute from the aggregate | |
down to the individual entity descriptors. | |
--> | |
<bean parent="mda.XSLTransformationStage" | |
p:XSLResource="classpath:uk/mdq_validity.xsl"/> | |
<!-- Break down into individual entities. --> | |
<ref bean="disassemble"/> | |
<!-- Populate ItemId with the entityID. --> | |
<ref bean="populateItemIds"/> | |
<!-- Set ID and cacheDuration attributes. --> | |
<bean parent="mda.GenerateIdStage"> | |
<property name="generator"> | |
<bean parent="mda.FixedStringIdentifierGenerationStrategy" c:_="_"/> | |
</property> | |
</bean> | |
<bean parent="mda.SetCacheDurationStage" p:cacheDuration="${cacheDuration.perEntity.duration}"/> | |
<!-- Identity transform fixes signing issues. --> | |
<bean parent="mda.XSLTransformationStage" | |
p:XSLResource="classpath:identity.xsl"/> | |
<!-- Sign each item. --> | |
<bean id="perform.signature" parent="mda.XMLSignatureSigningStage"> | |
<property name="privateKey"> | |
<bean parent="mda.PKCS11PrivateKeyFactoryBean" | |
p:pkcs11Config="${sign.pkcs11Config}" | |
p:keyPassword="${sign.keyPassword}" | |
p:keyAlias="${sign.keyAlias}" | |
/> | |
</property> | |
</bean> | |
<!-- Write individual entity documents to files. --> | |
<bean id="write.perentity" parent="mda.MultiOutputSerializationStage"> | |
<property name="serializer" ref="serializer"/> | |
<property name="outputStrategy"> | |
<bean parent="mda.FilesInDirectoryMultiOutputStrategy" p:nameSuffix=".xml"> | |
<property name="directory"> | |
<bean parent="File" c:_="${mdq.output}"/> | |
</property> | |
<property name="nameTransformer"> | |
<bean parent="mda.PathSegmentStringTransformer"/> | |
</property> | |
</bean> | |
</property> | |
</bean> | |
</list> | |
</property> | |
</bean> | |
</beans> |