TaskBean API
0.5

glogic.jthin.app
Class JThinContainer

java.lang.Object
  extended byglogic.jthin.app.JThinContainer
Direct Known Subclasses:
AdminContainer, DemoContainer

public abstract class JThinContainer
extends java.lang.Object

Main driver/container class for given Product.

Author:
taha

Field Summary
protected  boolean _bAuthenticatedApp
           
protected  boolean _bStartupSuccessful
           
protected  int _iApplicationState
           
protected  EndPane _oEndPane
           
protected  ErrorPane _oErrorPane
           
protected  JThinFrame _oJThinFrame
           
protected  JThinInstance _oJThinInstance
           
protected  SessionServiceIF _oSessionService
           
protected  StartPane _oStartPane
           
protected  java.lang.String _stAuthServiceBaseUrl
           
protected  java.lang.String _stProductName
           
protected  java.lang.String _stProductVersion
           
protected  java.lang.String _stSecretSessionID
           
static int ACTIVE_SESSION
           
static int ERROR
           
static int EXITING
           
static int READY_LOGOFF
           
static int READY_LOGON
           
static int STARTUP
           
 
Constructor Summary
JThinContainer(java.lang.String stWindowTitle)
          Subclass defines iProductID and stProductName.
 
Method Summary
protected abstract  ApplicationView createApplicationView(JThinFrame frame)
           
protected abstract  EndPane createEndPane()
          Override in subclass to return specific GUI.
 JThinFrame createJThinFrame()
           
protected  JThinMenuBar createJThinMenuBar(JThinFrame frame)
          Implement in subclass to return specific MenuBar.
protected abstract  StartPane createStartPane()
          Implement in subclass to return specific GUI.
 void destroyContainer()
           
 void doStartView()
          Called after endAppSession to re-initialize application.
 void endAppSession(JThinFrame frame)
          Ends the current application session.
 java.lang.String getApplicationLocation()
           
 EndPane getEndPane()
           
 ErrorPane getErrorPane()
           
static JThinContainer getInstance()
           
 JThinFrame getJThinFrame()
           
 JThinInstance getJThinInstance()
           
 java.lang.String getProductName()
           
 java.lang.String getProductVersion()
           
 java.lang.String getSecretSessionID()
           
 StartPane getStartPane()
           
 int getState()
           
 void gotoErrorScreen(java.lang.String stMsg)
          Display error screen.
 void initContainer(java.lang.String stProductName, java.lang.String stProductVersionNumber, java.lang.String stAuthServiceBaseUrl, boolean bSsoSession, java.lang.String stEncryptedSessionID, java.lang.String stSessionHash, long lSessionHashTime, boolean bAuthenticatedApp)
          Starting application for first time.
 boolean isAuthenticatedApp()
           
 boolean isStartupSuccessful()
           
 void setSecretSessionID(java.lang.String id)
           
 void startAppSession()
          Starts the JThinInstance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STARTUP

public static final int STARTUP
See Also:
Constant Field Values

READY_LOGON

public static final int READY_LOGON
See Also:
Constant Field Values

READY_LOGOFF

public static final int READY_LOGOFF
See Also:
Constant Field Values

ACTIVE_SESSION

public static final int ACTIVE_SESSION
See Also:
Constant Field Values

EXITING

public static final int EXITING
See Also:
Constant Field Values

ERROR

public static final int ERROR
See Also:
Constant Field Values

_bStartupSuccessful

protected boolean _bStartupSuccessful

_iApplicationState

protected int _iApplicationState

_stProductName

protected java.lang.String _stProductName

_stProductVersion

protected java.lang.String _stProductVersion

_stSecretSessionID

protected java.lang.String _stSecretSessionID

_stAuthServiceBaseUrl

protected java.lang.String _stAuthServiceBaseUrl

_bAuthenticatedApp

protected boolean _bAuthenticatedApp

_oJThinFrame

protected JThinFrame _oJThinFrame

_oJThinInstance

protected JThinInstance _oJThinInstance

_oSessionService

protected SessionServiceIF _oSessionService

_oStartPane

protected StartPane _oStartPane

_oEndPane

protected EndPane _oEndPane

_oErrorPane

protected ErrorPane _oErrorPane
Constructor Detail

JThinContainer

public JThinContainer(java.lang.String stWindowTitle)
Subclass defines iProductID and stProductName. The default subsclass constructor must call this constructor.

Method Detail

createApplicationView

protected abstract ApplicationView createApplicationView(JThinFrame frame)

createStartPane

protected abstract StartPane createStartPane()
Implement in subclass to return specific GUI.


createEndPane

protected abstract EndPane createEndPane()
Override in subclass to return specific GUI.


createJThinMenuBar

protected JThinMenuBar createJThinMenuBar(JThinFrame frame)
Implement in subclass to return specific MenuBar.


getInstance

public static JThinContainer getInstance()

getState

public int getState()

getJThinInstance

public JThinInstance getJThinInstance()
Returns:
null if no JThinInstance running.

getProductName

public java.lang.String getProductName()

getProductVersion

public java.lang.String getProductVersion()

getSecretSessionID

public java.lang.String getSecretSessionID()

setSecretSessionID

public void setSecretSessionID(java.lang.String id)

getJThinFrame

public JThinFrame getJThinFrame()

initContainer

public void initContainer(java.lang.String stProductName,
                          java.lang.String stProductVersionNumber,
                          java.lang.String stAuthServiceBaseUrl,
                          boolean bSsoSession,
                          java.lang.String stEncryptedSessionID,
                          java.lang.String stSessionHash,
                          long lSessionHashTime,
                          boolean bAuthenticatedApp)
Starting application for first time. These arguements are provided by the JThinDriver when appliction talks JNLP back to the site.


isStartupSuccessful

public boolean isStartupSuccessful()

doStartView

public void doStartView()
Called after endAppSession to re-initialize application. For example this takes you back to a login screen (e.g. before actually starting the JThinInstance). Make sure to call super.doStartView() in first line of subclassed method.


startAppSession

public void startAppSession()
Starts the JThinInstance. Make sure to call super.startAppSession() in first line of subclassed method.


gotoErrorScreen

public void gotoErrorScreen(java.lang.String stMsg)
Display error screen. Application can't proceed past this point. Can only be closed/exited from only after this happens.


endAppSession

public void endAppSession(JThinFrame frame)
Ends the current application session.

Parameters:
frame - This maybe the same frame currently referenced by the JThinContainer or could be a new one. If new it needs to replace the old one. Old one should be discarded.

destroyContainer

public void destroyContainer()

createJThinFrame

public JThinFrame createJThinFrame()

getStartPane

public StartPane getStartPane()

getEndPane

public EndPane getEndPane()

getErrorPane

public ErrorPane getErrorPane()

getApplicationLocation

public java.lang.String getApplicationLocation()

isAuthenticatedApp

public boolean isAuthenticatedApp()
Returns:
true means app requires authentication

TaskBean API
0.5

Copyright © Grand Logic, Inc. All Rights Reserved.