Permalink
Browse files

Merge remote-tracking branch 'origin/master' into NXCM-4867-indexer-s…

…ync-simple
  • Loading branch information...
2 parents 04385a1 + c1a9535 commit b06fffcc2d866d6a3d0510aa2f470547e5314552 @scarlucci scarlucci committed May 3, 2013
Showing with 1,549 additions and 182 deletions.
  1. +42 −0 ...client-core/src/main/java/org/sonatype/nexus/client/core/subsystem/repository/BaseRepository.java
  2. +1 −15 ...ient-core/src/main/java/org/sonatype/nexus/client/core/subsystem/repository/HostedRepository.java
  3. +12 −1 ...lient-core/src/main/java/org/sonatype/nexus/client/core/subsystem/repository/ProxyRepository.java
  4. +5 −0 nexus-client-core/src/main/java/org/sonatype/nexus/client/core/subsystem/repository/Repository.java
  5. +12 −0 ...src/main/java/org/sonatype/nexus/client/core/subsystem/repository/maven/MavenProxyRepository.java
  6. +5 −0 ...a/org/sonatype/nexus/client/internal/rest/jersey/subsystem/repository/JerseyHostedRepository.java
  7. +32 −0 ...va/org/sonatype/nexus/client/internal/rest/jersey/subsystem/repository/JerseyProxyRepository.java
  8. +4 −0 ...in/java/org/sonatype/nexus/client/internal/rest/jersey/subsystem/repository/JerseyRepository.java
  9. +12 −0 ...type/nexus/client/internal/rest/jersey/subsystem/repository/maven/JerseyMavenProxyRepository.java
  10. +132 −59 nexus-core/src/main/java/org/sonatype/nexus/maven/tasks/DefaultSnapshotRemover.java
  11. +9 −12 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/AbstractMavenRepository.java
  12. +3 −3 nexus-core/src/main/java/org/sonatype/nexus/proxy/repository/AbstractGroupRepository.java
  13. +33 −29 nexus-core/src/main/java/org/sonatype/nexus/proxy/repository/AbstractProxyRepository.java
  14. +8 −8 nexus-core/src/main/java/org/sonatype/nexus/proxy/repository/AbstractRepository.java
  15. +20 −1 nexus-core/src/main/java/org/sonatype/nexus/security/NexusViewSecurityResource.java
  16. +23 −4 nexus-core/src/main/java/org/sonatype/nexus/security/SecurityCleanupEventInspector.java
  17. +33 −0 nexus-core/src/test/java/org/sonatype/nexus/maven/tasks/DefaultSnapshotRemoverIT.java
  18. +32 −0 nexus-core/src/test/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/maven-metadata.xml
  19. +1 −0 ...s-core/src/test/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/maven-metadata.xml.md5
  20. +1 −0 ...-core/src/test/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/maven-metadata.xml.sha1
  21. BIN ...t/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154949-1-alpha.jar
  22. +1 −0 ...sources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154949-1-alpha.jar.md5
  23. +1 −0 ...ources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154949-1-alpha.jar.sha1
  24. +122 −0 ...rc/test/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154949-1.pom
  25. +1 −0 ...est/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154949-1.pom.md5
  26. +1 −0 ...st/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154949-1.pom.sha1
  27. BIN ...t/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154953-2-alpha.jar
  28. +1 −0 ...sources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154953-2-alpha.jar.md5
  29. +1 −0 ...ources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154953-2-alpha.jar.sha1
  30. +122 −0 ...rc/test/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154953-2.pom
  31. +1 −0 ...est/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154953-2.pom.md5
  32. +1 −0 ...st/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154953-2.pom.sha1
  33. BIN ...t/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154956-3-alpha.jar
  34. +1 −0 ...sources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154956-3-alpha.jar.md5
  35. +1 −0 ...ources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154956-3-alpha.jar.sha1
  36. +122 −0 ...rc/test/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154956-3.pom
  37. +1 −0 ...est/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154956-3.pom.md5
  38. +1 −0 ...st/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.154956-3.pom.sha1
  39. BIN ...st/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.155001-4-beta.jar
  40. +1 −0 ...esources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.155001-4-beta.jar.md5
  41. +1 −0 ...sources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.155001-4-beta.jar.sha1
  42. +122 −0 ...rc/test/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.155001-4.pom
  43. +1 −0 ...est/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.155001-4.pom.md5
  44. +1 −0 ...st/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.155001-4.pom.sha1
  45. BIN ...st/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.155005-5-beta.jar
  46. +1 −0 ...esources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.155005-5-beta.jar.md5
  47. +1 −0 ...sources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.155005-5-beta.jar.sha1
  48. +122 −0 ...rc/test/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.155005-5.pom
  49. +1 −0 ...est/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.155005-5.pom.md5
  50. +1 −0 ...st/resources/reposes/snapshots/org/sonatype/test/1.0-SNAPSHOT/test-1.0-20130501.155005-5.pom.sha1
  51. +1 −1 ...est/nexus-it-helper-plugin/src/test/java/org/sonatype/security/realms/simple/SimpleRealmTest.java
  52. +1 −13 plugins/kenai/nexus-kenai-plugin/pom.xml
  53. +1 −5 plugins/nexus-ui-extjs3-plugin/src/main/resources/static/js/Sonatype/utils.js
  54. +0 −7 plugins/restlet1x/nexus-restlet1x-model/src/main/mdo/vos.xml
  55. +10 −6 ...x-plugin/src/main/java/org/sonatype/nexus/rest/repositories/AbstractRepositoryPlexusResource.java
  56. +13 −10 ...restlet1x-plugin/src/main/java/org/sonatype/nexus/rest/repositories/RepositoryPlexusResource.java
  57. +0 −5 ...t1x/nexus-restlet1x-plugin/src/main/java/org/sonatype/nexus/rest/status/StatusPlexusResource.java
  58. +1 −1 ...let1x-plugin/src/main/java/org/sonatype/security/rest/privileges/PrivilegeTypePlexusResource.java
  59. +42 −0 plugins/restlet1x/nexus-restlet1x-testsuite/pom.xml
  60. +142 −0 ...e/src/test/java/org/sonatype/nexus/restlet1x/testsuite/Nxcm5131DefaultValuesOnRepoCreationIT.java
  61. +67 −0 ...-restlet1x-testsuite/src/test/java/org/sonatype/nexus/restlet1x/testsuite/Restlet1xITSupport.java
  62. +63 −0 plugins/restlet1x/nexus-restlet1x-testsupport-plugin/pom.xml
  63. +24 −0 ...tsupport-plugin/src/main/java/org/sonatype/nexus/restlet1x/nxcm5131/Nxcm5131HostedRepository.java
  64. +92 −0 ...stsupport-plugin/src/main/java/org/sonatype/nexus/restlet1x/nxcm5131/Nxcm5131ProxyRepository.java
  65. +24 −0 ...rt-plugin/src/main/java/org/sonatype/nexus/restlet1x/nxcm5131/Nxcm5131RepositoryConfigurator.java
  66. +16 −0 plugins/restlet1x/pom.xml
  67. +2 −2 pom.xml
@@ -0,0 +1,42 @@
+/*
+ * Sonatype Nexus (TM) Open Source Version
+ * Copyright (c) 2007-2012 Sonatype, Inc.
+ * All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions.
+ *
+ * This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0,
+ * which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks
+ * 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.repository;
+
+/**
+ * Base class for hosted/proxy repositories.
+ *
+ * @since 2.5
+ */
+interface BaseRepository<T extends Repository, S extends RepositoryStatus>
+ extends Repository<T, S>
+{
+
+ /**
+ * Enable browsing (see content of repository)
+ *
+ * @return itself, for fluent api usage
+ */
+ T enableBrowsing();
+
+ /**
+ * Disable browsing (see content of repository).
+ *
+ * @return itself, for fluent api usage
+ */
+ T disableBrowsing();
+
+ /**
+ * @return {@code true} if browsing is allowed for this repository, {@code false} otherwise.
+ */
+ boolean isBrowsable();
+}
@@ -18,7 +18,7 @@
* @since 2.3
*/
public interface HostedRepository<T extends HostedRepository>
- extends Repository<T, RepositoryStatus>
+ extends BaseRepository<T, RepositoryStatus>
{
T withRepoPolicy( final String policy );
@@ -44,18 +44,4 @@
*/
T disableRedeploy();
- /**
- * Enable browsing (see content of repository)
- *
- * @return itself, for fluent api usage
- */
- T enableBrowsing();
-
- /**
- * Disable browsing (see content of repository).
- *
- * @return itself, for fluent api usage
- */
- T disableBrowsing();
-
}
@@ -18,7 +18,7 @@
* @since 2.3
*/
public interface ProxyRepository<T extends ProxyRepository>
- extends Repository<T, ProxyRepositoryStatus>
+ extends BaseRepository<T, ProxyRepositoryStatus>
{
/**
@@ -56,6 +56,12 @@
*/
T doNotAutoBlock();
+ /**
+ * @return {@code true} if auto-blocking is enabled, {@code false} otherwise.
+ * @since 2.5
+ */
+ boolean isAutoBlocking();
+
/**
* Directly blocks the repository (no save required).
*
@@ -86,4 +92,9 @@
*/
T withItemMaxAge( int minutes );
+ /**
+ * @return the repository's max item age.
+ * @since 2.5
+ */
+ int itemMaxAge();
}
@@ -83,4 +83,9 @@
*/
T remove();
+ /**
+ * @return {@code true} if the repository is exposed, {@code false} otherwise.
+ * @since 2.5
+ */
+ boolean isExposed();
}
@@ -54,4 +54,16 @@
*/
MavenProxyRepository doNotDownloadRemoteIndexes();
+
+ /**
+ * @return the repository's max artifact age.
+ * @since 2.5
+ */
+ int artifactMaxAge();
+
+ /**
+ * @return the repository's max metadata age.
+ * @since 2.5
+ */
+ int metadataMaxAge();
}
@@ -104,4 +104,9 @@ public T disableBrowsing()
return me();
}
+ @Override
+ public boolean isBrowsable()
+ {
+ return settings().isBrowseable();
+ }
}
@@ -14,6 +14,7 @@
import org.sonatype.nexus.client.core.subsystem.repository.ProxyRepository;
import org.sonatype.nexus.client.core.subsystem.repository.ProxyRepositoryStatus;
+import org.sonatype.nexus.client.core.subsystem.repository.Repository;
import org.sonatype.nexus.client.rest.jersey.JerseyNexusClient;
import org.sonatype.nexus.rest.model.RepositoryProxyResource;
import org.sonatype.nexus.rest.model.RepositoryResourceRemoteStorage;
@@ -132,6 +133,12 @@ public T withItemMaxAge( final int minutes )
return me();
}
+ @Override
+ public int itemMaxAge()
+ {
+ return settings().getItemMaxAge();
+ }
+
@Override
public T autoBlock()
{
@@ -146,6 +153,12 @@ public T doNotAutoBlock()
return me();
}
+ @Override
+ public boolean isAutoBlocking()
+ {
+ return settings().isAutoBlockActive();
+ }
+
@Override
public T block()
{
@@ -164,4 +177,23 @@ public T unblock()
return me();
}
+ @Override
+ public T enableBrowsing()
+ {
+ settings().setBrowseable( true );
+ return me();
+ }
+
+ @Override
+ public T disableBrowsing()
+ {
+ settings().setBrowseable( false );
+ return me();
+ }
+
+ @Override
+ public boolean isBrowsable()
+ {
+ return settings().isBrowseable();
+ }
}
@@ -322,4 +322,8 @@ RepositoryStatusResource doUpdateStatus( final RepositoryStatusResource status )
}
}
+ public boolean isExposed() {
+ return settings().isExposed();
+ }
+
}
@@ -84,4 +84,16 @@ public MavenProxyRepository doNotDownloadRemoteIndexes()
return me();
}
+ @Override
+ public int artifactMaxAge()
+ {
+ return settings().getArtifactMaxAge();
+ }
+
+ @Override
+ public int metadataMaxAge()
+ {
+ return settings().getMetadataMaxAge();
+ }
+
}
Oops, something went wrong.

0 comments on commit b06fffc

Please sign in to comment.