Package com.saperion.util
Class ContentUtil
java.lang.Object
com.saperion.util.ContentUtil
Utility methods for content-loading.
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
changeElementNumberIfRequired
(com.saperion.connector.SaClassicConnector connector, String xhdoc, int element) If required, returns another element-number to use when loading content.
-
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 usexhdoc
- xhdoc of the document to loadelement
- requested element number- Returns:
- requested element number or -1, if required
- Throws:
com.saperion.exception.SaSystemException
- system exception when inspecting the document's structurecom.saperion.exception.SaAuthenticationException
- authentication exception when inspecting the document's structure
-