Class HttpConsoleOperation

java.lang.Object
org.alfresco.utility.network.HttpConsoleOperation
Direct Known Subclasses:
ModelAndMessagesConsole, TenantConsole, WorkflowConsole

public abstract class HttpConsoleOperation extends Object
Author:
Paul Brodner
  • Field Details

    • properties

      @Autowired protected TasProperties properties
    • LOG

      protected static org.slf4j.Logger LOG
    • relativePath

      protected String relativePath
  • Constructor Details

    • HttpConsoleOperation

      public HttpConsoleOperation(String relativePath)
      Pass the relative path of the "console" page, take a look at the implementation of TenantConsole class
      Parameters:
      relativePath -
  • Method Details

    • getHttpClient

      public org.apache.http.impl.client.CloseableHttpClient getHttpClient()
      Returns:
      HTTP Client used in POST calls
    • getAlfrescoConsolePath

      protected String getAlfrescoConsolePath()
      Returns:
      the full path (server & relative path) of console page
    • getAdminBasicAuthentication

      protected String 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

      protected org.jsoup.nodes.Document fullResponseDocument() throws IOException
      Perform the get request on console page.
      Returns:
      Document object with entire HTML page
      Throws:
      IOException
    • parsedResponse

      protected org.jsoup.nodes.Element parsedResponse() throws IOException
      Returns:
      the response value parsed
      Throws:
      IOException