© 2001 BEA Systems, Inc.

com.bea.commerce.platform.placeholder
Class PlaceholderHelper

java.lang.Object
  |
  +--com.bea.commerce.platform.placeholder.PlaceholderHelper
All Implemented Interfaces:
PlaceholderConstants

public class PlaceholderHelper
extends java.lang.Object
implements PlaceholderConstants

Utility routines used by the placeholder service and tag.


Fields inherited from interface com.bea.commerce.platform.placeholder.PlaceholderConstants
ADBUCKET_ENV_NAME, PLACEHOLDER_DB_NAME, PLACEHOLDER_NAME, PLACEHOLDER_PREVIEW_DB_NAME
 
Constructor Summary
PlaceholderHelper()
           
 
Method Summary
static java.lang.String cleanupNamespaces(java.lang.String src)
          remove the namespace qualifiers from an XML string
static void closeConnection(java.sql.Connection conn)
          close a connection obtained by getConnection().
static java.sql.Connection getConnection()
          this will get a connection for the Placeholders
static PlaceholderService getPlaceholderService()
          This will return the PlaceholderService EJB.
static java.lang.String getPreviewXML(long id)
          return the XML string for the query for the given id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlaceholderHelper

public PlaceholderHelper()
Method Detail

getPlaceholderService

public static PlaceholderService getPlaceholderService()
                                                throws javax.ejb.CreateException
This will return the PlaceholderService EJB. return an instance of the PlaceholderService EJB.
Returns:
the PlaceholderService EJB
Throws:
Create - when we fail to create the PlaceholderService

getPreviewXML

public static java.lang.String getPreviewXML(long id)
return the XML string for the query for the given id
Parameters:
id - the id of the preview

getConnection

public static java.sql.Connection getConnection()
                                         throws java.sql.SQLException,
                                                ToolkitException
this will get a connection for the Placeholders
Returns:
a JDBC Connection
Throws:
SQL - when we get a SQL failure
Toolkit - when the toolkit fails

closeConnection

public static void closeConnection(java.sql.Connection conn)
close a connection obtained by getConnection(). The connection may be null.
Parameters:
conn - A connection obtained from the getConnection method.

cleanupNamespaces

public static java.lang.String cleanupNamespaces(java.lang.String src)
remove the namespace qualifiers from an XML string

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved