return ERROR;
}
+ String result = SUCCESS;
if ( StringUtils.equals( mode, "delete-entry" ) || StringUtils.equals( mode, "delete-contents" ) )
{
AdminRepositoryConfiguration existingRepository = getRepository();
try
{
removeRepository( getRepoid() );
- removeRepositoryRoles( existingRepository );
- saveConfiguration();
+ result = saveConfiguration();
- if ( StringUtils.equals( mode, "delete-contents" ) )
+ if ( result.equals( SUCCESS ) )
{
- removeContents( existingRepository );
+ removeRepositoryRoles( existingRepository );
+ if ( StringUtils.equals( mode, "delete-contents" ) )
+ {
+ removeContents( existingRepository );
+ }
}
}
catch ( IOException e )
{
addActionError( "Unable to delete repository: " + e.getMessage() );
+ result = INPUT;
}
catch ( RoleManagerException e )
{
addActionError( "Unable to delete repository: " + e.getMessage() );
+ result = INPUT;
}
catch ( InvalidConfigurationException e )
{
addActionError( "Unable to delete repository: " + e.getMessage() );
+ result = INPUT;
}
catch ( RegistryException e )
{
addActionError( "Unable to delete repository: " + e.getMessage() );
+ result = INPUT;
}
}
- return SUCCESS;
+ return result;
}
public String edit()
removeRepository( repoId );
}
+ String result;
try
{
addRepository( getRepository() );
- saveConfiguration();
+ result = saveConfiguration();
}
catch ( IOException e )
{
addActionError( "I/O Exception: " + e.getMessage() );
+ result = INPUT;
}
catch ( RoleManagerException e )
{
addActionError( "Role Manager Exception: " + e.getMessage() );
+ result = INPUT;
}
catch ( InvalidConfigurationException e )
{
addActionError( "Invalid Configuration Exception: " + e.getMessage() );
+ result = INPUT;
}
catch ( RegistryException e )
{
addActionError( "Configuration Registry Exception: " + e.getMessage() );
+ result = INPUT;
}
- return SUCCESS;
+ return result;
}
private boolean validateFields( String mode )
catch ( IndeterminateConfigurationException e )
{
addActionError( e.getMessage() );
+ return INPUT;
}
return SUCCESS;
<action name="saveRepository" class="configureRepositoryAction" method="save">
<result name="success" type="redirect-action">repositories</result>
- <result name="input">/WEB-INF/jsp/admin/addRepository.jsp</result>
+ <result name="input">/WEB-INF/jsp/admin/editRepository.jsp</result>
<result name="error">/WEB-INF/jsp/admin/editRepository.jsp</result>
<interceptor-ref name="configuredPrepareParamsStack"/>
</action>
<h1>Admin: Delete Network Proxy</h1>
+<ww:actionerror/>
+
<div id="contentArea">
<h2>Delete Network Proxy</h2>
<blockquote>
<strong><span class="statusFailed">WARNING:</span> This operation can not be undone.</strong>
</blockquote>
-
+
<p>
- Are you sure you want to delete network proxy <code>${proxyid}</code> ?
+ Are you sure you want to delete network proxy <code>${proxyid}</code> ?
</p>
<ww:form method="post" action="deleteNetworkProxy!delete" namespace="/admin" validate="true">
<h1>Admin: Delete Proxy Connector</h1>
+<ww:actionerror/>
+
<div id="contentArea">
<h2>Delete Proxy Connector</h2>
<blockquote>
<strong><span class="statusFailed">WARNING:</span> This operation can not be undone.</strong>
</blockquote>
-
+
<p>
- Are you sure you want to delete proxy connector <code>[ ${source} , ${target} ]</code> ?
+ Are you sure you want to delete proxy connector <code>[ ${source} , ${target} ]</code> ?
</p>
<ww:form method="post" action="deleteProxyConnector!delete" namespace="/admin" validate="true">
<ww:hidden name="target"/>
- <ww:hidden name="source"/>
+ <ww:hidden name="source"/>
<ww:submit value="Delete"/>
</ww:form>
</div>
<h1>Admin: Edit Repository</h1>
+<ww:actionerror/>
+
<div id="contentArea">
<h2>Edit Repository</h2>
<ww:actionmessage/>
<ww:form method="post" action="saveRepository" namespace="/admin" validate="false">
- <ww:hidden name="mode" value="edit"/>
+ <ww:hidden name="mode" value="edit"/>
<ww:hidden name="repository.id"/>
<%@ include file="/WEB-INF/jsp/admin/include/repositoryForm.jspf" %>
<ww:submit value="Update Repository"/>