[spring-extensions] branch dev/JSPS-1 updated: Move AccessControlService wrapper down.
Scott Cantor
cantor.2 at osu.edu
Wed May 18 20:07:36 UTC 2022
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch dev/JSPS-1
in repository spring-extensions.
View the commit online:
http://git.shibboleth.net/view/?p=spring-extensions.git;a=commit;h=691df184c3ebd89151e04620d3274a56e3c275ff
The following commit(s) were added to refs/heads/dev/JSPS-1 by this push:
new 691df18 Move AccessControlService wrapper down.
691df18 is described below
commit 691df184c3ebd89151e04620d3274a56e3c275ff
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed May 18 16:07:33 2022 -0400
Move AccessControlService wrapper down.
---
.../service/ServiceableAccessControlService.java | 66 ++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/src/main/java/net/shibboleth/ext/spring/service/ServiceableAccessControlService.java b/src/main/java/net/shibboleth/ext/spring/service/ServiceableAccessControlService.java
new file mode 100644
index 0000000..f6674de
--- /dev/null
+++ b/src/main/java/net/shibboleth/ext/spring/service/ServiceableAccessControlService.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements. See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You 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 net.shibboleth.ext.spring.service;
+
+import javax.annotation.Nonnull;
+
+import net.shibboleth.utilities.java.support.annotation.ParameterName;
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+import net.shibboleth.utilities.java.support.logic.Constraint;
+import net.shibboleth.utilities.java.support.security.AccessControl;
+import net.shibboleth.utilities.java.support.security.AccessControlService;
+
+/**
+ * This class wraps an {@link AccessControlService} in a
+ * {@link net.shibboleth.utilities.java.support.service.ServiceableComponent}.
+ */
+public class ServiceableAccessControlService extends AbstractServiceableComponent<AccessControlService>
+ implements AccessControlService {
+
+ /** The embedded service. */
+ private final AccessControlService service;
+
+ /**
+ * Constructor.
+ *
+ * @param svc the embedded service
+ */
+ public ServiceableAccessControlService(@Nonnull @ParameterName(name="svc") final AccessControlService svc) {
+ service = Constraint.isNotNull(svc, "AccessControlService cannot be null");
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ protected void doInitialize() throws ComponentInitializationException {
+ setId(service.getId());
+ super.doInitialize();
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public AccessControl getInstance(@Nonnull final String name) {
+ return service.getInstance(name);
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public AccessControlService getComponent() {
+ return this;
+ }
+
+}
\ 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