Class ContentUtil

java.lang.Object
com.saperion.util.ContentUtil

public final class ContentUtil extends Object
Utility methods for content-loading.
  • Method Details

    • changeElementNumberIfRequired

      public static int changeElementNumberIfRequired(com.saperion.connector.SaClassicConnector connector, String xhdoc, int element) throws com.saperion.exception.SaSystemException, com.saperion.exception.SaAuthenticationException
      If required, returns another element-number to use when loading content. If a multipage-document is loaded and content.mergeMultipageDocs is true, -1 will be returned in order to retrieve a merged document containing all pages.
      Parameters:
      connector - classic connector instance to use
      xhdoc - xhdoc of the document to load
      element - requested element number
      Returns:
      requested element number or -1, if required
      Throws:
      com.saperion.exception.SaSystemException - system exception when inspecting the document's structure
      com.saperion.exception.SaAuthenticationException - authentication exception when inspecting the document's structure