Java Code Examples for org.sonatype.nexus.repository.types.HostedType#NAME
The following examples show how to use
org.sonatype.nexus.repository.types.HostedType#NAME .
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: MavenApiRepositoryAdapter.java From nexus-public with Eclipse Public License 1.0 | 6 votes |
@Override public AbstractApiRepository adapt(final Repository repository) { boolean online = repository.getConfiguration().isOnline(); String name = repository.getName(); String url = repository.getUrl(); switch (repository.getType().toString()) { case HostedType.NAME: return new MavenHostedApiRepository(name, url, online, getHostedStorageAttributes(repository), getCleanupPolicyAttributes(repository), createMavenAttributes(repository)); case ProxyType.NAME: return new MavenProxyApiRepository(name, url, online, getHostedStorageAttributes(repository), getCleanupPolicyAttributes(repository), getProxyAttributes(repository), getNegativeCacheAttributes(repository), getHttpClientAttributes(repository), getRoutingRuleName(repository), createMavenAttributes(repository)); default: return super.adapt(repository); } }
Example 2
Source File: AptApiRepositoryAdapter.java From nexus-public with Eclipse Public License 1.0 | 6 votes |
@Override public AbstractApiRepository adapt(final Repository repository) { boolean online = repository.getConfiguration().isOnline(); String name = repository.getName(); String url = repository.getUrl(); switch (repository.getType().toString()) { case HostedType.NAME: return new AptHostedApiRepository(name, url, online, getHostedStorageAttributes(repository), getCleanupPolicyAttributes(repository), createAptHostedRepositoriesAttributes(repository), createAptSigningRepositoriesAttributes(repository)); case ProxyType.NAME: return new AptProxyApiRepository(name, url, online, getHostedStorageAttributes(repository), getCleanupPolicyAttributes(repository), createAptProxyRepositoriesAttributes(repository), getProxyAttributes(repository), getNegativeCacheAttributes(repository), getHttpClientAttributes(repository), getRoutingRuleName(repository)); } return null; }
Example 3
Source File: SimpleApiRepositoryAdapter.java From nexus-public with Eclipse Public License 1.0 | 6 votes |
@Override public AbstractApiRepository adapt(final Repository repository) { boolean online = repository.getConfiguration().isOnline(); String name = repository.getName(); String format = repository.getFormat().toString(); String url = repository.getUrl(); switch (repository.getType().toString()) { case GroupType.NAME: return new SimpleApiGroupRepository(name, format, url, online, getStorageAttributes(repository), getGroupAttributes(repository)); case HostedType.NAME: return new SimpleApiHostedRepository(name, format, url, online, getHostedStorageAttributes(repository), getCleanupPolicyAttributes(repository)); case ProxyType.NAME: return new SimpleApiProxyRepository(name, format, url, online, getStorageAttributes(repository), getCleanupPolicyAttributes(repository), getProxyAttributes(repository), getNegativeCacheAttributes(repository), getHttpClientAttributes(repository), getRoutingRuleName(repository)); default: return null; } }
Example 4
Source File: NpmRepairPackageRootComponent.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@Inject public NpmRepairPackageRootComponent(final RepositoryManager repositoryManager, final AssetEntityAdapter assetEntityAdapter, final NpmPackageParser npmPackageParser, @Named(HostedType.NAME) final Type hostedType, @Named(NpmFormat.NAME) final Format npmFormat) { super(repositoryManager, assetEntityAdapter, hostedType, npmFormat); this.npmPackageParser = checkNotNull(npmPackageParser); }
Example 5
Source File: OrientPyPiRepairIndexComponent.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@Inject public OrientPyPiRepairIndexComponent(final RepositoryManager repositoryManager, final AssetEntityAdapter assetEntityAdapter, @Named(HostedType.NAME) final Type type, @Named(PyPiFormat.NAME) final Format format) { super(repositoryManager, assetEntityAdapter, type, format); }
Example 6
Source File: RebuildMaven2MetadataTask.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@Inject public RebuildMaven2MetadataTask(@Named(HostedType.NAME) final Type hostedType, @Named(Maven2Format.NAME) final Format maven2Format) { this.hostedType = checkNotNull(hostedType); this.maven2Format = checkNotNull(maven2Format); }
Example 7
Source File: PurgeMavenUnusedSnapshotsTask.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@Inject public PurgeMavenUnusedSnapshotsTask(@Named(GroupType.NAME) final Type groupType, @Named(HostedType.NAME) final Type hostedType, @Named(Maven2Format.NAME) final Format maven2Format) { this.groupType = checkNotNull(groupType); this.hostedType = checkNotNull(hostedType); this.maven2Format = checkNotNull(maven2Format); }
Example 8
Source File: PurgeUnusedSnapshotsFacetImpl.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@Inject public PurgeUnusedSnapshotsFacetImpl( final ComponentEntityAdapter componentEntityAdapter, @Named(GroupType.NAME) final Type groupType, @Named(HostedType.NAME) final Type hostedType, @Named("${nexus.tasks.purgeUnusedSnapshots.findUnusedLimit:-50}") int findUnusedLimit) { this.componentEntityAdapter = checkNotNull(componentEntityAdapter); this.groupType = checkNotNull(groupType); this.hostedType = checkNotNull(hostedType); this.findUnusedLimit = findUnusedLimit; checkArgument(findUnusedLimit >= 10 && findUnusedLimit <= 1000, "nexus.tasks.purgeUnusedSnapshots.findUnusedLimit must be between 10 and 1000"); }
Example 9
Source File: AptHostedRecipe.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@Inject public AptHostedRecipe(final HighAvailabilitySupportChecker highAvailabilitySupportChecker, @Named(HostedType.NAME) final Type type, @Named(AptFormat.NAME) final Format format) { super(highAvailabilitySupportChecker, type, format); }
Example 10
Source File: HostedRepositoryApiRequest.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public HostedRepositoryApiRequest( @JsonProperty("name") final String name, @JsonProperty("format") final String format, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final HostedStorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup) { super(name, format, HostedType.NAME, online); this.storage = storage; this.cleanup = cleanup; }
Example 11
Source File: SimpleApiHostedRepository.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@JsonCreator public SimpleApiHostedRepository( @JsonProperty("name") final String name, @JsonProperty("format") final String format, @JsonProperty("url") final String url, @JsonProperty("online") final Boolean online, @JsonProperty("storage") final HostedStorageAttributes storage, @JsonProperty("cleanup") final CleanupPolicyAttributes cleanup) { super(name, format, HostedType.NAME, url, online); this.storage = storage; this.cleanup = cleanup; }
Example 12
Source File: AptHostedRecipe.java From nexus-repository-apt with Eclipse Public License 1.0 | 4 votes |
@Inject public AptHostedRecipe(@Named(HostedType.NAME) Type type, @Named(AptFormat.NAME) Format format) { super(type, format); }