dke.smwp.db
Class DB_smwp_publish_pc

java.lang.Object
  |
  +--dke.smwp.db.DB_smwp_publish_pc

public class DB_smwp_publish_pc
extends java.lang.Object

database handling for table SMWP_PUBLISH_PC;

Defines the XML serialization of a page class. Every generated XML document uses the page definition as root element. Its child elements are the root elements of all assigned fragment classes.

SMWP_PUBLISH_PC (
   PC_NAME               VARCHAR2 (255)
   NS_URI                VARCHAR2 (500)
   PC_ELEMENT_LOCALNAME  VARCHAR2 (100)
   SYSTEM_ID             VARCHAR2 (500)
   MAINTENANCE_MODE      VARCHAR2 (50)
 )

Version:
1.0
Author:
Werner Enser

Field Summary
private  ConnectionPool _connectionPool
          ConnectionPool handle
static java.lang.String COLUMN_MAINTENANCE_MODE
          designates the method used to keep the generated documens up to date.
static java.lang.String COLUMN_NS_URI
          column name for page class namespace
static java.lang.String COLUMN_PC_ELEMENT_LOCALNAME
          column name for local name of the page
static java.lang.String COLUMN_PC_NAME
          column name for page class name
static java.lang.String COLUMN_STORAGE_MEDIA
          defines where the generated pages (xml documents) are to be saved
static java.lang.String COLUMN_SYSTEM_ID
          System ID (filename including relative filepath) for the generated XML document.
static java.lang.String TABLENAME_SMWP_PUBLISH_PC
          tablename for publication information of page class
 
Constructor Summary
DB_smwp_publish_pc()
          default constructor
 
Method Summary
 boolean checkPageClassExists(java.lang.String fc_name, java.lang.String maintenance_mode)
          checks if at least one page class exists which maps a given fragment class using a given maintenance mode
 boolean delete(java.lang.String pc_name)
          deletes publishing information for given page class
 java.util.Hashtable getXMLPublishStatement(java.lang.String pc_name)
          gets xml publishing information for a given page class
 void set(java.lang.String pc_name, java.lang.String ns_uri, java.lang.String pc_element_localname, java.lang.String system_id, java.lang.String maintenance_mode)
          saves xml publishing information for given Page Class
 void update(java.lang.String pc_name, java.lang.String ns_uri, java.lang.String pc_element_localname, java.lang.String system_id, java.lang.String maintenance_mode)
          updates xml publishing information of given Page Class
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

TABLENAME_SMWP_PUBLISH_PC

public static final java.lang.String TABLENAME_SMWP_PUBLISH_PC
tablename for publication information of page class

COLUMN_PC_NAME

public static final java.lang.String COLUMN_PC_NAME
column name for page class name

COLUMN_NS_URI

public static final java.lang.String COLUMN_NS_URI
column name for page class namespace

COLUMN_PC_ELEMENT_LOCALNAME

public static final java.lang.String COLUMN_PC_ELEMENT_LOCALNAME
column name for local name of the page

COLUMN_SYSTEM_ID

public static final java.lang.String COLUMN_SYSTEM_ID
System ID (filename including relative filepath) for the generated XML document. It begins with a '/' and ends without filename extension. Parameterized pages add their parameter value as postfix to the systemid (also providing the '.xml' extension)

COLUMN_MAINTENANCE_MODE

public static final java.lang.String COLUMN_MAINTENANCE_MODE
designates the method used to keep the generated documens up to date.

COLUMN_STORAGE_MEDIA

public static final java.lang.String COLUMN_STORAGE_MEDIA
defines where the generated pages (xml documents) are to be saved

_connectionPool

private ConnectionPool _connectionPool
ConnectionPool handle
Constructor Detail

DB_smwp_publish_pc

public DB_smwp_publish_pc()
default constructor
Method Detail

checkPageClassExists

public boolean checkPageClassExists(java.lang.String fc_name,
                                    java.lang.String maintenance_mode)
checks if at least one page class exists which maps a given fragment class using a given maintenance mode
Parameters:
fc_name - fragment class name (longname)
maintenance_mode - maintenance mode .. {"coreSMWP", "pullOfFragments", "onTheFly", null}
Returns:
true if page class exists otherwise

delete

public boolean delete(java.lang.String pc_name)
deletes publishing information for given page class
Parameters:
pc_name - name of page class
Returns:
true for successful deletion, false otherwise

getXMLPublishStatement

public java.util.Hashtable getXMLPublishStatement(java.lang.String pc_name)
gets xml publishing information for a given page class
Parameters:
pc_name - name of page class whose xml publish information is to be fetched
Returns:
publish pc statement as Hashtable, using the column names of smwp_publish_pc relation as key

set

public void set(java.lang.String pc_name,
                java.lang.String ns_uri,
                java.lang.String pc_element_localname,
                java.lang.String system_id,
                java.lang.String maintenance_mode)
         throws java.sql.SQLException
saves xml publishing information for given Page Class
Parameters:
pc_name - name of Page Class whose publishing information is to be saved
ns_uri - namespace for Page Class
pc_element_localnmae - name of Page Class in xml document
system_id - unique systemid for xml document; systemid = [filepath] first_part_of_filename
maintenance_mode - describes how Page Class fragments are updated; either "coreSMWP", or "onTheFly", or "pullOfFragments"
Throws:
java.sql.SQLException - failed to write publishing information

update

public void update(java.lang.String pc_name,
                   java.lang.String ns_uri,
                   java.lang.String pc_element_localname,
                   java.lang.String system_id,
                   java.lang.String maintenance_mode)
            throws java.sql.SQLException
updates xml publishing information of given Page Class
Parameters:
pc_name - name of Page Class whose publishing information is to be saved
ns_uri - namespace for Page Class
pc_element_localname - name of Page Class in xml document
system_id - unique systemid for xml document; systemid = [filepath] first_part_of_filename
maintenance_mode - describes how Page Class fragments are updated; either "coreSMWP", or "onTheFly", or "pullOfFragments"
Throws:
java.sql.SQLException - failed to update publishing information