org.sonatype.nexus.repository.rest.api.model.CleanupPolicyAttributes Java Examples
The following examples show how to use
org.sonatype.nexus.repository.rest.api.model.CleanupPolicyAttributes.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AptProxyRepositoryApiRequest.java From nexus-public with Eclipse Public License 1.0 | 6 votes |
@SuppressWarnings("squid:S00107") // suppress constructor parameter count @JsonCreator public AptProxyRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final StorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("apt") final AptProxyRepositoriesAttributes apt, @JsonProperty("proxy") final ProxyAttributes proxy, @JsonProperty("negativeCache") final NegativeCacheAttributes negativeCache, @JsonProperty("httpClient") final HttpClientAttributes httpClient, @JsonProperty("routingRule") final String routingRule) { super(name, AptFormat.NAME, online, storage, cleanup, proxy, negativeCache, httpClient, routingRule); this.apt = apt; }
Example #2
Source File: AptProxyApiRepository.java From nexus-public with Eclipse Public License 1.0 | 6 votes |
@JsonCreator public AptProxyApiRepository( @JsonProperty("name") final String name, @JsonProperty("url") final String url, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final StorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("apt") final AptProxyRepositoriesAttributes apt, @JsonProperty("proxy") final ProxyAttributes proxy, @JsonProperty("negativeCache") final NegativeCacheAttributes negativeCache, @JsonProperty("httpClient") final HttpClientAttributes httpClient, @JsonProperty("routingRuleName") final String routingRuleName) { super(name, AptFormat.NAME, url, online, storage, cleanup, proxy, negativeCache, httpClient, routingRuleName); this.apt = apt; }
Example #3
Source File: MavenProxyRepositoryApiRequest.java From nexus-public with Eclipse Public License 1.0 | 6 votes |
@JsonCreator @SuppressWarnings("squid:S00107") // suppress constructor parameter count public MavenProxyRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final StorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("proxy") final ProxyAttributes proxy, @JsonProperty("negativeCache") final NegativeCacheAttributes negativeCache, @JsonProperty("httpClient") final HttpClientAttributes httpClient, @JsonProperty("routingRule") final String routingRule, @JsonProperty("maven") final MavenAttributes maven) { super(name, Maven2Format.NAME, online, storage, cleanup, proxy, negativeCache, httpClient, routingRule); this.maven = maven; }
Example #4
Source File: MavenProxyApiRepository.java From nexus-public with Eclipse Public License 1.0 | 6 votes |
@SuppressWarnings("squid:S00107") // suppress constructor parameter count @JsonCreator public MavenProxyApiRepository( @JsonProperty("name") final String name, @JsonProperty("url") final String url, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final StorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("proxy") final ProxyAttributes proxy, @JsonProperty("negativeCache") final NegativeCacheAttributes negativeCache, @JsonProperty("httpClient") final HttpClientAttributes httpClient, @JsonProperty("routingRuleName") final String routingRuleName, @JsonProperty("maven") final MavenAttributes maven) { super(name, Maven2Format.NAME, url, online, storage, cleanup, proxy, negativeCache, httpClient, routingRuleName); this.maven = maven; }
Example #5
Source File: RawHostedRepositoryApiRequest.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public RawHostedRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final HostedStorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup) { super(name, RawFormat.NAME, online, storage, cleanup); }
Example #6
Source File: SimpleApiRepositoryAdapterTest.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
private void testCleanup( final Repository repository, final Function<AbstractApiRepository, CleanupPolicyAttributes> cleanupFn) throws Exception { AbstractApiRepository restRepository = underTest.adapt(repository); assertThat(cleanupFn.apply(restRepository), nullValue()); NestedAttributesMap storage = repository.getConfiguration().attributes("cleanup"); storage.set("policyName", Collections.singleton("policy-a")); restRepository = underTest.adapt(repository); assertThat(cleanupFn.apply(restRepository).getPolicyNames(), contains("policy-a")); }
Example #7
Source File: ProxyRepositoryApiRequestToConfigurationConverter.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
private void convertCleanup(final T request, final Configuration configuration) { CleanupPolicyAttributes cleanup = request.getCleanup(); if (nonNull(cleanup)) { NestedAttributesMap cleanupConfiguration = configuration.attributes("cleanup"); cleanupConfiguration.set("policyName", Sets.newHashSet(cleanup.getPolicyNames())); } }
Example #8
Source File: SimpleApiRepositoryAdapter.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
protected CleanupPolicyAttributes getCleanupPolicyAttributes(final Repository repository) { Configuration configuration = repository.getConfiguration(); if (!configuration.getAttributes().containsKey("cleanup")) { return null; } Collection<String> policyNames = configuration.attributes("cleanup").get("policyName", new TypeToken<Collection<String>>() { }, Collections.emptyList()); return new CleanupPolicyAttributes(policyNames); }
Example #9
Source File: CocoapodsProxyRepositoryApiRequest.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public CocoapodsProxyRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final StorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("proxy") final ProxyAttributes proxy, @JsonProperty("negativeCache") final NegativeCacheAttributes negativeCache, @JsonProperty("httpClient") final HttpClientAttributes httpClient, @JsonProperty("routingRule") final String routingRule) { super(name, CocoapodsFormat.NAME, online, storage, cleanup, proxy, negativeCache, httpClient, routingRule); }
Example #10
Source File: AptHostedRepositoryApiRequest.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public AptHostedRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final HostedStorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("apt") final AptHostedRepositoriesAttributes apt, @JsonProperty("aptSigning") final AptSigningRepositoriesAttributes aptSigning) { super(name, AptFormat.NAME, online, storage, cleanup); this.apt = apt; this.aptSigning = aptSigning; }
Example #11
Source File: AptHostedApiRepository.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public AptHostedApiRepository( @JsonProperty("name") final String name, @JsonProperty("url") final String url, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final HostedStorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("apt") final AptHostedRepositoriesAttributes apt, @JsonProperty("aptSigning") final AptSigningRepositoriesAttributes aptSigning) { super(name, AptFormat.NAME, url, online, storage, cleanup); this.apt = apt; this.aptSigning = aptSigning; }
Example #12
Source File: MavenHostedRepositoryApiRequest.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public MavenHostedRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final HostedStorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("maven") final MavenAttributes maven ) { super(name, Maven2Format.NAME, online, storage, cleanup); this.maven = maven; }
Example #13
Source File: MavenHostedApiRepository.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public MavenHostedApiRepository( @JsonProperty("name") final String name, @JsonProperty("url") final String url, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final HostedStorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("maven") final MavenAttributes maven) { super(name, Maven2Format.NAME, url, online, storage, cleanup); this.maven = maven; }
Example #14
Source File: GolangHostedRepositoryApiRequest.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public GolangHostedRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final HostedStorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup) { super(name, GolangFormat.NAME, online, storage, cleanup); }
Example #15
Source File: GolangProxyRepositoryApiRequest.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@SuppressWarnings("squid:S00107") // suppress constructor parameter count @JsonCreator public GolangProxyRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final StorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("proxy") final ProxyAttributes proxy, @JsonProperty("negativeCache") final NegativeCacheAttributes negativeCache, @JsonProperty("httpClient") final HttpClientAttributes httpClient, @JsonProperty("routingRule") final String routingRule) { super(name, GolangFormat.NAME, online, storage, cleanup, proxy, negativeCache, httpClient, routingRule); }
Example #16
Source File: RawProxyRepositoryApiRequest.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@JsonCreator @SuppressWarnings("squid:S00107") // suppress constructor parameter count public RawProxyRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final StorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("proxy") final ProxyAttributes proxy, @JsonProperty("negativeCache") final NegativeCacheAttributes negativeCache, @JsonProperty("httpClient") final HttpClientAttributes httpClient, @JsonProperty("routingRule") final String routingRule) { super(name, RawFormat.NAME, online, storage, cleanup, proxy, negativeCache, httpClient, routingRule); }
Example #17
Source File: P2ProxyRepositoryApiRequest.java From nexus-repository-p2 with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public P2ProxyRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final StorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("proxy") final ProxyAttributes proxy, @JsonProperty("negativeCache") final NegativeCacheAttributes negativeCache, @JsonProperty("httpClient") final HttpClientAttributes httpClient, @JsonProperty("routingRule") final String routingRule) { super(name, P2Format.NAME, online, storage, cleanup, proxy, negativeCache, httpClient, routingRule); }
Example #18
Source File: PypiProxyRepositoryApiRequest.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@JsonCreator @SuppressWarnings("squid:S00107") // suppress constructor parameter count public PypiProxyRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final StorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("proxy") final ProxyAttributes proxy, @JsonProperty("negativeCache") final NegativeCacheAttributes negativeCache, @JsonProperty("httpClient") final HttpClientAttributes httpClient, @JsonProperty("routingRule") final String routingRule) { super(name, PyPiFormat.NAME, online, storage, cleanup, proxy, negativeCache, httpClient, routingRule); }
Example #19
Source File: PypiHostedRepositoryApiRequest.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public PypiHostedRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final HostedStorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup ) { super(name, PyPiFormat.NAME, online, storage, cleanup); }
Example #20
Source File: NpmProxyRepositoryApiRequest.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@JsonCreator @SuppressWarnings("squid:S00107") // suppress constructor parameter count public NpmProxyRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final StorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("proxy") final ProxyAttributes proxy, @JsonProperty("negativeCache") final NegativeCacheAttributes negativeCache, @JsonProperty("httpClient") final HttpClientAttributes httpClient, @JsonProperty("routingRule") final String routingRule) { super(name, NpmFormat.NAME, online, storage, cleanup, proxy, negativeCache, httpClient, routingRule); }
Example #21
Source File: NpmHostedRepositoryApiRequest.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public NpmHostedRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final HostedStorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup ) { super(name, NpmFormat.NAME, online, storage, cleanup); }
Example #22
Source File: ConanResourceITSupport.java From nexus-repository-conan with Eclipse Public License 1.0 | 5 votes |
protected AbstractRepositoryApiRequest createProxyRequest(boolean strictContentTypeValidation) { StorageAttributes storage = new StorageAttributes("default", strictContentTypeValidation); CleanupPolicyAttributes cleanup = new CleanupPolicyAttributes(Collections.emptyList()); ProxyAttributes proxy = new ProxyAttributes(REMOTE_URL, 1, 2); NegativeCacheAttributes negativeCache = new NegativeCacheAttributes(false, 1440); HttpClientConnectionAttributes connection = new HttpClientConnectionAttributes(1, null, 5, false, false); HttpClientAttributes httpClient = new HttpClientAttributes(false, true, connection, null); // SET YOUR FORMAT DATA return new ConanProxyRepositoryApiRequest(PROXY_NAME, true, storage, cleanup, proxy, negativeCache, httpClient, null); }
Example #23
Source File: ConanProxyRepositoryApiRequest.java From nexus-repository-conan with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public ConanProxyRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final StorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("proxy") final ProxyAttributes proxy, @JsonProperty("negativeCache") final NegativeCacheAttributes negativeCache, @JsonProperty("httpClient") final HttpClientAttributes httpClient, @JsonProperty("routingRule") final String routingRule) { super(name, ConanFormat.NAME, online, storage, cleanup, proxy, negativeCache, httpClient, routingRule); }
Example #24
Source File: RResourceITSupport.java From nexus-repository-r with Eclipse Public License 1.0 | 5 votes |
protected AbstractRepositoryApiRequest createHostedRequest(boolean strictContentTypeValidation) { HostedStorageAttributes storage = new HostedStorageAttributes("default", strictContentTypeValidation, WritePolicy.ALLOW.name()); CleanupPolicyAttributes cleanup = new CleanupPolicyAttributes(Collections.emptyList()); return new RHostedRepositoryApiRequest(HOSTED_NAME, true, storage, cleanup); }
Example #25
Source File: RResourceITSupport.java From nexus-repository-r with Eclipse Public License 1.0 | 5 votes |
protected AbstractRepositoryApiRequest createProxyRequest(final boolean strictContentValidation) { StorageAttributes storage = new StorageAttributes("default", strictContentValidation); CleanupPolicyAttributes cleanup = new CleanupPolicyAttributes(Collections.emptyList()); ProxyAttributes proxy = new ProxyAttributes(REMOTE_URL, 1, 2); NegativeCacheAttributes negativeCache = new NegativeCacheAttributes(false, 1440); HttpClientConnectionAttributes connection = new HttpClientConnectionAttributes(1, null, 5, false, false); HttpClientAttributes httpClient = new HttpClientAttributes(false, true, connection, null); return new RProxyRepositoryApiRequest(PROXY_NAME, true, storage, cleanup, proxy, negativeCache, httpClient, null); }
Example #26
Source File: RHostedRepositoryApiRequest.java From nexus-repository-r with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public RHostedRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final HostedStorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup) { super(name, RFormat.NAME, online, storage, cleanup); }
Example #27
Source File: RProxyRepositoryApiRequest.java From nexus-repository-r with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public RProxyRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final StorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("proxy") final ProxyAttributes proxy, @JsonProperty("negativeCache") final NegativeCacheAttributes negativeCache, @JsonProperty("httpClient") final HttpClientAttributes httpClient, @JsonProperty("routingRule") final String routingRule) { super(name, RFormat.NAME, online, storage, cleanup, proxy, negativeCache, httpClient, routingRule); }
Example #28
Source File: HelmHostedRepositoryApiRequest.java From nexus-repository-helm with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public HelmHostedRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final HostedStorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup) { super(name, HelmFormat.NAME, online, storage, cleanup); }
Example #29
Source File: HelmProxyRepositoryApiRequest.java From nexus-repository-helm with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public HelmProxyRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final StorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup, @JsonProperty("proxy") final ProxyAttributes proxy, @JsonProperty("negativeCache") final NegativeCacheAttributes negativeCache, @JsonProperty("httpClient") final HttpClientAttributes httpClient, @JsonProperty("routingRule") final String routingRule) { super(name, HelmFormat.NAME, online, storage, cleanup, proxy, negativeCache, httpClient, routingRule); }
Example #30
Source File: ResourceITSupport.java From nexus-repository-helm with Eclipse Public License 1.0 | 5 votes |
protected AbstractRepositoryApiRequest createHostedRequest(boolean strictContentTypeValidation) { HostedStorageAttributes storage = new HostedStorageAttributes("default", strictContentTypeValidation, WritePolicy.ALLOW.name()); CleanupPolicyAttributes cleanup = new CleanupPolicyAttributes(Collections.emptyList()); // SET YOUR FORMAT DATA return new HelmHostedRepositoryApiRequest(HOSTED_NAME, true, storage, cleanup); }