public class Dir2BrmsCommand
extends org.overlord.sramp.shell.api.AbstractShellCommand
| Constructor and Description |
|---|
Dir2BrmsCommand()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAssetsToPackageToBRMS(String brmsBaseUrl,
String pkgName,
String userId,
String password,
String packagePath)
Uploads assets to the correct package in BRMS.
|
protected void |
applyAuth(HttpURLConnection connection,
String user,
String password)
Applies authentication to the given HTTP URL connection.
|
void |
createNewPackage(String brmsBaseUrl,
String pkgName,
String userId,
String password)
A HTTP POST request to URL http://host:portnumber/repository/packages with the data:
|
void |
execute() |
static void |
main(String[] args)
Main entry point - for use outside the interactive shell.
|
void |
printHelp() |
void |
printUsage() |
boolean |
urlExists(String checkUrl,
String user,
String password)
Returns true if the given URL is accessible.
|
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 createNewPackage(String brmsBaseUrl, String pkgName, String userId, String password) throws Exception
brmsBaseUrl - pkgName - userId - password - Exceptionpublic void addAssetsToPackageToBRMS(String brmsBaseUrl, String pkgName, String userId, String password, String packagePath) throws Exception
brmsBaseUrl - pkgName - userId - password - packagePath - ExceptionCopyright © 2013 JBoss, a division of Red Hat. All rights reserved.