[java-opensaml COMMIT] /trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/BindingDescriptor.java
noreply at shibboleth.net
noreply at shibboleth.net
Tue Mar 1 15:24:45 EST 2016
Author: scantor
Date: Tue Mar 1 15:24:44 2016
New Revision: 4426
URL: http://svn.shibboleth.net/view/java-opensaml?rev=4426&view=rev
Log:
IDP-934 - Support for short identifiers for bindings for logging
https://issues.shibboleth.net/jira/browse/IDP-934
Add a short name field to support this IdP feature.
Modified:
trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/BindingDescriptor.java
Modified: trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/BindingDescriptor.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/BindingDescriptor.java?rev=4426&r1=4425&r2=4426&view=diff
==============================================================================
--- trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/BindingDescriptor.java (original)
+++ trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/BindingDescriptor.java Tue Mar 1 15:24:44 2016
@@ -37,8 +37,10 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
+import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
import net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent;
import net.shibboleth.utilities.java.support.logic.Constraint;
+import net.shibboleth.utilities.java.support.primitive.StringSupport;
import org.opensaml.profile.context.ProfileRequestContext;
@@ -67,6 +69,9 @@
/** Indicates whether the binding provides a built-in signing mechanism. */
private boolean signatureCapable;
+
+ /** A short name for the binding. */
+ @Nullable @NotEmpty private String shortName;
/** Constructor. */
public BindingDescriptor() {
@@ -139,6 +144,15 @@
public void setSignatureCapable(final boolean flag) {
signatureCapable = flag;
}
+
+ /**
+ * Set a short/concise name for the binding.
+ *
+ * @param name name to set
+ */
+ public void setShortName(@Nullable @NotEmpty final String name) {
+ shortName = StringSupport.trimOrNull(name);
+ }
/** {@inheritDoc} */
@Override
@@ -174,6 +188,7 @@
@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("bindingId", getId())
+ .add("shortName", shortName)
.add("synchronous", synchronous)
.add("artifact", artifact)
.add("signatureCapable", signatureCapable)
More information about the commits
mailing list