lumis.portal.page
Class PageLayoutUtil

Package class diagram package PageLayoutUtil
java.lang.Object
  extended by lumis.portal.page.PageLayoutUtil

public abstract class PageLayoutUtil
extends Object

Utility class for operating pages' layouts.

Since:
5.6.0

Nested Class Summary
static interface PageLayoutUtil.IMappingResolver
          Provides a method to resolve a service interface instance identifier into another one.
 
Field Summary
static String WITHOUT_HOLDER_ID
          Holder identifier used for interfaces without holder.
 
Constructor Summary
PageLayoutUtil()
           
 
Method Summary
static NodeList getInterfaceInstanceNodeList(Document document)
          Gets a node list of the service interface instances contained into the given layout document.
static List<Node> getLayoutInterfaceInstanceNodes(Document document)
          Gets a list with the service interface instance nodes present into the given layout document.
static List<String> getLayoutServiceInstanceIds(Document document)
          Gets a list of the service interface instance identifiers contained into the Document.
static String getNodeInterfaceInstanceId(Node interfaceInstanceNode)
          Gets the service interface instance identifier present into its Node.
static void replaceInterfaceInstanceIds(Document layout, Map<String,String> mapping)
          Replaces service interface instance identifiers of given layout using the Map to resolve the identifiers.
static void replaceInterfaceInstanceIds(Document layoutDocument, PageLayoutUtil.IMappingResolver resolver)
          Replaces service interface instance identifiers of given layout using the given PageLayoutUtil.IMappingResolver to resolve the identifiers.
static void setServiceInterfaceInstanceIdInNode(Node node, String serviceInterfaceInstanceId)
          Sets the service interface instance identifier to the given service interface instance node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WITHOUT_HOLDER_ID

public static final String WITHOUT_HOLDER_ID
Holder identifier used for interfaces without holder.

Since:
5.6.0
See Also:
Constant Field Values
Constructor Detail

PageLayoutUtil

public PageLayoutUtil()
Method Detail

replaceInterfaceInstanceIds

public static void replaceInterfaceInstanceIds(Document layout,
                                               Map<String,String> mapping)
                                        throws PortalException
Replaces service interface instance identifiers of given layout using the Map 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(Document layoutDocument,
                                               PageLayoutUtil.IMappingResolver resolver)
                                        throws PortalException
Replaces service interface instance identifiers of given layout using the given PageLayoutUtil.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 List<String> getLayoutServiceInstanceIds(Document document)
                                                throws PortalException
Gets a list of the service interface instance identifiers contained into the Document.

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 String getNodeInterfaceInstanceId(Node interfaceInstanceNode)
                                         throws PortalException
Gets the service interface instance identifier present into its Node.

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 List<Node> getLayoutInterfaceInstanceNodes(Document document)
Gets a list with the service interface instance nodes present into the given layout document.

Parameters:
document - the layout document.
Returns:
a list with the service interface instance identifiers.
Since:
5.6.0

getInterfaceInstanceNodeList

public static NodeList getInterfaceInstanceNodeList(Document document)
Gets a node list of the service interface instances contained into the given layout document.

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(Node node,
                                                       String serviceInterfaceInstanceId)
Sets the service interface instance identifier to the given service interface instance node.

Parameters:
node - the service interface instance node.
serviceInterfaceInstanceId - the service interface instance identifier ti be set.
Since:
5.6.0


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.