Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

NEXUS-5639: URL change of the resources

Client is handled too
  • Loading branch information...
commit c2249e0f9f04dec29ba4b903095ea7ffc59c7904 1 parent 2dbec3c
@cstamas cstamas authored
View
16 .../java/org/sonatype/nexus/client/internal/rest/jersey/subsystem/routing/JerseyRouting.java
@@ -59,7 +59,7 @@ public Status getStatus( final String mavenRepositoryId )
try
{
final RoutingStatusMessage message =
- getNexusClient().serviceResource( wlPath( mavenRepositoryId ) ).get( RoutingStatusMessageWrapper.class ).getData();
+ getNexusClient().serviceResource( routingPath( mavenRepositoryId ) ).get( RoutingStatusMessageWrapper.class ).getData();
final DiscoveryStatus discoveryStatus;
if ( message.getDiscovery() == null )
@@ -98,7 +98,7 @@ public void updatePrefixFile( final String mavenProxyRepositoryId )
{
try
{
- getNexusClient().serviceResource( wlPath( mavenProxyRepositoryId ) ).delete();
+ getNexusClient().serviceResource( routingPath( mavenProxyRepositoryId ) ).delete();
}
catch ( UniformInterfaceException e )
{
@@ -117,7 +117,7 @@ public DiscoveryConfiguration getDiscoveryConfigurationFor( final String mavenPr
try
{
final RoutingConfigMessage message =
- getNexusClient().serviceResource( wlConfigPath( mavenProxyRepositoryId ) ).get(
+ getNexusClient().serviceResource( routingConfigPath( mavenProxyRepositoryId ) ).get(
RoutingConfigMessageWrapper.class ).getData();
return new DiscoveryConfiguration( message.isDiscoveryEnabled(), message.getDiscoveryIntervalHours() );
}
@@ -143,7 +143,7 @@ public void setDiscoveryConfigurationFor( final String mavenProxyRepositoryId,
message.setDiscoveryIntervalHours( configuration.getIntervalHours() );
final RoutingConfigMessageWrapper wrapper = new RoutingConfigMessageWrapper();
wrapper.setData( message );
- getNexusClient().serviceResource( wlConfigPath( mavenProxyRepositoryId ) ).put( wrapper );
+ getNexusClient().serviceResource( routingConfigPath( mavenProxyRepositoryId ) ).put( wrapper );
}
catch ( UniformInterfaceException e )
{
@@ -157,11 +157,11 @@ public void setDiscoveryConfigurationFor( final String mavenProxyRepositoryId,
// ==
- static String wlPath( final String mavenRepositoryId )
+ static String routingPath( final String mavenRepositoryId )
{
try
{
- return "repositories/" + URLEncoder.encode( mavenRepositoryId, "UTF-8" ) + "/wl";
+ return "repositories/" + URLEncoder.encode( mavenRepositoryId, "UTF-8" ) + "/routing";
}
catch ( UnsupportedEncodingException e )
{
@@ -169,8 +169,8 @@ static String wlPath( final String mavenRepositoryId )
}
}
- static String wlConfigPath( final String mavenRepositoryId )
+ static String routingConfigPath( final String mavenRepositoryId )
{
- return wlPath( mavenRepositoryId ) + "/config";
+ return routingPath( mavenRepositoryId ) + "/config";
}
}
View
14 .../Sonatype/repoServer/RepositoryWLPanel.js → ...type/repoServer/RepositoryRoutingPanel.js
@@ -11,7 +11,7 @@
* Eclipse Foundation. All other trademarks are the property of their respective owners.
*/
/*global define, Ext, Nexus, Sonatype, NX*/
-NX.define('Sonatype.repoServer.RepositoryWLPanel', {
+NX.define('Sonatype.repoServer.RepositoryRoutingPanel', {
extend : 'Nexus.ext.FormPanel',
requirejs : ['Nexus/config'],
@@ -67,7 +67,7 @@ NX.define('Sonatype.repoServer.RepositoryWLPanel', {
}
// should be static, but Sonatype.config is not defined yet when statics are defined (before requirejs dep resolution)
- this.resourceUrl = new Ext.Template(Sonatype.config.repos.urls.repositories + "/{0}/wl").compile();
+ this.resourceUrl = new Ext.Template(Sonatype.config.repos.urls.repositories + "/{0}/routing").compile();
var
self = this,
@@ -97,13 +97,13 @@ NX.define('Sonatype.repoServer.RepositoryWLPanel', {
load : {
'publishedStatus' : function(value) {
self.publishedStatus = value;
- var store = Sonatype.repoServer.RepositoryWLPanel.publishStatusStore;
+ var store = Sonatype.repoServer.RepositoryRoutingPanel.publishStatusStore;
return store.getAt(store.find('value', value)).get('text');
},
'discovery.discoveryLastStatus' : function(value) {
self.discoveryStatus = value;
- var store = Sonatype.repoServer.RepositoryWLPanel.discoveryStatusStore;
+ var store = Sonatype.repoServer.RepositoryRoutingPanel.discoveryStatusStore;
return store.getAt(store.find('value', value)).get('text');
},
@@ -217,7 +217,7 @@ NX.define('Sonatype.repoServer.RepositoryWLPanel', {
xtype : 'combo',
fieldLabel : 'Update interval',
name : 'discovery.discoveryIntervalHours',
- store : Sonatype.repoServer.RepositoryWLPanel.discoveryUpdateIntervalStore,
+ store : Sonatype.repoServer.RepositoryRoutingPanel.discoveryUpdateIntervalStore,
displayField : 'intervalLabel',
valueField : 'valueHrs',
emptyText : 'Select...',
@@ -248,7 +248,7 @@ NX.define('Sonatype.repoServer.RepositoryWLPanel', {
}
];
- Sonatype.repoServer.RepositoryWLPanel.superclass.constructor.apply(self, arguments);
+ Sonatype.repoServer.RepositoryRoutingPanel.superclass.constructor.apply(self, arguments);
self.on('actioncomplete', self.onActionComplete);
},
@@ -399,7 +399,7 @@ NX.define('Sonatype.repoServer.RepositoryWLPanel', {
if (!newRecord && maven2FormatRepo && notShadowType &&
( sp.checkPermission('nexus:repositories', sp.CREATE) || sp.checkPermission('nexus:repositories', sp.DELETE) || sp.checkPermission('nexus:repositories', sp.EDIT) )) {
- cardPanel.add(new Sonatype.repoServer.RepositoryWLPanel({
+ cardPanel.add(new Sonatype.repoServer.RepositoryRoutingPanel({
tabTitle : 'Routing',
name : 'routing',
payload : rec
View
2  nexus-webapp/src/main/webapp/js/repoServer.js
@@ -31,7 +31,7 @@ define('repoServer',
'repoServer/SchedulesEditPanel',
'repoServer/UserBrowserPanel',
'repoServer/UserPrivilegeBrowserPanel',
- 'Sonatype/repoServer/RepositoryWLPanel',
+ 'Sonatype/repoServer/RepositoryRoutingPanel',
'Sonatype/repoServer/ServerEditPanel',
'Sonatype/repoServer/ConfigViewPanel',
'Sonatype/repoServer/DefaultUserEditor',
View
4 ...restlet1x-plugin/src/main/java/org/sonatype/nexus/rest/routing/RoutingConfigResource.java
@@ -53,7 +53,7 @@
/**
* REST resource URI.
*/
- public static final String RESOURCE_URI = "/repositories/{" + REPOSITORY_ID_KEY + "}/wl/config";
+ public static final String RESOURCE_URI = "/repositories/{" + REPOSITORY_ID_KEY + "}/routing/config";
@Override
public Object getPayloadInstance()
@@ -70,7 +70,7 @@ public String getResourceUri()
@Override
public PathProtectionDescriptor getResourceProtection()
{
- return new PathProtectionDescriptor( "/repositories/*/wl/config", "authcBasic,perms[nexus:repositories]" );
+ return new PathProtectionDescriptor( "/repositories/*/routing/config", "authcBasic,perms[nexus:repositories]" );
}
/**
View
4 ...restlet1x-plugin/src/main/java/org/sonatype/nexus/rest/routing/RoutingStatusResource.java
@@ -63,7 +63,7 @@
/**
* REST resource URI.
*/
- public static final String RESOURCE_URI = "/repositories/{" + REPOSITORY_ID_KEY + "}/wl";
+ public static final String RESOURCE_URI = "/repositories/{" + REPOSITORY_ID_KEY + "}/routing";
@Requirement( hint = "RestletRepositoryUrlBuilder" )
private RepositoryURLBuilder repositoryURLBuilder;
@@ -83,7 +83,7 @@ public String getResourceUri()
@Override
public PathProtectionDescriptor getResourceProtection()
{
- return new PathProtectionDescriptor( "/repositories/*/wl", "authcBasic,perms[nexus:repositories]" );
+ return new PathProtectionDescriptor( "/repositories/*/routing", "authcBasic,perms[nexus:repositories]" );
}
@Override
Please sign in to comment.
Something went wrong with that request. Please try again.