[MRM-1082] restore per-lookup to action classes that was set by default with the previous version of the plexus plugin. This is important for actions that store state and resolves a number of issues with parameters persisting across requests (and clients)

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@751672 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2009-03-09 13:17:46 +00:00
parent 9633f8d288
commit 5a9d510e8a
37 changed files with 112 additions and 34 deletions

View File

@ -38,7 +38,7 @@ import org.apache.maven.archiva.security.*;
* @todo cache browsing results.
* @todo implement repository selectors (all or specific repository)
* @todo implement security around browse (based on repository id at first)
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="browseAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="browseAction" instantiation-strategy="per-lookup"
*/
public class BrowseAction
extends PlexusActionSupport

View File

@ -66,7 +66,7 @@ import com.opensymphony.xwork2.Validateable;
/**
* Delete an artifact. Metadata will be updated if one exists, otherwise it would be created.
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteArtifactAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteArtifactAction" instantiation-strategy="per-lookup"
*/
public class DeleteArtifactAction
extends PlexusActionSupport

View File

@ -57,7 +57,7 @@ import org.springframework.web.context.support.WebApplicationContextUtils;
/**
* Search all indexed fields by the given criteria.
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="searchAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="searchAction" instantiation-strategy="per-lookup"
*/
public class SearchAction
extends PlexusActionSupport

View File

@ -42,7 +42,7 @@ import com.opensymphony.xwork2.Validateable;
*
* TODO change name to ShowVersionedAction to conform to terminology.
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="showArtifactAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="showArtifactAction" instantiation-strategy="per-lookup"
*/
public class ShowArtifactAction
extends PlexusActionSupport

View File

@ -73,7 +73,7 @@ import org.apache.commons.lang.StringUtils;
* Upload an artifact using Jakarta file upload in webwork. If set by the user a pom will also be generated. Metadata
* will also be updated if one exists, otherwise it would be created.
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="uploadAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="uploadAction" instantiation-strategy="per-lookup"
*/
public class UploadAction
extends PlexusActionSupport

View File

@ -37,7 +37,7 @@ import org.codehaus.redback.integration.interceptor.SecureActionException;
/**
* Configures the application.
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="schedulerAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="schedulerAction" instantiation-strategy="per-lookup"
*/
public class SchedulerAction
extends PlexusActionSupport

View File

@ -34,6 +34,7 @@ import org.codehaus.redback.integration.interceptor.SecureActionException;
*
* @plexus.component role="com.opensymphony.xwork2.Action"
* role-hint="editOrganisationInfo"
* instantiation-strategy="per-lookup"
*/
public class EditOrganisationInfoAction
extends AbstractAppearanceAction

View File

@ -22,7 +22,7 @@ package org.apache.maven.archiva.web.action.admin.appearance;
/**
* Stores the organisation information for displaying on the page.
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="organisationInfo"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="organisationInfo" instantiation-strategy="per-lookup"
*/
public class OrganisationInfoAction
extends AbstractAppearanceAction

View File

@ -27,7 +27,7 @@ import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
*
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="addProxyConnectorAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="addProxyConnectorAction" instantiation-strategy="per-lookup"
*/
public class AddProxyConnectorAction
extends AbstractProxyConnectorFormAction

View File

@ -26,7 +26,7 @@ import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
*
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteProxyConnectorAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteProxyConnectorAction" instantiation-strategy="per-lookup"
*/
public class DeleteProxyConnectorAction
extends AbstractProxyConnectorAction

View File

@ -24,7 +24,7 @@ import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
/**
* DisableProxyConnectorAction
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="disableProxyConnectorAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="disableProxyConnectorAction" instantiation-strategy="per-lookup"
*/
public class DisableProxyConnectorAction extends AbstractProxyConnectorAction
{

View File

@ -27,7 +27,7 @@ import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
*
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="editProxyConnectorAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="editProxyConnectorAction" instantiation-strategy="per-lookup"
*/
public class EditProxyConnectorAction
extends AbstractProxyConnectorFormAction

View File

@ -24,7 +24,7 @@ import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
/**
* EnableProxyConnectorAction
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="enableProxyConnectorAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="enableProxyConnectorAction" instantiation-strategy="per-lookup"
*/
public class EnableProxyConnectorAction extends AbstractProxyConnectorAction
{

View File

@ -34,7 +34,7 @@ import java.util.Map;
*
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="proxyConnectorsAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="proxyConnectorsAction" instantiation-strategy="per-lookup"
*/
public class ProxyConnectorsAction
extends AbstractProxyConnectorAction

View File

@ -29,7 +29,7 @@ import java.util.List;
*
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="sortProxyConnectorsAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="sortProxyConnectorsAction" instantiation-strategy="per-lookup"
*/
public class SortProxyConnectorsAction
extends AbstractProxyConnectorAction

View File

@ -42,7 +42,7 @@ import org.codehaus.redback.integration.interceptor.SecureActionException;
* DatabaseAction
*
* @version $Id$
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="databaseAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="databaseAction" instantiation-strategy="per-lookup"
*/
public class DatabaseAction
extends PlexusActionSupport

View File

@ -34,7 +34,7 @@ import org.apache.maven.archiva.web.action.PlexusActionSupport;
* Add a LegacyArtifactPath to archiva configuration
*
* @since 1.1
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="addLegacyArtifactPathAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="addLegacyArtifactPathAction" instantiation-strategy="per-lookup"
*/
public class AddLegacyArtifactPathAction
extends PlexusActionSupport

View File

@ -33,7 +33,7 @@ import org.codehaus.plexus.registry.RegistryException;
*
*
* @since 1.1
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteLegacyArtifactPathAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteLegacyArtifactPathAction" instantiation-strategy="per-lookup"
*/
public class DeleteLegacyArtifactPathAction
extends PlexusActionSupport

View File

@ -42,7 +42,7 @@ import org.codehaus.redback.integration.interceptor.SecureActionException;
* Shows the LegacyArtifactPath Tab for the administrator.
*
* @since 1.1
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="legacyArtifactPathAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="legacyArtifactPathAction" instantiation-strategy="per-lookup"
*/
public class LegacyArtifactPathAction
extends PlexusActionSupport

View File

@ -40,7 +40,7 @@ import org.codehaus.redback.integration.interceptor.SecureActionException;
* ConfigureNetworkProxyAction
*
* @version $Id$
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="configureNetworkProxyAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="configureNetworkProxyAction" instantiation-strategy="per-lookup"
*/
public class ConfigureNetworkProxyAction
extends PlexusActionSupport

View File

@ -36,7 +36,7 @@ import java.util.List;
*
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="networkProxiesAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="networkProxiesAction" instantiation-strategy="per-lookup"
*/
public class NetworkProxiesAction
extends PlexusActionSupport

View File

@ -34,7 +34,7 @@ import java.io.IOException;
*
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="addManagedRepositoryAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="addManagedRepositoryAction" instantiation-strategy="per-lookup"
*/
public class AddManagedRepositoryAction
extends AbstractManagedRepositoriesAction

View File

@ -33,7 +33,7 @@ import java.io.IOException;
*
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="addRemoteRepositoryAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="addRemoteRepositoryAction" instantiation-strategy="per-lookup"
*/
public class AddRemoteRepositoryAction
extends AbstractRemoteRepositoriesAction

View File

@ -47,7 +47,7 @@ import java.util.Map;
* DeleteManagedRepositoryAction
*
* @version $Id$
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteManagedRepositoryAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteManagedRepositoryAction" instantiation-strategy="per-lookup"
*/
public class DeleteManagedRepositoryAction
extends AbstractManagedRepositoriesAction

View File

@ -33,7 +33,7 @@ import java.util.List;
*
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteRemoteRepositoryAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteRemoteRepositoryAction" instantiation-strategy="per-lookup"
*/
public class DeleteRemoteRepositoryAction
extends AbstractRemoteRepositoriesAction

View File

@ -29,7 +29,7 @@ import org.apache.maven.archiva.configuration.RepositoryGroupConfiguration;
* DeleteRepositoryGroupAction
*
* @version
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteRepositoryGroupAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteRepositoryGroupAction" instantiation-strategy="per-lookup"
*/
public class DeleteRepositoryGroupAction
extends AbstractRepositoriesAdminAction

View File

@ -36,7 +36,7 @@ import java.io.IOException;
*
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="editManagedRepositoryAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="editManagedRepositoryAction" instantiation-strategy="per-lookup"
*/
public class EditManagedRepositoryAction
extends AbstractManagedRepositoriesAction

View File

@ -33,7 +33,7 @@ import java.io.IOException;
*
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="editRemoteRepositoryAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="editRemoteRepositoryAction" instantiation-strategy="per-lookup"
*/
public class EditRemoteRepositoryAction
extends AbstractRemoteRepositoriesAction

View File

@ -48,7 +48,7 @@ import java.util.Map;
* Shows the Repositories Tab for the administrator.
*
* @version $Id$
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="repositoriesAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="repositoriesAction" instantiation-strategy="per-lookup"
*/
public class RepositoriesAction
extends PlexusActionSupport

View File

@ -39,7 +39,7 @@ import org.apache.maven.archiva.web.util.ContextUtils;
* RepositoryGroupsAction
*
* @version
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="repositoryGroupsAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="repositoryGroupsAction" instantiation-strategy="per-lookup"
*/
public class RepositoryGroupsAction
extends AbstractRepositoriesAdminAction

View File

@ -29,7 +29,7 @@ import org.apache.maven.archiva.configuration.RepositoryGroupConfiguration;
* SortRepositoriesAction
*
* @version
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="sortRepositoriesAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="sortRepositoriesAction" instantiation-strategy="per-lookup"
*/
public class SortRepositoriesAction
extends AbstractRepositoriesAdminAction

View File

@ -49,7 +49,7 @@ import java.util.Map;
* RepositoryScanningAction
*
* @version $Id$
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="repositoryScanningAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="repositoryScanningAction" instantiation-strategy="per-lookup"
*/
public class RepositoryScanningAction
extends PlexusActionSupport

View File

@ -69,7 +69,7 @@ import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
/**
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="generateReport"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="generateReport" instantiation-strategy="per-lookup"
*/
public class GenerateReportAction
extends PlexusActionSupport

View File

@ -1,4 +1,4 @@
package org.apache.maven.archiva.web.rss;
package org.apache.maven.archiva.security;
/*
* Licensed to the Apache Software Foundation (ASF) under one

View File

@ -0,0 +1,33 @@
package org.apache.maven.archiva.web.action;
/*
* 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.codehaus.plexus.spring.PlexusInSpringTestCase;
import com.opensymphony.xwork2.Action;
public class ShowArtifactActionTest
extends PlexusInSpringTestCase
{
public void testInstantiation()
{
assertFalse( lookup( Action.class, "showArtifactAction" ) == lookup( Action.class, "showArtifactAction" ) );
}
}

View File

@ -0,0 +1,44 @@
<!--
~ 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>org.apache.maven.archiva.database.ArchivaDAO</role>
<role-hint>jdo</role-hint>
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaDAOStub</implementation>
<requirements>
<requirement>
<role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role>
<field-name>configuration</field-name>
</requirement>
</requirements>
</component>
<component>
<role>org.apache.maven.archiva.security.UserRepositories</role>
<role-hint>default</role-hint>
<implementation>org.apache.maven.archiva.security.UserRepositoriesStub</implementation>
</component>
</components>
</plexus>

View File

@ -44,7 +44,7 @@
<component>
<role>org.apache.maven.archiva.security.UserRepositories</role>
<role-hint>default</role-hint>
<implementation>org.apache.maven.archiva.web.rss.UserRepositoriesStub</implementation>
<implementation>org.apache.maven.archiva.security.UserRepositoriesStub</implementation>
</component>
</components>
</plexus>