public final class Http4PackageManagerClient extends AbstractPackageManagerClient
AbstractPackageManagerClient.Either<T,U>, AbstractPackageManagerClient.ResponseBuilder
CMD_BUILD, CMD_CONTENTS, CMD_CREATE, CMD_DELETE, CMD_DRY_RUN, CMD_INSTALL, CMD_REPLICATE, CMD_REWRAP, CMD_UNINSTALL, CMD_UPLOAD, CONSOLE_UI_BASE_PATH, CONSOLE_UI_DOWNLOAD_PATH, CONSOLE_UI_LIST_PATH, CONSOLE_UI_UPDATE_PATH, DEFAULT_BASE_URL, DEFAULT_CHARSET, DEFAULT_LISTENER, DEFAULT_PASSWORD, DEFAULT_USERNAME, HTML_SERVICE_PATH, JSON_SERVICE_PATH, KEY_ACHANDLING, KEY_AUTOSAVE, KEY_CHARSET, KEY_CMD, KEY_FILTER, KEY_FORCE, KEY_GROUP, KEY_GROUP_NAME, KEY_HAS_SNAPSHOT, KEY_INCLUDE_VERSIONS, KEY_MESSAGE, KEY_NAME, KEY_NEEDS_REWRAP, KEY_NO_SLING, KEY_PACKAGE, KEY_PACKAGE_NAME, KEY_PACKAGE_VERSION, KEY_PATH, KEY_QUERY, KEY_RECURSIVE, KEY_RESULTS, KEY_SUCCESS, KEY_TOTAL, KEY_VERSION, LEGACY_PARAM_PASSWORD, LEGACY_PARAM_TOKEN, LEGACY_PARAM_USERID, LEGACY_PARAM_WORKSPACE, LEGACY_PATH, LEGACY_VALUE_TOKEN, LEGACY_VALUE_WORKSPACE, LOGIN_PARAM_CHARSET, LOGIN_PARAM_PASSWORD, LOGIN_PARAM_USERNAME, LOGIN_PARAM_VALIDATE, LOGIN_PATH, LOGIN_VALUE_CHARSET, LOGIN_VALUE_VALIDATE, MIME_ZIP, MIN_AUTOSAVE, NO_SUCH_PACK_ID, SERVICE_BASE_PATH, VAL_NO_SLING
Constructor and Description |
---|
Http4PackageManagerClient() |
Http4PackageManagerClient(org.apache.http.impl.client.AbstractHttpClient client) |
Modifier and Type | Method and Description |
---|---|
protected AbstractPackageManagerClient.Either<? extends Exception,Boolean> |
checkServiceAvailability(boolean checkTimeout,
long timeoutRemaining)
The CRX PackageManagerServlet does not support GET requests.
|
org.apache.http.impl.client.AbstractHttpClient |
getClient() |
org.apache.http.protocol.HttpContext |
getHttpContext() |
protected net.adamcin.granite.client.packman.http4.Http4PackageManagerClient.Http4ResponseBuilder |
getResponseBuilder() |
boolean |
login(String username,
String password)
Login to CRX using a POST request /crx/j_security_check.
|
void |
preemptLogin(String username,
String password)
Enable preemptive authentication using Basic Auth credentials.
|
void |
setHttpContext(org.apache.http.protocol.HttpContext httpContext) |
build, build, constructUrl, contents, contents, create, createDownloadResponse, delete, download, downloadToDirectory, dryRun, dryRun, existsOnServer, getBaseUrl, getCharset, getConsoleUiUrl, getConsoleUiUrl, getDownloadUrl, getHtmlUrl, getHtmlUrl, getJsonUrl, getJsonUrl, getListUrl, getLoginUrl, getRequestTimeout, getServiceTimeout, getUpdateUrl, getWaitDelay, identify, identify, install, install, left, list, list, list, move, parseDetailedResponse, parseDownloadResponse, parseListResponse, parseSimpleResponse, parseSimpleResponse, replicate, rewrap, rewrap, right, setBaseUrl, setCharset, setRequestTimeout, setServiceTimeout, setWaitDelay, uninstall, uninstall, updateFilter, upload, waitForService
public Http4PackageManagerClient()
public Http4PackageManagerClient(org.apache.http.impl.client.AbstractHttpClient client)
public org.apache.http.impl.client.AbstractHttpClient getClient()
public org.apache.http.protocol.HttpContext getHttpContext()
public void setHttpContext(org.apache.http.protocol.HttpContext httpContext)
public void preemptLogin(String username, String password)
AbstractPackageManagerClient
preemptLogin
in class AbstractPackageManagerClient
username
- the usernamepassword
- the passwordpublic boolean login(String username, String password) throws IOException
AbstractPackageManagerClient
login
in class AbstractPackageManagerClient
username
- the usernamepassword
- the passwordIOException
- for "a failure to communicate"protected AbstractPackageManagerClient.Either<? extends Exception,Boolean> checkServiceAvailability(boolean checkTimeout, long timeoutRemaining)
AbstractPackageManagerClient
checkServiceAvailability
in class AbstractPackageManagerClient
checkTimeout
- set to true to enforce a timeouttimeoutRemaining
- remaining timeout in millisecondsprotected net.adamcin.granite.client.packman.http4.Http4PackageManagerClient.Http4ResponseBuilder getResponseBuilder()
getResponseBuilder
in class AbstractPackageManagerClient
Copyright © 2013-2017. All Rights Reserved.