dke.smwp.serialize
Class FragmentSer

java.lang.Object
  |
  +--dke.smwp.serialize.FragmentSer

public class FragmentSer
extends java.lang.Object

Serializes single fragments

Version:
1.0
Author:
Werner Enser

Field Summary
private  FragmentClassSer _fc
          fragment class which is being serialized
private  java.util.Hashtable _fParams
          parameters used by fragment class; using parameter names as key and parameter values as value
private static boolean DEBUG
          debug information
 
Constructor Summary
FragmentSer(FragmentClassSer fc, java.util.Hashtable fParams)
          default constructor:
 
Method Summary
 PageSer[] getAffectedPages(java.sql.Connection con, java.lang.String maintenance_mode, boolean fragmentUsedAsFoundationFragmentClass)
          gets all pages which need to be modified due modification of current fragment; if fragmentUsedAsFoundationFragmentClass is set to true only pages are fetched which use the current fragment as foundation fragment class; if the parameter is set to false all mapped page classes are mapped;
 FragmentClassSer getFragmentClass()
          get fragment class
 java.util.Hashtable getParameters()
          get fragment class parameters
 void serialize(java.sql.Connection con, org.xml.sax.ContentHandler hdl)
          serializes fragment
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
debug information

_fc

private FragmentClassSer _fc
fragment class which is being serialized

_fParams

private java.util.Hashtable _fParams
parameters used by fragment class; using parameter names as key and parameter values as value
Constructor Detail

FragmentSer

public FragmentSer(FragmentClassSer fc,
                   java.util.Hashtable fParams)
default constructor:
Parameters:
fc - fragment class
fParams - Fragment parameters in the form of a Hashtable, a key corresponds to a parameter name, and a value to a parameter's actual value.
Method Detail

getFragmentClass

public FragmentClassSer getFragmentClass()
get fragment class

getParameters

public java.util.Hashtable getParameters()
get fragment class parameters

serialize

public void serialize(java.sql.Connection con,
                      org.xml.sax.ContentHandler hdl)
               throws org.xml.sax.SAXException,
                      java.sql.SQLException
serializes fragment
Parameters:
con - Connection handle
hdl - document content handle
Throws:
org.xml.sax.SAXException - generating xml document failed
java.sql.SQLException - fetching data failed

getAffectedPages

public PageSer[] getAffectedPages(java.sql.Connection con,
                                  java.lang.String maintenance_mode,
                                  boolean fragmentUsedAsFoundationFragmentClass)
                           throws java.sql.SQLException
gets all pages which need to be modified due modification of current fragment;

if fragmentUsedAsFoundationFragmentClass is set to true only pages are fetched which use the current fragment as foundation fragment class; if the parameter is set to false all mapped page classes are mapped;

Parameters:
con - Connection handle
maintenance_mode - {"coreSMWP", "onTheFly", "pullOfFragments", null}
fragmentUsedAsFoundationFragmentClass - true fetches only pages which use the current fragment as foundation fragment class; false fetches all pages the fragment is mapped to
Returns:
Pages that need to be modified due to modification of the given fragment.
Throws:
java.sql.SQLException - fetching data failed