planetj.dataengine.application
Class DataEngineApplicationBuilderServlet

java.lang.Object
  extended byHttpServlet
      extended byplanetj.dataengine.DataEngineServlet
          extended byplanetj.dataengine.application.DataEngineApplicationBuilderServlet
All Implemented Interfaces:
IApplication, IApplicationJSPs, IDataEngine, IJSPPages, INavigation, ISecured, ISecuredSignOnAndRegistration, IServletParameters, IWOWJSPs

public class DataEngineApplicationBuilderServlet
extends DataEngineServlet
implements IApplication, ISecuredSignOnAndRegistration

The servlet for creating/managing a DataEngineApplication Creation date: (12/16/01 3:32:25 PM)

See Also:
Serialized Form

Field Summary
static java.lang.String ACTION_CONNECTION_POOL_RESTART
          Restart the connection pool
static java.lang.String ACTION_CONNECTION_POOL_START
          Start the connection pool
static java.lang.String ACTION_CONNECTION_POOL_STOP
          Stop the connection pool
static java.lang.String ADMIN_MANAGER_URL
          Admin Application URL key
static java.lang.String CREATE_DATA_INQUIRY
           
static java.lang.String FD_MANAGER_URL
          FDManager URL key
static java.lang.String OPERATIONS_APPLICATION
          Application key
static java.lang.String PREVIEW_APPLICATION
           
static java.lang.String SIGN_ON_LIBRARY
           
static java.lang.String SIGN_ON_TABLE
           
static java.lang.String WAB_APPLICATION
          Deprecated. replaced with WOW_APPLICATION
static int WAB_APPLICATION_ID
           
static int WAB_APPLICATION_OWNER_ID
           
static java.lang.String WOW_APPLICATION
           
static int WOW_MANAGE_OPERATIONS_ID
           
 
Fields inherited from interface planetj.dataengine.application.IApplication
APPLICATION_CLASS, APPLICATION_HTTP_ID, APPLICATION_ID, APPLICATION_JSP_FILE, APPLICATION_METADATA_ALIAS, APPLICATION_NAME, APPLICATION_RESULTS_KEY, APPLICATION_TABLE_NAME, AUTO_RUN_STATUS, COMPANY_ID, COMPANY_NAME, CONNECTION_ALIAS, CURRENT_EXECUTING_APPLICATION, CURRENT_WOW_APPLICATION, DESCRIPTION, ERROR_JSP_FILE, INITIAL_VIEW, MANAGE, OPTIONAL_SIGNON, OWNER_ID, PASSWORD, PROPERTIES, SERVLET_URI, SIGN_ON_CLASS, SIGN_ON_OP_ID, SIGN_ON_URI, THEME_ID, USER_ID, VERIFY_CONNECTION
 
Fields inherited from interface planetj.dataengine.security.http.ISecured
SECURED_APPLICATION
 
Fields inherited from interface planetj.dataengine.IDataEngine
ACTION, ADMIN_MAGIC_REQUEST, ALL_SERVLET_PATHS, ALLOW_MULTIPLE_DELETES, ALLOW_MULTIPLE_SELECTION, APPLICATION, COMPANY, CONTEXT, CONTEXT_KEY, CONTROLLER_SERVLET_PATH, CONTROLLER_SERVLET_URI, CURRENT_SQL_CONTEXT, CURRENT_SQL_RECORD_COUNT, CURRENT_SQL_STRING, CURRENT_TOC, DATA_ENGINE_MESSAGE, DATAENGINE_ADMIN_SERVLET_PATH, DATAENGINE_APPLICATION_BUILDER_SERVLET_PATH, DATAENGINE_APPLICATION_SERVLET_PATH, DATAEXPLORER_SERVLET_PATH, DE_ACTION_CATEGORY, DE_ACTION_SIGN_ON, DEFAULT_LAYOUT_DISPLAY_PROPERTIES, DEFAULT_RESULTS_KEY, DETAILS, EDITABLE_OPERATIONS, ENVIRONMENT_MODE_DEVELOPMENT, ENVIRONMENT_MODE_PRODUCTION, ERROR_APPLICATION_INVALID, ERROR_COMPANY_INVALID, ERROR_MESSAGE, ERROR_MESSAGE_NEXT_PAGE, EXCEPTION, EXCEPTION_JSP_KEY, FD_LIBRARY_LIST, FD_TABLE_LIST, FIELD, FIELD_DESCRIPTOR_SERVLET_PATH, FIELD_LIST, FIELD_NAMES, FIELDS, FORM_LIB_TBL_FLD, FUNCTION, HIDDEN_APPLICATION_ID, HIDDEN_APPLICATION_METADATA_ALIAS, HTTP_ATTRIBUTE_LIBRARY_LIST, HTTP_ATTRIBUTE_REPLACEMENT_LIBRARIES, HTTP_ATTRIBUTE_THEME_ID, HTTP_METHOD, HTTP_PARAMETER_LIBRARY_LIST, HTTP_PARAMETER_REPLACEMENT_LIBRARIES, HTTP_PARAMETER_THEME_ID, HTTP_PARAMETER_USER_LIBRARY, HTTP_SAME_NEW_GROUP, IGNORE_MAGIC_REQUEST, KEEP_INSERT_VALUES, LAST_JSP_CALLED, LAUNCHED_FROM_BUILDER, LIBRARY, MAGIC_ACTION_ROW, MODE, MODE_COPY, MODE_DELETE, MODE_EDIT, MODE_INSERT, MODE_INT_COPY, MODE_INT_DELETE, MODE_INT_EDIT, MODE_INT_INSERT, MODE_INT_SEARCH, MODE_INT_UNKNOWN, MODE_INT_VIEW, MODE_SEARCH, MODE_UNKNOWN, MODE_VIEW, MULTIPLESELECTION, NEW_ROW, NEW_WINDOW_FOR_RESULTS, NEXT_PAGE, NO_COOKIES_FLAG, NO_COOKIES_JSP, NOSELECTION, OPERATION, OPERATION_KEY, OWNER_ID, PAGE, PAGE_REQUEST_EXECUTED, PAGE_VALIDATION_REQUIRED, PARAMETER_VALUE_PREFIX, PREVIOUS_PAGE, READ_ONLY_VALUE, RESERVED_PARAMETERS, RETRIEVE_ALL_COLUMNS_ON_COPY, RETRIEVE_ALL_COLUMNS_ON_EDIT, RETRIEVE_ALL_COLUMNS_ON_VIEW, RETRIEVE_FIELDS, RETRIEVE_TABLES, RETURN_URI, ROW, ROW_ALTERNATE_KEY, ROW_COLLECTION, ROW_COLLECTION_KEY, ROW_KEY, ROW_KEY_FOR_DETAILS, ROW_SELECTION_JS_INCLUDED, ROWS_ALTERED_COUNT, SAVED_HTML, SAVED_HTML_KEY, SELECTED_ROW, SELECTED_ROW_COLLECTION, SELECTEDOBJECTS, SERVLET_CONTEXT, SESSION_RANDOM_NUMBER, SESSION_SIGNED_OFF, SESSION_SIGNON_RECEIPT_KEY, SESSION_TIMED_OUT, SHOW_FD_QUICK_LINKS, SHOW_UPDATABLE_TABLES, SHOW_UPDATEABLE_ROW, SIGN_ON_CALLER, SIGNON, SIGNON_AND_REGISTRATION_SERVLET_PATH, SINGLESELECTION, STATEMENT, SYSTEM, SYSTEMS_LIST, TAB_PARENT_ROW_KEY, TABLE, TRANSIENT, UNSUPPORTED, URI_PREFIX, USER_LIBRARY_HTTP_PARAMETER, USER_LIBRARY_HTTP_SESSION_KEY, USER_MESSAGE, USER_PREFERENCES, VALID_SIGNON, WAITING_MAGIC_REQUEST, WAITING_SERVLET, WINDOW_CLOSE, WINDOW_NORMAL, WINDOW_POPUP, WINDOW_TYPE_PARAM
 
Fields inherited from interface planetj.dataengine.INavigation
CHILD_PREFIX, GROUP_ATTRIBUTES, GROUP_ID, INITIAL_GROUP_ID, INITIAL_PAGE_ID, INITIAL_REQUEST_ID, NAVIGATION_CHECKED, NAVIGATION_OBJECT_LIST_PREFIX, NEW_GROUP_ID, NEW_REQUEST_ID, NEW_SESSION_ID, PAGE_ATTRIBUTES, PAGE_ID, PARENT_PREFIX, PERSISTENT_ATTRIBUTES, PREVIOUS_ATTRIBUTES, PREVIOUS_GROUP_ID, PREVIOUS_PAGE_ID, PREVIOUS_REQUEST_ID, REQUEST_ID, RESET_GROUP_ID, RESET_NAVIGATION_IDS, RESET_NAVIGATION_IDS_COMPLETED, RESET_PAGE_ID, RESET_REQUEST_ID, RESET_SESSION_ID, SESSION_ID
 
Fields inherited from interface planetj.dataengine.IServletParameters
ALL, AUTO_RUN, BASE_URL, CACHE_TRACK_ON, CACHE_TRACK_WRITE_TO_FILE, CLEAN_UP_TIME, DATA_ACCESS_TRACKING, DATABASE, DRIVER, ENVIRONMENT_MODE, JDBC_OPTIMIZATIONS, LIBRARY_LIST, MAX_CONNECTIONS, METADATA_LIBRARY, METADATA_USER_LIBRARY, MIN_CONNECTIONS, ORPHAN_TIMEOUT, PASSWORD, PORT, REPLACEMENT_LIBRARIES, SYSTEM_ALIAS, SYSTEM_ALIAS_PARAM, SYSTEM_URL, USER_ID, USER_PASSWORD
 
Fields inherited from interface planetj.dataengine.IJSPPages
CUSTOM_LOG_ON_JSP, DEFAULT_ADD_BODY_JSP, DEFAULT_ADD_BUTTONS_JSP, DEFAULT_EDIT_BODY_JSP, DEFAULT_EDIT_BUTTONS_JSP, DEFAULT_PARAMS_JSP, DEFAULT_PLEASE_WAIT_JSP, DEFAULT_PRINT_PAGE_JSP, DEFAULT_RESULTS_JSP, DEFAULT_ROW_DETAILS, DEFAULT_SQL_OPERATION_RESULTS_JSP, DEFAULT_TAB_CONTAINER_JSP, DEFAULT_TAB_HEADINGS_JSP, DEFAULT_TAB_PARENT_JSP, DEFAULT_VIEW_BODY_JSP, DEFAULT_VIEW_BUTTONS_JSP, DETAILS_JSP, DISPLAY_EXCEPTION_JSP, INITIAL_JSP, PLEASE_WAIT_CONTROLLER_JSP, SIGN_ON_BODY_JSP, SIGN_ON_JSP, SIGNON_PARAMS_JSP
 
Fields inherited from interface planetj.dataengine.application.IApplicationJSPs
APPLICATION_ADD_JSP, APPLICATION_DETAILS_JSP, APPLICATION_EDIT_JSP, APPLICATION_ERROR_JSP, APPLICATION_HEADER_JSP, APPLICATION_INVALID_LICENSE_JSP, APPLICATION_JSP, APPLICATION_MESSAGE_JSP, APPLICATION_OPERATIONS_TOC, APPLICATION_RESULTS_JSP, APPLICATION_SIGN_ON_JSP, APPLICATION_TEMPLATE_JSP, APPLICATION_TOC_JSP, APPLICATION_VIEW_JSP
 
Fields inherited from interface planetj.dataengine.application.IWOWJSPs
WOW_MAIN_EXCEPTION_JSP, WOW_MANAGE_OPERATIONS_JSP, WOW_STEPS_JSP, WOW_TOC, WOW_VIEW_APPLICATIONS_JSP, WOW_VIEW_CONNECTIONS_JSP
 
Constructor Summary
DataEngineApplicationBuilderServlet()
           
 
Method Summary
protected  boolean checkLicense(HttpServletRequest request, HttpServletResponse response)
          Checks to see if the WOW license is valid.
 void forward(java.lang.String uri, HttpServletRequest request, HttpServletResponse response)
          Forward to the specified URI.
static int getApplicationsCount(HttpServletRequest req)
          Gets the number of applications owned by the current user
static RowCollection getApplicationsRC(HttpServletRequest req)
          Gets the user's Applications
 java.lang.String getCompanyName()
          Gets the company name associated with this secured object
static int getConnectionsCount(HttpServletRequest req)
          Gets the number of connections owned by the current user
 int getId()
          Gets the ID of this secured object
 java.lang.String getInitialPage(HttpServletRequest request)
          Force subclasses to return an initial jsp/servlet.
 LayoutDisplayPropertyGroup getLayoutProperties()
           
 java.lang.String getName()
          Gets the name of this secured object
 int getOwnerId()
          Gets the ID of this secured object's owner
 IRowEventListener getRowEventListener(HttpServletRequest req)
          Each Servlet may have its own RowEventListener defined, so they would override this method and return the appropriate Listener Creation date: (7/11/2002 10:30:18 AM)
 java.lang.String getSecuredLibraryName()
           
 java.lang.String getSecuredSystemAlias()
          Returns the systemAlias used by this secured app.
 java.lang.String getSecuredTableName()
          Returns the tableName of this secured app.
 java.lang.Class getSignOnClass()
          Gets the class to use for signing on to this secured object.
 java.lang.String getSignOnURI()
          Gets the sign on URI of this secured object
 java.lang.String getSystemAlias()
          Gets the alias of the system for this secured object
 Application getWOWApplication(HttpServletRequest request)
           
 void init()
          Initialize the log
protected  void initWOWUpdates()
          Apply any new internal WOW updates.
protected  void pageExpired(HttpServletRequest request, HttpServletResponse response)
          This method is called when a page has expired.
 boolean preHandleServiceRequest(HttpServletRequest request, HttpServletResponse response)
          This method servers as a temporary fix to handle sign on request.
 void processRequest(HttpServletRequest request, HttpServletResponse response)
          This is the main delegating method called after doPost and doGet.
protected  void sessionTimedOut(HttpServletRequest request, HttpServletResponse response)
          This method is called when the user's session timeouts.
 void signOnAttempted(java.lang.String userID, boolean success)
          Invoked by the security manager after a signon attempt
 
Methods inherited from class planetj.dataengine.DataEngineServlet
addCookie, checkLaunchedFromBuilder, correctRequest, destroy, displayDataEngineException, doGet, doPost, dumpParameters, forwardInternal, forwardToPage, getAvailableServletNames, getCookie, getCookies, getDataEngineException, getErrorMessage, getInitializationException, getInitializationParameter, getLastJSPPath, getLicense, getLoggingPath, getRequestAttribute, getRequestParameter, getRequestParameterValues, getRowCollectionJsp, getServiceRequestOverride, getServletPath, getServletPath, getSessionAttribute, getSessionSharedAttribute, getUserMessage, handleError, handleMagicRequest, handleSavedHTML, handleServiceClassRequest, handleServiceRequest, initConnectionPool, initDataEngineProperties, initInitParameters, initLicense, initMetadataLibraries, initSerlvetPaths, isAuthorized, isCookiesAllowed, isLicenseValid, isRunningInVA, isServletPath, isSessionTimeOut, navigationError, printParameterTrace, removeRequestAttribute, removeRequestData, removeSessionAttribute, removeSessionSharedAttribute, removeSharedSessionAttribute, service, setErrorMessage, setErrorMessage, setLayoutProperties, setMethod, setRequestGroupAttribute, setRequestPageAttribute, setRequestPersistentAttribute, setRequestTransientAttribute, setServletPath, setServletURI, setSessionAttribute, setSessionSharedAttribute, setUseFullURI, setUserMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WOW_APPLICATION

public static final java.lang.String WOW_APPLICATION
See Also:
Constant Field Values

PREVIEW_APPLICATION

public static final java.lang.String PREVIEW_APPLICATION
See Also:
Constant Field Values

CREATE_DATA_INQUIRY

public static final java.lang.String CREATE_DATA_INQUIRY
See Also:
Constant Field Values

WAB_APPLICATION

public static final java.lang.String WAB_APPLICATION
Deprecated. replaced with WOW_APPLICATION

See Also:
Constant Field Values

WAB_APPLICATION_ID

public static final int WAB_APPLICATION_ID
See Also:
Constant Field Values

WAB_APPLICATION_OWNER_ID

public static final int WAB_APPLICATION_OWNER_ID
See Also:
Constant Field Values

WOW_MANAGE_OPERATIONS_ID

public static final int WOW_MANAGE_OPERATIONS_ID
See Also:
Constant Field Values

SIGN_ON_TABLE

public static final java.lang.String SIGN_ON_TABLE
See Also:
Constant Field Values

SIGN_ON_LIBRARY

public static final java.lang.String SIGN_ON_LIBRARY
See Also:
Constant Field Values

ACTION_CONNECTION_POOL_RESTART

public static final java.lang.String ACTION_CONNECTION_POOL_RESTART
Restart the connection pool

See Also:
Constant Field Values

ACTION_CONNECTION_POOL_START

public static final java.lang.String ACTION_CONNECTION_POOL_START
Start the connection pool

See Also:
Constant Field Values

ACTION_CONNECTION_POOL_STOP

public static final java.lang.String ACTION_CONNECTION_POOL_STOP
Stop the connection pool

See Also:
Constant Field Values

FD_MANAGER_URL

public static final java.lang.String FD_MANAGER_URL
FDManager URL key

See Also:
Constant Field Values

ADMIN_MANAGER_URL

public static final java.lang.String ADMIN_MANAGER_URL
Admin Application URL key

See Also:
Constant Field Values

OPERATIONS_APPLICATION

public static final java.lang.String OPERATIONS_APPLICATION
Application key

See Also:
Constant Field Values
Constructor Detail

DataEngineApplicationBuilderServlet

public DataEngineApplicationBuilderServlet()
Method Detail

checkLicense

protected boolean checkLicense(HttpServletRequest request,
                               HttpServletResponse response)
Checks to see if the WOW license is valid. If it is not valid, then control is forwarded to an invalid license JSP.

Overrides:
checkLicense in class DataEngineServlet

forward

public void forward(java.lang.String uri,
                    HttpServletRequest request,
                    HttpServletResponse response)
             throws DataEngineException
Forward to the specified URI.

Overrides:
forward in class DataEngineServlet
Throws:
DataEngineException

getApplicationsCount

public static final int getApplicationsCount(HttpServletRequest req)
Gets the number of applications owned by the current user


getApplicationsRC

public static RowCollection getApplicationsRC(HttpServletRequest req)
                                       throws DataEngineException
Gets the user's Applications

Throws:
DataEngineException

getCompanyName

public java.lang.String getCompanyName()
Description copied from interface: ISecured
Gets the company name associated with this secured object

Specified by:
getCompanyName in interface ISecured

getConnectionsCount

public static final int getConnectionsCount(HttpServletRequest req)
Gets the number of connections owned by the current user


getId

public int getId()
Description copied from interface: ISecured
Gets the ID of this secured object

Specified by:
getId in interface ISecured

getInitialPage

public java.lang.String getInitialPage(HttpServletRequest request)
Force subclasses to return an initial jsp/servlet. We need this incase potential errors timeout occur while running generic services. For example, the web browser brings up a page and then sits for 5 hours then tries a DataEngineServlet service method such as sorting. The DataEngineServlet session has been lost (invalidated) so we are dead in the water so we'll ask the subclass servlet where we should take the user to resignon.

Specified by:
getInitialPage in class DataEngineServlet

getLayoutProperties

public LayoutDisplayPropertyGroup getLayoutProperties()
Specified by:
getLayoutProperties in interface ISecured

getName

public java.lang.String getName()
Description copied from interface: ISecured
Gets the name of this secured object

Specified by:
getName in interface ISecured

getOwnerId

public int getOwnerId()
Description copied from interface: ISecured
Gets the ID of this secured object's owner

Specified by:
getOwnerId in interface ISecured

getRowEventListener

public IRowEventListener getRowEventListener(HttpServletRequest req)
Each Servlet may have its own RowEventListener defined, so they would override this method and return the appropriate Listener Creation date: (7/11/2002 10:30:18 AM)

Overrides:
getRowEventListener in class DataEngineServlet

getSecuredLibraryName

public java.lang.String getSecuredLibraryName()
Specified by:
getSecuredLibraryName in interface ISecuredSignOnAndRegistration
See Also:
ISecuredSignOnAndRegistration

getSecuredSystemAlias

public java.lang.String getSecuredSystemAlias()
Description copied from interface: ISecuredSignOnAndRegistration
Returns the systemAlias used by this secured app. Creation date: (7/1/2002 3:52:51 PM)

Specified by:
getSecuredSystemAlias in interface ISecuredSignOnAndRegistration
Returns:
java.lang.String
See Also:
ISecuredSignOnAndRegistration

getSecuredTableName

public java.lang.String getSecuredTableName()
Description copied from interface: ISecuredSignOnAndRegistration
Returns the tableName of this secured app. Creation date: (7/1/2002 3:52:51 PM)

Specified by:
getSecuredTableName in interface ISecuredSignOnAndRegistration
Returns:
java.lang.String
See Also:
ISecuredSignOnAndRegistration

getSignOnClass

public java.lang.Class getSignOnClass()
Description copied from interface: ISecured
Gets the class to use for signing on to this secured object. The class must implement the SignOn interface

Specified by:
getSignOnClass in interface ISecured
See Also:
ISecured

getSignOnURI

public java.lang.String getSignOnURI()
Description copied from interface: ISecured
Gets the sign on URI of this secured object

Specified by:
getSignOnURI in interface ISecured

getSystemAlias

public java.lang.String getSystemAlias()
Description copied from interface: ISecured
Gets the alias of the system for this secured object

Specified by:
getSystemAlias in interface ISecured
See Also:
ISecuredSignOnAndRegistration

getWOWApplication

public Application getWOWApplication(HttpServletRequest request)
                              throws CMException
Throws:
CMException

init

public void init()
          throws ServletException
Initialize the log

Overrides:
init in class DataEngineServlet
Throws:
ServletException

initWOWUpdates

protected void initWOWUpdates()
Apply any new internal WOW updates.


pageExpired

protected void pageExpired(HttpServletRequest request,
                           HttpServletResponse response)
                    throws CMException
Description copied from class: DataEngineServlet
This method is called when a page has expired. Subclasses should override this method if they need to handle page expirations differently.

Overrides:
pageExpired in class DataEngineServlet
Throws:
CMException

preHandleServiceRequest

public boolean preHandleServiceRequest(HttpServletRequest request,
                                       HttpServletResponse response)
This method servers as a temporary fix to handle sign on request. This servlet should never handle any sign on requests.

Overrides:
preHandleServiceRequest in class DataEngineServlet

processRequest

public void processRequest(HttpServletRequest request,
                           HttpServletResponse response)
This is the main delegating method called after doPost and doGet. Creation date: (3/22/2002 5:03:02 PM)

Specified by:
processRequest in class DataEngineServlet
Parameters:
request - request
response - response

sessionTimedOut

protected void sessionTimedOut(HttpServletRequest request,
                               HttpServletResponse response)
                        throws CMException
This method is called when the user's session timeouts. Subclasses should override this method if they need to handle session timeouts differently. This method sets an error message in the request and forwards to the servlet's initial page.

Overrides:
sessionTimedOut in class DataEngineServlet
Parameters:
request -
response -
Throws:
CMException

signOnAttempted

public void signOnAttempted(java.lang.String userID,
                            boolean success)
                     throws CMException
Invoked by the security manager after a signon attempt

Specified by:
signOnAttempted in interface ISecured
Throws:
CMException