[java-identity-provider COMMIT] in /trunk: idp-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/fil...
noreply at shibboleth.net
noreply at shibboleth.net
Sun Jun 29 11:25:20 EDT 2014
Author: rdw
Date: Sun Jun 29 11:25:20 2014
New Revision: 6185
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6185&view=rev
Log:
IDP-379 stop parsing booleans in the parsers, let Srping do the heavy lifting
Added:
trunk/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/ad/PatternFactoryBean.java (with props)
Modified:
trunk/idp-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/saml/RegistrationAuthorityRuleParser.java
trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/ad/mapped/impl/SourceValue.java
trunk/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/ad/BaseAttributeDefinitionParser.java
trunk/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/ad/RegexSplitAttributeDefinitionParser.java
trunk/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/ad/mapped/MappedAttributeDefinitionParser.java
trunk/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/ad/mapped/SourceValueParser.java
trunk/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/rdbms/RDBMSDataConnectorParser.java
Modified: trunk/idp-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/saml/RegistrationAuthorityRuleParser.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/saml/RegistrationAuthorityRuleParser.java?rev=6185&r1=6184&r2=6185&view=diff
==============================================================================
--- trunk/idp-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/saml/RegistrationAuthorityRuleParser.java (original)
+++ trunk/idp-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/saml/RegistrationAuthorityRuleParser.java Sun Jun 29 11:25:20 2014
@@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package net.shibboleth.idp.attribute.filter.spring.saml;
import java.util.List;
@@ -57,14 +58,11 @@
@Override protected void doNativeParse(@Nonnull final Element element, @Nonnull final ParserContext parserContext,
@Nonnull BeanDefinitionBuilder builder) {
- boolean matchIfSilent = false;
if (element.hasAttributeNS(null, MATCH_IF_METADATA_SILENT_ATTR_NAME)) {
- matchIfSilent =
- AttributeSupport.getAttributeValueAsBoolean(element.getAttributeNodeNS(null,
- MATCH_IF_METADATA_SILENT_ATTR_NAME));
+ String matchIfSilent = element.getAttributeNS(null, MATCH_IF_METADATA_SILENT_ATTR_NAME);
+ log.debug("Registration Authority Filter: Match if Metadata silent = {}", matchIfSilent);
+ builder.addPropertyValue("matchIfMetadataSilent", matchIfSilent);
}
- log.debug("Registration Authority Filter: Match if Metadata silent = {}", matchIfSilent);
- builder.addPropertyValue("matchIfMetadataSilent", matchIfSilent);
final Attr attr = element.getAttributeNodeNS(null, REGISTRARS_ATTR_NAME);
if (attr != null) {
@@ -73,5 +71,4 @@
builder.addPropertyValue("issuers", issuers);
}
}
-
}
Modified: trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/ad/mapped/impl/SourceValue.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/ad/mapped/impl/SourceValue.java?rev=6185&r1=6184&r2=6185&view=diff
==============================================================================
--- trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/ad/mapped/impl/SourceValue.java (original)
+++ trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/ad/mapped/impl/SourceValue.java Sun Jun 29 11:25:20 2014
@@ -57,10 +57,18 @@
* @param theIgnoreCase whether case should be ignored when matching
* @param thePartialMatch whether partial matches should be allowed
*/
- public SourceValue(@Nullable String theValue, boolean theIgnoreCase, boolean thePartialMatch) {
+ public SourceValue(@Nullable String theValue, @Nullable Boolean theIgnoreCase, @Nullable Boolean thePartialMatch) {
value = StringSupport.trimOrNull(theValue);
- ignoreCase = theIgnoreCase;
- partialMatch = thePartialMatch;
+ if (null != theIgnoreCase) {
+ ignoreCase = theIgnoreCase;
+ } else {
+ ignoreCase = false;
+ }
+ if (null != thePartialMatch) {
+ partialMatch = thePartialMatch;
+ } else {
+ partialMatch = false;
+ }
if (!partialMatch && value != null) {
[... 225 lines stripped ...]
More information about the commits
mailing list