<service ref="modulesManager" interface="org.argeo.slc.execution.ExecutionModulesManager" />\r
\r
<!-- LABEL -->\r
- <beans:bean class="org.argeo.slc.osgi.deploy.OsgiModuleLabel">\r
+ <beans:bean class="org.argeo.security.core.OsgiModuleLabel">\r
<beans:property name="bundleContext" ref="bundleContext" />\r
</beans:bean>\r
+\r
+ <!-- ROLES -->\r
+ <reference id="userAdminService" interface="org.argeo.security.UserAdminService" />\r
+\r
+ <beans:bean class="org.argeo.security.core.SimpleRoleRegistration"\r
+ init-method="run">\r
+ <beans:property name="role" value="ROLE_SLC" />\r
+ <beans:property name="userAdminService" ref="userAdminService" />\r
+ </beans:bean>\r
</beans:beans>
\ No newline at end of file
<service ref="mavenProxyService" interface="org.argeo.slc.repo.maven.proxy.MavenProxyService" />\r
\r
<!-- LABEL -->\r
- <beans:bean class="org.argeo.slc.osgi.deploy.OsgiModuleLabel">\r
+ <beans:bean class="org.argeo.security.core.OsgiModuleLabel">\r
<beans:property name="bundleContext" ref="bundleContext" />\r
</beans:bean>\r
+\r
+ <!-- ROLES -->\r
+ <reference id="userAdminService" interface="org.argeo.security.UserAdminService" />\r
+\r
+ <beans:bean class="org.argeo.security.core.SimpleRoleRegistration"\r
+ init-method="run">\r
+ <beans:property name="role" value="ROLE_SLC" />\r
+ <beans:property name="userAdminService" ref="userAdminService" />\r
+ </beans:bean>\r
</beans:beans>\r
\r
<!-- <reference id="mavenRepositorySystem" interface="org.sonatype.aether.RepositorySystem" -->\r
+++ /dev/null
-package org.argeo.slc.osgi.deploy;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
-
-/** Logs the version of an OSGi bundle. */
-public class OsgiModuleLabel {
- private final static Log log = LogFactory.getLog(OsgiModuleLabel.class);
-
- private Bundle bundle;
-
- public OsgiModuleLabel() {
- }
-
- /** Sets without logging. */
- public OsgiModuleLabel(Bundle bundle) {
- this.bundle = bundle;
- }
-
- /**
- * Retrieved bundle from a bundle context and logs it. Typically to be set
- * as a Spring bean.
- */
- public void setBundleContext(BundleContext bundleContext) {
- this.bundle = bundleContext.getBundle();
- log.info(msg());
- }
-
- public String msg() {
- String name = bundle.getHeaders().get(Constants.BUNDLE_NAME).toString();
- String symbolicName = bundle.getSymbolicName();
- String version = bundle.getVersion().toString();
- return name + " v" + version + " (" + symbolicName + ")";
- }
-}