Permalink
Browse files

NEXUS-5639: "Deep" rename WL to Routing

Initial code changes, bundle smoke tested and is working.

Tests and ITs not verified yet.
  • Loading branch information...
1 parent a7444cd commit 2dbec3c14b99ba2ac92b698a7d4a5023981be033 @cstamas cstamas committed Mar 28, 2013
Showing with 989 additions and 1,047 deletions.
  1. +22 −24 ...e-testsuite/src/test/java/org/sonatype/nexus/client/testsuite/{WhitelistIT.java → RoutingIT.java}
  2. +2 −2 ...n/java/org/sonatype/nexus/client/core/subsystem/{whitelist → routing}/DiscoveryConfiguration.java
  3. +9 −9 ...n/java/org/sonatype/nexus/client/core/subsystem/{whitelist/Whitelist.java → routing/Routing.java}
  4. +5 −5 ...ent-core/src/main/java/org/sonatype/nexus/client/core/subsystem/{whitelist → routing}/Status.java
  5. +22 −22 ...ient/internal/rest/jersey/subsystem/{whitelist/JerseyWhitelist.java → routing/JerseyRouting.java}
  6. +9 −9 ...type/nexus/client/rest/jersey/subsystem/{JerseyWhitelistFactory.java → JerseyRoutingFactory.java}
  7. +4 −4 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/AbstractMavenRepository.java
  8. +2 −2 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/{wl/WLConfig.java → routing/Config.java}
  9. +3 −3 ...in/java/org/sonatype/nexus/proxy/maven/{wl/WLDiscoveryConfig.java → routing/DiscoveryConfig.java}
  10. +4 −4 ...in/java/org/sonatype/nexus/proxy/maven/{wl/WLDiscoveryStatus.java → routing/DiscoveryStatus.java}
  11. +15 −15 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/{wl/WLManager.java → routing/Manager.java}
  12. +1 −1 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/PrefixSource.java
  13. +1 −1 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/ProxyRequestFilter.java
  14. +3 −3 .../java/org/sonatype/nexus/proxy/maven/{wl/WLPublishingStatus.java → routing/PublishingStatus.java}
  15. +8 −8 ...core/src/main/java/org/sonatype/nexus/proxy/maven/{wl/WLStatus.java → routing/RoutingStatus.java}
  16. +1 −1 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/WritablePrefixSource.java
  17. +2 −2 ...s-core/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/discovery/DiscoveryResult.java
  18. +1 −1 ...src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/discovery/LocalContentDiscoverer.java
  19. +1 −1 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/discovery/Prioritized.java
  20. +1 −1 ...rc/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/discovery/RemoteContentDiscoverer.java
  21. +1 −1 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/discovery/RemoteStrategy.java
  22. +1 −1 ...rc/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/discovery/StrategyFailedException.java
  23. +2 −2 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/discovery/StrategyResult.java
  24. +4 −4 ...n/{wl/events/AbstractWLRepositoryEvent.java → routing/events/AbstractRoutingRepositoryEvent.java}
  25. +11 −11 .../events/WLPublishedRepositoryEvent.java → routing/events/PrefixFilePublishedRepositoryEvent.java}
  26. +6 −6 ...nts/WLUnpublishedRepositoryEvent.java → routing/events/PrefixFileUnpublishedRepositoryEvent.java}
  27. +2 −2 ...ore/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/AbstractPrioritized.java
  28. +2 −2 .../src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/AbstractRemoteStrategy.java
  29. +2 −2 ...e/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/ArrayListPrefixSource.java
  30. +15 −15 ...org/sonatype/nexus/proxy/maven/{wl/internal/WLConfigImpl.java → routing/internal/ConfigImpl.java}
  31. +13 −13 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/EventDispatcher.java
  32. +9 −9 ...s-core/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/FilePrefixSource.java
  33. +1 −1 ...e/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/InvalidInputException.java
  34. +6 −6 .../main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/LocalContentDiscovererImpl.java
  35. +92 −92 ...g/sonatype/nexus/proxy/maven/{wl/internal/WLManagerImpl.java → routing/internal/ManagerImpl.java}
  36. +1 −1 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/PathMatcher.java
  37. +6 −6 ...in/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/PropfileDiscoveryStatusSource.java
  38. +32 −32 .../src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/ProxyRequestFilterImpl.java
  39. +7 −7 ...main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/RemoteContentDiscovererImpl.java
  40. +10 −10 ...rc/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/RemotePrefixFileStrategy.java
  41. +10 −10 ...re/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/RemoteScrapeStrategy.java
  42. +3 −3 ...n/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/TextFilePrefixSourceMarshaller.java
  43. +6 −6 ...en/{wl/internal/WLUpdateRepositoryRunnable.java → routing/internal/UpdateRepositoryRunnable.java}
  44. +9 −9 ...ain/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/WritablePrefixSourceModifier.java
  45. +5 −5 .../sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/AbstractGeneratedIndexPageScraper.java
  46. +3 −3 .../src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/AbstractScraper.java
  47. +1 −1 ...main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/AmazonS3IndexScraper.java
  48. +1 −1 ...rc/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/HttpdIndexScraper.java
  49. +1 −1 ...ore/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/NexusScraper.java
  50. +1 −1 ...rc/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/NginxIndexScraper.java
  51. +1 −1 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/Page.java
  52. +2 −2 ...re/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/ScrapeContext.java
  53. +2 −2 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/Scraper.java
  54. +1 −1 .../src/main/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/SvnIndexScraper.java
  55. +4 −4 nexus-core/src/test/java/org/sonatype/nexus/NexusAppTestSupport.java
  56. +3 −3 nexus-core/src/test/java/org/sonatype/nexus/proxy/RequestFlagsTest.java
  57. +8 −7 ...oxy/maven/{wl/internal/AbstractWLProxyTest.java → routing/internal/AbstractRoutingProxyTest.java}
  58. +1 −1 ...src/test/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/GenerateRandomBehaviour.java
  59. +5 −5 ...t/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/LocalContentDiscovererImplTest.java
  60. +2 −1 nexus-core/src/test/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/PathMatcherTest.java
  61. +8 −8 ...roxy/maven/{wl/internal/WLMaintenanceTest.java → routing/internal/PrefixFileMaintenanceTest.java}
  62. +19 −19 ...UpdatePropagationContentTest.java → routing/internal/PrefixFileUpdatePropagationContentTest.java}
  63. +9 −9 ...agationGroupUpdatesTest.java → routing/internal/PrefixFileUpdatePropagationGroupUpdatesTest.java}
  64. +10 −10 ...wl/internal/WLUpdatePropagationTest.java → routing/internal/PrefixFileUpdatePropagationTest.java}
  65. +8 −7 ...ava/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/PropfileDiscoveryStatusSourceTest.java
  66. +7 −5 .../test/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/ProxyRequestFilterImplTest.java
  67. +31 −30 .../java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/RemoteContentDiscovererImplTest.java
  68. +7 −5 ...st/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/RemotePrefixFileIsGarbageTest.java
  69. +6 −5 ...est/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/RemotePrefixFileStrategyTest.java
  70. +4 −3 ...rc/test/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/RemoteScrapeStrategyTest.java
  71. +26 −25 ...y/maven/{wl/internal/WLAndLocalStatusTest.java → routing/internal/RoutingAndLocalStatusTest.java}
  72. +26 −25 ...proxy/maven/{wl/internal/WLAndProxyModeTest.java → routing/internal/RoutingAndProxyModeTest.java}
  73. +4 −2 ...va/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/TextFilePrefixSourceMarshallerTest.java
  74. +4 −3 ...java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/WritablePrefixSourceModifierTest.java
  75. +6 −2 .../java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/AmazonS3IndexScraperTest.java
  76. +1 −1 ...src/test/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/DeliverBehaviour.java
  77. +1 −1 .../java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/DeliverTemplateBehaviour.java
  78. +5 −2 ...src/test/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/NexusScraperTest.java
  79. +4 −2 nexus-core/src/test/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/PageTest.java
  80. +5 −2 .../test/java/org/sonatype/nexus/proxy/maven/{wl → routing}/internal/scrape/SvnIndexScraperTest.java
  81. +19 −19 ...suite/src/test/java/core/{whitelist/WhitelistDisabledSmokeIT.java → routing/DisabledSmokeIT.java}
  82. +14 −14 ...WhitelistEnableDisableDoesNotLoosePeriodIT.java → routing/EnableDisableDoesNotLoosePeriodIT.java}
  83. +24 −24 ...ore-testsuite/src/test/java/core/{whitelist/WhitelistFilteringIT.java → routing/FilteringIT.java}
  84. +119 −0 nexus-test/nexus-core-testsuite/src/test/java/core/routing/ITSupport.java
  85. +11 −11 ...exus-core-testsuite/src/test/java/core/{whitelist/WhitelistSanityIT.java → routing/SanityIT.java}
  86. +23 −23 .../nexus-core-testsuite/src/test/java/core/{whitelist/WhitelistSmokeIT.java → routing/SmokeIT.java}
  87. +13 −13 ...st/java/core/{whitelist/WhitelistWithGroupRepositoryIT.java → routing/WithGroupRepositoryIT.java}
  88. +7 −8 .../java/core/{whitelist/WhitelistWithHostedRepositoryIT.java → routing/WithHostedRepositoryIT.java}
  89. +16 −16 ...st/java/core/{whitelist/WhitelistWithProxyRepositoryIT.java → routing/WithProxyRepositoryIT.java}
  90. +0 −202 nexus-test/nexus-core-testsuite/src/test/java/core/whitelist/WhitelistITSupport.java
  91. +9 −9 ...hitelist/api/WhitelistWaitForPlexusResource.java → routing/api/RoutingWaitForPlexusResource.java}
  92. +2 −2 ...test-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus3860/AbstractCargoIT.java
  93. +2 −2 ...t/nexus-test-harness-launcher/src/main/java/org/sonatype/nexus/test/booter/Jetty8NexusBooter.java
  94. +11 −11 ...-client/src/main/java/org/sonatype/nexus/testsuite/client/{WhitelistTest.java → RoutingTest.java}
  95. +5 −4 ...exception/{WhitelistJobsAreStillRunningException.java → RoutingJobsAreStillRunningException.java}
  96. +15 −15 .../org/sonatype/nexus/testsuite/client/internal/{JerseyWhitelistTest.java → JerseyRoutingTest.java}
  97. +9 −9 ...e/client/rest/{JerseyWhitelistTestSubsystemFactory.java → JerseyRoutingTestSubsystemFactory.java}
  98. +6 −6 ...s-restlet1x-model/src/main/java/org/sonatype/nexus/rest/model/XStreamConfiguratorLightweight.java
  99. +21 −21 plugins/restlet1x/nexus-restlet1x-model/src/main/mdo/vos.xml
  100. +21 −21 ...ain/java/org/sonatype/nexus/rest/{mwl/WLConfigResource.java → routing/RoutingConfigResource.java}
  101. +8 −8 ...n/java/org/sonatype/nexus/rest/{mwl/WLResourceSupport.java → routing/RoutingResourceSupport.java}
  102. +26 −26 ...ain/java/org/sonatype/nexus/rest/{mwl/WLStatusResource.java → routing/RoutingStatusResource.java}
  103. +9 −9 .../org/sonatype/nexus/rest/{mwl/WLStatusResourceTest.java → routing/RoutingStatusResourceTest.java}
@@ -20,46 +20,44 @@
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
-import java.util.concurrent.TimeUnit;
-
import org.junit.Test;
import org.sonatype.nexus.client.core.exception.NexusClientBadRequestException;
import org.sonatype.nexus.client.core.exception.NexusClientNotFoundException;
-import org.sonatype.nexus.client.core.subsystem.whitelist.DiscoveryConfiguration;
-import org.sonatype.nexus.client.core.subsystem.whitelist.Status;
-import org.sonatype.nexus.client.core.subsystem.whitelist.Status.Outcome;
-import org.sonatype.nexus.client.core.subsystem.whitelist.Whitelist;
+import org.sonatype.nexus.client.core.subsystem.routing.DiscoveryConfiguration;
+import org.sonatype.nexus.client.core.subsystem.routing.Routing;
+import org.sonatype.nexus.client.core.subsystem.routing.Status;
+import org.sonatype.nexus.client.core.subsystem.routing.Status.Outcome;
/**
* Will not work until proxy404 merged into master, AND at least one CI build/deploys of that master, as it seems Sisu
* Maven Bridge will download the "latest" from remote, not use the build from branch.
*
* @author cstamas
*/
-public class WhitelistIT
+public class RoutingIT
extends NexusClientITSupport
{
- public WhitelistIT( final String nexusBundleCoordinates )
+ public RoutingIT( final String nexusBundleCoordinates )
{
super( nexusBundleCoordinates );
}
- private Whitelist whitelist()
+ private Routing routing()
{
- return client().getSubsystem( Whitelist.class );
+ return client().getSubsystem( Routing.class );
}
@Test( expected = NexusClientNotFoundException.class )
public void getNonExistentStatus()
{
- final Status status = whitelist().getWhitelistStatus( "no-such-repo-id" );
+ final Status status = routing().getStatus( "no-such-repo-id" );
}
@Test
public void getReleaseStatus()
{
- final Status status = whitelist().getWhitelistStatus( "releases" );
+ final Status status = routing().getStatus( "releases" );
assertThat( status, is( not( nullValue() ) ) );
assertThat( status.getPublishedStatus(), equalTo( Outcome.SUCCEEDED ) );
assertThat( status.getPublishedMessage(), is( notNullValue() ) );
@@ -70,7 +68,7 @@ public void getReleaseStatus()
@Test
public void getSnapshotsStatus()
{
- final Status status = whitelist().getWhitelistStatus( "snapshots" );
+ final Status status = routing().getStatus( "snapshots" );
assertThat( status, is( not( nullValue() ) ) );
assertThat( status.getPublishedStatus(), equalTo( Outcome.SUCCEEDED ) );
assertThat( status.getPublishedMessage(), is( notNullValue() ) );
@@ -81,19 +79,19 @@ public void getSnapshotsStatus()
@Test( expected = NexusClientBadRequestException.class )
public void getCentralM1Status()
{
- final Status status = whitelist().getWhitelistStatus( "central-m1" );
+ final Status status = routing().getStatus( "central-m1" );
}
@Test( expected = NexusClientNotFoundException.class )
public void getNonExistentConfig()
{
- final DiscoveryConfiguration config = whitelist().getDiscoveryConfigurationFor( "no-such-repo-id" );
+ final DiscoveryConfiguration config = routing().getDiscoveryConfigurationFor( "no-such-repo-id" );
}
@Test
public void getCentralDefaultConfig()
{
- final DiscoveryConfiguration config = whitelist().getDiscoveryConfigurationFor( "central" );
+ final DiscoveryConfiguration config = routing().getDiscoveryConfigurationFor( "central" );
assertThat( config, is( notNullValue() ) );
assertThat( config.isEnabled(), is( true ) );
assertThat( config.getIntervalHours(), is( 24 ) );
@@ -103,13 +101,13 @@ public void getCentralDefaultConfig()
public void modifyDiscoveryConfig()
{
{
- final DiscoveryConfiguration config = whitelist().getDiscoveryConfigurationFor( "central" );
+ final DiscoveryConfiguration config = routing().getDiscoveryConfigurationFor( "central" );
config.setEnabled( false );
config.setIntervalHours( 12 );
- whitelist().setDiscoveryConfigurationFor( "central", config );
+ routing().setDiscoveryConfigurationFor( "central", config );
}
{
- final DiscoveryConfiguration config = whitelist().getDiscoveryConfigurationFor( "central" );
+ final DiscoveryConfiguration config = routing().getDiscoveryConfigurationFor( "central" );
assertThat( config.isEnabled(), is( false ) );
assertThat( config.getIntervalHours(), is( 12 ) );
}
@@ -118,30 +116,30 @@ public void modifyDiscoveryConfig()
@Test
public void updateReleases()
{
- whitelist().updateWhitelist( "releases" );
+ routing().updatePrefixFile( "releases" );
}
@Test
public void updateSnapshots()
{
- whitelist().updateWhitelist( "snapshots" );
+ routing().updatePrefixFile( "snapshots" );
}
@Test
public void updateCentral()
{
- whitelist().updateWhitelist( "central" );
+ routing().updatePrefixFile( "central" );
}
@Test( expected = NexusClientBadRequestException.class )
public void updateCentralM1()
{
- whitelist().updateWhitelist( "central-m1" );
+ routing().updatePrefixFile( "central-m1" );
}
@Test( expected = NexusClientNotFoundException.class )
public void updateNonExistent()
{
- whitelist().updateWhitelist( "no-such-repo-id" );
+ routing().updatePrefixFile( "no-such-repo-id" );
}
}
@@ -10,12 +10,12 @@
* of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the
* Eclipse Foundation. All other trademarks are the property of their respective owners.
*/
-package org.sonatype.nexus.client.core.subsystem.whitelist;
+package org.sonatype.nexus.client.core.subsystem.routing;
import static com.google.common.base.Preconditions.checkArgument;
/**
- * The whitelist discovery configuration for a proxy repository.
+ * The routing discovery configuration for a proxy repository.
*
* @author cstamas
* @since 2.4
@@ -10,39 +10,39 @@
* of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the
* Eclipse Foundation. All other trademarks are the property of their respective owners.
*/
-package org.sonatype.nexus.client.core.subsystem.whitelist;
+package org.sonatype.nexus.client.core.subsystem.routing;
import org.sonatype.nexus.client.core.exception.NexusClientErrorResponseException;
import org.sonatype.nexus.client.core.exception.NexusClientNotFoundException;
/**
- * Client subsystem for Nexus Whitelist feature.
+ * Client subsystem for Nexus Automatic Routing feature.
*
* @author cstamas
* @since 2.4
*/
-public interface Whitelist
+public interface Routing
{
/**
- * Returns the status of the Whitelist of a Maven Repository (proxy, hosted or group).
+ * Returns the status of the Automatic Routing of a Maven Repository (proxy, hosted or group).
*
* @param mavenRepositoryId the ID of the Maven repository you want get status for.
* @return the status for given repository.
* @throws NexusClientNotFoundException if the passed in ID does not exists.
*/
- Status getWhitelistStatus( String mavenRepositoryId );
+ Status getStatus( String mavenRepositoryId );
/**
- * Perform a forced update of the Whitelist of a Maven repository. This method returns immediately, but it spawns a
- * background operation on Nexus that will perform the update and it's outcome will be reflected in status when
+ * Perform a forced update of the prefix file of a Maven repository. This method returns immediately, but it spawns
+ * a background operation on Nexus that will perform the update and it's outcome will be reflected in status when
* update is done.
*
- * @param mavenRepositoryId the ID of the Maven Repository you want update the whitelist for (see throws for what
+ * @param mavenRepositoryId the ID of the Maven Repository you want update the prefix file for (see throws for what
* kind of repositories this call is allowed).
* @throws NexusClientErrorResponseException if the passed in ID is not a Maven Proxy repository.
* @throws NexusClientNotFoundException if the passed in ID does not exists.
*/
- void updateWhitelist( String mavenRepositoryId )
+ void updatePrefixFile( String mavenRepositoryId )
throws NexusClientErrorResponseException, NexusClientNotFoundException;
/**
@@ -10,10 +10,10 @@
* of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the
* Eclipse Foundation. All other trademarks are the property of their respective owners.
*/
-package org.sonatype.nexus.client.core.subsystem.whitelist;
+package org.sonatype.nexus.client.core.subsystem.routing;
/**
- * The whitelist status for a Maven repository.
+ * The routing status for a Maven repository.
*
* @author cstamas
* @since 2.4
@@ -42,7 +42,7 @@
}
/**
- * The whitelist discovery status for a Maven Proxy repository.
+ * The routing discovery status for a Maven Proxy repository.
*/
public static class DiscoveryStatus
{
@@ -175,7 +175,7 @@ public long getDiscoveryLastRunTimestamp()
private final long publishedTimestamp;
/**
- * The URL of the published WL prefix file or {@code null} if not published.
+ * The URL of the published prefix file or {@code null} if not published.
*/
private final String publishedUrl;
@@ -234,7 +234,7 @@ public long getPublishedTimestamp()
}
/**
- * Returns the URL of the published whitelist file, or {@code null} if not published.
+ * Returns the URL of the published prefix file, or {@code null} if not published.
*
* @return the prefix file URL if published, or {@code null}.
*/
@@ -10,56 +10,56 @@
* of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the
* Eclipse Foundation. All other trademarks are the property of their respective owners.
*/
-package org.sonatype.nexus.client.internal.rest.jersey.subsystem.whitelist;
+package org.sonatype.nexus.client.internal.rest.jersey.subsystem.routing;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import org.sonatype.nexus.client.core.exception.NexusClientNotFoundException;
import org.sonatype.nexus.client.core.spi.SubsystemSupport;
-import org.sonatype.nexus.client.core.subsystem.whitelist.DiscoveryConfiguration;
-import org.sonatype.nexus.client.core.subsystem.whitelist.Status;
-import org.sonatype.nexus.client.core.subsystem.whitelist.Status.DiscoveryStatus;
-import org.sonatype.nexus.client.core.subsystem.whitelist.Status.Outcome;
-import org.sonatype.nexus.client.core.subsystem.whitelist.Whitelist;
+import org.sonatype.nexus.client.core.subsystem.routing.DiscoveryConfiguration;
+import org.sonatype.nexus.client.core.subsystem.routing.Routing;
+import org.sonatype.nexus.client.core.subsystem.routing.Status;
+import org.sonatype.nexus.client.core.subsystem.routing.Status.DiscoveryStatus;
+import org.sonatype.nexus.client.core.subsystem.routing.Status.Outcome;
import org.sonatype.nexus.client.rest.jersey.JerseyNexusClient;
-import org.sonatype.nexus.rest.model.WLConfigMessage;
-import org.sonatype.nexus.rest.model.WLConfigMessageWrapper;
-import org.sonatype.nexus.rest.model.WLStatusMessage;
-import org.sonatype.nexus.rest.model.WLStatusMessageWrapper;
+import org.sonatype.nexus.rest.model.RoutingConfigMessage;
+import org.sonatype.nexus.rest.model.RoutingConfigMessageWrapper;
+import org.sonatype.nexus.rest.model.RoutingStatusMessage;
+import org.sonatype.nexus.rest.model.RoutingStatusMessageWrapper;
import com.google.common.base.Throwables;
import com.sun.jersey.api.client.ClientHandlerException;
import com.sun.jersey.api.client.UniformInterfaceException;
/**
- * Jersey based {@link Whitelist} implementation.
+ * Jersey based {@link Routing} implementation.
*
* @author cstamas
* @since 2.4
*/
-public class JerseyWhitelist
+public class JerseyRouting
extends SubsystemSupport<JerseyNexusClient>
- implements Whitelist
+ implements Routing
{
/**
* Constructor.
*
* @param nexusClient
*/
- public JerseyWhitelist( final JerseyNexusClient nexusClient )
+ public JerseyRouting( final JerseyNexusClient nexusClient )
{
super( nexusClient );
}
@Override
- public Status getWhitelistStatus( final String mavenRepositoryId )
+ public Status getStatus( final String mavenRepositoryId )
{
try
{
- final WLStatusMessage message =
- getNexusClient().serviceResource( wlPath( mavenRepositoryId ) ).get( WLStatusMessageWrapper.class ).getData();
+ final RoutingStatusMessage message =
+ getNexusClient().serviceResource( wlPath( mavenRepositoryId ) ).get( RoutingStatusMessageWrapper.class ).getData();
final DiscoveryStatus discoveryStatus;
if ( message.getDiscovery() == null )
@@ -93,7 +93,7 @@ public Status getWhitelistStatus( final String mavenRepositoryId )
}
@Override
- public void updateWhitelist( final String mavenProxyRepositoryId )
+ public void updatePrefixFile( final String mavenProxyRepositoryId )
throws IllegalArgumentException, NexusClientNotFoundException
{
try
@@ -116,9 +116,9 @@ public DiscoveryConfiguration getDiscoveryConfigurationFor( final String mavenPr
{
try
{
- final WLConfigMessage message =
+ final RoutingConfigMessage message =
getNexusClient().serviceResource( wlConfigPath( mavenProxyRepositoryId ) ).get(
- WLConfigMessageWrapper.class ).getData();
+ RoutingConfigMessageWrapper.class ).getData();
return new DiscoveryConfiguration( message.isDiscoveryEnabled(), message.getDiscoveryIntervalHours() );
}
catch ( UniformInterfaceException e )
@@ -138,10 +138,10 @@ public void setDiscoveryConfigurationFor( final String mavenProxyRepositoryId,
{
try
{
- final WLConfigMessage message = new WLConfigMessage();
+ final RoutingConfigMessage message = new RoutingConfigMessage();
message.setDiscoveryEnabled( configuration.isEnabled() );
message.setDiscoveryIntervalHours( configuration.getIntervalHours() );
- final WLConfigMessageWrapper wrapper = new WLConfigMessageWrapper();
+ final RoutingConfigMessageWrapper wrapper = new RoutingConfigMessageWrapper();
wrapper.setData( message );
getNexusClient().serviceResource( wlConfigPath( mavenProxyRepositoryId ) ).put( wrapper );
}
@@ -18,19 +18,19 @@
import org.sonatype.nexus.client.core.Condition;
import org.sonatype.nexus.client.core.condition.NexusStatusConditions;
import org.sonatype.nexus.client.core.spi.SubsystemFactory;
-import org.sonatype.nexus.client.core.subsystem.whitelist.Whitelist;
-import org.sonatype.nexus.client.internal.rest.jersey.subsystem.whitelist.JerseyWhitelist;
+import org.sonatype.nexus.client.core.subsystem.routing.Routing;
+import org.sonatype.nexus.client.internal.rest.jersey.subsystem.routing.JerseyRouting;
import org.sonatype.nexus.client.rest.jersey.JerseyNexusClient;
/**
- * Jersey based {@link Whitelist} subsystem factory.
+ * Jersey based {@link Routing} subsystem factory.
*
* @since 2.4
*/
@Named
@Singleton
-public class JerseyWhitelistFactory
- implements SubsystemFactory<Whitelist, JerseyNexusClient>
+public class JerseyRoutingFactory
+ implements SubsystemFactory<Routing, JerseyNexusClient>
{
@Override
public Condition availableWhen()
@@ -39,14 +39,14 @@ public Condition availableWhen()
}
@Override
- public Class<Whitelist> getType()
+ public Class<Routing> getType()
{
- return Whitelist.class;
+ return Routing.class;
}
@Override
- public Whitelist create( final JerseyNexusClient nexusClient )
+ public Routing create( final JerseyNexusClient nexusClient )
{
- return new JerseyWhitelist( nexusClient );
+ return new JerseyRouting( nexusClient );
}
}
Oops, something went wrong.

0 comments on commit 2dbec3c

Please sign in to comment.