fr.paris.lutece.plugins.comarquage.util.localnodes
Class XslXalanExtension

java.lang.Object
  extended by fr.paris.lutece.plugins.comarquage.util.localnodes.XslXalanExtension

public class XslXalanExtension
extends java.lang.Object

This class is called by the xsl stylesheet "ajout_local.xsl". It is responsible for adding to the public xml stream the local themes/cards that where referenced by the deamon.


Constructor Summary
XslXalanExtension()
           
 
Method Summary
 void addTitle(java.lang.StringBuffer buf, java.lang.String strKeyPathTemp, java.lang.String strKeyTemp, java.lang.String strSubTitle, java.lang.String strChildNodeName)
          Method called to add one line of path
 void completePathInfo(java.lang.StringBuffer buf, java.lang.String strKeyPathTemp, java.lang.String strKeyTemp, java.util.Map<java.lang.String,java.lang.String> mapLocalCard, java.lang.String strChildNodeName, java.util.ArrayList<java.util.ArrayList<java.lang.String>> arKeyResult)
          Method called to complete missing line path
 java.lang.String createPath(java.util.List<java.lang.String> arKeyTemp)
          Create path using arraylist
 java.lang.String nodesAttached(org.apache.xalan.extensions.ExpressionContext context, java.lang.String strThemeId, java.lang.String strPluginName)
          Method called from the xsl stylesheet and that performs the addintion of the local nodes to the xml stream.
 java.lang.String resolvePath(org.apache.xalan.extensions.ExpressionContext context, java.lang.String initialKey, org.w3c.dom.Node node, java.lang.String strPluginName)
          Method called from the xsl stylesheet and that performs the creation of the path
 void suppKey(java.util.List<java.util.ArrayList<java.lang.String>> arKeyResult, java.lang.String strKeyTemp)
          Delete key in an arrayList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XslXalanExtension

public XslXalanExtension()
Method Detail

nodesAttached

public java.lang.String nodesAttached(org.apache.xalan.extensions.ExpressionContext context,
                                      java.lang.String strThemeId,
                                      java.lang.String strPluginName)
Method called from the xsl stylesheet and that performs the addintion of the local nodes to the xml stream.

Parameters:
context - the expression context
strThemeId - the id of the current theme (where local nodes might have to be added
strPluginName - the plugin name
Returns:
the xml code corresponding to the local nodes to add to this theme

resolvePath

public java.lang.String resolvePath(org.apache.xalan.extensions.ExpressionContext context,
                                    java.lang.String initialKey,
                                    org.w3c.dom.Node node,
                                    java.lang.String strPluginName)
                             throws javax.xml.transform.TransformerException
Method called from the xsl stylesheet and that performs the creation of the path

Parameters:
context - the expression context
initialKey - the id paramater (node or card asked)
node - path node containing all paths available
strPluginName - the plugin name
Returns:
the xml code corresponding to the path
Throws:
javax.xml.transform.TransformerException - exception during path resolving

createPath

public java.lang.String createPath(java.util.List<java.lang.String> arKeyTemp)
Create path using arraylist

Parameters:
arKeyTemp - arrayList of keys
Returns:
list of keys separated by slash

addTitle

public void addTitle(java.lang.StringBuffer buf,
                     java.lang.String strKeyPathTemp,
                     java.lang.String strKeyTemp,
                     java.lang.String strSubTitle,
                     java.lang.String strChildNodeName)
Method called to add one line of path

Parameters:
buf - result stringBuffer
strKeyPathTemp - value of attribute id of the node created
strKeyTemp - value of attribute key of the node created
strSubTitle - value of attribute title of the node created
strChildNodeName - local name of the node created

completePathInfo

public void completePathInfo(java.lang.StringBuffer buf,
                             java.lang.String strKeyPathTemp,
                             java.lang.String strKeyTemp,
                             java.util.Map<java.lang.String,java.lang.String> mapLocalCard,
                             java.lang.String strChildNodeName,
                             java.util.ArrayList<java.util.ArrayList<java.lang.String>> arKeyResult)
Method called to complete missing line path

Parameters:
buf - result StringBuffer
strKeyPathTemp - value of attribute id of the node created
strKeyTemp - key
mapLocalCard - map of local cards
strChildNodeName - local name of the node created
arKeyResult - arrayList of keys

suppKey

public void suppKey(java.util.List<java.util.ArrayList<java.lang.String>> arKeyResult,
                    java.lang.String strKeyTemp)
Delete key in an arrayList

Parameters:
arKeyResult - arrayList of keys
strKeyTemp - key


Copyright © 2007 Mairie de Paris. All Rights Reserved.