Package lumis.portal.page
Class PageLayoutUtil
- java.lang.Object
-
- lumis.portal.page.PageLayoutUtil
-
public abstract class PageLayoutUtil extends java.lang.Object
Utility class for operating pages' layouts.- Since:
- 5.6.0
- Version:
- $Revision$ $Date$
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
PageLayoutUtil.IMappingResolver
Provides a method to resolve a service interface instance identifier into another one.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
WITHOUT_HOLDER_ID
Holder identifier used for interfaces without holder.
-
Constructor Summary
Constructors Constructor Description PageLayoutUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.w3c.dom.NodeList
getInterfaceInstanceNodeList(org.w3c.dom.Document document)
Gets anode list
of the service interface instances contained into the given layoutdocument
.static java.util.List<org.w3c.dom.Node>
getLayoutInterfaceInstanceNodes(org.w3c.dom.Document document)
Gets alist
with the service interface instancenodes
present into the given layoutdocument
.static java.util.List<java.lang.String>
getLayoutServiceInstanceIds(org.w3c.dom.Document document)
Gets alist
of theservice interface instance identifiers
contained into theDocument
.static java.lang.String
getNodeInterfaceInstanceId(org.w3c.dom.Node interfaceInstanceNode)
Gets the service interface instance identifier present into itsNode
.static void
replaceInterfaceInstanceIds(org.w3c.dom.Document layout, java.util.Map<java.lang.String,java.lang.String> mapping)
Replaces service interface instance identifiers of givenlayout
using theMap
to resolve the identifiers.static void
replaceInterfaceInstanceIds(org.w3c.dom.Document layoutDocument, PageLayoutUtil.IMappingResolver resolver)
Replaces service interface instance identifiers of givenlayout
using the givenPageLayoutUtil.IMappingResolver
to resolve the identifiers.static void
setServiceInterfaceInstanceIdInNode(org.w3c.dom.Node node, java.lang.String serviceInterfaceInstanceId)
Sets the service interface instance identifier to the givenservice interface instance node
.
-
-
-
Field Detail
-
WITHOUT_HOLDER_ID
public static final java.lang.String WITHOUT_HOLDER_ID
Holder identifier used for interfaces without holder.- Since:
- 5.6.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
replaceInterfaceInstanceIds
public static void replaceInterfaceInstanceIds(org.w3c.dom.Document layout, java.util.Map<java.lang.String,java.lang.String> mapping) throws PortalException
Replaces service interface instance identifiers of givenlayout
using theMap
to resolve the identifiers.- Parameters:
layout
- the layout to be altered.mapping
- the mapping used to resolve the service interface instance identifiers.- Throws:
PortalException
- Since:
- 5.6.0
-
replaceInterfaceInstanceIds
public static void replaceInterfaceInstanceIds(org.w3c.dom.Document layoutDocument, PageLayoutUtil.IMappingResolver resolver) throws PortalException
Replaces service interface instance identifiers of givenlayout
using the givenPageLayoutUtil.IMappingResolver
to resolve the identifiers.- Parameters:
layoutDocument
- the layout to be altered.resolver
- the resolver that will manage interface instance identifiers resolving.- Throws:
PortalException
- Since:
- 5.6.0
-
getLayoutServiceInstanceIds
public static java.util.List<java.lang.String> getLayoutServiceInstanceIds(org.w3c.dom.Document document) throws PortalException
Gets alist
of theservice interface instance identifiers
contained into theDocument
.- Parameters:
document
- the layout document.- Returns:
- a list containing the service interface instance identifiers contained into the layout document.
- Throws:
PortalException
- Since:
- 5.6.0
-
getNodeInterfaceInstanceId
public static java.lang.String getNodeInterfaceInstanceId(org.w3c.dom.Node interfaceInstanceNode) throws PortalException
Gets the service interface instance identifier present into itsNode
.- Parameters:
interfaceInstanceNode
- the node from where it should be read the service interface instance identifier.- Returns:
- the service interface instance identifier.
- Throws:
PortalException
- Since:
- 5.6.0
-
getLayoutInterfaceInstanceNodes
public static java.util.List<org.w3c.dom.Node> getLayoutInterfaceInstanceNodes(org.w3c.dom.Document document)
Gets alist
with the service interface instancenodes
present into the given layoutdocument
.- Parameters:
document
- the layout document.- Returns:
- a list with the service interface instance identifiers.
- Since:
- 5.6.0
-
getInterfaceInstanceNodeList
public static org.w3c.dom.NodeList getInterfaceInstanceNodeList(org.w3c.dom.Document document)
Gets anode list
of the service interface instances contained into the given layoutdocument
.- Parameters:
document
- the layout document.- Returns:
- a node list of the service interface instances contained into the given layout document.
- Since:
- 5.6.0
-
setServiceInterfaceInstanceIdInNode
public static void setServiceInterfaceInstanceIdInNode(org.w3c.dom.Node node, java.lang.String serviceInterfaceInstanceId)
Sets the service interface instance identifier to the givenservice interface instance node
.- Parameters:
node
- the service interface instance node.serviceInterfaceInstanceId
- the service interface instance identifier ti be set.- Since:
- 5.6.0
-
-