fix naming use redback as part of the name as it concerns redback only

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1423666 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-12-18 21:19:43 +00:00
parent 9736ffc636
commit f11c956b8b
6 changed files with 22 additions and 24 deletions

View File

@ -40,11 +40,11 @@ import java.util.List;
@Path("/archivaRuntimeConfigurationService/")
public interface ArchivaRuntimeConfigurationService
{
@Path("archivaRuntimeConfiguration")
@Path("redbackRuntimeConfiguration")
@GET
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
RedbackRuntimeConfiguration getArchivaRuntimeConfigurationAdmin()
RedbackRuntimeConfiguration getRedbackRuntimeConfigurationAdmin()
throws ArchivaRestServiceException;
@Path("redbackRuntimeConfiguration")
@ -52,7 +52,7 @@ public interface ArchivaRuntimeConfigurationService
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
Boolean updateArchivaRuntimeConfiguration( RedbackRuntimeConfiguration redbackRuntimeConfiguration )
Boolean updateRedbackRuntimeConfiguration( RedbackRuntimeConfiguration redbackRuntimeConfiguration )
throws ArchivaRestServiceException;
@Path("userManagerImplementationInformation")

View File

@ -71,7 +71,7 @@ public class DefaultArchivaRuntimeConfigurationService
@Named(value = "ldapConnectionFactory#configurable")
private LdapConnectionFactory ldapConnectionFactory;
public RedbackRuntimeConfiguration getArchivaRuntimeConfigurationAdmin()
public RedbackRuntimeConfiguration getRedbackRuntimeConfigurationAdmin()
throws ArchivaRestServiceException
{
try
@ -84,7 +84,7 @@ public class DefaultArchivaRuntimeConfigurationService
}
}
public Boolean updateArchivaRuntimeConfiguration( RedbackRuntimeConfiguration redbackRuntimeConfiguration )
public Boolean updateRedbackRuntimeConfiguration( RedbackRuntimeConfiguration redbackRuntimeConfiguration )
throws ArchivaRestServiceException
{
try

View File

@ -38,7 +38,7 @@ public class ArchivaRuntimeConfigurationServiceTest
throws Exception
{
RedbackRuntimeConfiguration redbackRuntimeConfiguration =
getArchivaRuntimeConfigurationService().getArchivaRuntimeConfigurationAdmin();
getArchivaRuntimeConfigurationService().getRedbackRuntimeConfigurationAdmin();
assertEquals( "jdo", redbackRuntimeConfiguration.getUserManagerImpls().get( 0 ) );
}
@ -47,14 +47,14 @@ public class ArchivaRuntimeConfigurationServiceTest
throws Exception
{
RedbackRuntimeConfiguration redbackRuntimeConfiguration =
getArchivaRuntimeConfigurationService().getArchivaRuntimeConfigurationAdmin();
getArchivaRuntimeConfigurationService().getRedbackRuntimeConfigurationAdmin();
assertEquals( "jdo", redbackRuntimeConfiguration.getUserManagerImpls().get( 0 ) );
redbackRuntimeConfiguration.setUserManagerImpls( Arrays.asList( "foo" ) );
getArchivaRuntimeConfigurationService().updateArchivaRuntimeConfiguration( redbackRuntimeConfiguration );
getArchivaRuntimeConfigurationService().updateRedbackRuntimeConfiguration( redbackRuntimeConfiguration );
redbackRuntimeConfiguration = getArchivaRuntimeConfigurationService().getArchivaRuntimeConfigurationAdmin();
redbackRuntimeConfiguration = getArchivaRuntimeConfigurationService().getRedbackRuntimeConfigurationAdmin();
assertEquals( "foo", redbackRuntimeConfiguration.getUserManagerImpls().get( 0 ) );
}

View File

@ -549,9 +549,8 @@ docs.rest.header=REST Apis Documentations
menu.docs=Documentation
#runtime configuration
runtime-configuration.title=Redback Runtime Configuration
runtime-configuration.usermanager.label=User Manager Implementation
archiva-runtime-configuration.updated=Redback Runtime Configuration updated.
redback-runtime-configuration.title=Redback Runtime Configuration
redback-runtime-configuration.updated=Redback Runtime Configuration updated.
archiva.redback.usermanager.ldap=LDAP User Manager
archiva.redback.usermanager.jdo=Database User Manager
redback.runtime.properties.help.title=Property Description

View File

@ -1175,7 +1175,6 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
var redbackRuntimeConfiguration =
new RedbackRuntimeConfiguration(data.userManagerImpls,mapLdapConfiguration(data.ldapConfiguration),data.migratedFromRedbackConfiguration);
var configurationPropertiesEntries = data.configurationPropertiesEntries == null ? []: $.each(data.configurationPropertiesEntries,function(item){
return new Entry(item.key, item.value,function(newValue){
redbackRuntimeConfiguration.modified(true);
@ -1351,9 +1350,9 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
self.redbackRuntimeConfiguration().modified(true);
}
saveArchivaRuntimeConfiguration=function(){
$.log("saveArchivaRuntimeConfiguration");
var saveButton = $("#archiva-runtime-configuration-save" );
saveRedbackRuntimeConfiguration=function(){
$.log("saveRedbackRuntimeConfiguration");
var saveButton = $("#redback-runtime-configuration-save" );
saveButton.button('loading');
clearUserMessages();
var userMessages=$("#user-messages");
@ -1367,14 +1366,14 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
}
$.log("length:"+self.redbackRuntimeConfiguration().userManagerImpls().length);
$.log("json:"+ko.toJSON(self.redbackRuntimeConfiguration));
$.ajax("restServices/archivaServices/archivaRuntimeConfigurationService/archivaRuntimeConfiguration",
$.ajax("restServices/archivaServices/archivaRuntimeConfigurationService/redbackRuntimeConfiguration",
{
type: "PUT",
contentType: 'application/json',
data:ko.toJSON(self.redbackRuntimeConfiguration),
dataType: 'json',
success: function(data) {
var message=$.i18n.prop('archiva-runtime-configuration.updated');
var message=$.i18n.prop('redback-runtime-configuration.updated');
displaySuccessMessage(message);
},
error: function(data) {
@ -1423,7 +1422,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
dataType: 'json',
success: function(data) {
var userManagerImplementationInformations=mapUserManagerImplementationInformations(data);
$.ajax("restServices/archivaServices/archivaRuntimeConfigurationService/archivaRuntimeConfiguration", {
$.ajax("restServices/archivaServices/archivaRuntimeConfigurationService/redbackRuntimeConfiguration", {
type: "GET",
dataType: 'json',
success: function(data) {

View File

@ -888,13 +888,13 @@
<script type="text/html" id="runtime-configuration-main">
<div class="page-header">
<h2>${$.i18n.prop('runtime-configuration.title')}</h2>
<h2>${$.i18n.prop('redback-runtime-configuration.title')}</h2>
</div>
<div id="runtime-configuration-content" data-bind='template: {name:"runtime-configuration-content-tmpl"}'>
<div id="runtime-configuration-content" data-bind='template: {name:"redback-runtime-configuration-content-tmpl"}'>
</div>
</script>
<script type="text/html" id="runtime-configuration-content-tmpl">
<script type="text/html" id="redback-runtime-configuration-content-tmpl">
<ul class="nav nav-tabs">
<li class="active" id="redback-runtime-general-li"><a href="#redback-runtime-general-content" data-toggle="tab">${$.i18n.prop('redback.runtime.general.title')}</a></li>
<li id="redback-runtime-ldap-li"><a href="#redback-runtime-ldap-content" data-toggle="tab">${$.i18n.prop('redback.runtime.ldap.title')}</a></li>
@ -1044,8 +1044,8 @@
</div>
<div>
<button data-bind="click: saveArchivaRuntimeConfiguration,css:{ 'btn-warning': redbackRuntimeConfiguration().modified() | redbackRuntimeConfiguration().ldapConfiguration().modified() }"
id="archiva-runtime-configuration-save"class="btn">${$.i18n.prop('save')}</button>
<button data-bind="click: saveRedbackRuntimeConfiguration,css:{ 'btn-warning': redbackRuntimeConfiguration().modified() | redbackRuntimeConfiguration().ldapConfiguration().modified() }"
id="redback-archiva-runtime-configuration-save"class="btn">${$.i18n.prop('save')}</button>
</div>
</script>