diff options
author | Olivier Lamy <olamy@apache.org> | 2011-08-10 19:17:50 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-08-10 19:17:50 +0000 |
commit | f4a130e2c5cc710f87044b62f5c020700c1b8fe1 (patch) | |
tree | f33ce9c558ecad733e2104da34541e4603e42ed3 | |
parent | b36ed8a621faaa15a9945fc9812a8572bc2cc4c4 (diff) | |
download | archiva-f4a130e2c5cc710f87044b62f5c020700c1b8fe1.tar.gz archiva-f4a130e2c5cc710f87044b62f5c020700c1b8fe1.zip |
[MRM-1481] Ability to do user management through xmlrpc
Submitted by Maria Catherine Tan
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1156322 13f79535-47bb-0310-9956-ffa450edef68
4 files changed, 84 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml index 30e2ab252..377bfdf98 100644 --- a/archiva-modules/archiva-web/archiva-webapp/pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml @@ -226,6 +226,16 @@ <groupId>org.codehaus.redback</groupId> <artifactId>redback-common-integrations</artifactId> </dependency> + <dependency> + <groupId>org.codehaus.redback</groupId> + <artifactId>redback-xmlrpc-services</artifactId> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.codehaus.redback</groupId> + <artifactId>redback-xmlrpc-security</artifactId> + <scope>runtime</scope> + </dependency> <!-- Other dependencies --> <dependency> <groupId>org.apache.archiva</groupId> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml index 857c4d9ec..6a2d98c39 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml @@ -68,7 +68,33 @@ <constructor-arg ref="repositoryMerger#maven2"/> <constructor-arg ref="auditListener#logging"/> <constructor-arg ref="commons-configuration"/> + </bean> + + <!-- Redback Web Services --> + <bean name="redbackRoleService" lazy-init="true" scope="singleton" + class="org.codehaus.redback.xmlrpc.service.RoleServiceImpl"> + <constructor-arg ref="rBACManager#cached"/> + <constructor-arg ref="roleManager"/> + </bean> + + <bean name="redbackOperationService" lazy-init="true" scope="singleton" + class="org.codehaus.redback.xmlrpc.service.OperationServiceImpl"> + <constructor-arg ref="rBACManager#cached"/> + </bean> + + <bean name="redbackPermissionService" lazy-init="true" scope="singleton" + class="org.codehaus.redback.xmlrpc.service.PermissionServiceImpl"> + <constructor-arg ref="rBACManager#cached"/> + </bean> + + <bean name="redbackResourceService" lazy-init="true" scope="singleton" + class="org.codehaus.redback.xmlrpc.service.ResourceServiceImpl"> + <constructor-arg ref="rBACManager#cached"/> + </bean> + <bean name="redbackUserService" lazy-init="true" scope="singleton" + class="org.codehaus.redback.xmlrpc.service.UserServiceImpl"> + <constructor-arg ref="userManager#cached"/> </bean> <bean name="xmlrpcServicesList" lazy-init="true" scope="singleton" class="java.util.ArrayList"> @@ -86,6 +112,22 @@ <constructor-arg ref="userRepositories"/> </bean> + <bean name="redbackXmlrpcServicesList" class="java.util.ArrayList"> + <constructor-arg> + <list> + <ref bean="redbackOperationService"/> + <ref bean="redbackPermissionService"/> + <ref bean="redbackResourceService"/> + <ref bean="redbackRoleService"/> + <ref bean="redbackUserService"/> + </list> + </constructor-arg> + </bean> + + <bean name="redbackXmlRpcAuthenticator" class="org.codehaus.redback.xmlrpc.security.XmlRpcAuthenticator"> + <constructor-arg ref="securitySystem"/> + </bean> + <bean id="mailSession" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="java:comp/env/mail/Session"> </property> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml index 10ed5aaaf..7d24f88c0 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml @@ -122,6 +122,23 @@ <load-on-startup>1</load-on-startup> </servlet> + <servlet> + <servlet-name>RedbackXmlRpcServlet</servlet-name> + <servlet-class>com.atlassian.xmlrpc.spring.BinderSpringXmlRpcServlet</servlet-class> + <init-param> + <param-name>serviceListBeanName</param-name> + <param-value>redbackXmlrpcServicesList</param-value> + </init-param> + <init-param> + <param-name>authHandlerBeanName</param-name> + <param-value>redbackXmlRpcAuthenticator</param-value> + </init-param> + <init-param> + <param-name>enabledForExtensions</param-name> + <param-value>true</param-value> + </init-param> + </servlet> + <servlet> <servlet-name>RssFeedServlet</servlet-name> <servlet-class> @@ -144,6 +161,11 @@ <url-pattern>/xmlrpc</url-pattern> </servlet-mapping> + <servlet-mapping> + <servlet-name>RedbackXmlRpcServlet</servlet-name> + <url-pattern>/redback-xmlrpc</url-pattern> + </servlet-mapping> + <resource-ref> <res-ref-name>jdbc/users</res-ref-name> <res-type>javax.sql.DataSource</res-type> @@ -820,6 +820,16 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.codehaus.redback</groupId> + <artifactId>redback-xmlrpc-services</artifactId> + <version>${redback.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.redback</groupId> + <artifactId>redback-xmlrpc-security</artifactId> + <version>${redback.version}</version> + </dependency> <!-- redback --> |