Package lumis.portal.presentation
Class PageRendererUtil
- java.lang.Object
-
- lumis.portal.presentation.PageRendererUtil
-
public class PageRendererUtil extends Object
Contains utility methods to help the page render.- Since:
- 5.6.0
- Version:
- $Revision: 22420 $ $Date: 2019-02-19 16:21:02 -0300 (Tue, 19 Feb 2019) $
-
-
Constructor Summary
Constructors Constructor Description PageRendererUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>
getHolderServiceInterfaceInstanceIds(String holderId, Document layoutDocument)
Returns the identifiers of the service interface instances in a holder.static URL
getLayoutFilePath(PageWebResource pageWebResource)
Returns the path to the layout file.static Document
getPageLayout(SessionConfig sessionConfig, PageWebResource pageWebResource, ITransaction transaction, int mode)
Returns current page's layoutdocument
.static Collection<String>
getPageLayoutHolderIds(Document pageLayout, PageWebResource pageWebResource)
Returns a collection of holder ids for the given page layoutDocument
if thePageWebResource
has a layout file path, else returns null.static String
getServiceInterfaceInstanceSafeModeHTML(String serviceInterfaceInstanceId)
Returns the HTML used for a service interface instance rendering in safe mode.static CharSequence
renderServiceInterfaceInstance(String baseServiceInterfaceInstanceId, LayoutFilePage page)
Returns the HTML source code for the service interface instance instantiated on a page.
-
-
-
Method Detail
-
getServiceInterfaceInstanceSafeModeHTML
public static String getServiceInterfaceInstanceSafeModeHTML(String serviceInterfaceInstanceId) throws PortalException
Returns the HTML used for a service interface instance rendering in safe mode.- Returns:
- the HTML code.
- Throws:
PortalException
- Since:
- 5.6.0
-
renderServiceInterfaceInstance
public static CharSequence renderServiceInterfaceInstance(String baseServiceInterfaceInstanceId, LayoutFilePage page)
Returns the HTML source code for the service interface instance instantiated on a page.- Parameters:
baseServiceInterfaceInstanceId
- the service interface instance identifier (before replacements).page
- the page that contains the service instance to be rendered.- Returns:
- the HTML source code for the service interface instance instantiated on a page.
- Since:
- 6.0.0
-
getPageLayout
public static Document getPageLayout(SessionConfig sessionConfig, PageWebResource pageWebResource, ITransaction transaction, int mode)
Returns current page's layoutdocument
. Result is cached during the request's live time.- Returns:
- current page's layout.
- Since:
- 6.0.0
-
getHolderServiceInterfaceInstanceIds
public static List<String> getHolderServiceInterfaceInstanceIds(String holderId, Document layoutDocument)
Returns the identifiers of the service interface instances in a holder.- Parameters:
holderId
- the holder identifier.- Returns:
- the service interface instance identifiers, ordered according to their place in the holder.
- Since:
- 6.0.0
-
getLayoutFilePath
public static URL getLayoutFilePath(PageWebResource pageWebResource)
Returns the path to the layout file.- Returns:
- the path to the layout file, or
null
if no layout file is set. - Since:
- 6.0.0
-
getPageLayoutHolderIds
public static Collection<String> getPageLayoutHolderIds(Document pageLayout, PageWebResource pageWebResource)
Returns a collection of holder ids for the given page layoutDocument
if thePageWebResource
has a layout file path, else returns null.- Parameters:
pageLayout
- the page layout document.pageWebResource
- the page web resource.- Returns:
- A collection of holder ids for the given page layout
Document
if thePageWebResource
has a layout file path, else returns null. - Since:
- 6.0.0
-
-