Class ContentUtil


  • public final class ContentUtil
    extends java.lang.Object
    Utility methods for content-loading.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int changeElementNumberIfRequired​(com.saperion.connector.SaClassicConnector connector, java.lang.String xhdoc, int element)
      If required, returns another element-number to use when loading content.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • changeElementNumberIfRequired

        public static int changeElementNumberIfRequired​(com.saperion.connector.SaClassicConnector connector,
                                                        java.lang.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