*/
public class DeleteRepositoryGroupAction
extends AbstractRepositoriesAdminAction
+ implements Preparable
{
private RepositoryGroupConfiguration repositoryGroup;
private String repoGroupId;
private boolean cancel;
+
+ public void prepare()
+ {
+ if ( StringUtils.isNotBlank( repoGroupId ) )
+ {
+ this.repositoryGroup = archivaConfiguration.getConfiguration().findRepositoryGroupById( repoGroupId );
+ }
+ }
public String confirmDelete()
{
addActionError( "Unable to delete repository group: repository id was blank." );
return ERROR;
}
- else
- {
- this.repositoryGroup = archivaConfiguration.getConfiguration().findRepositoryGroupById( repoGroupId );
- }
return INPUT;
}
<action name="editProxyConnector" class="editProxyConnectorAction" method="input">
<result name="input">/WEB-INF/jsp/admin/editProxyConnector.jsp</result>
<result name="success" type="redirectAction">proxyConnectors</result>
- <interceptor-ref name="configuredArchivaStack">
- <param name="params.acceptParamNames">\w+((\.\w+)|(\[\d+\])|(\(\d+\))|(\['[-\w]+'\])|(\('\w+'\)))*</param>
- </interceptor-ref>
+ <interceptor-ref name="configuredPrepareParamsStack" />
</action>
<action name="editProxyConnector_*" class="editProxyConnectorAction" method="{1}">
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null );
auditLogsDaoControl.replay();
- String status = action.deleteEntry();
+ String status = action.delete();
auditLogsDaoControl.verify();
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null );
auditLogsDaoControl.replay();
-
- String status = action.deleteContents();
+
+ action.setDeleteContents( Boolean.TRUE.toString() );
+ String status = action.delete();
auditLogsDaoControl.verify();
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null );
auditLogsDaoControl.replay();
-
- String status = action.deleteContents();
+
+ action.setDeleteContents( Boolean.TRUE.toString() );
+ String status = action.delete();
auditLogsDaoControl.verify();
assertEquals( Action.SUCCESS, status );
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null );
auditLogsDaoControl.replay();
-
- String status = action.deleteContents();
+
+ action.setDeleteContents( Boolean.TRUE.toString() );
+ String status = action.delete();
assertEquals( Action.SUCCESS, status );
auditLogsDaoControl.verify();