/** * npm search index facet. * * @since 3.0 * @deprecated No longer actively used by npm upstream, replaced by v1 search api (NEXUS-13150). */ @Deprecated @Facet.Exposed public interface NpmSearchIndexFacet extends Facet { /** * Fetches the index document. */ Content searchIndex(@Nullable final DateTime since) throws IOException; /** * Invalidates cached index document, if applicable. */ void invalidateCachedSearchIndex(); }
/** * A format neutral proxy facet. * * @since 3.0 */ @Facet.Exposed public interface ProxyFacet extends Facet { /** * Obtain the content which the user has requested, either by retrieving cached content, or by fetching new or * updated content from the upstream repository. */ @Nullable Content get(Context context) throws IOException; /** * Returns the root of the remote repository. */ URI getRemoteUrl(); /** * Invalidates all entries from proxy cache, causing all subsequent requests to attempt to fetch new or updated * content, if any. */ void invalidateProxyCaches(); }
/** * Maven2 specific index facet responsible to generate index (for hosted and group repositories). * * @since 3.0 */ @Facet.Exposed public interface MavenIndexFacet extends Facet { /** * Returns time when index was last published on this repository, or {@code null} if index is not published for * whatever reason. */ @Nullable DateTime lastPublished() throws IOException; /** * Publishes Maven Indexer indexes repository for downstream consumption. */ void publishIndex() throws IOException; /** * Removes published Maven Indexer indexes from repository (or cache, if proxy). */ void unpublishIndex() throws IOException; }
/** * npm token management facet. * * @since 3.0 */ @Facet.Exposed public interface NpmTokenFacet extends Facet { /** * Performs a login for user authenticated in the request (creates token and returns login specific response). */ Response login(Context context); /** * Performs a log-out for currently authenticated user (deletes the token if found and returns logout specific * response). */ Response logout(Context context); }
/** * View facet. * * @since 3.0 */ @Facet.Exposed public interface ViewFacet extends Facet { /** * Dispatch request to router. */ Response dispatch(Request request) throws Exception; /** * Dispatch request to router with an existing context to pull attributes from. * @since 3.1 */ Response dispatch(Request request, Context context) throws Exception; }
/** * Services for accessing and manipulating repository-level metadata attributes. * * @since 3.0 */ @Facet.Exposed public interface AttributesFacet extends Facet { /** * Returns an immutable view of the Repository's attributes. */ ImmutableNestedAttributesMap getAttributes(); /** * Modifies the Repository's attributes. */ void modifyAttributes(AttributeChange change); }
/** * Facet for purging unused Maven snapshots. * * @since 3.0 */ @Facet.Exposed public interface PurgeUnusedSnapshotsFacet extends Facet { /** * Purges snapshots that were not used/accessed for a number of days. * * @param numberOfDays number of days from the moment the method is invoked. Must be > 0. */ void purgeUnusedSnapshots(int numberOfDays); }
/** * Facet interface for rebuilding Helm index.yaml files * * @since 0.0.2 */ @Exposed public interface CreateIndexFacet extends Facet { /** * Mark the helm index yaml as invalidated such that it will be rebuilt after waiting for a configured amount of time * to prevent unnecessary successive rebuilds of the metadata. */ void invalidateIndex(); }
/** * Facet handling the removal of snapshots from a repository. * * @since 3.0 */ @Facet.Exposed public interface RemoveSnapshotsFacet extends Facet { /** * Delete snapshots matching this configuration, and update associated metadata in the repository. * * @param removeSnapshotsConfig {@link RemoveSnapshotsConfig} */ void removeSnapshots(RemoveSnapshotsConfig removeSnapshotsConfig); }
/** * Find & delete components and assets that were not used/accessed for a number of days. * * @since 3.0 */ @Facet.Exposed public interface PurgeUnusedFacet extends Facet { /** * Find & delete components and assets that were not used/accessed for a number of days. * * @param numberOfDays number of days from the moment the method is invoked. Must be > 0. */ void purgeUnused(int numberOfDays); }
/** * Security facet. * * @since 3.0 */ @Facet.Exposed public interface SecurityFacet extends Facet { /** * Ensure the given request is permitted on the repository. * * @throws AuthorizationException */ void ensurePermitted(Request request); }
/** * Interface defining the features supported by Composer repository hosted facets. */ @Facet.Exposed public interface ComposerHostedFacet extends Facet { void upload(String vendor, String project, String version, Payload payload) throws IOException; Content getPackagesJson() throws IOException; Content getProviderJson(String vendor, String project) throws IOException; void rebuildProviderJson(String vendor, String project) throws IOException; @Nullable Content getZipball(String path) throws IOException; }
/** * Facet for npm V1 search, replacing the existing npm search indexes that are now deprecated. * * @since 3.7 */ @Facet.Exposed public interface NpmSearchFacet extends Facet { /** * Fetches the v1 search results. */ Content searchV1(final Parameters parameters) throws IOException; }
/** * Provides Browse related information * * @since 3.15 */ @Facet.Exposed public interface BrowseFacet extends Facet { /** * @return true if the repository is being rebuilt by an existing task */ boolean isRebuilding(); }
/** * Helm Hosted Facet * * @since 0.0.2 */ @Exposed public interface HelmHostedFacet extends Facet { Content get(String path); void upload(String path, Payload payload, final AssetKind assetKind) throws IOException; Asset upload(String path, TempBlob tempBlob,Payload payload) throws IOException; boolean delete(String path); }
/** * HTTP client facet. * * @since 3.0 */ @Facet.Exposed public interface HttpClientFacet extends Facet { HttpClient getHttpClient(); RemoteConnectionStatus getStatus(); Header createBasicAuthHeader(); }
/** * Content facet used for getting assets from storage and putting assets into storage for a Composer-format repository. */ @Facet.Exposed public interface ComposerContentFacet extends Facet { @Nullable Content get(String path) throws IOException; Content put(String path, Payload payload, AssetKind assetKind) throws IOException; void setCacheInfo(String path, Content content, CacheInfo cacheInfo) throws IOException; }
@Facet.Exposed public interface AptSnapshotFacet extends Facet { public boolean isSnapshotableFile(String path); public void createSnapshot(String id, SnapshotComponentSelector spec) throws IOException; public Content getSnapshotFile(String id, String path) throws IOException; public void deleteSnapshot(String id) throws IOException; }
@Facet.Exposed public interface AptFacet extends Facet { @Nullable Content get(String path) throws IOException; Content put(String path, Payload payload) throws IOException; boolean delete(String path) throws IOException; boolean isFlat(); String getDistribution(); }
/** * Tagging interface indicating that a facet is an implementation of a {@code ComposerHostedMetadataFacet}. This facet * is responsible for maintaining the internal metadata (currently just the provider.json file). */ @Facet.Exposed public interface ComposerHostedMetadataFacet extends Facet { }