get RID of deprecated use of ArchivaRoleConstants and some plexus annotations

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1165521 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-09-06 07:21:43 +00:00
parent c6066ec4b2
commit 113fa60beb
13 changed files with 21 additions and 75 deletions

View File

@ -25,12 +25,12 @@ import com.sun.syndication.io.SyndFeedOutput;
import org.apache.archiva.metadata.repository.RepositorySession;
import org.apache.archiva.metadata.repository.RepositorySessionFactory;
import org.apache.archiva.rss.processor.RssFeedProcessor;
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.commons.codec.Decoder;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang.StringUtils;
import org.apache.archiva.security.AccessDeniedException;
import org.apache.archiva.security.ArchivaRoleConstants;
import org.apache.archiva.security.ArchivaSecurityException;
import org.apache.archiva.security.PrincipalNotFoundException;
import org.apache.archiva.security.ServletAuthenticator;

View File

@ -19,13 +19,13 @@ package org.apache.archiva.web.startup;
* under the License.
*/
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.common.ArchivaException;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.ConfigurationNames;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.archiva.security.ArchivaRoleConstants;
import org.codehaus.plexus.redback.rbac.RBACManager;
import org.codehaus.plexus.redback.rbac.RbacManagerException;
import org.codehaus.plexus.redback.rbac.UserAssignment;
@ -53,8 +53,6 @@ import java.util.Map.Entry;
* ConfigurationSynchronization
*
* @version $Id$
* plexus.component role="org.apache.archiva.web.startup.SecuritySynchronization"
* role-hint="default"
*/
@Service
public class SecuritySynchronization
@ -62,27 +60,15 @@ public class SecuritySynchronization
{
private Logger log = LoggerFactory.getLogger( SecuritySynchronization.class );
/**
* plexus.requirement role-hint="default"
*/
@Inject
private RoleManager roleManager;
/**
* plexus.requirement role-hint="cached"
*/
@Inject
@Named( value = "rBACManager#cached" )
private RBACManager rbacManager;
/**
* plexus.requirement role="org.codehaus.plexus.redback.system.check.EnvironmentCheck"
*/
private Map<String, EnvironmentCheck> checkers;
/**
* plexus.requirement
*/
@Inject
private ArchivaConfiguration archivaConfiguration;

View File

@ -21,8 +21,8 @@ package org.apache.maven.archiva.web.action.admin;
import org.apache.archiva.scheduler.repository.RepositoryArchivaTaskScheduler;
import org.apache.archiva.scheduler.repository.RepositoryTask;
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.commons.lang.StringUtils;
import org.apache.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.action.AbstractActionSupport;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.taskqueue.TaskQueueException;
@ -37,8 +37,6 @@ import javax.inject.Named;
/**
* Configures the application.
* <p/>
* plexus.component role="com.opensymphony.xwork2.Action" role-hint="schedulerAction" instantiation-strategy="per-lookup"
*/
@Controller( "schedulerAction" )
@Scope( "prototype" )
@ -46,9 +44,7 @@ public class SchedulerAction
extends AbstractActionSupport
implements SecureAction
{
/**
* plexus.requirement role="org.apache.archiva.scheduler.ArchivaTaskScheduler" role-hint="repository"
*/
@Inject
@Named( value = "archivaTaskScheduler#repository" )
private RepositoryArchivaTaskScheduler repositoryTaskScheduler;

View File

@ -20,8 +20,8 @@ package org.apache.maven.archiva.web.action.admin;
*/
import org.apache.archiva.repository.scanner.RepositoryScanner;
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.commons.lang.StringUtils;
import org.apache.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.action.AbstractActionSupport;
import org.codehaus.plexus.cache.Cache;
import org.codehaus.plexus.redback.rbac.Resource;
@ -40,7 +40,6 @@ import java.util.Map;
* Shows system status information for the administrator.
*
* @version $Id$
* plexus.component role="com.opensymphony.xwork2.Action" role-hint="systemStatus" instantiation-strategy="per-lookup"
*/
@Controller( "systemStatus" )
@Scope( "prototype" )

View File

@ -20,11 +20,11 @@ package org.apache.maven.archiva.web.action.admin.appearance;
*/
import com.opensymphony.xwork2.Validateable;
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.Configuration;
import org.apache.maven.archiva.configuration.IndeterminateConfigurationException;
import org.apache.maven.archiva.configuration.OrganisationInformation;
import org.apache.archiva.security.ArchivaRoleConstants;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.registry.RegistryException;
import org.codehaus.redback.integration.interceptor.SecureAction;
@ -35,9 +35,6 @@ import org.springframework.stereotype.Controller;
/**
* @version $Id: ConfigurationAction.java 480950 2006-11-30 14:58:35Z evenisse $
* plexus.component role="com.opensymphony.xwork2.Action"
* role-hint="editOrganisationInfo"
* instantiation-strategy="per-lookup"
*/
@Controller( "editOrganisationInfo" )
@Scope( "prototype" )

View File

@ -19,6 +19,7 @@ package org.apache.maven.archiva.web.action.admin.connectors.proxy;
* under the License.
*/
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.functors.NotPredicate;
import org.apache.commons.lang.StringUtils;
@ -27,7 +28,6 @@ import org.apache.maven.archiva.configuration.Configuration;
import org.apache.maven.archiva.configuration.IndeterminateConfigurationException;
import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
import org.apache.maven.archiva.configuration.functors.ProxyConnectorSelectionPredicate;
import org.apache.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.action.AbstractActionSupport;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.registry.RegistryException;
@ -51,9 +51,6 @@ public abstract class AbstractProxyConnectorAction
{
public static final String DIRECT_CONNECTION = "(direct connection)";
/**
* plexus.requirement
*/
@Inject
protected ArchivaConfiguration archivaConfiguration;

View File

@ -20,10 +20,10 @@ package org.apache.maven.archiva.web.action.admin.legacy;
*/
import com.opensymphony.xwork2.Preparable;
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.Configuration;
import org.apache.maven.archiva.configuration.LegacyArtifactPath;
import org.apache.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.action.AbstractActionSupport;
import org.apache.archiva.web.util.ContextUtils;
import org.apache.struts2.interceptor.ServletRequestAware;
@ -43,7 +43,6 @@ import java.util.List;
* Shows the LegacyArtifactPath Tab for the administrator.
*
* @since 1.1
* plexus.component role="com.opensymphony.xwork2.Action" role-hint="legacyArtifactPathAction" instantiation-strategy="per-lookup"
*/
@Controller( "legacyArtifactPathAction" )
@Scope( "prototype" )
@ -51,9 +50,7 @@ public class LegacyArtifactPathAction
extends AbstractActionSupport
implements SecureAction, ServletRequestAware, Preparable
{
/**
* plexus.requirement
*/
@Inject
private ArchivaConfiguration archivaConfiguration;

View File

@ -21,6 +21,7 @@ package org.apache.maven.archiva.web.action.admin.networkproxies;
import com.opensymphony.xwork2.Preparable;
import com.opensymphony.xwork2.Validateable;
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.functors.NotPredicate;
import org.apache.commons.lang.StringUtils;
@ -29,7 +30,6 @@ import org.apache.maven.archiva.configuration.Configuration;
import org.apache.maven.archiva.configuration.IndeterminateConfigurationException;
import org.apache.maven.archiva.configuration.NetworkProxyConfiguration;
import org.apache.maven.archiva.configuration.functors.NetworkProxySelectionPredicate;
import org.apache.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.action.AbstractActionSupport;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.registry.RegistryException;
@ -45,7 +45,6 @@ import javax.inject.Inject;
* ConfigureNetworkProxyAction
*
* @version $Id$
* plexus.component role="com.opensymphony.xwork2.Action" role-hint="configureNetworkProxyAction" instantiation-strategy="per-lookup"
*/
@Controller( "configureNetworkProxyAction" )
@Scope( "prototype" )
@ -53,9 +52,7 @@ public class ConfigureNetworkProxyAction
extends AbstractActionSupport
implements SecureAction, Preparable, Validateable
{
/**
* plexus.requirement
*/
@Inject
private ArchivaConfiguration archivaConfiguration;

View File

@ -20,9 +20,9 @@ package org.apache.maven.archiva.web.action.admin.networkproxies;
*/
import com.opensymphony.xwork2.Preparable;
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.NetworkProxyConfiguration;
import org.apache.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.action.AbstractActionSupport;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.redback.integration.interceptor.SecureAction;
@ -38,8 +38,6 @@ import java.util.List;
* NetworkProxiesAction
*
* @version $Id$
* <p/>
* plexus.component role="com.opensymphony.xwork2.Action" role-hint="networkProxiesAction" instantiation-strategy="per-lookup"
*/
@Controller( "networkProxiesAction" )
@Scope( "prototype" )
@ -47,9 +45,7 @@ public class NetworkProxiesAction
extends AbstractActionSupport
implements Preparable, SecureAction
{
/**
* plexus.requirement
*/
@Inject
private ArchivaConfiguration configuration;

View File

@ -22,7 +22,7 @@ package org.apache.maven.archiva.web.action.admin.repositories;
import org.apache.archiva.admin.repository.RepositoryCommonValidator;
import org.apache.archiva.admin.repository.managed.ManagedRepositoryAdmin;
import org.apache.archiva.audit.Auditable;
import org.apache.archiva.security.ArchivaRoleConstants;
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.Configuration;
import org.apache.maven.archiva.configuration.IndeterminateConfigurationException;
@ -52,9 +52,7 @@ public abstract class AbstractRepositoriesAdminAction
extends AbstractActionSupport
implements SecureAction, Auditable
{
/**
* plexus.requirement
*/
@Inject
protected ArchivaConfiguration archivaConfiguration;

View File

@ -25,12 +25,12 @@ import org.apache.archiva.metadata.repository.MetadataRepositoryException;
import org.apache.archiva.metadata.repository.RepositorySession;
import org.apache.archiva.metadata.repository.stats.RepositoryStatistics;
import org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager;
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.Configuration;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration;
import org.apache.maven.archiva.configuration.functors.RepositoryConfigurationComparator;
import org.apache.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.action.AbstractActionSupport;
import org.apache.archiva.web.util.ContextUtils;
import org.apache.struts2.interceptor.ServletRequestAware;
@ -53,7 +53,6 @@ import javax.servlet.http.HttpServletRequest;
* Shows the Repositories Tab for the administrator.
*
* @version $Id$
* plexus.component role="com.opensymphony.xwork2.Action" role-hint="repositoriesAction" instantiation-strategy="per-lookup"
*/
@Controller( "repositoriesAction" )
@Scope( "prototype" )
@ -61,9 +60,7 @@ public class RepositoriesAction
extends AbstractActionSupport
implements SecureAction, ServletRequestAware, Preparable
{
/**
* plexus.requirement
*/
@Inject
private ArchivaConfiguration archivaConfiguration;
@ -80,9 +77,7 @@ public class RepositoriesAction
*/
private String baseUrl;
/**
* plexus.requirement
*/
@Inject
private RepositoryStatisticsManager repositoryStatisticsManager;

View File

@ -24,6 +24,7 @@ import com.opensymphony.xwork2.Validateable;
import org.apache.archiva.audit.AuditEvent;
import org.apache.archiva.audit.Auditable;
import org.apache.archiva.repository.scanner.RepositoryContentConsumers;
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
@ -33,7 +34,6 @@ import org.apache.maven.archiva.configuration.IndeterminateConfigurationExceptio
import org.apache.maven.archiva.configuration.RepositoryScanningConfiguration;
import org.apache.maven.archiva.configuration.functors.FiletypeSelectionPredicate;
import org.apache.maven.archiva.configuration.functors.FiletypeToMapClosure;
import org.apache.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.action.AbstractActionSupport;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.registry.RegistryException;
@ -53,7 +53,6 @@ import java.util.Map;
* RepositoryScanningAction
*
* @version $Id$
* plexus.component role="com.opensymphony.xwork2.Action" role-hint="repositoryScanningAction" instantiation-strategy="per-lookup"
*/
@Controller( "repositoryScanningAction" )
@Scope( "prototype" )
@ -61,15 +60,10 @@ public class RepositoryScanningAction
extends AbstractActionSupport
implements Preparable, Validateable, SecureAction, Auditable
{
/**
* plexus.requirement
*/
@Inject
private ArchivaConfiguration archivaConfiguration;
/**
* plexus.requirement
*/
@Inject
private RepositoryContentConsumers repoconsumerUtil;

View File

@ -26,11 +26,11 @@ import org.apache.archiva.metadata.repository.RepositorySession;
import org.apache.archiva.metadata.repository.stats.RepositoryStatistics;
import org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager;
import org.apache.archiva.reports.RepositoryProblemFacet;
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateUtils;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.action.AbstractRepositoryBasedAction;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.redback.integration.interceptor.SecureAction;
@ -77,15 +77,9 @@ public class GenerateReportAction
private Logger log = LoggerFactory.getLogger( GenerateReportAction.class );
/**
* plexus.requirement
*/
@Inject
private ArchivaConfiguration archivaConfiguration;
/**
* plexus.requirement
*/
@Inject
private RepositoryStatisticsManager repositoryStatisticsManager;