org.sonatype.nexus.repository.rest.api.model.NegativeCacheAttributes Java Examples
The following examples show how to use
org.sonatype.nexus.repository.rest.api.model.NegativeCacheAttributes.
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: 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 #6
Source File: ProxyRepositoryApiRequestToConfigurationConverter.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
private void convertNegativeCache(final T request, final Configuration configuration) { NegativeCacheAttributes negativeCache = request.getNegativeCache(); if (nonNull(negativeCache)) { NestedAttributesMap negativeCacheConfiguration = configuration.attributes("negativeCache"); negativeCacheConfiguration.set("enabled", negativeCache.getEnabled()); negativeCacheConfiguration.set("timeToLive", negativeCache.getTimeToLive()); } }
Example #7
Source File: SimpleApiRepositoryAdapter.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
protected NegativeCacheAttributes getNegativeCacheAttributes(final Repository repository) { NestedAttributesMap configuration = repository.getConfiguration().attributes("negativeCache"); Boolean enabled = configuration.get("enabled", Boolean.class, true); Integer timeToLive = toInt(configuration.get("timeToLive", Number.class, Time.hours(24).toMinutesI())); return new NegativeCacheAttributes(enabled, timeToLive); }
Example #8
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 #9
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 #10
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 #11
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 #12
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 #13
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 #14
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 #15
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 #16
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 #17
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 #18
Source File: ResourceITSupport.java From nexus-repository-helm with Eclipse Public License 1.0 | 5 votes |
protected AbstractRepositoryApiRequest createProxyRequest(boolean strictContentTypeValidation) { HostedStorageAttributes storage = new HostedStorageAttributes("default", strictContentTypeValidation, WritePolicy.ALLOW.name()); CleanupPolicyAttributes cleanup = new CleanupPolicyAttributes(Collections.emptyList()); ProxyAttributes proxy = new ProxyAttributes("http://example.net", 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 HelmProxyRepositoryApiRequest(PROXY_NAME, true, storage, cleanup, proxy, negativeCache, httpClient, null); }
Example #19
Source File: P2ResourceITSupport.java From nexus-repository-p2 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 P2ProxyRepositoryApiRequest(PROXY_NAME, true, storage, cleanup, proxy, negativeCache, httpClient, null); }