public class GrapesClient extends Object
Implemented Grapes client.
| Constructor and Description |
|---|
GrapesClient(String host,
String port) |
| Modifier and Type | Method and Description |
|---|---|
void |
addLicense(String gavc,
String licenseId,
String user,
String password)
Add a license to an artifact
|
void |
approveLicense(String licenseId,
Boolean approve,
String user,
String password)
Approve or reject a license
|
void |
deleteArtifact(String gavc,
String user,
String password)
Delete an artifact in the Grapes server
|
void |
deleteLicense(String licenseId,
String user,
String password)
Delete a license in the server
|
void |
deleteModule(String name,
String version,
String user,
String password)
Delete a module from Grapes server
|
Artifact |
getArtifact(String gavc)
Send a get artifact request
|
String |
getArtifactLastVersion(String gavc)
Returns the artifact last version
|
List<Artifact> |
getArtifacts(Boolean isCorporate,
Boolean hasLicense)
Send a get artifacts request
|
List<String> |
getArtifactVersions(String gavc)
Returns the artifact available versions
|
List<String> |
getCorporateFilters()
Returns the list of corporate filters
|
License |
getLicense(String licenseId)
Send a get license request
|
Module |
getModule(String name,
String version)
Send a get module request
|
List<Dependency> |
getModuleAncestors(String moduleName,
String moduleVersion)
Return the list of module ancestors
|
List<Dependency> |
getModuleDependencies(String moduleName,
String moduleVersion,
Boolean fullRecursive,
Boolean corporate,
Boolean thirdParty)
Return the list of module dependencies
|
String |
getServerURL() |
boolean |
isServerAvailable()
Checks if the dependency server is available
|
Boolean |
moduleCanBePromoted(String name,
String version)
Promote a module in the Grapes server
|
void |
postArtifact(Artifact artifact,
String user,
String password)
Post an artifact to the Grapes server
|
void |
postDoNotUseArtifact(String gavc,
Boolean doNotUse,
String user,
String password)
Post boolean flag "DO_NOT_USE" to an artifact
|
void |
postLicense(License license,
String user,
String password)
Post a license to the server
|
void |
postModule(Module module,
String user,
String password)
Post a module to the server
|
void |
promoteModule(String name,
String version,
String user,
String password)
Promote a module in the Grapes server
|
void |
setTimeout(Integer timeout) |
public void setTimeout(Integer timeout)
public String getServerURL()
public boolean isServerAvailable()
public void postModule(Module module, String user, String password) throws GrapesCommunicationException, AuthenticationException
module - user - password - GrapesCommunicationExceptionAuthenticationExceptionpublic void deleteModule(String name, String version, String user, String password) throws GrapesCommunicationException, AuthenticationException
name - version - GrapesCommunicationExceptionAuthenticationExceptionpublic Module getModule(String name, String version) throws GrapesCommunicationException
name - version - GrapesCommunicationExceptionpublic void promoteModule(String name, String version, String user, String password) throws GrapesCommunicationException, AuthenticationException
name - version - GrapesCommunicationExceptionAuthenticationExceptionpublic Boolean moduleCanBePromoted(String name, String version) throws GrapesCommunicationException
name - version - GrapesCommunicationExceptionpublic void postArtifact(Artifact artifact, String user, String password) throws GrapesCommunicationException, AuthenticationException
artifact - user - password - GrapesCommunicationExceptionAuthenticationExceptionpublic void deleteArtifact(String gavc, String user, String password) throws GrapesCommunicationException, AuthenticationException
gavc - GrapesCommunicationExceptionAuthenticationExceptionpublic Artifact getArtifact(String gavc) throws GrapesCommunicationException
gavc - GrapesCommunicationExceptionpublic List<Artifact> getArtifacts(Boolean isCorporate, Boolean hasLicense) throws GrapesCommunicationException
isCorporate - hasLicense - GrapesCommunicationExceptionpublic void postDoNotUseArtifact(String gavc, Boolean doNotUse, String user, String password) throws GrapesCommunicationException, AuthenticationException
gavc - doNotUse - user - password - GrapesCommunicationExceptionAuthenticationExceptionpublic List<String> getArtifactVersions(String gavc) throws GrapesCommunicationException
gavc - StringGrapesCommunicationExceptionpublic String getArtifactLastVersion(String gavc) throws GrapesCommunicationException
gavc - StringGrapesCommunicationExceptionpublic void addLicense(String gavc, String licenseId, String user, String password) throws GrapesCommunicationException, AuthenticationException
gavc - licenseId - GrapesCommunicationExceptionAuthenticationExceptionpublic void postLicense(License license, String user, String password) throws GrapesCommunicationException, AuthenticationException
license - user - password - GrapesCommunicationExceptionAuthenticationExceptionpublic void deleteLicense(String licenseId, String user, String password) throws GrapesCommunicationException, AuthenticationException
licenseId - GrapesCommunicationExceptionAuthenticationExceptionpublic License getLicense(String licenseId) throws GrapesCommunicationException
licenseId - GrapesCommunicationExceptionpublic void approveLicense(String licenseId, Boolean approve, String user, String password) throws GrapesCommunicationException, AuthenticationException
licenseId - approve - GrapesCommunicationExceptionAuthenticationExceptionpublic List<Dependency> getModuleAncestors(String moduleName, String moduleVersion) throws GrapesCommunicationException
moduleName - moduleVersion - GrapesCommunicationExceptionpublic List<Dependency> getModuleDependencies(String moduleName, String moduleVersion, Boolean fullRecursive, Boolean corporate, Boolean thirdParty) throws GrapesCommunicationException
moduleName - moduleVersion - fullRecursive - corporate - thirdParty - GrapesCommunicationExceptionpublic List<String> getCorporateFilters() throws GrapesCommunicationException, IOException
GrapesCommunicationExceptionIOExceptionCopyright © 2014. All Rights Reserved.