--- /dev/null
+package org.apache.maven.archiva.web.action.admin.repositories;
+
+/*
+ * 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.io.Serializable;
+import java.util.List;
+
+import org.apache.maven.archiva.database.ArchivaDAO;
+import org.apache.maven.archiva.database.ArtifactDAO;
+import org.apache.maven.archiva.database.ProjectModelDAO;
+import org.apache.maven.archiva.database.RepositoryContentStatisticsDAO;
+import org.apache.maven.archiva.database.RepositoryProblemDAO;
+import org.apache.maven.archiva.database.SimpleConstraint;
+
+/**
+ * AbstractManagedRepositoryArchivaDAOStub
+ *
+ * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
+ * @version
+ */
+public class AbstractManagedRepositoryArchivaDAOStub
+ implements ArchivaDAO
+{
+ /**
+ * @plexus.requirement role-hint="jdo"
+ */
+ private ProjectModelDAO projectModelDAO;
+
+ /**
+ * @plexus.requirement role-hint="jdo"
+ */
+ private ArtifactDAO artifactDAO;
+
+ /**
+ * @plexus.requirement role-hint="jdo"
+ */
+ private RepositoryContentStatisticsDAO repoContentStatisticsDAO;
+
+ public List query( SimpleConstraint constraint )
+ {
+ return null;
+ }
+
+ public Object save( Serializable obj )
+ {
+ throw new UnsupportedOperationException( "query not implemented for stub" );
+ }
+
+ public ArtifactDAO getArtifactDAO()
+ {
+ return artifactDAO;
+ }
+
+ public ProjectModelDAO getProjectModelDAO()
+ {
+ return projectModelDAO;
+ }
+
+ public RepositoryProblemDAO getRepositoryProblemDAO()
+ {
+ throw new UnsupportedOperationException( "query not implemented for stub" );
+ }
+
+ public RepositoryContentStatisticsDAO getRepositoryContentStatisticsDAO()
+ {
+ return repoContentStatisticsDAO;
+ }
+}
private static final String REPO_ID = "repo-ident";
private File location;
-
+
+ @Override
+ protected String getCustomConfigurationName()
+ {
+ return AbstractManagedRepositoriesAction.class.getName().replace( '.', '/' ) + "Test.xml";
+ }
+
protected void setUp()
throws Exception
{
private File location;
+ @Override
+ protected String getCustomConfigurationName()
+ {
+ return AbstractManagedRepositoriesAction.class.getName().replace( '.', '/' ) + "Test.xml";
+ }
+
protected void setUp()
throws Exception
{
+++ /dev/null
-package org.apache.maven.archiva.web.action.admin.repositories;
-
-/*
- * 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.io.Serializable;
-import java.util.List;
-
-import org.apache.maven.archiva.database.ArchivaDAO;
-import org.apache.maven.archiva.database.ArtifactDAO;
-import org.apache.maven.archiva.database.ProjectModelDAO;
-import org.apache.maven.archiva.database.RepositoryContentStatisticsDAO;
-import org.apache.maven.archiva.database.RepositoryProblemDAO;
-import org.apache.maven.archiva.database.SimpleConstraint;
-
-/**
- * DeleteManagedRepositoryArchivaDAOStub
- *
- * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
- * @version
- */
-public class DeleteManagedRepositoryArchivaDAOStub
- implements ArchivaDAO
-{
- /**
- * @plexus.requirement role-hint="jdo"
- */
- private ProjectModelDAO projectModelDAO;
-
- /**
- * @plexus.requirement role-hint="jdo"
- */
- private ArtifactDAO artifactDAO;
-
- /**
- * @plexus.requirement role-hint="jdo"
- */
- private RepositoryContentStatisticsDAO repoContentStatisticsDAO;
-
- public List query( SimpleConstraint constraint )
- {
- return null;
- }
-
- public Object save( Serializable obj )
- {
- throw new UnsupportedOperationException( "query not implemented for stub" );
- }
-
- public ArtifactDAO getArtifactDAO()
- {
- return artifactDAO;
- }
-
- public ProjectModelDAO getProjectModelDAO()
- {
- return projectModelDAO;
- }
-
- public RepositoryProblemDAO getRepositoryProblemDAO()
- {
- throw new UnsupportedOperationException( "query not implemented for stub" );
- }
-
- public RepositoryContentStatisticsDAO getRepositoryContentStatisticsDAO()
- {
- return repoContentStatisticsDAO;
- }
-}
private File location;
+ @Override
+ protected String getCustomConfigurationName()
+ {
+ return AbstractManagedRepositoriesAction.class.getName().replace( '.', '/' ) + "Test.xml";
+ }
+
protected void setUp()
throws Exception
{
--- /dev/null
+<!--
+ ~ 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.
+ -->
+
+<plexus>
+ <components>
+ <component>
+ <role>org.codehaus.plexus.logging.LoggerManager</role>
+ <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation>
+ <lifecycle-handler>basic</lifecycle-handler>
+ </component>
+
+ <component>
+ <role>com.opensymphony.xwork.Action</role>
+ <role-hint>addManagedRepositoryAction</role-hint>
+ <implementation>org.apache.maven.archiva.web.action.admin.repositories.AddManagedRepositoryAction</implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
+ <!-- no requirements set -->
+ </component>
+
+ <component>
+ <role>com.opensymphony.xwork.Action</role>
+ <role-hint>deleteManagedRepositoryAction</role-hint>
+ <implementation>org.apache.maven.archiva.web.action.admin.repositories.DeleteManagedRepositoryAction</implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
+ <requirements>
+ <requirement>
+ <role>org.apache.maven.archiva.database.ArchivaDAO</role>
+ <role-hint>jdo</role-hint>
+ <field-name>archivaDAO</field-name>
+ </requirement>
+ </requirements>
+ </component>
+
+ <component>
+ <role>com.opensymphony.xwork.Action</role>
+ <role-hint>editManagedRepositoryAction</role-hint>
+ <implementation>org.apache.maven.archiva.web.action.admin.repositories.EditManagedRepositoryAction</implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
+ <!-- no requirements set -->
+ </component>
+
+ <!-- DAO : Stubs -->
+ <component>
+ <role>org.apache.maven.archiva.database.ArchivaDAO</role>
+ <role-hint>jdo</role-hint>
+ <implementation>org.apache.maven.archiva.web.action.admin.repositories.AbstractManagedRepositoryArchivaDAOStub</implementation>
+ <requirements>
+ <requirement>
+ <role>org.apache.maven.archiva.database.ArtifactDAO</role>
+ <role-hint>jdo</role-hint>
+ <field-name>artifactDAO</field-name>
+ </requirement>
+ <requirement>
+ <role>org.apache.maven.archiva.database.ProjectModelDAO</role>
+ <role-hint>jdo</role-hint>
+ <field-name>projectModelDAO</field-name>
+ </requirement>
+ <requirement>
+ <role>org.apache.maven.archiva.database.RepositoryContentStatisticsDAO</role>
+ <role-hint>jdo</role-hint>
+ <field-name>repoContentStatisticsDAO</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ <component>
+ <role>org.apache.maven.archiva.database.ArtifactDAO</role>
+ <role-hint>jdo</role-hint>
+ <implementation>org.apache.maven.archiva.web.action.admin.repositories.ArtifactDAOStub</implementation>
+ </component>
+ <component>
+ <role>org.apache.maven.archiva.database.ProjectModelDAO</role>
+ <role-hint>jdo</role-hint>
+ <implementation>org.apache.maven.archiva.web.action.admin.repositories.ProjectModelDAOStub</implementation>
+ </component>
+ <component>
+ <role>org.apache.maven.archiva.database.RepositoryContentStatisticsDAO</role>
+ <role-hint>jdo</role-hint>
+ <implementation>org.apache.maven.archiva.web.action.admin.repositories.RepositoryContentStatisticsDAOStub</implementation>
+ </component>
+
+ </components>
+</plexus>
<implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation>
<lifecycle-handler>basic</lifecycle-handler>
</component>
+ <component>
+ <role>org.codehaus.plexus.redback.role.RoleManager</role>
+ <role-hint>default</role-hint>
+ <implementation>org.apache.maven.archiva.web.action.admin.repositories.RoleManagerStub</implementation>
+ </component>
<component>
<role>com.opensymphony.xwork.Action</role>
<role-hint>deleteManagedRepositoryAction</role-hint>