Skip to content

Commit

Permalink
Move to using ClasspathResource instead of FilesystemResource where w…
Browse files Browse the repository at this point in the history
…e can. It's neater for new code, and it will help with splitting the project into components later.
  • Loading branch information
iay committed Jun 8, 2013
1 parent 76c4b7b commit f7f6410
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 36 deletions.
20 changes: 14 additions & 6 deletions mdx/common-beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@
-->
<bean id="component_parent" abstract="true" init-method="initialize"/>

<!--
ClasspathResource
Parent for all classpath resource beans.
-->
<bean id="ClasspathResource" abstract="true" parent="component_parent"
class="net.shibboleth.utilities.java.support.resource.ClasspathResource"/>

<!--
FilesystemResource
Expand Down Expand Up @@ -264,8 +272,8 @@
<bean id="normaliseNamespaces" parent="XSLTransformationStage"
p:id="normaliseNamespaces">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/ns_norm.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="ns_norm.xsl"/>
</bean>
</property>
</bean>
Expand Down Expand Up @@ -390,8 +398,8 @@
-->
<bean id="default_regauth_parent" abstract="true" parent="XSLTransformationStage">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/default_regauth.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="default_regauth.xsl"/>
</bean>
</property>
</bean>
Expand Down Expand Up @@ -533,8 +541,8 @@
<bean id="cleanImport" parent="XSLTransformationStage"
p:id="cleanImport">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/clean-import.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="clean-import.xsl"/>
</bean>
</property>
</bean>
Expand Down
28 changes: 14 additions & 14 deletions mdx/uk/beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@
<bean id="uk_processScopes" parent="XSLTransformationStage"
p:id="uk_processScopes">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/scopes.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="uk/scopes.xsl"/>
</bean>
</property>
<property name="transformParameters">
Expand Down Expand Up @@ -208,8 +208,8 @@
<bean id="uk_fix_mailto" parent="XSLTransformationStage"
p:id="uk_fix_mailto">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/fix_mailto.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="uk/fix_mailto.xsl"/>
</bean>
</property>
</bean>
Expand All @@ -226,8 +226,8 @@
<bean id="uk_hide_idps" parent="XSLTransformationStage"
p:id="uk_hide_idps">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/hide_idps.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="uk/hide_idps.xsl"/>
</bean>
</property>
</bean>
Expand Down Expand Up @@ -276,8 +276,8 @@
<bean id="uk_addTrustRoots" parent="XSLTransformationStage"
p:id="uk_addTrustRoots">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/trust-roots.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="uk/trust-roots.xsl"/>
</bean>
</property>
<property name="transformParameters">
Expand All @@ -296,8 +296,8 @@
<bean id="uk_processFragment" parent="XSLTransformationStage"
p:id="uk_processFragment">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/fragment.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="uk/fragment.xsl"/>
</bean>
</property>
</bean>
Expand Down Expand Up @@ -390,8 +390,8 @@
<bean id="uk_stripExtensions" parent="XSLTransformationStage"
p:id="uk_stripExtensions">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/strip_extensions.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="uk/strip_extensions.xsl"/>
</bean>
</property>
</bean>
Expand Down Expand Up @@ -490,8 +490,8 @@
<bean id="uk_generateStatistics" parent="XSLTransformationStage"
p:id="uk_generateStatistics">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/statistics.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="uk/statistics.xsl"/>
</bean>
</property>
<property name="transformParameters">
Expand Down
24 changes: 12 additions & 12 deletions mdx/uk/generate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
<bean id="stripEntityScopes" parent="XSLTransformationStage"
p:id="stripEntityScopes">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/entity_scopes.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="uk/entity_scopes.xsl"/>
</bean>
</property>
</bean>
Expand Down Expand Up @@ -101,8 +101,8 @@
<bean id="fixup_keyuse" parent="XSLTransformationStage"
p:id="fixup_keyuse">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/fixup_keyuse.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="uk/fixup_keyuse.xsl"/>
</bean>
</property>
</bean>
Expand Down Expand Up @@ -280,8 +280,8 @@
<bean id="uk_finaliseProduction" parent="XSLTransformationStage"
p:id="uk_finaliseProduction">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/final_tweak.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="uk/final_tweak.xsl"/>
</bean>
</property>
<property name="transformParameters">
Expand Down Expand Up @@ -374,8 +374,8 @@
<bean id="uk_finaliseFallback" parent="XSLTransformationStage"
p:id="uk_finaliseFallback">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/final_tweak.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="uk/final_tweak.xsl"/>
</bean>
</property>
<property name="transformParameters">
Expand Down Expand Up @@ -436,8 +436,8 @@
<bean id="uk_finaliseTest" parent="XSLTransformationStage"
p:id="uk_finaliseTest">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/final_tweak.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="uk/final_tweak.xsl"/>
</bean>
</property>
<property name="transformParameters">
Expand Down Expand Up @@ -498,8 +498,8 @@
<bean id="uk_finaliseExport" parent="XSLTransformationStage"
p:id="uk_finaliseExport">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/final_tweak.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="uk/final_tweak.xsl"/>
</bean>
</property>
<property name="transformParameters">
Expand Down
8 changes: 4 additions & 4 deletions mdx/uk/verbs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
<bean id="process" parent="XSLTransformationStage"
p:id="process">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/sp_mdui_test.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="uk/sp_mdui_test.xsl"/>
</bean>
</property>
</bean>
Expand Down Expand Up @@ -218,8 +218,8 @@
<bean id="importTransform" parent="XSLTransformationStage"
p:id="importTransform">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/import.xsl"/>
<bean parent="ClasspathResource">
<constructor-arg value="uk/import.xsl"/>
</bean>
</property>
</bean>
Expand Down

0 comments on commit f7f6410

Please sign in to comment.