* @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
/**
* 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
/**
* 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
*
* 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
* 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
/**
* 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
*
* @plexus.component role="com.opensymphony.xwork2.Action"
* role-hint="editOrganisationInfo"
+ * instantiation-strategy="per-lookup"
*/
public class EditOrganisationInfoAction
extends AbstractAppearanceAction
/**
* 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
*
* @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
*
* @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
/**
* 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
{
*
* @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
/**
* 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
{
*
* @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
*
* @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
* 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
* 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
*\r
*\r
* @since 1.1\r
- * @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteLegacyArtifactPathAction"\r
+ * @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteLegacyArtifactPathAction" instantiation-strategy="per-lookup"\r
*/\r
public class DeleteLegacyArtifactPathAction\r
extends PlexusActionSupport\r
* Shows the LegacyArtifactPath Tab for the administrator.\r
*\r
* @since 1.1\r
- * @plexus.component role="com.opensymphony.xwork2.Action" role-hint="legacyArtifactPathAction"\r
+ * @plexus.component role="com.opensymphony.xwork2.Action" role-hint="legacyArtifactPathAction" instantiation-strategy="per-lookup"\r
*/\r
public class LegacyArtifactPathAction\r
extends PlexusActionSupport\r
* 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
*
* @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
*
* @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
*
* @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
* 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
*
* @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
* 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
*
* @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
*
* @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
* 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
* 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
* 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
* 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
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
--- /dev/null
+package org.apache.maven.archiva.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 java.util.ArrayList;
+import java.util.List;
+
+import org.apache.maven.archiva.security.AccessDeniedException;
+import org.apache.maven.archiva.security.ArchivaSecurityException;
+import org.apache.maven.archiva.security.PrincipalNotFoundException;
+import org.apache.maven.archiva.security.UserRepositories;
+import org.codehaus.plexus.redback.rbac.RbacObjectNotFoundException;
+import org.codehaus.plexus.redback.rbac.RbacManagerException;
+
+/**
+ * UserRepositories stub used for testing.
+ *
+ * @version $Id$
+ */
+public class UserRepositoriesStub
+ implements UserRepositories
+{
+
+ public void createMissingRepositoryRoles( String repoId )
+ throws ArchivaSecurityException
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public List<String> getObservableRepositoryIds( String principal )
+ throws PrincipalNotFoundException, AccessDeniedException, ArchivaSecurityException
+ {
+ List<String> repoIds = new ArrayList<String>();
+ repoIds.add( "test-repo" );
+
+ return repoIds;
+ }
+
+ public boolean isAuthorizedToUploadArtifacts( String principal, String repoId )
+ throws PrincipalNotFoundException, ArchivaSecurityException
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isAuthorizedToDeleteArtifacts( String principal, String repoId )
+ throws RbacManagerException, RbacObjectNotFoundException
+ {
+ return false;
+ }
+
+}
--- /dev/null
+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" ) );
+ }
+}
+++ /dev/null
-package org.apache.maven.archiva.web.rss;
-
-/*
- * 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.ArrayList;
-import java.util.List;
-
-import org.apache.maven.archiva.security.AccessDeniedException;
-import org.apache.maven.archiva.security.ArchivaSecurityException;
-import org.apache.maven.archiva.security.PrincipalNotFoundException;
-import org.apache.maven.archiva.security.UserRepositories;
-import org.codehaus.plexus.redback.rbac.RbacObjectNotFoundException;
-import org.codehaus.plexus.redback.rbac.RbacManagerException;
-
-/**
- * UserRepositories stub used for testing.
- *
- * @version $Id$
- */
-public class UserRepositoriesStub
- implements UserRepositories
-{
-
- public void createMissingRepositoryRoles( String repoId )
- throws ArchivaSecurityException
- {
- // TODO Auto-generated method stub
-
- }
-
- public List<String> getObservableRepositoryIds( String principal )
- throws PrincipalNotFoundException, AccessDeniedException, ArchivaSecurityException
- {
- List<String> repoIds = new ArrayList<String>();
- repoIds.add( "test-repo" );
-
- return repoIds;
- }
-
- public boolean isAuthorizedToUploadArtifacts( String principal, String repoId )
- throws PrincipalNotFoundException, ArchivaSecurityException
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean isAuthorizedToDeleteArtifacts( String principal, String repoId )
- throws RbacManagerException, RbacObjectNotFoundException
- {
- return false;
- }
-
-}
--- /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>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>
<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>