Package org.alfresco.utility.network
Class HttpConsoleOperation
java.lang.Object
org.alfresco.utility.network.HttpConsoleOperation
- Direct Known Subclasses:
ModelAndMessagesConsole,TenantConsole,WorkflowConsole
- Author:
- Paul Brodner
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static org.slf4j.Loggerprotected TasPropertiesprotected String -
Constructor Summary
ConstructorsConstructorDescriptionHttpConsoleOperation(String relativePath) Pass the relative path of the "console" page, take a look at the implementation ofTenantConsoleclass -
Method Summary
Modifier and TypeMethodDescriptionorg.jsoup.nodes.Elementexecute(org.apache.http.message.BasicNameValuePair command) This is the method that will perform the actual POST command on alfresco consoleprotected org.jsoup.nodes.DocumentPerform the get request on console page.protected Stringprotected Stringorg.apache.http.impl.client.CloseableHttpClientprotected org.jsoup.nodes.Element
-
Field Details
-
properties
-
LOG
protected static org.slf4j.Logger LOG -
relativePath
-
-
Constructor Details
-
HttpConsoleOperation
Pass the relative path of the "console" page, take a look at the implementation ofTenantConsoleclass- Parameters:
relativePath-
-
-
Method Details
-
getHttpClient
public org.apache.http.impl.client.CloseableHttpClient getHttpClient()- Returns:
- HTTP Client used in POST calls
-
getAlfrescoConsolePath
- Returns:
- the full path (server & relative path) of console page
-
getAdminBasicAuthentication
- Returns:
- Basic Authentication 64 bit encoded of admin user (defined in *.properties file)
-
execute
public org.jsoup.nodes.Element execute(org.apache.http.message.BasicNameValuePair command) throws IOException This is the method that will perform the actual POST command on alfresco console- Returns:
- Throws:
IOException
-
fullResponseDocument
Perform the get request on console page.- Returns:
Documentobject with entire HTML page- Throws:
IOException
-
parsedResponse
- Returns:
- the response value parsed
- Throws:
IOException
-