forked from eclipse/lemminx-maven
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Maven Central search results should be cached eclipse#263
Fixes: eclipse#263
- Loading branch information
Showing
3 changed files
with
492 additions
and
97 deletions.
There are no files selected for viewing
86 changes: 86 additions & 0 deletions
86
...a/org/eclipse/lemminx/extensions/maven/searcher/JsonRemoteCentralRepositoryConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Red Hat Inc. and others. | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*******************************************************************************/ | ||
package org.eclipse.lemminx.extensions.maven.searcher; | ||
|
||
/** | ||
* Maven Search API response is set to be of Json format, containing the "response" | ||
* root item, consisting of the following three main items: | ||
* | ||
* * numFound - number of items found | ||
* * start - number of first item in response: the items can be transfered | ||
* partially, so start indicates a number of item in whole result | ||
* * docs - an array of response data items, the format of each data item | ||
* depends on the type of request | ||
* | ||
* For example: | ||
* | ||
* { | ||
* numFound=125, | ||
* start=0, | ||
* docs= | ||
* [ | ||
* { | ||
* "id":"org.fujion:fujion-ckeditor", | ||
* "g":"org.fujion", | ||
* "a":"fujion-ckeditor", | ||
* "latestVersion":"3.1.0", | ||
* "repositoryId":"central", | ||
* "p":"jar", | ||
* "timestamp":1688564431000, | ||
* "versionCount":16, | ||
* "text":["org.fujion","fujion-ckeditor","-sources.jar",".pom","-javadoc.jar",".jar"], | ||
* "ec":["-sources.jar",".pom","-javadoc.jar",".jar"] | ||
* }, | ||
* // ... other 124 data items ... | ||
* ] | ||
* } | ||
*/ | ||
public class JsonRemoteCentralRepositoryConstants { | ||
/** | ||
* response - root item | ||
*/ | ||
public static String RESPONSE = "response"; | ||
|
||
/** | ||
* numFound - number of items found | ||
*/ | ||
public static String NUM_FOUND = "numFound"; | ||
|
||
/** | ||
* start - number of first item in response: the items can be transfered | ||
* partially, so start indicates a number of item in whole result | ||
*/ | ||
public static String START = "start"; | ||
|
||
/** | ||
* docs - an array of response data items, the format of each data item depends | ||
* on the type of request | ||
*/ | ||
public static String DOCS = "docs"; | ||
|
||
/** | ||
* Group ID of an artifact | ||
*/ | ||
public static final String GROUP_ID = "g"; | ||
|
||
/** | ||
* Artifact ID of an artifact | ||
*/ | ||
public static final String ARTIFACT_ID = "a"; | ||
|
||
/** | ||
* Version of an artifact | ||
*/ | ||
public static final String VERSION = "v"; | ||
|
||
/** | ||
* The latest available version of an artifact | ||
*/ | ||
public static final String LATEST_VERSION = "latestVersion"; | ||
} |
Oops, something went wrong.