[java-opensaml] branch main updated: JSATTR-6: SAML AttributeQuery DataConnector
Brent Putman
putmanb at georgetown.edu
Sat May 31 22:58:52 UTC 2025
This is an automated email from the git hooks/post-receive script.
putmanb pushed a commit to branch main
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=84ea26b90a213a9d4ea3c8596cacaf445b8150d7
The following commit(s) were added to refs/heads/main by this push:
new 84ea26b90 JSATTR-6: SAML AttributeQuery DataConnector
84ea26b90 is described below
commit 84ea26b90a213a9d4ea3c8596cacaf445b8150d7
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Sat May 31 00:53:47 2025 -0400
JSATTR-6: SAML AttributeQuery DataConnector
A a ProfileIDCriterion needed for new criteria-based resolver.
---
.../profile/criterion/ProfileIDCriterion.java | 81 ++++++++++++++++++++++
1 file changed, 81 insertions(+)
diff --git a/opensaml-profile-api/src/main/java/org/opensaml/profile/criterion/ProfileIDCriterion.java b/opensaml-profile-api/src/main/java/org/opensaml/profile/criterion/ProfileIDCriterion.java
new file mode 100644
index 000000000..c2b68e232
--- /dev/null
+++ b/opensaml-profile-api/src/main/java/org/opensaml/profile/criterion/ProfileIDCriterion.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.opensaml.profile.criterion;
+
+import javax.annotation.Nonnull;
+
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+import net.shibboleth.shared.logic.Constraint;
+import net.shibboleth.shared.primitive.StringSupport;
+import net.shibboleth.shared.resolver.Criterion;
+
+/** {@link Criterion} representing a profile ID. */
+public final class ProfileIDCriterion implements Criterion {
+
+ /** The profile ID. */
+ @Nonnull @NotEmpty private final String id;
+
+ /**
+ * Constructor.
+ *
+ * @param profileId the profile ID, can not be null or empty
+ */
+ public ProfileIDCriterion(@Nonnull @NotEmpty final String profileId) {
+ id = Constraint.isNotNull(StringSupport.trimOrNull(profileId), "Profile ID cannot be null or empty");
+ }
+
+ /**
+ * Gets the profile ID.
+ *
+ * @return the profile ID, never null or empty
+ */
+ @Nonnull @NotEmpty public String getProfileId() {
+ return id;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public String toString() {
+ final StringBuilder builder = new StringBuilder();
+ builder.append("ProfileIdCriterion [id=");
+ builder.append(id);
+ builder.append("]");
+ return builder.toString();
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public int hashCode() {
+ return id.hashCode();
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj) {
+ return true;
+ }
+
+ if (obj == null) {
+ return false;
+ }
+
+ if (obj instanceof ProfileIDCriterion) {
+ return id.equals(((ProfileIDCriterion) obj).id);
+ }
+
+ return false;
+ }
+}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list