org.sonatype.nexus.repository.rest.api.model.StorageAttributes Java Examples

The following examples show how to use org.sonatype.nexus.repository.rest.api.model.StorageAttributes. 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 vote down vote up
@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 vote down vote up
@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 vote down vote up
@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 vote down vote up
@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 vote down vote up
@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 vote down vote up
private void convertStorage(final T request, final Configuration configuration) {
  StorageAttributes storage = request.getStorage();
  if (nonNull(storage)) {
    NestedAttributesMap storageConfiguration = configuration.attributes(STORAGE);
    storageConfiguration.set(BLOB_STORE_NAME, storage.getBlobStoreName());
    storageConfiguration.set(STRICT_CONTENT_TYPE_VALIDATION, storage.getStrictContentTypeValidation());
  }
}
 
Example #7
Source File: SimpleApiRepositoryAdapter.java    From nexus-public with Eclipse Public License 1.0 5 votes vote down vote up
protected StorageAttributes getStorageAttributes(final Repository repository) {
  NestedAttributesMap configuration = repository.getConfiguration().attributes(ConfigurationConstants.STORAGE);

  String blobStoreName = configuration.get(ConfigurationConstants.BLOB_STORE_NAME, String.class);
  Boolean strictContentTypeValidation =
      configuration.get(ConfigurationConstants.STRICT_CONTENT_TYPE_VALIDATION, Boolean.class, Boolean.TRUE);

  return new StorageAttributes(blobStoreName, strictContentTypeValidation);
}
 
Example #8
Source File: CocoapodsProxyRepositoryApiRequest.java    From nexus-public with Eclipse Public License 1.0 5 votes vote down vote up
@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: MavenGroupRepositoryApiRequest.java    From nexus-public with Eclipse Public License 1.0 5 votes vote down vote up
@JsonCreator
public MavenGroupRepositoryApiRequest(
    @JsonProperty("name") final String name,
    @JsonProperty("online") final Boolean online,
    @JsonProperty("storage") final StorageAttributes storage,
    @JsonProperty("group") final GroupAttributes group)
{
  super(name, Maven2Format.NAME, online, storage, group);
}
 
Example #10
Source File: GolangGroupRepositoryApiRequest.java    From nexus-public with Eclipse Public License 1.0 5 votes vote down vote up
@JsonCreator
public GolangGroupRepositoryApiRequest(
    @JsonProperty("name") final String name,
    @JsonProperty("online") final Boolean online,
    @JsonProperty("storage") final StorageAttributes storage,
    @JsonProperty("group") final GroupAttributes group)
{
  super(name, GolangFormat.NAME, online, storage, group);
}
 
Example #11
Source File: GolangProxyRepositoryApiRequest.java    From nexus-public with Eclipse Public License 1.0 5 votes vote down vote up
@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 #12
Source File: RawProxyRepositoryApiRequest.java    From nexus-public with Eclipse Public License 1.0 5 votes vote down vote up
@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 #13
Source File: RawGroupRepositoryApiRequest.java    From nexus-public with Eclipse Public License 1.0 5 votes vote down vote up
@JsonCreator
public RawGroupRepositoryApiRequest(
    @JsonProperty("name") final String name,
    @JsonProperty("online") final Boolean online,
    @JsonProperty("storage") final StorageAttributes storage,
    @JsonProperty("group") final GroupAttributes group)
{
  super(name, RawFormat.NAME, online, storage, group);
}
 
Example #14
Source File: P2ProxyRepositoryApiRequest.java    From nexus-repository-p2 with Eclipse Public License 1.0 5 votes vote down vote up
@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 #15
Source File: PypiGroupRepositoryApiRequest.java    From nexus-public with Eclipse Public License 1.0 5 votes vote down vote up
@JsonCreator
public PypiGroupRepositoryApiRequest(
    @JsonProperty("name") final String name,
    @JsonProperty("online") final Boolean online,
    @JsonProperty("storage") final StorageAttributes storage,
    @JsonProperty("group") final GroupAttributes group)
{
  super(name, PyPiFormat.NAME, online, storage, group);
}
 
Example #16
Source File: NpmGroupRepositoryApiRequest.java    From nexus-public with Eclipse Public License 1.0 5 votes vote down vote up
@JsonCreator
public NpmGroupRepositoryApiRequest(
    @JsonProperty("name") final String name,
    @JsonProperty("online") final Boolean online,
    @JsonProperty("storage") final StorageAttributes storage,
    @JsonProperty("group") final GroupAttributes group)
{
  super(name, NpmFormat.NAME, online, storage, group);
}
 
Example #17
Source File: NpmProxyRepositoryApiRequest.java    From nexus-public with Eclipse Public License 1.0 5 votes vote down vote up
@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 #18
Source File: ConanResourceITSupport.java    From nexus-repository-conan with Eclipse Public License 1.0 5 votes vote down vote up
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 #19
Source File: ConanProxyRepositoryApiRequest.java    From nexus-repository-conan with Eclipse Public License 1.0 5 votes vote down vote up
@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 #20
Source File: RResourceITSupport.java    From nexus-repository-r with Eclipse Public License 1.0 5 votes vote down vote up
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 #21
Source File: RGroupRepositoryApiRequest.java    From nexus-repository-r with Eclipse Public License 1.0 5 votes vote down vote up
@JsonCreator
public RGroupRepositoryApiRequest(
    @JsonProperty("name") final String name,
    @JsonProperty("online") final Boolean online,
    @JsonProperty("storage") final StorageAttributes storage,
    @JsonProperty("group") final GroupAttributes group)
{
  super(name, RFormat.NAME, online, storage, group);
}
 
Example #22
Source File: RProxyRepositoryApiRequest.java    From nexus-repository-r with Eclipse Public License 1.0 5 votes vote down vote up
@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 #23
Source File: HelmProxyRepositoryApiRequest.java    From nexus-repository-helm with Eclipse Public License 1.0 5 votes vote down vote up
@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 #24
Source File: P2ResourceITSupport.java    From nexus-repository-p2 with Eclipse Public License 1.0 5 votes vote down vote up
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);
}
 
Example #25
Source File: RResourceITSupport.java    From nexus-repository-r with Eclipse Public License 1.0 4 votes vote down vote up
protected RGroupRepositoryApiRequest createGroupRequest(final boolean strictContentTypeValidation) {
  StorageAttributes storage = new StorageAttributes("default", strictContentTypeValidation);
  GroupAttributes group = new GroupAttributes(Lists.newArrayList(MEMBER_NAME));
  return new RGroupRepositoryApiRequest(GROUP_NAME, true, storage, group);
}