planetj.dataengine.application
Class DataEngineApplicationServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--planetj.dataengine.DataEngineServlet
                    |
                    +--planetj.dataengine.application.DataEngineApplicationServlet
All Implemented Interfaces:
IApplication, IApplicationJSPs, IDataEngine, IJSPPages, INavigation, IServletParameters, IWOWJSPs, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
DataEngineWebServiceServlet

public class DataEngineApplicationServlet
extends DataEngineServlet
implements IApplication

See Also:
Serialized Form

Field Summary
static String ID
           
static String REFRESH_APPS
           
static String VIEW_HTTP_ID
           
 
Fields inherited from class planetj.dataengine.DataEngineServlet
className
 
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.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, DEFAULT_USER_LIBRARY, DETAILS, EDITABLE_OPERATIONS, ENVIRONMENT_MODE_DEVELOPMENT, ENVIRONMENT_MODE_PRODUCTION, ERROR_APPLICATION_INVALID, ERROR_COMPANY_INVALID, ERROR_MESSAGE, EXCEPTION, EXCEPTION_JSP_KEY, FIELD, FIELD_DESCRIPTOR_SERVLET_PATH, FIELD_LIST, FIELD_NAMES, FIELDS, FORM_LIB_TBL_FLD, FUNCTION, HIDDEN_APPLICATION_ID, HIDDEN_APPLICATION_METADATA_ALIAS, IGNORE_MAGIC_REQUEST, KEEP_INSERT_VALUES, LAST_JSP_CALLED, LAUNCHED_FROM_BUILDER, LIBRARY, LIBRARY_LIST, MAGIC_ACTION_ROW, MODE, MODE_COPY, MODE_DELETE, MODE_EDIT, MODE_INSERT, MODE_SEARCH, MODE_UNKNOWN, MODE_VIEW, MULTIPLESELECTION, NEW_ROW, NEW_WINDOW_FOR_RESULTS, NEXT_PAGE, NOSELECTION, OPERATION, OPERATION_KEY, OWNER_ID, PAGE, PAGE_REQUEST_EXECUTED, PAGE_VALIDATION_REQUIRED, PARAMETER_VALUE_PREFIX, PREVIOUS_PAGE, 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, 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, TABLE, TABLE_LIST, TRANSIENT, UNSUPPORTED, USER_LIBRARY_HTTP_PARAMETER, USER_LIBRARY_HTTP_SESSION_KEY, USER_MESSAGE, USER_PREFERENCES, VALID_SIGNON, 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, DATABASE, DRIVER, ENVIRONMENT_MODE, JDBC_OPTIMIZATIONS, MAX_CONNECTIONS, METADATA_LIBRARY, MIN_CONNECTIONS, ORPHAN_TIMEOUT, PASSWORD, PORT, 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_EDIT_BODY_JSP, DEFAULT_PARAMS_JSP, DEFAULT_PRINT_PAGE_JSP, DEFAULT_RESULTS_JSP, DEFAULT_ROW_DETAILS, DEFAULT_SQL_OPERATION_RESULTS_JSP, DEFAULT_VIEW_BODY_JSP, DETAILS_JSP, DISPLAY_EXCEPTION_JSP, INITIAL_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
DataEngineApplicationServlet()
           
 
Method Summary
 String getInitialPage(javax.servlet.http.HttpServletRequest req)
          Force subclasses to return an initial jsp/servlet.
static String getInitialURL(Application app, javax.servlet.http.HttpServletRequest req)
          Gets the initial URL.
static DirectOperationRequest getRequestedOperationData(javax.servlet.http.HttpServletRequest pReq)
          Gets the DirectOperationRequest object specifying which Operation was requested.
 IRowEventListener getRowEventListener(javax.servlet.http.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)
 void init()
          Initialize the log
static boolean isSignOnNecessary(Application app, javax.servlet.http.HttpServletRequest req)
          Tests if the user has to sign on to the application.
 boolean preHandleServiceRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method handles generic DataEngine service requests.
 void processApplication(Application app, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse res)
           
 void processRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          This is the main delegating method called after doPost and doGet.
 void processSQLOperation(SQLOperation pSQLOperation, String pJsp, javax.servlet.http.HttpServletRequest pReq, javax.servlet.http.HttpServletResponse pRes)
          Deprecated.  
 boolean verifySignOn(Application application, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Checks to see if the user is signed on to the Application.
 
Methods inherited from class planetj.dataengine.DataEngineServlet
addCookie, doGet, doPost, dumpParameters, forward, getCookie, getCookies, getErrorMessage, getInitializationException, getLastJSPPath, getLicense, getLoggingPath, getRequestAttribute, getRequestParameter, getRequestParameterValues, getRowCollectionJsp, getServiceRequestOverride, getServletPath, getServletPath, getSessionAttribute, getSessionSharedAttribute, getUserMessage, handleServiceRequest, isLicenseValid, isRunningInVA, isServletPath, printParameterTrace, removeRequestAttribute, removeRequestAttribute, removeRequestData, removeSessionAttribute, removeSessionAttribute, removeSessionSharedAttribute, removeSharedSessionAttribute, service, setErrorMessage, setLayoutProperties, setRequestGroupAttribute, setRequestPageAttribute, setRequestPersistentAttribute, setRequestTransientAttribute, setServletPath, setServletURI, setSessionAttribute, setSessionSharedAttribute, setUserMessage
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values

VIEW_HTTP_ID

public static final String VIEW_HTTP_ID
See Also:
Constant Field Values

REFRESH_APPS

public static final String REFRESH_APPS
See Also:
Constant Field Values
Constructor Detail

DataEngineApplicationServlet

public DataEngineApplicationServlet()
Method Detail

getInitialPage

public String getInitialPage(javax.servlet.http.HttpServletRequest req)
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

getInitialURL

public static String getInitialURL(Application app,
                                   javax.servlet.http.HttpServletRequest req)
Gets the initial URL. This is the URL which can be used to "restart" the application for the current user


getRequestedOperationData

public static DirectOperationRequest getRequestedOperationData(javax.servlet.http.HttpServletRequest pReq)
                                                        throws CMException
Gets the DirectOperationRequest object specifying which Operation was requested. Most of the time, an Operation is retrieved through an application and magic requests, not this method. Only when an Operation is directly specified on the URL does this method return a non-null object.

Returns:
The data for the Operation directly specified on the URL, or null if no such Operation was specified.
CMException

getRowEventListener

public IRowEventListener getRowEventListener(javax.servlet.http.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

init

public void init()
          throws javax.servlet.ServletException
Initialize the log

Overrides:
init in class DataEngineServlet
javax.servlet.ServletException

isSignOnNecessary

public static boolean isSignOnNecessary(Application app,
                                        javax.servlet.http.HttpServletRequest req)
                                 throws CMException
Tests if the user has to sign on to the application. Even if the application is marked as sign-on optional, a user may still be forced to sign on if the user is attempting to go straight to an operation that is guarded.

CMException

preHandleServiceRequest

public boolean preHandleServiceRequest(javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
This method handles generic DataEngine service requests. As well as ensures the application being called has its unique session identifier set.

Overrides:
preHandleServiceRequest in class DataEngineServlet

processApplication

public void processApplication(Application app,
                               javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse res)
                        throws CMException
CMException

processRequest

public void processRequest(javax.servlet.http.HttpServletRequest req,
                           javax.servlet.http.HttpServletResponse res)
This is the main delegating method called after doPost and doGet. It determines the correct application and invokes the processApplication() method Creation date: (3/22/2002 5:03:02 PM)

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

processSQLOperation

public void processSQLOperation(SQLOperation pSQLOperation,
                                String pJsp,
                                javax.servlet.http.HttpServletRequest pReq,
                                javax.servlet.http.HttpServletResponse pRes)
Deprecated.  


verifySignOn

public boolean verifySignOn(Application application,
                            javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
                     throws CMException
Checks to see if the user is signed on to the Application. If the user is not signed on, then the user will either be routed to the sign on screen (if one exists) or automatically signed on. Note that this method assumes that the Application's Sign On URI is the URI of a JSP which will be displayed as the body of the Application's JSP. If this is not true and the Application's URI instead represents a different Servlet or JSP, then this method can be overridden and the DESTINATION_URI set appropriately.

Returns:
false if the user is not signed on to the Application, true if the user is signed on.
CMException