public class Pkg2SrampCommand
extends org.overlord.sramp.shell.api.AbstractShellCommand
| Constructor and Description |
|---|
Pkg2SrampCommand()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyAuth(HttpURLConnection connection,
String user,
String password)
Applies basic auth to the given HTTP URL connection.
|
void |
execute() |
protected org.overlord.sramp.atom.services.brms.assets.Assets |
getAssetsFromBrms(String brmsBaseUrl,
String pkgName)
Gets the assets from BRMS.
|
protected String |
getAssetsStringFromBrms(String brmsBaseUrl,
String pkgName)
Gets the assets XML as a string.
|
org.jboss.resteasy.client.ClientResponse<InputStream> |
getInputStream(String url)
Gets the input stream at the given URL.
|
protected Map<String,org.overlord.sramp.atom.services.brms.packages.Packages.Package> |
getPkgsFromBrms(String brmsBaseUrl)
Gets the packages from BRMS at the given URL.
|
static void |
main(String[] args)
Main entry point - for use outside the interactive shell.
|
void |
printHelp() |
void |
printUsage() |
void |
uploadBrmsPackage(String brmsBaseUrl,
String pkgName,
String tag,
String userId,
String password,
org.overlord.sramp.client.SrampAtomApiClient client)
Uploads the BMRS package.
|
boolean |
urlExists(String checkUrl,
String user,
String password)
Returns true if the given URL can be accessed.
|
public static void main(String[] args) throws Exception
args - Exceptionpublic void printUsage()
org.overlord.sramp.shell.api.shell.ShellCommand#printUsage()public void printHelp()
org.overlord.sramp.shell.api.shell.ShellCommand#printHelp()public void execute()
throws Exception
Exceptionorg.overlord.sramp.shell.api.shell.ShellCommand#execute()public boolean urlExists(String checkUrl, String user, String password)
checkUrl - user - password - protected void applyAuth(HttpURLConnection connection, String user, String password)
connection - user - password - public void uploadBrmsPackage(String brmsBaseUrl, String pkgName, String tag, String userId, String password, org.overlord.sramp.client.SrampAtomApiClient client) throws Exception
brmsBaseUrl - pkgName - tag - userId - password - client - Exceptionprotected Map<String,org.overlord.sramp.atom.services.brms.packages.Packages.Package> getPkgsFromBrms(String brmsBaseUrl) throws Exception
brmsBaseUrl - Exceptionprotected String getAssetsStringFromBrms(String brmsBaseUrl, String pkgName) throws Exception
brmsBaseUrl - pkgName - Exceptionprotected org.overlord.sramp.atom.services.brms.assets.Assets getAssetsFromBrms(String brmsBaseUrl, String pkgName) throws Exception
brmsBaseUrl - pkgName - Exceptionpublic org.jboss.resteasy.client.ClientResponse<InputStream> getInputStream(String url) throws Exception
url - ExceptionCopyright © 2013 JBoss, a division of Red Hat. All rights reserved.