added correct documentation for the ArchDistribution class
This commit is contained in:
		
							parent
							
								
									cc1ef81609
								
							
						
					
					
						commit
						279ad63891
					
				| @ -15,14 +15,24 @@ import fr.packageviewer.pack.SearchedPackage; | |||||||
| import fr.packageviewer.parser.AsyncRequestsParser; | import fr.packageviewer.parser.AsyncRequestsParser; | ||||||
| import org.json.*; | import org.json.*; | ||||||
| 
 | 
 | ||||||
|  | /** | ||||||
|  |  * This class handles package requests for Arch linux. All return objects in | ||||||
|  |  * this class are wrapped by a CompletableFuture to ensure async workload. | ||||||
|  |  *  | ||||||
|  |  * @author C.Marla, R.Thomas  | ||||||
|  |  * @version 1.0  | ||||||
|  |  */ | ||||||
| public class ArchDistribution extends AsyncRequestsParser implements Distribution { | public class ArchDistribution extends AsyncRequestsParser implements Distribution { | ||||||
| 
 | 
 | ||||||
|     private static final Logger logger = LoggerManager.getLogger("ArchDistribution"); |     private static final Logger logger = LoggerManager.getLogger("ArchDistribution"); | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Will return the String json of the package from the Arch Linux API |  * This function return a package from arch package api in the form of a Pair | ||||||
|  * @param packageName the package name to get the json from |  * Composed of a Package object, and a set of string containing the names of  | ||||||
|  * @return json of the package |  * the dependecies of the package. | ||||||
|  |  *  | ||||||
|  |  * @param packageName String, The package's exact name | ||||||
|  |  * @return Pair of Package and Set of String | ||||||
|   */ |   */ | ||||||
| 
 | 
 | ||||||
| @Override | @Override | ||||||
| @ -72,9 +82,11 @@ public CompletableFuture<Pair<Package, Set<String>>> getPackageFromAPI(String pa | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Search for a package and return a list of packages |  * Search for a package matching a pattern and return a list of packages and | ||||||
|  * @param packageName the package name to search |  * return a list of string matching this pattern. | ||||||
|  * @return |  *  | ||||||
|  |  * @param packageName String, the pattern to search in the repositories | ||||||
|  |  * @return List of SearchedPackage objects | ||||||
|  */ |  */ | ||||||
|     public CompletableFuture<List<SearchedPackage>> searchPackage(String packageName){ |     public CompletableFuture<List<SearchedPackage>> searchPackage(String packageName){ | ||||||
|         HttpClient client = HttpClient.newHttpClient(); |         HttpClient client = HttpClient.newHttpClient(); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user