From: Maria Odea B. Ching Date: Wed, 8 Oct 2008 11:04:24 +0000 (+0000) Subject: repackaged directories X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5b59ba19f6a29d1b6d24bb38b71b4773dfafaa12;p=archiva.git repackaged directories git-svn-id: https://svn.apache.org/repos/asf/archiva/branches@702806 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/AdministrationService.java b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/AdministrationService.java new file mode 100644 index 000000000..0e157effc --- /dev/null +++ b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/AdministrationService.java @@ -0,0 +1,47 @@ +package org.apache.archiva.web.xmlrpc.api; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + +import java.util.List; + +import com.atlassian.xmlrpc.ServiceObject; + +@ServiceObject( "Administration" ) +public interface AdministrationService +{ + public boolean executeRepositoryScanner( String repoId ); + + public boolean executeDatabaseScanner(); + + public List getAllDatabaseConsumers(); + + public boolean configureDatabaseConsumer( String consumerId, boolean enable ); + + // TODO should we already implement config of consumers per repository? + public boolean configureRepositoryConsumer( String repoId, String consumerId, boolean enable ); + + public List getAllRepositoryConsumers( String repoId ); + + public List getAllManagedRepositories(); + + public List getAllRemoteRepositories(); + + public boolean deleteArtifact( String repoId, String groupId, String artifactId, String version ); +} diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java new file mode 100644 index 000000000..cbc47547f --- /dev/null +++ b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java @@ -0,0 +1,28 @@ +package org.apache.archiva.web.xmlrpc.api; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + +import com.atlassian.xmlrpc.ServiceObject; + +@ServiceObject("Search") +public interface SearchService +{ + +} diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/TestService.java b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/TestService.java new file mode 100644 index 000000000..5eba5144d --- /dev/null +++ b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/TestService.java @@ -0,0 +1,28 @@ +package org.apache.archiva.web.xmlrpc.api; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + +import com.atlassian.xmlrpc.ServiceObject; + +@ServiceObject("Test") +public interface TestService +{ + public String ping(); +} diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/AdministrationService.java b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/AdministrationService.java deleted file mode 100644 index 187fb14e1..000000000 --- a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/AdministrationService.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.apache.maven.archiva.web.xmlrpc.api; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import java.util.List; - -import com.atlassian.xmlrpc.ServiceObject; - -@ServiceObject( "Administration" ) -public interface AdministrationService -{ - public boolean executeRepositoryScanner( String repoId ); - - public boolean executeDatabaseScanner(); - - public List getAllDatabaseConsumers(); - - public boolean configureDatabaseConsumer( String consumerId, boolean enable ); - - // TODO should we already implement config of consumers per repository? - public boolean configureRepositoryConsumer( String repoId, String consumerId, boolean enable ); - - public List getAllRepositoryConsumers( String repoId ); - - public List getAllManagedRepositories(); - - public List getAllRemoteRepositories(); - - public boolean deleteArtifact( String repoId, String groupId, String artifactId, String version ); -} diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/SearchService.java b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/SearchService.java deleted file mode 100644 index f92c450fd..000000000 --- a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/SearchService.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.apache.maven.archiva.web.xmlrpc.api; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import com.atlassian.xmlrpc.ServiceObject; - -@ServiceObject("Search") -public interface SearchService -{ - -} diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/TestService.java b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/TestService.java deleted file mode 100644 index 5734abbdf..000000000 --- a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/TestService.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.apache.maven.archiva.web.xmlrpc.api; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import com.atlassian.xmlrpc.ServiceObject; - -@ServiceObject("Test") -public interface TestService -{ - public String ping(); -} diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/mdo/archiva-service.xml b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/mdo/archiva-service.xml index e370abea8..0e5e2e04a 100644 --- a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/mdo/archiva-service.xml +++ b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/mdo/archiva-service.xml @@ -25,7 +25,7 @@ package - org.apache.maven.archiva.web.xmlrpc.api + org.apache.archiva.web.xmlrpc.api diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/archiva/web/xmlrpc/security/XmlRpcAuthenticator.java b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/archiva/web/xmlrpc/security/XmlRpcAuthenticator.java new file mode 100644 index 000000000..f12b28378 --- /dev/null +++ b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/archiva/web/xmlrpc/security/XmlRpcAuthenticator.java @@ -0,0 +1,97 @@ +package org.apache.archiva.web.xmlrpc.security; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + +import org.apache.maven.archiva.security.ArchivaRoleConstants; +import org.apache.xmlrpc.XmlRpcException; +import org.apache.xmlrpc.XmlRpcRequest; +import org.apache.xmlrpc.common.XmlRpcHttpRequestConfigImpl; +import org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.AuthenticationHandler; +import org.codehaus.plexus.redback.authentication.AuthenticationException; +import org.codehaus.plexus.redback.authentication.PasswordBasedAuthenticationDataSource; +import org.codehaus.plexus.redback.authorization.AuthorizationException; +import org.codehaus.plexus.redback.authorization.AuthorizationResult; +import org.codehaus.plexus.redback.policy.AccountLockedException; +import org.codehaus.plexus.redback.system.SecuritySession; +import org.codehaus.plexus.redback.system.SecuritySystem; +import org.codehaus.plexus.redback.users.UserNotFoundException; + +public class XmlRpcAuthenticator + implements AuthenticationHandler +{ + private final SecuritySystem securitySystem; + + public XmlRpcAuthenticator( SecuritySystem securitySystem ) + { + this.securitySystem = securitySystem; + } + + public boolean isAuthorized( XmlRpcRequest pRequest ) + throws XmlRpcException + { + if ( pRequest.getConfig() instanceof XmlRpcHttpRequestConfigImpl ) + { + XmlRpcHttpRequestConfigImpl config = (XmlRpcHttpRequestConfigImpl) pRequest.getConfig(); + SecuritySession session = + authenticate( new PasswordBasedAuthenticationDataSource( config.getBasicUserName(), + config.getBasicPassword() ) ); + AuthorizationResult result = authorize( session ); + return result.isAuthorized(); + } + + throw new XmlRpcException( "Unsupported transport (must be http)" ); + } + + private SecuritySession authenticate( PasswordBasedAuthenticationDataSource authenticationDataSource ) + throws XmlRpcException + { + try + { + return securitySystem.authenticate( authenticationDataSource ); + } + catch ( AccountLockedException e ) + { + throw new XmlRpcException( 401, e.getMessage(), e ); + } + catch ( AuthenticationException e ) + { + throw new XmlRpcException( 401, e.getMessage(), e ); + } + catch ( UserNotFoundException e ) + { + throw new XmlRpcException( 401, e.getMessage(), e ); + } + } + + private AuthorizationResult authorize( SecuritySession session ) + throws XmlRpcException + { + try + { + //TODO authorization/permissions should be checked depending on the service being accessed + + return securitySystem.authorize( session, ArchivaRoleConstants.GLOBAL_REPOSITORY_MANAGER_ROLE ); + } + catch ( AuthorizationException e ) + { + throw new XmlRpcException( 401, e.getMessage(), e ); + } + } +} diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/maven/archiva/xmlrpc/security/XmlRpcAuthenticator.java b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/maven/archiva/xmlrpc/security/XmlRpcAuthenticator.java deleted file mode 100644 index e7ba4466f..000000000 --- a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/maven/archiva/xmlrpc/security/XmlRpcAuthenticator.java +++ /dev/null @@ -1,97 +0,0 @@ -package org.apache.maven.archiva.xmlrpc.security; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import org.apache.maven.archiva.security.ArchivaRoleConstants; -import org.apache.xmlrpc.XmlRpcException; -import org.apache.xmlrpc.XmlRpcRequest; -import org.apache.xmlrpc.common.XmlRpcHttpRequestConfigImpl; -import org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.AuthenticationHandler; -import org.codehaus.plexus.redback.authentication.AuthenticationException; -import org.codehaus.plexus.redback.authentication.PasswordBasedAuthenticationDataSource; -import org.codehaus.plexus.redback.authorization.AuthorizationException; -import org.codehaus.plexus.redback.authorization.AuthorizationResult; -import org.codehaus.plexus.redback.policy.AccountLockedException; -import org.codehaus.plexus.redback.system.SecuritySession; -import org.codehaus.plexus.redback.system.SecuritySystem; -import org.codehaus.plexus.redback.users.UserNotFoundException; - -public class XmlRpcAuthenticator - implements AuthenticationHandler -{ - private final SecuritySystem securitySystem; - - public XmlRpcAuthenticator( SecuritySystem securitySystem ) - { - this.securitySystem = securitySystem; - } - - public boolean isAuthorized( XmlRpcRequest pRequest ) - throws XmlRpcException - { - if ( pRequest.getConfig() instanceof XmlRpcHttpRequestConfigImpl ) - { - XmlRpcHttpRequestConfigImpl config = (XmlRpcHttpRequestConfigImpl) pRequest.getConfig(); - SecuritySession session = - authenticate( new PasswordBasedAuthenticationDataSource( config.getBasicUserName(), - config.getBasicPassword() ) ); - AuthorizationResult result = authorize( session ); - return result.isAuthorized(); - } - - throw new XmlRpcException( "Unsupported transport (must be http)" ); - } - - private SecuritySession authenticate( PasswordBasedAuthenticationDataSource authenticationDataSource ) - throws XmlRpcException - { - try - { - return securitySystem.authenticate( authenticationDataSource ); - } - catch ( AccountLockedException e ) - { - throw new XmlRpcException( 401, e.getMessage(), e ); - } - catch ( AuthenticationException e ) - { - throw new XmlRpcException( 401, e.getMessage(), e ); - } - catch ( UserNotFoundException e ) - { - throw new XmlRpcException( 401, e.getMessage(), e ); - } - } - - private AuthorizationResult authorize( SecuritySession session ) - throws XmlRpcException - { - try - { - //TODO authorization/permissions should be checked depending on the service being accessed - - return securitySystem.authorize( session, ArchivaRoleConstants.GLOBAL_REPOSITORY_MANAGER_ROLE ); - } - catch ( AuthorizationException e ) - { - throw new XmlRpcException( 401, e.getMessage(), e ); - } - } -} diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/java/org/apache/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.java b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/java/org/apache/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.java new file mode 100644 index 000000000..55fbd3360 --- /dev/null +++ b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/java/org/apache/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.java @@ -0,0 +1,211 @@ +package org.apache.archiva.xmlrpc.security; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + +import org.apache.archiva.web.xmlrpc.security.XmlRpcAuthenticator; +import org.apache.maven.archiva.security.ArchivaRoleConstants; +import org.apache.xmlrpc.XmlRpcRequest; +import org.apache.xmlrpc.common.XmlRpcHttpRequestConfigImpl; +import org.codehaus.plexus.redback.role.RoleManager; +import org.codehaus.plexus.redback.system.SecuritySystem; +import org.codehaus.plexus.redback.users.User; +import org.codehaus.plexus.redback.users.UserManager; +import org.codehaus.plexus.redback.users.UserNotFoundException; +import org.codehaus.plexus.spring.PlexusInSpringTestCase; +import org.easymock.MockControl; +import org.easymock.classextension.MockClassControl; + +/** + * XmlRpcAuthenticatorTest + * + * @version $Id XmlRpcAuthenticatorTest.java + */ +public class XmlRpcAuthenticatorTest +//extends AbstractDependencyInjectionSpringContextTests + extends PlexusInSpringTestCase +{ + protected static final String USER_GUEST = "guest"; + + protected static final String USER_ADMIN = "admin"; + + protected static final String USER_ALPACA = "alpaca"; + + private static final String PASSWORD = "password123"; + + protected SecuritySystem securitySystem; + + protected RoleManager roleManager; + + private MockControl xmlRpcRequestControl; + + private XmlRpcRequest xmlRpcRequest; + + private XmlRpcAuthenticator authenticator; + + private MockControl configControl; + + private XmlRpcHttpRequestConfigImpl config; + + public void setUp() + throws Exception + { + super.setUp(); + + securitySystem = (SecuritySystem) lookup( SecuritySystem.class, "testable" ); + roleManager = (RoleManager) lookup( RoleManager.class, "default" ); + + // Some basic asserts. + assertNotNull( securitySystem ); + assertNotNull( roleManager ); + + // Setup Admin User. + User adminUser = createUser( USER_ADMIN, "Admin User", null ); + roleManager.assignRole( ArchivaRoleConstants.TEMPLATE_SYSTEM_ADMIN, adminUser.getPrincipal().toString() ); + + // Setup Guest User. + User guestUser = createUser( USER_GUEST, "Guest User", null ); + roleManager.assignRole( ArchivaRoleConstants.TEMPLATE_GUEST, guestUser.getPrincipal().toString() ); + + configControl = MockClassControl.createControl( XmlRpcHttpRequestConfigImpl.class ); + config = ( XmlRpcHttpRequestConfigImpl ) configControl.getMock(); + + xmlRpcRequestControl = MockControl.createControl( XmlRpcRequest.class ); + xmlRpcRequest = ( XmlRpcRequest ) xmlRpcRequestControl.getMock(); + + authenticator = new XmlRpcAuthenticator( securitySystem ); + } + + private User createUser( String principal, String fullname, String password ) + throws UserNotFoundException + { + UserManager userManager = securitySystem.getUserManager(); + + User user = userManager.createUser( principal, fullname, principal + "@testable.archiva.apache.org" ); + securitySystem.getPolicy().setEnabled( false ); + userManager.addUser( user ); + securitySystem.getPolicy().setEnabled( true ); + + user.setPassword( password ); + userManager.updateUser( user ); + + return user; + } + + public void testIsAuthorizedUserExistsButNotAuthorized() + throws Exception + { + createUser( USER_ALPACA, "Al 'Archiva' Paca", PASSWORD ); + + UserManager userManager = securitySystem.getUserManager(); + try + { + User user = userManager.findUser( USER_ALPACA ); + assertEquals( USER_ALPACA, user.getPrincipal() ); + } + catch ( UserNotFoundException e ) + { + fail( "User should exist in the database." ); + } + + xmlRpcRequestControl.expectAndReturn( xmlRpcRequest.getConfig(), config, 2 ); + + configControl.expectAndReturn( config.getBasicUserName(), USER_ALPACA ); + + configControl.expectAndReturn( config.getBasicPassword(), PASSWORD ); + + xmlRpcRequestControl.replay(); + configControl.replay(); + + boolean isAuthorized = authenticator.isAuthorized( xmlRpcRequest ); + + xmlRpcRequestControl.verify(); + configControl.verify(); + + assertFalse( isAuthorized ); + } + + public void testIsAuthorizedUserExistsAndAuthorized() + throws Exception + { + createUser( USER_ALPACA, "Al 'Archiva' Paca", PASSWORD ); + + UserManager userManager = securitySystem.getUserManager(); + try + { + User user = userManager.findUser( USER_ALPACA ); + assertEquals( USER_ALPACA, user.getPrincipal() ); + } + catch ( UserNotFoundException e ) + { + fail( "User should exist in the database." ); + } + + //TODO cannot assign global repo manager role - it says role does not exist :| + + //roleManager.assignRole( ArchivaRoleConstants.GLOBAL_REPOSITORY_MANAGER_ROLE, USER_ALPACA ); + + xmlRpcRequestControl.expectAndReturn( xmlRpcRequest.getConfig(), config, 2 ); + + configControl.expectAndReturn( config.getBasicUserName(), USER_ALPACA ); + + configControl.expectAndReturn( config.getBasicPassword(), PASSWORD ); + + xmlRpcRequestControl.replay(); + configControl.replay(); + + boolean isAuthorized = authenticator.isAuthorized( xmlRpcRequest ); + + xmlRpcRequestControl.verify(); + configControl.verify(); + + //assertTrue( isAuthorized ); + } + + public void testIsAuthorizedUserDoesNotExist() + throws Exception + { + UserManager userManager = securitySystem.getUserManager(); + try + { + userManager.findUser( USER_ALPACA ); + fail( "User should not exist in the database." ); + } + catch ( UserNotFoundException e ) + { + assertEquals( "Unable to find user 'alpaca'", e.getMessage() ); + } + + xmlRpcRequestControl.expectAndReturn( xmlRpcRequest.getConfig(), config, 2 ); + + configControl.expectAndReturn( config.getBasicUserName(), USER_ALPACA ); + + configControl.expectAndReturn( config.getBasicPassword(), PASSWORD ); + + xmlRpcRequestControl.replay(); + configControl.replay(); + + boolean isAuthorized = authenticator.isAuthorized( xmlRpcRequest ); + + xmlRpcRequestControl.verify(); + configControl.verify(); + + assertFalse( isAuthorized ); + } +} diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/java/org/apache/maven/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.java b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/java/org/apache/maven/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.java deleted file mode 100644 index 206b299ff..000000000 --- a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/java/org/apache/maven/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.java +++ /dev/null @@ -1,210 +0,0 @@ -package org.apache.maven.archiva.xmlrpc.security; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import org.apache.maven.archiva.security.ArchivaRoleConstants; -import org.apache.xmlrpc.XmlRpcRequest; -import org.apache.xmlrpc.common.XmlRpcHttpRequestConfigImpl; -import org.codehaus.plexus.redback.role.RoleManager; -import org.codehaus.plexus.redback.system.SecuritySystem; -import org.codehaus.plexus.redback.users.User; -import org.codehaus.plexus.redback.users.UserManager; -import org.codehaus.plexus.redback.users.UserNotFoundException; -import org.codehaus.plexus.spring.PlexusInSpringTestCase; -import org.easymock.MockControl; -import org.easymock.classextension.MockClassControl; - -/** - * XmlRpcAuthenticatorTest - * - * @version $Id XmlRpcAuthenticatorTest.java - */ -public class XmlRpcAuthenticatorTest -//extends AbstractDependencyInjectionSpringContextTests - extends PlexusInSpringTestCase -{ - protected static final String USER_GUEST = "guest"; - - protected static final String USER_ADMIN = "admin"; - - protected static final String USER_ALPACA = "alpaca"; - - private static final String PASSWORD = "password123"; - - protected SecuritySystem securitySystem; - - protected RoleManager roleManager; - - private MockControl xmlRpcRequestControl; - - private XmlRpcRequest xmlRpcRequest; - - private XmlRpcAuthenticator authenticator; - - private MockControl configControl; - - private XmlRpcHttpRequestConfigImpl config; - - public void setUp() - throws Exception - { - super.setUp(); - - securitySystem = (SecuritySystem) lookup( SecuritySystem.class, "testable" ); - roleManager = (RoleManager) lookup( RoleManager.class, "default" ); - - // Some basic asserts. - assertNotNull( securitySystem ); - assertNotNull( roleManager ); - - // Setup Admin User. - User adminUser = createUser( USER_ADMIN, "Admin User", null ); - roleManager.assignRole( ArchivaRoleConstants.TEMPLATE_SYSTEM_ADMIN, adminUser.getPrincipal().toString() ); - - // Setup Guest User. - User guestUser = createUser( USER_GUEST, "Guest User", null ); - roleManager.assignRole( ArchivaRoleConstants.TEMPLATE_GUEST, guestUser.getPrincipal().toString() ); - - configControl = MockClassControl.createControl( XmlRpcHttpRequestConfigImpl.class ); - config = ( XmlRpcHttpRequestConfigImpl ) configControl.getMock(); - - xmlRpcRequestControl = MockControl.createControl( XmlRpcRequest.class ); - xmlRpcRequest = ( XmlRpcRequest ) xmlRpcRequestControl.getMock(); - - authenticator = new XmlRpcAuthenticator( securitySystem ); - } - - private User createUser( String principal, String fullname, String password ) - throws UserNotFoundException - { - UserManager userManager = securitySystem.getUserManager(); - - User user = userManager.createUser( principal, fullname, principal + "@testable.archiva.apache.org" ); - securitySystem.getPolicy().setEnabled( false ); - userManager.addUser( user ); - securitySystem.getPolicy().setEnabled( true ); - - user.setPassword( password ); - userManager.updateUser( user ); - - return user; - } - - public void testIsAuthorizedUserExistsButNotAuthorized() - throws Exception - { - createUser( USER_ALPACA, "Al 'Archiva' Paca", PASSWORD ); - - UserManager userManager = securitySystem.getUserManager(); - try - { - User user = userManager.findUser( USER_ALPACA ); - assertEquals( USER_ALPACA, user.getPrincipal() ); - } - catch ( UserNotFoundException e ) - { - fail( "User should exist in the database." ); - } - - xmlRpcRequestControl.expectAndReturn( xmlRpcRequest.getConfig(), config, 2 ); - - configControl.expectAndReturn( config.getBasicUserName(), USER_ALPACA ); - - configControl.expectAndReturn( config.getBasicPassword(), PASSWORD ); - - xmlRpcRequestControl.replay(); - configControl.replay(); - - boolean isAuthorized = authenticator.isAuthorized( xmlRpcRequest ); - - xmlRpcRequestControl.verify(); - configControl.verify(); - - assertFalse( isAuthorized ); - } - - public void testIsAuthorizedUserExistsAndAuthorized() - throws Exception - { - createUser( USER_ALPACA, "Al 'Archiva' Paca", PASSWORD ); - - UserManager userManager = securitySystem.getUserManager(); - try - { - User user = userManager.findUser( USER_ALPACA ); - assertEquals( USER_ALPACA, user.getPrincipal() ); - } - catch ( UserNotFoundException e ) - { - fail( "User should exist in the database." ); - } - - //TODO cannot assign global repo manager role - it says role does not exist :| - - //roleManager.assignRole( ArchivaRoleConstants.GLOBAL_REPOSITORY_MANAGER_ROLE, USER_ALPACA ); - - xmlRpcRequestControl.expectAndReturn( xmlRpcRequest.getConfig(), config, 2 ); - - configControl.expectAndReturn( config.getBasicUserName(), USER_ALPACA ); - - configControl.expectAndReturn( config.getBasicPassword(), PASSWORD ); - - xmlRpcRequestControl.replay(); - configControl.replay(); - - boolean isAuthorized = authenticator.isAuthorized( xmlRpcRequest ); - - xmlRpcRequestControl.verify(); - configControl.verify(); - - //assertTrue( isAuthorized ); - } - - public void testIsAuthorizedUserDoesNotExist() - throws Exception - { - UserManager userManager = securitySystem.getUserManager(); - try - { - userManager.findUser( USER_ALPACA ); - fail( "User should not exist in the database." ); - } - catch ( UserNotFoundException e ) - { - assertEquals( "Unable to find user 'alpaca'", e.getMessage() ); - } - - xmlRpcRequestControl.expectAndReturn( xmlRpcRequest.getConfig(), config, 2 ); - - configControl.expectAndReturn( config.getBasicUserName(), USER_ALPACA ); - - configControl.expectAndReturn( config.getBasicPassword(), PASSWORD ); - - xmlRpcRequestControl.replay(); - configControl.replay(); - - boolean isAuthorized = authenticator.isAuthorized( xmlRpcRequest ); - - xmlRpcRequestControl.verify(); - configControl.verify(); - - assertFalse( isAuthorized ); - } -} diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/resources/org/apache/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.xml b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/resources/org/apache/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.xml new file mode 100644 index 000000000..9c7b9344f --- /dev/null +++ b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/resources/org/apache/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.xml @@ -0,0 +1,192 @@ + + + + + + + + org.codehaus.plexus.redback.system.SecuritySystem + testable + org.codehaus.plexus.redback.system.DefaultSecuritySystem + DefaultSecuritySystem: + + + org.codehaus.plexus.redback.authentication.AuthenticationManager + authnManager + + + org.codehaus.plexus.redback.authorization.Authorizer + rbac + authorizer + + + org.codehaus.plexus.redback.users.UserManager + memory + userManager + + + org.codehaus.plexus.redback.keys.KeyManager + memory + keyManager + + + org.codehaus.plexus.redback.policy.UserSecurityPolicy + policy + + + + + + org.codehaus.plexus.redback.authorization.Authorizer + rbac + org.codehaus.plexus.redback.authorization.rbac.RbacAuthorizer + RbacAuthorizer: + + + org.codehaus.plexus.redback.rbac.RBACManager + memory + manager + + + org.codehaus.plexus.redback.users.UserManager + memory + userManager + + + org.codehaus.plexus.redback.authorization.rbac.evaluator.PermissionEvaluator + default + evaluator + + + org.codehaus.plexus.redback.configuration.UserConfiguration + default + config + + + + + + org.codehaus.plexus.redback.authorization.rbac.evaluator.PermissionEvaluator + default + org.codehaus.plexus.redback.authorization.rbac.evaluator.DefaultPermissionEvaluator + + + org.codehaus.plexus.redback.users.UserManager + memory + userManager + + + + + + org.codehaus.plexus.redback.role.RoleManager + default + org.codehaus.plexus.redback.role.DefaultRoleManager + RoleProfileManager: + + + org.codehaus.plexus.redback.role.validator.RoleModelValidator + default + modelValidator + + + org.codehaus.plexus.redback.role.processor.RoleModelProcessor + default + modelProcessor + + + org.codehaus.plexus.redback.role.template.RoleTemplateProcessor + default + templateProcessor + + + org.codehaus.plexus.redback.rbac.RBACManager + memory + rbacManager + + + + + + org.codehaus.plexus.redback.role.processor.RoleModelProcessor + default + org.codehaus.plexus.redback.role.processor.DefaultRoleModelProcessor + DefaultRoleModelProcessor: inserts the components of the model that can be populated into the rbac manager + + + org.codehaus.plexus.redback.rbac.RBACManager + memory + rbacManager + + + + + + org.codehaus.plexus.redback.role.template.RoleTemplateProcessor + default + org.codehaus.plexus.redback.role.template.DefaultRoleTemplateProcessor + DefaultRoleTemplateProcessor: inserts the components of a template into the rbac manager + + + org.codehaus.plexus.redback.rbac.RBACManager + memory + rbacManager + + + + + + + + \ No newline at end of file diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/resources/org/apache/maven/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.xml b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/resources/org/apache/maven/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.xml deleted file mode 100644 index 9c7b9344f..000000000 --- a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/resources/org/apache/maven/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.xml +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - org.codehaus.plexus.redback.system.SecuritySystem - testable - org.codehaus.plexus.redback.system.DefaultSecuritySystem - DefaultSecuritySystem: - - - org.codehaus.plexus.redback.authentication.AuthenticationManager - authnManager - - - org.codehaus.plexus.redback.authorization.Authorizer - rbac - authorizer - - - org.codehaus.plexus.redback.users.UserManager - memory - userManager - - - org.codehaus.plexus.redback.keys.KeyManager - memory - keyManager - - - org.codehaus.plexus.redback.policy.UserSecurityPolicy - policy - - - - - - org.codehaus.plexus.redback.authorization.Authorizer - rbac - org.codehaus.plexus.redback.authorization.rbac.RbacAuthorizer - RbacAuthorizer: - - - org.codehaus.plexus.redback.rbac.RBACManager - memory - manager - - - org.codehaus.plexus.redback.users.UserManager - memory - userManager - - - org.codehaus.plexus.redback.authorization.rbac.evaluator.PermissionEvaluator - default - evaluator - - - org.codehaus.plexus.redback.configuration.UserConfiguration - default - config - - - - - - org.codehaus.plexus.redback.authorization.rbac.evaluator.PermissionEvaluator - default - org.codehaus.plexus.redback.authorization.rbac.evaluator.DefaultPermissionEvaluator - - - org.codehaus.plexus.redback.users.UserManager - memory - userManager - - - - - - org.codehaus.plexus.redback.role.RoleManager - default - org.codehaus.plexus.redback.role.DefaultRoleManager - RoleProfileManager: - - - org.codehaus.plexus.redback.role.validator.RoleModelValidator - default - modelValidator - - - org.codehaus.plexus.redback.role.processor.RoleModelProcessor - default - modelProcessor - - - org.codehaus.plexus.redback.role.template.RoleTemplateProcessor - default - templateProcessor - - - org.codehaus.plexus.redback.rbac.RBACManager - memory - rbacManager - - - - - - org.codehaus.plexus.redback.role.processor.RoleModelProcessor - default - org.codehaus.plexus.redback.role.processor.DefaultRoleModelProcessor - DefaultRoleModelProcessor: inserts the components of the model that can be populated into the rbac manager - - - org.codehaus.plexus.redback.rbac.RBACManager - memory - rbacManager - - - - - - org.codehaus.plexus.redback.role.template.RoleTemplateProcessor - default - org.codehaus.plexus.redback.role.template.DefaultRoleTemplateProcessor - DefaultRoleTemplateProcessor: inserts the components of a template into the rbac manager - - - org.codehaus.plexus.redback.rbac.RBACManager - memory - rbacManager - - - - - - - - \ No newline at end of file diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java new file mode 100644 index 000000000..ba0afd9c9 --- /dev/null +++ b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java @@ -0,0 +1,83 @@ +package org.apache.archiva.web.xmlrpc.services; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + +import java.util.List; + +import org.apache.archiva.web.xmlrpc.api.AdministrationService; +import org.apache.archiva.web.xmlrpc.api.ManagedRepository; +import org.apache.archiva.web.xmlrpc.api.RemoteRepository; + +public class AdministrationServiceImpl + implements AdministrationService +{ + + public boolean configureDatabaseConsumer( String consumerId, boolean enable ) + { + // TODO Auto-generated method stub + return false; + } + + public boolean configureRepositoryConsumer( String repoId, String consumerId, boolean enable ) + { + // TODO Auto-generated method stub + return false; + } + + public boolean deleteArtifact( String repoId, String groupId, String artifactId, String version ) + { + // TODO Auto-generated method stub + return false; + } + + public boolean executeDatabaseScanner() + { + // TODO Auto-generated method stub + return false; + } + + public boolean executeRepositoryScanner( String repoId ) + { + // TODO Auto-generated method stub + return false; + } + + public List getAllDatabaseConsumers() + { + // TODO Auto-generated method stub + return null; + } + + public List getAllRepositoryConsumers( String repoId ) + { + // TODO Auto-generated method stub + return null; + } + + public List getAllManagedRepositories() + { + return null; + } + + public List getAllRemoteRepositories() + { + return null; + } +} diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/PingServiceImpl.java b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/PingServiceImpl.java new file mode 100644 index 000000000..aa47f5f0e --- /dev/null +++ b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/PingServiceImpl.java @@ -0,0 +1,30 @@ +package org.apache.archiva.web.xmlrpc.services; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + +import org.apache.archiva.web.xmlrpc.api.TestService; + +public class PingServiceImpl implements TestService +{ + public String ping() + { + return "pong"; + } +} diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/maven/archiva/web/xmlrpc/services/AdministrationServiceImpl.java b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/maven/archiva/web/xmlrpc/services/AdministrationServiceImpl.java deleted file mode 100644 index bb52d56ad..000000000 --- a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/maven/archiva/web/xmlrpc/services/AdministrationServiceImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.apache.maven.archiva.web.xmlrpc.services; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import java.util.List; - -import org.apache.maven.archiva.web.xmlrpc.api.AdministrationService; -import org.apache.maven.archiva.web.xmlrpc.api.ManagedRepository; -import org.apache.maven.archiva.web.xmlrpc.api.RemoteRepository; - -public class AdministrationServiceImpl - implements AdministrationService -{ - - public boolean configureDatabaseConsumer( String consumerId, boolean enable ) - { - // TODO Auto-generated method stub - return false; - } - - public boolean configureRepositoryConsumer( String repoId, String consumerId, boolean enable ) - { - // TODO Auto-generated method stub - return false; - } - - public boolean deleteArtifact( String repoId, String groupId, String artifactId, String version ) - { - // TODO Auto-generated method stub - return false; - } - - public boolean executeDatabaseScanner() - { - // TODO Auto-generated method stub - return false; - } - - public boolean executeRepositoryScanner( String repoId ) - { - // TODO Auto-generated method stub - return false; - } - - public List getAllDatabaseConsumers() - { - // TODO Auto-generated method stub - return null; - } - - public List getAllRepositoryConsumers( String repoId ) - { - // TODO Auto-generated method stub - return null; - } - - public List getAllManagedRepositories() - { - return null; - } - - public List getAllRemoteRepositories() - { - return null; - } -} diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/maven/archiva/web/xmlrpc/services/PingServiceImpl.java b/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/maven/archiva/web/xmlrpc/services/PingServiceImpl.java deleted file mode 100644 index e77adffe0..000000000 --- a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/maven/archiva/web/xmlrpc/services/PingServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.apache.maven.archiva.web.xmlrpc.services; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import org.apache.maven.archiva.web.xmlrpc.api.TestService; - -public class PingServiceImpl implements TestService -{ - public String ping() - { - return "pong"; - } -}