Ontimize 5.2072EN

com.ontimize.locator
Class ReferenceLocator

java.lang.Object
  extended bycom.ontimize.locator.ReferenceLocator
All Implemented Interfaces:
ClientReferenceLocator, EntityReferenceLocator, INoticeSendMails, INoticeSystem, com.ontimize.ols.LOk, java.rmi.Remote, RemoteApplicationPreferenceReferencer, RemotelyManageable, RemoteReportReferencer, java.rmi.server.RMIFailureHandler, TokenLogin, UtilReferenceLocator, XMLClientProvider, XMLFormProvider
Direct Known Subclasses:
PermissionReferenceLocator

public class ReferenceLocator
extends java.lang.Object
implements EntityReferenceLocator, java.rmi.server.RMIFailureHandler, RemotelyManageable, UtilReferenceLocator, RemoteReportReferencer, RemoteApplicationPreferenceReferencer, com.ontimize.ols.LOk, INoticeSystem, INoticeSendMails, XMLClientProvider, ClientReferenceLocator, TokenLogin

Standard implementation of EntityReferenceLocator.
This class implements a 'local' EntityReferenceLocator, where 'local' means that the object is instantiated and used in the client side. In this mode, the entity requests (and other requests) that this object receives are forwarded to a remote ReferenceLocator.
Also, the ReferenceLocator can be instantiated in nonlocal mode. In this way, the object will not forward requests but will process these requests itself.
This class implements the RMIFailureHandler interface for managing RMI failures. These failures are handled only if the value of the parameter 'CustomSocket' is yes.
*

Author:
Imatia Innovation

Nested Class Summary
protected  class ReferenceLocator.DefaultClientSocketFactory
          Inner class that implements a RMISocketFactory and manages reconnection in case of RMI failures.
protected  class ReferenceLocator.DefaultSSLClientSocketFactory
          Inner class that implements a RMISocketFactory with SSL communications and manages reconnection in case of RMI failures.
 
Nested classes inherited from class com.ontimize.locator.UtilReferenceLocator
UtilReferenceLocator.Message
 
Field Summary
static boolean askUserChangeTimezone
          Configuration variable used when client and server have different time zones.
static java.lang.String ATTACHMENT_ENTITY
          AttachmentEntity property
static java.lang.String ATTACHMENT_ENTITY_PATH
          AttachmentEntityPath property
protected  java.lang.String attachmentEntity
          The name of the entity for managing attachments
protected  Entity attachmentEntityInstance
           
protected  java.lang.String attachmentPath
           
static java.lang.String AUTONUMERICAL_PROPERTIES
          AutonumericalProperties property
protected  javax.swing.JButton b
           
protected  int chatCheckTime
           
protected  javax.swing.JDialog chatWindow
           
static java.lang.String CHECK_SERVER_MESSAGES_PERIOD
          CheckServerMessagePeriod property
protected  java.lang.Thread checkMessagesThread
           
static java.lang.String CUSTOM_SOCKET
          CustomSocket property
protected  ClientWatch cw
           
protected  DatabaseEntityManager databaseEntityManager
           
static java.lang.String DB_PROPERTIES
          DatabaseProperties property
static boolean DEBUG
          For debugging purposes
protected static java.lang.String defaultNoticeDestinyEntityClass
           
protected static java.lang.String defaultNoticeEntityClass
           
static boolean defaultValueUseServerTimezone
          Configuration variable used when client and server have different time zones.
protected static java.lang.String ENCRYPT_PROPERTY
          com.ontimize.locator.ReferenceLocator.InitSession.Encrypt property.
static java.lang.String ENTITIES_CLASS
          EntityClass property
static java.lang.String ENTITIES_PROPERTIES
          EntityProperties property
protected  java.util.Hashtable entitiesProperties
           
protected  java.lang.String entitiesPropertiesClass
           
protected  java.lang.String formManagerProviderEntity
           
protected  java.lang.String formManagerProviderEntityFormNameColumn
           
protected  java.lang.String formManagerProviderEntityIdColumn
           
protected  java.lang.String formManagerProviderEntityInteractionManagerColumn
           
protected  java.lang.String formProviderEntity
           
protected  java.lang.String formProviderEntityFormNameColumn
           
protected  java.lang.String formProviderEntityFormXMLColumn
           
static java.lang.String IMPOSSIBLE_CONNECT_TO_SERVER
          'Cannot connect to server' message key
protected  java.util.List initReferences
           
protected  boolean installSocketFactory
           
protected  java.lang.String key
           
protected  long lastRemoteReferenceCheck
           
protected  java.util.Hashtable loadedEntities
           
static java.lang.String LOCAL
          Local property
static java.lang.String LOCAL_ENTITIES
          LocalEntities property
static java.lang.String LOCAL_ENTITIES_PACKAGE
          LocalEntityPackage property
protected  java.util.Vector localEntities
           
protected  java.lang.String localEntitiesPackage
           
protected  boolean localLocator
           
protected  LocalRemoteReportStore localRemoteReportStore
           
static java.lang.String LOGIN_ENTITY
          LoginEntity property
protected  java.lang.String loginEntity
          The name of the entity used for login.
static java.lang.String M_NOT_AUTHORIZED
          'Unauthorized user' message key
protected  DatabaseConnectionManager manager
           
protected  java.lang.String menuProviderEntity
           
protected  java.lang.String menuProviderEntityXMLColumn
           
protected  int messagesCheckTime
           
static java.lang.String MULTICONNECTION_MANAGER
           
protected  boolean multiConnectionManager
           
protected  java.lang.String multiConnectionManagerPath
           
static boolean NEW_CHAT
           
static java.lang.String NOTICE_ENTITY_DESTINY_NAME
           
static java.lang.String NOTICE_ENTITY_NAME
           
protected static NoticeEntity noticeEntity
           
protected  java.lang.String noticesPath
           
protected  boolean noticeSystem
           
protected static int offset
           
protected static java.lang.String offsetString
           
static java.lang.String PACKAGE_OR_HOSTNAME
          PackageOrHostname property
protected  java.lang.String packageA
           
protected  int port
           
static java.lang.String PORT
          Port property
protected  Entity printingTemplateEntityInstance
           
protected  java.lang.String printingTemplatesEntity
           
protected  int privilegedId
          An integer used when needed as privileged identifier for querying entities
protected  java.lang.String propertiesPath
           
protected  boolean reconnectState
           
protected  java.lang.Object referenceLocatorServer
           
protected  java.lang.String referenceLocatorServerName
          Name of the object that contains the references of the server entities.
static java.lang.String REMOTE_OBJECT_NOT_REGISTERED
          'Server not ready' message key
static java.lang.String REMOTE_REFERENCE_LOCATOR_NAME
          RemoteLocatorName property
 long remoteReferenceCheckCycle
           
protected static java.util.Hashtable remoteReferenceClassNames
           
protected static java.util.Hashtable remoteReferenceInstances
           
protected static java.util.Hashtable remoteReferenceParameters
           
static java.lang.String REPORT_ENTITIES
          ReportEntities property
protected  java.util.List reportEntities
           
protected  ReportStore reportStore
           
protected  RemoteOperationManager rOperationManager
           
protected  javax.swing.JScrollPane s
           
protected  java.util.TimeZone serverTimeZone
           
protected  boolean startSession
           
protected  javax.swing.JTextArea text
           
protected  javax.swing.text.SimpleAttributeSet textAttribute
           
static java.lang.String UNKNOWN_ERROR
          'Unknown error' message key
static java.lang.String UNKNOWN_HOST
          'Unknown host' message key
protected  java.lang.String user
           
protected  int userId
           
static java.lang.String VIEWER
          Viewer property
protected  java.lang.String xmlDynamicMenu
           
 
Fields inherited from interface com.ontimize.gui.RemotelyManageable
ADMINISTRATION_PERMISSION, CONNECTION_INFO, IS_MULTICONNECTION, LOADED_ENTITIES, MULTICONNECTION_IDLIST, MULTICONNECTION_INFO
 
Fields inherited from interface com.ontimize.util.notice.INoticeSystem
INTERNAL_NOTICE_PERIOD, MAIL_CONF_PROPERTIES, NOTICE_CONTENT, NOTICE_CREATE_DATE, NOTICE_DELETE_RECEIVE_NOTICE, NOTICE_DELETE_SEND_NOTICE, NOTICE_DESTINY_KEY, NOTICE_ENTITY_DESTINY_TABLE_DB, NOTICE_ENTITY_TABLE_DB, NOTICE_FORCE_READ, NOTICE_FROM_PARAMETER, NOTICE_KEY, NOTICE_MAILTO_PARAMETER, NOTICE_MESSAGE_COLUMN_NAME, NOTICE_MESSAGE_TYPE_COLUMN_NAME, NOTICE_OTHER_COLUMNS, NOTICE_READ, NOTICE_READ_DATE, NOTICE_RESPONSE_REQUEST, NOTICE_SEND, NOTICE_SEND_DATE, NOTICE_SEND_MAIL, NOTICE_SUBJECT, NOTICE_SYSTEM, NOTICE_TO_PARAMETER, PROP_NOTICE_CLASS_MAIL, PROP_NOTICE_CONFIG_DEFAULT_TEMPLATE, PROP_NOTICE_CONFIG_MAIL, PROP_NOTICE_CONFIG_REQUEST_TEMPLATE, PROP_NOTICE_CONFIG_TEMPLATES, PROP_NOTICE_ENTITY_DESTINY_NAME, PROP_NOTICE_ENTITY_NAME, SEND_MAIL_PERIOD
 
Constructor Summary
ReferenceLocator(boolean local, java.lang.String entitiesPackageOrRMIServer, java.lang.String entitiesReferenceServerName, int port, java.net.URL databasePropertiesURL, java.net.URL autonumericalURL)
          When application runs in local mode, references to entities will be obtained with Class.forName() and for remote applications with RMI.
ReferenceLocator(boolean local, java.lang.String entitiesPackageOrRMIServer, java.lang.String entityReferenceServerName, int port, java.net.URL databasePropURL, java.net.URL autonumericalURL, java.lang.String loginEntity)
           
ReferenceLocator(java.util.Hashtable param)
          Initializes parameters.
 
Method Summary
 void checkNoticeAsSend(java.lang.Object noticeKey)
          This method marks the specified notice as sent
 void checkNoticeSent(int sessionId, java.lang.Object noticeKey)
          This method sets a notices as sent
 boolean checkToken(java.lang.String token)
           
 void closeLockedConnections(java.lang.String id, java.lang.String databaseId)
           
 boolean closeSession(java.lang.String id, int sessionId)
          This method close the user's session with the given sessionID.
protected  DatabaseConnectionManager configureConnectionManager(boolean bStatisticViewer, boolean writeConnectionInfoFile, java.net.URL databasePropertiesURL, java.net.URL autonumericalURL)
           
protected  void configureMultiConnectionManager()
           
protected  void configureRemoteReferences(java.lang.String xmlDefinitionResource)
           
protected  DatabaseConnectionManager createConnectionManager(boolean bStatisticViewer, boolean writeConnectionInfoFile, java.net.URL databasePropertiesURL, java.net.URL autonumericalURL)
           
protected  DatabaseEntityManager createDatabaseEntityManager(java.util.Hashtable param)
           
protected  java.lang.Object createRemoteReference(java.lang.String className, java.util.Hashtable parameters)
           
 void endSession(int id)
          This method finishes a client session.
protected  void ensureRemoteReferenceLocator()
           
 boolean failure(java.lang.Exception e)
           
protected  void finalize()
          Override the finalize method to guarantee the end of the open session.
 void finishAdministrationRemoteSession(java.lang.String id)
          Method that finishes the remote session.
 Entity getAttachmentEntity(int sessionId)
           
 int getChatCheckTime()
          Get the time between two verifications of new chat messages
 java.util.List getConnectedSessionIds(int sessionId)
           
 java.util.List getConnectedUsers(int sessionId)
           
 DatabaseConnectionManager getConnectionManager()
           
protected  java.util.Hashtable getContextParams(java.lang.String password)
           
 DatabaseConnectionManager getDatabaseConnectionManager()
           
 boolean getDEBUGValueRemote(java.lang.String id, java.lang.String v)
          Method to obtain the current value of the DEBUG Server variables.
 java.lang.String getDefaultPackage()
           
protected  DatabaseConnectionManager getEntityConnectionManager(java.lang.String entityName)
           
 Entity getEntityReference(java.lang.String entityName)
          This method gets an entity reference.
 java.util.Hashtable getFormManagerParameters(java.lang.String formManagerId, int userid)
           
 InitialContext getInitialContext()
           
 EntityResult getInternalNotices(int sessionId, boolean unsend, boolean unread, boolean deleted)
          Method to get all notices for the specified user.
 java.lang.String getLastNCharactersFromLogFile(int characterNumber)
          Method that recovers the n characters indicated from the log file.
 java.lang.String getLContent()
           
 java.lang.Object getLInfoObject()
           
 java.util.List getLoadedEntities(int sessionId)
           
protected  Entity getLocalEntity(java.lang.String entityName)
           
protected  Entity getLocalEntity(java.lang.String entityName, boolean checkDatabase)
           
 java.lang.String getLoginEntityName(int sessionId)
          Get the name of the login entity (LoginEntity parameter)
 java.lang.String getLValue(java.lang.String name)
           
protected  Entity getMemoryEntity(java.lang.String entityName)
           
 int getMessageCheckTime()
           
 java.util.Vector getMessages(int sessionIdTo, int sessionId)
           
 EntityResult getNewMailNotice()
          This method allows to get all e-mail notices not yet sent
protected  java.lang.String getNodeValue(org.w3c.dom.Node son)
           
protected  Entity getNoticeEntity(java.lang.String entityName, boolean isDestinyEntity)
           
 java.lang.String getNoticeEntityDestinyName()
          Get the name of the notice destiny entity
 java.lang.String getNoticeEntityName()
          Get the name of the notice entity
 java.util.Vector getNoticeTypes()
          Get the identifies for all notices types in the application
protected  java.lang.String getPasswordFromCert(java.security.cert.Certificate cert)
           
 java.lang.String getPasswordFromCert(java.lang.String stringCertificate)
           
 Entity getPrintingTemplateEntity(int sessionId)
           
protected  Entity getPrivateEntity(java.lang.String entityName)
          Deprecated. @see getMemoryEntity(String)
 RemoteApplicationPreferences getRemoteApplicationPreferences(int sessionId)
          Get the application preferences stored in the server side
 RemoteOperationManager getRemoteOperationManager(int sessionId)
           
 java.util.Properties getRemotePreferencesFile(java.lang.String id)
          Method to get remotely the Server Preferences file.
 java.lang.Object getRemoteReference(java.lang.String name, int sessionId)
          Gets a remote reference.
 java.util.List getRemoteReportStore(int sessionId)
           
 java.util.List getReportEntityNames(int sessionId)
           
 EntityResult getSentNotices(int sessionId, java.lang.Boolean deleted)
          Method to query all notices sent by the specified user
 java.util.TimeZone getServerTimeZone(int sessionId)
          Get the Server TimeZone.
 int getSessionId()
          If the user has started a session always return a not negative integer.
 SessionInfo[] getSessionInfo(java.lang.String id)
          This method returns the main information of all available user's sessions.
protected  Entity getSpecialEntity(java.lang.String entityName, java.lang.String originalEntity)
           
 java.util.Hashtable getStartSessionTime(java.lang.String id)
          This method obtains a list with all the start times of all connections.
 java.util.Hashtable getSystemInfo(java.lang.String id, java.lang.String key)
          Method that returns system information about the connection with the database.
 java.lang.String getToken()
           
 java.lang.String getUser()
          Get the current user name
protected  java.lang.String getUserFromCert(java.security.cert.Certificate cert)
           
 java.lang.String getUserFromCert(java.lang.String stringCertificate)
           
 java.lang.Object getUserId(int sessionId)
          Get the identification of the user that must be stored in the notice system to identify this application user.
 java.util.Hashtable getUserIds(java.lang.String id)
          This method returns a Hashtable with the current list of users's IDs.
 java.lang.String getXMLForm(java.lang.String form, int userid)
           
 java.lang.String getXMLMenu(int userid)
           
 boolean hasChat()
          True when the application has a chat configured
protected  void initServerNotice(java.util.Hashtable params)
           
protected  void installClientRMIFailureHandler()
           
protected  void installRMISocketFactory()
           
static boolean isAllowCertificateLogin()
           
 boolean isDevelopementL()
           
 boolean isLocalMode()
           
 boolean isMultiConnectionManager()
           
protected  Entity loadEntity(java.lang.String entityName, boolean checkDatabase, DatabaseConnectionManager entityConnectionManager)
           
 boolean ok()
           
 boolean ok(java.lang.String number)
           
 boolean ping()
          unimplemented.
 void reloadXMLMenu(int userid)
           
 void removeEntity(java.lang.String entityName, int sessionId)
           
 void removeEntity(java.lang.String id, java.lang.String entityName)
           
 void removeReceivedNotices(int sessionId, java.util.Vector idNotices)
          This method removes the specified received notices for the user with this session identifier.
protected  void removeRemoteReferences()
           
 void removeSentNotices(int sessionId, java.util.Vector idNotices)
          This method sets the specified notices as deleted
 void restartServer(java.lang.String id)
           
 InitialContext retrieveInitialContext(int sessionId, java.util.Hashtable params)
           
protected  void selectTimeZone()
          Get the server time zone.
 void sendMessage(java.lang.String message, java.lang.String user, int sessionId)
           
 void sendMessage(UtilReferenceLocator.Message message, java.lang.String user, int sessionId)
           
 void sendMessageToAll(java.lang.String message, int sessionId)
           
 void sendNotice(java.util.Hashtable messageValues, int sessionId, boolean request)
          Method used to send notices.
 void setDEBUGValueRemote(java.lang.String id, java.lang.String v, boolean b)
          Method to set the DEBUG Server variables.
 void setLocalEntities(java.util.Vector el)
           
 void setMultiConnectionManager(boolean multiConnectionManager)
           
 void setNoticesRead(int sessionId, java.util.Vector idNotices)
          Method to set some notices as read
 void setRemotePreferencesFile(java.lang.String id, java.util.Properties prop)
          Method to set remotely the Server Preferences file.
 void setRemoteReportStore(ReportStore rs)
           
 void showMessageDialog(java.awt.Component c)
           
 java.lang.String startAdministrationRemoteSession(java.lang.String us, java.lang.String pass)
          This method starts a new remote session.
protected  void startCheckMessagesThread()
           
protected  int startLocalSession(java.lang.String user, java.lang.String password, ClientWatch cw)
           
protected  int startRemoteSession(java.lang.String user, java.lang.String password, ClientWatch cw)
           
 int startSession(java.lang.String user, java.lang.String password, ClientWatch client)
          Start a new client session in local or remote mode.
protected  int startUserPasswordSession(java.lang.String user, java.lang.String password, ClientWatch cw)
           
 void stopServer(java.lang.String id)
           
 int testConnectionSpeed()
          Bytes per second.
 int testConnectionSpeed(int tam)
           
protected  void updateRemoteReferenceLocator()
           
protected  void waitServerForRestart(int maxTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REMOTE_REFERENCE_LOCATOR_NAME

public static final java.lang.String REMOTE_REFERENCE_LOCATOR_NAME
RemoteLocatorName property

See Also:
Constant Field Values

PACKAGE_OR_HOSTNAME

public static final java.lang.String PACKAGE_OR_HOSTNAME
PackageOrHostname property

See Also:
Constant Field Values

LOCAL

public static final java.lang.String LOCAL
Local property

See Also:
Constant Field Values

CHECK_SERVER_MESSAGES_PERIOD

public static final java.lang.String CHECK_SERVER_MESSAGES_PERIOD
CheckServerMessagePeriod property

See Also:
Constant Field Values

CUSTOM_SOCKET

public static final java.lang.String CUSTOM_SOCKET
CustomSocket property

See Also:
Constant Field Values

ATTACHMENT_ENTITY_PATH

public static final java.lang.String ATTACHMENT_ENTITY_PATH
AttachmentEntityPath property

See Also:
Constant Field Values

ATTACHMENT_ENTITY

public static final java.lang.String ATTACHMENT_ENTITY
AttachmentEntity property

See Also:
Constant Field Values

REPORT_ENTITIES

public static final java.lang.String REPORT_ENTITIES
ReportEntities property

See Also:
Constant Field Values

ENTITIES_CLASS

public static final java.lang.String ENTITIES_CLASS
EntityClass property

See Also:
Constant Field Values

ENTITIES_PROPERTIES

public static final java.lang.String ENTITIES_PROPERTIES
EntityProperties property

See Also:
Constant Field Values

VIEWER

public static final java.lang.String VIEWER
Viewer property

See Also:
Constant Field Values

LOGIN_ENTITY

public static final java.lang.String LOGIN_ENTITY
LoginEntity property

See Also:
Constant Field Values

LOCAL_ENTITIES_PACKAGE

public static final java.lang.String LOCAL_ENTITIES_PACKAGE
LocalEntityPackage property

See Also:
Constant Field Values

LOCAL_ENTITIES

public static final java.lang.String LOCAL_ENTITIES
LocalEntities property

See Also:
Constant Field Values

PORT

public static final java.lang.String PORT
Port property

See Also:
Constant Field Values

DB_PROPERTIES

public static final java.lang.String DB_PROPERTIES
DatabaseProperties property

See Also:
Constant Field Values

AUTONUMERICAL_PROPERTIES

public static final java.lang.String AUTONUMERICAL_PROPERTIES
AutonumericalProperties property

See Also:
Constant Field Values

MULTICONNECTION_MANAGER

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

NEW_CHAT

public static boolean NEW_CHAT

defaultValueUseServerTimezone

public static boolean defaultValueUseServerTimezone
Configuration variable used when client and server have different time zones.
If askUserChangeTimezone is false this is the default value to use.
If defaultValueUseServerTimezone is true client time zone will be set to the server value


askUserChangeTimezone

public static boolean askUserChangeTimezone
Configuration variable used when client and server have different time zones.
If askUserChangeTimezone is true a configuration dialog is showed when client starts a new session to select the time zone


ENCRYPT_PROPERTY

protected static final java.lang.String ENCRYPT_PROPERTY
com.ontimize.locator.ReferenceLocator.InitSession.Encrypt property. Can be established as a System Property with value 'true' for setting this object's encrypt variable to true.

See Also:
Constant Field Values

DEBUG

public static boolean DEBUG
For debugging purposes


IMPOSSIBLE_CONNECT_TO_SERVER

public static java.lang.String IMPOSSIBLE_CONNECT_TO_SERVER
'Cannot connect to server' message key


REMOTE_OBJECT_NOT_REGISTERED

public static java.lang.String REMOTE_OBJECT_NOT_REGISTERED
'Server not ready' message key


UNKNOWN_ERROR

public static java.lang.String UNKNOWN_ERROR
'Unknown error' message key


UNKNOWN_HOST

public static java.lang.String UNKNOWN_HOST
'Unknown host' message key


M_NOT_AUTHORIZED

public static java.lang.String M_NOT_AUTHORIZED
'Unauthorized user' message key


loginEntity

protected java.lang.String loginEntity
The name of the entity used for login. By default, 'User'


privilegedId

protected int privilegedId
An integer used when needed as privileged identifier for querying entities


attachmentEntity

protected java.lang.String attachmentEntity
The name of the entity for managing attachments


attachmentPath

protected java.lang.String attachmentPath

printingTemplatesEntity

protected java.lang.String printingTemplatesEntity

propertiesPath

protected java.lang.String propertiesPath

reconnectState

protected boolean reconnectState

cw

protected ClientWatch cw

localEntities

protected java.util.Vector localEntities

localEntitiesPackage

protected java.lang.String localEntitiesPackage

offset

protected static int offset

offsetString

protected static java.lang.String offsetString

entitiesPropertiesClass

protected java.lang.String entitiesPropertiesClass

reportEntities

protected java.util.List reportEntities

serverTimeZone

protected java.util.TimeZone serverTimeZone

localLocator

protected boolean localLocator

packageA

protected java.lang.String packageA

port

protected int port

loadedEntities

protected java.util.Hashtable loadedEntities

startSession

protected boolean startSession

formProviderEntity

protected java.lang.String formProviderEntity

formProviderEntityFormNameColumn

protected java.lang.String formProviderEntityFormNameColumn

formProviderEntityFormXMLColumn

protected java.lang.String formProviderEntityFormXMLColumn

databaseEntityManager

protected DatabaseEntityManager databaseEntityManager

formManagerProviderEntity

protected java.lang.String formManagerProviderEntity

formManagerProviderEntityIdColumn

protected java.lang.String formManagerProviderEntityIdColumn

formManagerProviderEntityFormNameColumn

protected java.lang.String formManagerProviderEntityFormNameColumn

formManagerProviderEntityInteractionManagerColumn

protected java.lang.String formManagerProviderEntityInteractionManagerColumn

menuProviderEntity

protected java.lang.String menuProviderEntity

menuProviderEntityXMLColumn

protected java.lang.String menuProviderEntityXMLColumn

referenceLocatorServerName

protected java.lang.String referenceLocatorServerName
Name of the object that contains the references of the server entities.
This name was registered in the rmi server.


referenceLocatorServer

protected java.lang.Object referenceLocatorServer

manager

protected DatabaseConnectionManager manager

user

protected java.lang.String user

key

protected java.lang.String key

userId

protected int userId

installSocketFactory

protected boolean installSocketFactory

chatWindow

protected javax.swing.JDialog chatWindow

b

protected javax.swing.JButton b

text

protected javax.swing.JTextArea text

s

protected javax.swing.JScrollPane s

messagesCheckTime

protected int messagesCheckTime

chatCheckTime

protected int chatCheckTime

checkMessagesThread

protected java.lang.Thread checkMessagesThread

entitiesProperties

protected java.util.Hashtable entitiesProperties

multiConnectionManager

protected boolean multiConnectionManager

multiConnectionManagerPath

protected java.lang.String multiConnectionManagerPath

noticeEntity

protected static NoticeEntity noticeEntity

NOTICE_ENTITY_NAME

public static java.lang.String NOTICE_ENTITY_NAME

NOTICE_ENTITY_DESTINY_NAME

public static java.lang.String NOTICE_ENTITY_DESTINY_NAME

noticesPath

protected java.lang.String noticesPath

noticeSystem

protected boolean noticeSystem

defaultNoticeEntityClass

protected static java.lang.String defaultNoticeEntityClass

defaultNoticeDestinyEntityClass

protected static java.lang.String defaultNoticeDestinyEntityClass

lastRemoteReferenceCheck

protected long lastRemoteReferenceCheck

remoteReferenceCheckCycle

public long remoteReferenceCheckCycle

attachmentEntityInstance

protected Entity attachmentEntityInstance

printingTemplateEntityInstance

protected Entity printingTemplateEntityInstance

textAttribute

protected javax.swing.text.SimpleAttributeSet textAttribute

reportStore

protected ReportStore reportStore

localRemoteReportStore

protected LocalRemoteReportStore localRemoteReportStore

xmlDynamicMenu

protected java.lang.String xmlDynamicMenu

rOperationManager

protected RemoteOperationManager rOperationManager

remoteReferenceClassNames

protected static java.util.Hashtable remoteReferenceClassNames

remoteReferenceParameters

protected static java.util.Hashtable remoteReferenceParameters

remoteReferenceInstances

protected static java.util.Hashtable remoteReferenceInstances

initReferences

protected java.util.List initReferences
Constructor Detail

ReferenceLocator

public ReferenceLocator(java.util.Hashtable param)
Initializes parameters.

Parameters:
param - the Hashtable with parameters

attribute values default required meaning
PackageOrHostname yes Entity package(for remote applications) and host name (for local applications).
RemoteLocatorName no Remote locator register name.
LoginEntity User no Login entity name, this entity must contains a column 'User_' and a column'Password'.
DatabaseProperties yes Database properties configuration file
AutonumericalProperties no Autonumerical configuration file.
Port yes Locator port.
CustomSocket yes/no no Indicates when RMI failures are handled by RMIFailureHandler interface implemented in this class.
LocalEntities localent1;localent2;...;localentn no Names of the entities that must be loaded in local mode (used for entities in local memory)
LocalEntityPackage no Package of the entities that must be loaded in local mode (used for entities in local memory)
CheckServerMessagePeriod no For Ontimize chat utility. Default value -1, if this parameter has this default value, messages are not checked.
EntityProperties no This parameter specifies the properties file that contains the definition of some entities. This entities are implemented with TableEntity class and will be automatically generated. Each line in this file represents one entity.
ReportEntities no Entity names list for the report designer. Default value is empty. Format is: "entity_name:entity_properties_file".

ReferenceLocator

public ReferenceLocator(boolean local,
                        java.lang.String entitiesPackageOrRMIServer,
                        java.lang.String entitiesReferenceServerName,
                        int port,
                        java.net.URL databasePropertiesURL,
                        java.net.URL autonumericalURL)
When application runs in local mode, references to entities will be obtained with Class.forName() and for remote applications with RMI.


ReferenceLocator

public ReferenceLocator(boolean local,
                        java.lang.String entitiesPackageOrRMIServer,
                        java.lang.String entityReferenceServerName,
                        int port,
                        java.net.URL databasePropURL,
                        java.net.URL autonumericalURL,
                        java.lang.String loginEntity)
Method Detail

isAllowCertificateLogin

public static boolean isAllowCertificateLogin()

getInitialContext

public InitialContext getInitialContext()
Specified by:
getInitialContext in interface ClientReferenceLocator

isMultiConnectionManager

public boolean isMultiConnectionManager()

setMultiConnectionManager

public void setMultiConnectionManager(boolean multiConnectionManager)

createDatabaseEntityManager

protected DatabaseEntityManager createDatabaseEntityManager(java.util.Hashtable param)
                                                     throws java.lang.Exception
Throws:
java.lang.Exception

getEntityReference

public Entity getEntityReference(java.lang.String entityName)
                          throws java.lang.Exception
Description copied from interface: EntityReferenceLocator
This method gets an entity reference.

Specified by:
getEntityReference in interface EntityReferenceLocator
Parameters:
entityName - Entity name
Returns:
Throws:
java.lang.Exception

removeEntity

public void removeEntity(java.lang.String entityName,
                         int sessionId)
                  throws java.lang.Exception
Specified by:
removeEntity in interface UtilReferenceLocator
Throws:
java.lang.Exception

getLoadedEntities

public java.util.List getLoadedEntities(int sessionId)
                                 throws java.lang.Exception
Specified by:
getLoadedEntities in interface UtilReferenceLocator
Throws:
java.lang.Exception

getPrivateEntity

protected Entity getPrivateEntity(java.lang.String entityName)
                           throws java.lang.Exception
Deprecated. @see getMemoryEntity(String)

Parameters:
entityName -
Returns:
Throws:
java.lang.Exception

getMemoryEntity

protected Entity getMemoryEntity(java.lang.String entityName)
                          throws java.lang.Exception
Throws:
java.lang.Exception

getSpecialEntity

protected Entity getSpecialEntity(java.lang.String entityName,
                                  java.lang.String originalEntity)

getNoticeEntity

protected Entity getNoticeEntity(java.lang.String entityName,
                                 boolean isDestinyEntity)

getLocalEntity

protected Entity getLocalEntity(java.lang.String entityName)
                         throws java.lang.Exception
Throws:
java.lang.Exception

getLocalEntity

protected Entity getLocalEntity(java.lang.String entityName,
                                boolean checkDatabase)
                         throws java.lang.Exception
Throws:
java.lang.Exception

getEntityConnectionManager

protected DatabaseConnectionManager getEntityConnectionManager(java.lang.String entityName)

loadEntity

protected Entity loadEntity(java.lang.String entityName,
                            boolean checkDatabase,
                            DatabaseConnectionManager entityConnectionManager)
                     throws java.lang.Exception
Throws:
java.lang.Exception

startSession

public int startSession(java.lang.String user,
                        java.lang.String password,
                        ClientWatch client)
                 throws java.lang.Exception
Start a new client session in local or remote mode.
If the application has remote server this method calls it.
In local mode the method needs to know the user entity (LoginEntity parameter) to make a query looking for the specified user and password (with keys 'User_' and 'Password' in the Hashtable used in the {#@link Entity.query(Hashtable, Vector, int) method). If this query return one record te session starts.

Specified by:
startSession in interface EntityReferenceLocator
Parameters:
user - User name
password - User password
client - Object to checks if this session is open
Returns:
Integer value not negative used to identifier this client and allows him to get entity references
Throws:
java.lang.Exception

selectTimeZone

protected void selectTimeZone()
Get the server time zone.
When server and client have different time zones select one to use in the client
This depends on askUserChangeTimezone and defaultValueUseServerTimezone values


startLocalSession

protected int startLocalSession(java.lang.String user,
                                java.lang.String password,
                                ClientWatch cw)
                         throws java.lang.Exception
Throws:
java.lang.Exception

startUserPasswordSession

protected int startUserPasswordSession(java.lang.String user,
                                       java.lang.String password,
                                       ClientWatch cw)
                                throws java.lang.Exception
Throws:
java.lang.Exception

ensureRemoteReferenceLocator

protected void ensureRemoteReferenceLocator()
                                     throws java.lang.Exception
Throws:
java.lang.Exception

removeRemoteReferences

protected void removeRemoteReferences()

startRemoteSession

protected int startRemoteSession(java.lang.String user,
                                 java.lang.String password,
                                 ClientWatch cw)
                          throws java.lang.Exception
Throws:
java.lang.Exception

getSessionId

public int getSessionId()
If the user has started a session always return a not negative integer.

Specified by:
getSessionId in interface EntityReferenceLocator
Returns:
Client session identifier.

endSession

public void endSession(int id)
                throws java.lang.Exception
Description copied from interface: EntityReferenceLocator
This method finishes a client session. When this method is called, the entity reference locator does not provide more entity references to this client identifier.

Specified by:
endSession in interface EntityReferenceLocator
Parameters:
id - Client session identifier
Throws:
java.lang.Exception

getUser

public java.lang.String getUser()
Description copied from interface: ClientReferenceLocator
Get the current user name

Specified by:
getUser in interface ClientReferenceLocator
Returns:

finalize

protected void finalize()
                 throws java.lang.Throwable
Override the finalize method to guarantee the end of the open session.

Throws:
java.lang.Throwable

isLocalMode

public boolean isLocalMode()

testConnectionSpeed

public int testConnectionSpeed()
Bytes per second. The compression threshold establishes if remote locator support it. The threshold establishes calculating the compression and transmission time. The better way is execute this in a separated thread because test a EntityResult with 25kb approximately.


testConnectionSpeed

public int testConnectionSpeed(int tam)

installRMISocketFactory

protected void installRMISocketFactory()

installClientRMIFailureHandler

protected void installClientRMIFailureHandler()

failure

public boolean failure(java.lang.Exception e)
Specified by:
failure in interface java.rmi.server.RMIFailureHandler

setLocalEntities

public void setLocalEntities(java.util.Vector el)

updateRemoteReferenceLocator

protected void updateRemoteReferenceLocator()
                                     throws java.lang.Exception
Throws:
java.lang.Exception

getSessionInfo

public SessionInfo[] getSessionInfo(java.lang.String id)
                             throws java.lang.Exception
Description copied from interface: RemotelyManageable
This method returns the main information of all available user's sessions. The information available of each session is:

Specified by:
getSessionInfo in interface RemotelyManageable
Parameters:
id - String with the administrator id of the remote session.
Returns:
a SessionInfo[] with the information of the sessions.
Throws:
java.lang.Exception

getLastNCharactersFromLogFile

public java.lang.String getLastNCharactersFromLogFile(int characterNumber)
                                               throws java.lang.Exception
Description copied from interface: RemotelyManageable
Method that recovers the n characters indicated from the log file. If a -1 is passed as parameter the method returns the entire log file.

Specified by:
getLastNCharactersFromLogFile in interface RemotelyManageable
Parameters:
characterNumber - int with the number of characters that will be recovered.
Returns:
a String with the characters of the log file.
Throws:
java.lang.Exception

finishAdministrationRemoteSession

public void finishAdministrationRemoteSession(java.lang.String id)
                                       throws java.lang.Exception
Description copied from interface: RemotelyManageable
Method that finishes the remote session.

Specified by:
finishAdministrationRemoteSession in interface RemotelyManageable
Parameters:
id - String with the administrator id of the remote session.
Throws:
java.lang.Exception

restartServer

public void restartServer(java.lang.String id)
                   throws java.lang.Exception
Specified by:
restartServer in interface RemotelyManageable
Throws:
java.lang.Exception

waitServerForRestart

protected void waitServerForRestart(int maxTime)

stopServer

public void stopServer(java.lang.String id)
                throws java.lang.Exception
Specified by:
stopServer in interface RemotelyManageable
Throws:
java.lang.Exception

getUserIds

public java.util.Hashtable getUserIds(java.lang.String id)
                               throws java.lang.Exception
Description copied from interface: RemotelyManageable
This method returns a Hashtable with the current list of users's IDs.

Specified by:
getUserIds in interface RemotelyManageable
Parameters:
id - String with the administrator id of the remote session.
Returns:
a Hashtable with the user's IDs.
Throws:
java.lang.Exception

getConnectedUsers

public java.util.List getConnectedUsers(int sessionId)
                                 throws java.lang.Exception
Specified by:
getConnectedUsers in interface UtilReferenceLocator
Throws:
java.lang.Exception

getConnectedSessionIds

public java.util.List getConnectedSessionIds(int sessionId)
                                      throws java.lang.Exception
Specified by:
getConnectedSessionIds in interface UtilReferenceLocator
Throws:
java.lang.Exception

getStartSessionTime

public java.util.Hashtable getStartSessionTime(java.lang.String id)
                                        throws java.lang.Exception
Description copied from interface: RemotelyManageable
This method obtains a list with all the start times of all connections.

Specified by:
getStartSessionTime in interface RemotelyManageable
Parameters:
id - String with the administrator id of the remote session.
Returns:
a Hashtable with the values.
Throws:
java.lang.Exception

closeSession

public boolean closeSession(java.lang.String id,
                            int sessionId)
                     throws java.lang.Exception
Description copied from interface: RemotelyManageable
This method close the user's session with the given sessionID.

Specified by:
closeSession in interface RemotelyManageable
Parameters:
id - String with the administrator id of the remote session.
sessionId - int with the session id of the user's session.
Returns:
a boolean with the result of the operation.
Throws:
java.lang.Exception

startAdministrationRemoteSession

public java.lang.String startAdministrationRemoteSession(java.lang.String us,
                                                         java.lang.String pass)
                                                  throws java.lang.Exception
Description copied from interface: RemotelyManageable
This method starts a new remote session. It returns a String that are going to be the ID that allows to perform any remote action in the server.

Specified by:
startAdministrationRemoteSession in interface RemotelyManageable
Parameters:
us - String with the user.
pass - String with the password.
Returns:
a String with the administrator id of the remote session.
Throws:
java.lang.Exception

getDatabaseConnectionManager

public DatabaseConnectionManager getDatabaseConnectionManager()

getAttachmentEntity

public Entity getAttachmentEntity(int sessionId)
                           throws java.lang.Exception
Specified by:
getAttachmentEntity in interface UtilReferenceLocator
Throws:
java.lang.Exception

getPrintingTemplateEntity

public Entity getPrintingTemplateEntity(int sessionId)
                                 throws java.lang.Exception
Specified by:
getPrintingTemplateEntity in interface UtilReferenceLocator
Throws:
java.lang.Exception

getMessages

public java.util.Vector getMessages(int sessionIdTo,
                                    int sessionId)
                             throws java.lang.Exception
Specified by:
getMessages in interface UtilReferenceLocator
Throws:
java.lang.Exception

sendMessage

public void sendMessage(UtilReferenceLocator.Message message,
                        java.lang.String user,
                        int sessionId)
                 throws java.lang.Exception
Specified by:
sendMessage in interface UtilReferenceLocator
Throws:
java.lang.Exception

sendMessage

public void sendMessage(java.lang.String message,
                        java.lang.String user,
                        int sessionId)
                 throws java.lang.Exception
Specified by:
sendMessage in interface UtilReferenceLocator
Throws:
java.lang.Exception

sendMessageToAll

public void sendMessageToAll(java.lang.String message,
                             int sessionId)
                      throws java.lang.Exception
Specified by:
sendMessageToAll in interface UtilReferenceLocator
Throws:
java.lang.Exception

getChatCheckTime

public int getChatCheckTime()
Description copied from interface: ClientReferenceLocator
Get the time between two verifications of new chat messages

Specified by:
getChatCheckTime in interface ClientReferenceLocator
Returns:

getMessageCheckTime

public int getMessageCheckTime()
Specified by:
getMessageCheckTime in interface ClientReferenceLocator

startCheckMessagesThread

protected void startCheckMessagesThread()

showMessageDialog

public void showMessageDialog(java.awt.Component c)
Specified by:
showMessageDialog in interface ClientReferenceLocator

ping

public boolean ping()
             throws java.lang.Exception
Description copied from interface: RemotelyManageable
unimplemented.

Specified by:
ping in interface RemotelyManageable
Returns:
Throws:
java.lang.Exception

getRemoteReportStore

public java.util.List getRemoteReportStore(int sessionId)
                                    throws java.lang.Exception
Specified by:
getRemoteReportStore in interface RemoteReportReferencer
Throws:
java.lang.Exception

getReportEntityNames

public java.util.List getReportEntityNames(int sessionId)
                                    throws java.lang.Exception
Specified by:
getReportEntityNames in interface RemoteReportReferencer
Throws:
java.lang.Exception

setRemoteReportStore

public void setRemoteReportStore(ReportStore rs)
                          throws java.lang.Exception
Throws:
java.lang.Exception

getRemoteApplicationPreferences

public RemoteApplicationPreferences getRemoteApplicationPreferences(int sessionId)
                                                             throws java.lang.Exception
Description copied from interface: RemoteApplicationPreferenceReferencer
Get the application preferences stored in the server side

Specified by:
getRemoteApplicationPreferences in interface RemoteApplicationPreferenceReferencer
Parameters:
sessionId - User session identifier
Returns:
Throws:
java.lang.Exception

ok

public boolean ok()
           throws java.lang.Exception
Specified by:
ok in interface com.ontimize.ols.LOk
Throws:
java.lang.Exception

isDevelopementL

public boolean isDevelopementL()
                        throws java.lang.Exception
Specified by:
isDevelopementL in interface com.ontimize.ols.LOk
Throws:
java.lang.Exception

ok

public boolean ok(java.lang.String number)
           throws java.lang.Exception
Specified by:
ok in interface com.ontimize.ols.LOk
Throws:
java.lang.Exception

getLValue

public java.lang.String getLValue(java.lang.String name)
                           throws java.lang.Exception
Specified by:
getLValue in interface com.ontimize.ols.LOk
Throws:
java.lang.Exception

getLContent

public java.lang.String getLContent()
                             throws java.lang.Exception
Specified by:
getLContent in interface com.ontimize.ols.LOk
Throws:
java.lang.Exception

getLInfoObject

public java.lang.Object getLInfoObject()
                                throws java.lang.Exception
Specified by:
getLInfoObject in interface com.ontimize.ols.LOk
Throws:
java.lang.Exception

sendNotice

public void sendNotice(java.util.Hashtable messageValues,
                       int sessionId,
                       boolean request)
                throws java.lang.Exception
Description copied from interface: INoticeSystem
Method used to send notices. This method insert the notice in the notice entity and insert all destinies in the destiny notice entity

Specified by:
sendNotice in interface INoticeSystem
Parameters:
messageValues -
sessionId -
request - If this is true, the notices is a request notice. In this case the correct template must be selected
Throws:
java.lang.Exception

getInternalNotices

public EntityResult getInternalNotices(int sessionId,
                                       boolean unsend,
                                       boolean unread,
                                       boolean deleted)
                                throws java.lang.Exception
Description copied from interface: INoticeSystem
Method to get all notices for the specified user.
In this method is possible specified if the user wants all messages or only unread ones

Specified by:
getInternalNotices in interface INoticeSystem
Parameters:
sessionId - User session identifier
unsend - When this is true only return the unsend notices
unread - When this is true ontly return the unread notices
Returns:
Throws:
java.lang.Exception

setNoticesRead

public void setNoticesRead(int sessionId,
                           java.util.Vector idNotices)
                    throws java.lang.Exception
Description copied from interface: INoticeSystem
Method to set some notices as read

Specified by:
setNoticesRead in interface INoticeSystem
Parameters:
sessionId - User session identifier
idNotices - Array with the notice keys
Throws:
java.lang.Exception

getSentNotices

public EntityResult getSentNotices(int sessionId,
                                   java.lang.Boolean deleted)
                            throws java.lang.Exception
Description copied from interface: INoticeSystem
Method to query all notices sent by the specified user

Specified by:
getSentNotices in interface INoticeSystem
Parameters:
sessionId - User session identifier
deleted - deleted = true only query the deleted notices
deleted = false only query not deleted notices
deleted = null query all sent notices
Returns:
Throws:
java.lang.Exception

checkNoticeSent

public void checkNoticeSent(int sessionId,
                            java.lang.Object noticeKey)
                     throws java.lang.Exception
Description copied from interface: INoticeSystem
This method sets a notices as sent

Specified by:
checkNoticeSent in interface INoticeSystem
Parameters:
sessionId - User session identifier
noticeKey - Notice key.
Throws:
java.lang.Exception

removeSentNotices

public void removeSentNotices(int sessionId,
                              java.util.Vector idNotices)
                       throws java.lang.Exception
Description copied from interface: INoticeSystem
This method sets the specified notices as deleted

Specified by:
removeSentNotices in interface INoticeSystem
Parameters:
sessionId - User session identifier
idNotices - Keys of the notices to remove
Throws:
java.lang.Exception

removeReceivedNotices

public void removeReceivedNotices(int sessionId,
                                  java.util.Vector idNotices)
                           throws java.lang.Exception
Description copied from interface: INoticeSystem
This method removes the specified received notices for the user with this session identifier.

Specified by:
removeReceivedNotices in interface INoticeSystem
Parameters:
sessionId - User session identifier
idNotices - Notice keys
Throws:
java.lang.Exception

getNoticeTypes

public java.util.Vector getNoticeTypes()
                                throws java.lang.Exception
Description copied from interface: INoticeSystem
Get the identifies for all notices types in the application

Specified by:
getNoticeTypes in interface INoticeSystem
Returns:
Throws:
java.lang.Exception

getNoticeEntityName

public java.lang.String getNoticeEntityName()
Description copied from interface: INoticeSystem
Get the name of the notice entity

Specified by:
getNoticeEntityName in interface INoticeSystem
Returns:

getNoticeEntityDestinyName

public java.lang.String getNoticeEntityDestinyName()
Description copied from interface: INoticeSystem
Get the name of the notice destiny entity

Specified by:
getNoticeEntityDestinyName in interface INoticeSystem
Returns:

initServerNotice

protected void initServerNotice(java.util.Hashtable params)

getNewMailNotice

public EntityResult getNewMailNotice()
                              throws java.lang.Exception
Description copied from interface: INoticeSendMails
This method allows to get all e-mail notices not yet sent

Specified by:
getNewMailNotice in interface INoticeSendMails
Returns:
Throws:
java.lang.Exception

checkNoticeAsSend

public void checkNoticeAsSend(java.lang.Object noticeKey)
                       throws java.lang.Exception
Description copied from interface: INoticeSendMails
This method marks the specified notice as sent

Specified by:
checkNoticeAsSend in interface INoticeSendMails
Parameters:
noticeKey - Notice key
Throws:
java.lang.Exception

getUserId

public java.lang.Object getUserId(int sessionId)
                           throws java.lang.Exception
Description copied from interface: INoticeSystem
Get the identification of the user that must be stored in the notice system to identify this application user. In this way the identification of a user can be not only a string.

Specified by:
getUserId in interface INoticeSystem
Parameters:
sessionId - User session identifier
Returns:
Throws:
java.lang.Exception

getConnectionManager

public DatabaseConnectionManager getConnectionManager()

getXMLForm

public java.lang.String getXMLForm(java.lang.String form,
                                   int userid)
                            throws java.lang.Exception
Specified by:
getXMLForm in interface XMLFormProvider
Throws:
java.lang.Exception

getFormManagerParameters

public java.util.Hashtable getFormManagerParameters(java.lang.String formManagerId,
                                                    int userid)
                                             throws java.lang.Exception
Specified by:
getFormManagerParameters in interface XMLClientProvider
Throws:
java.lang.Exception

reloadXMLMenu

public void reloadXMLMenu(int userid)
                   throws java.lang.Exception
Specified by:
reloadXMLMenu in interface XMLClientProvider
Throws:
java.lang.Exception

getXMLMenu

public java.lang.String getXMLMenu(int userid)
                            throws java.lang.Exception
Specified by:
getXMLMenu in interface XMLClientProvider
Throws:
java.lang.Exception

hasChat

public boolean hasChat()
Description copied from interface: ClientReferenceLocator
True when the application has a chat configured

Specified by:
hasChat in interface ClientReferenceLocator
Returns:

getRemoteOperationManager

public RemoteOperationManager getRemoteOperationManager(int sessionId)
                                                 throws java.lang.Exception
Specified by:
getRemoteOperationManager in interface UtilReferenceLocator
Throws:
java.lang.Exception

getRemoteReference

public java.lang.Object getRemoteReference(java.lang.String name,
                                           int sessionId)
                                    throws java.lang.Exception
Description copied from interface: UtilReferenceLocator
Gets a remote reference.

Specified by:
getRemoteReference in interface UtilReferenceLocator
Parameters:
name -
sessionId -
Returns:
Throws:
java.lang.Exception
See Also:
{@link SecureReferenceLocator#configureRemoteReferences(String)}

createRemoteReference

protected java.lang.Object createRemoteReference(java.lang.String className,
                                                 java.util.Hashtable parameters)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

configureRemoteReferences

protected void configureRemoteReferences(java.lang.String xmlDefinitionResource)

getNodeValue

protected java.lang.String getNodeValue(org.w3c.dom.Node son)

getServerTimeZone

public java.util.TimeZone getServerTimeZone(int sessionId)
                                     throws java.lang.Exception
Description copied from interface: UtilReferenceLocator
Get the Server TimeZone. If is local mode get the Application Time Zone

Specified by:
getServerTimeZone in interface UtilReferenceLocator
Parameters:
sessionId -
Returns:
Throws:
java.lang.Exception

getLoginEntityName

public java.lang.String getLoginEntityName(int sessionId)
                                    throws java.lang.Exception
Description copied from interface: UtilReferenceLocator
Get the name of the login entity (LoginEntity parameter)

Specified by:
getLoginEntityName in interface UtilReferenceLocator
Parameters:
sessionId -
Returns:
The name of the Login Entity
Throws:
java.lang.Exception

getDefaultPackage

public java.lang.String getDefaultPackage()

configureConnectionManager

protected DatabaseConnectionManager configureConnectionManager(boolean bStatisticViewer,
                                                               boolean writeConnectionInfoFile,
                                                               java.net.URL databasePropertiesURL,
                                                               java.net.URL autonumericalURL)
                                                        throws java.lang.Exception
Throws:
java.lang.Exception

createConnectionManager

protected DatabaseConnectionManager createConnectionManager(boolean bStatisticViewer,
                                                            boolean writeConnectionInfoFile,
                                                            java.net.URL databasePropertiesURL,
                                                            java.net.URL autonumericalURL)
                                                     throws java.lang.Exception
Throws:
java.lang.Exception

configureMultiConnectionManager

protected void configureMultiConnectionManager()

getDEBUGValueRemote

public boolean getDEBUGValueRemote(java.lang.String id,
                                   java.lang.String v)
                            throws java.lang.Exception
Description copied from interface: RemotelyManageable
Method to obtain the current value of the DEBUG Server variables.

Specified by:
getDEBUGValueRemote in interface RemotelyManageable
Parameters:
id - String with the administrator id of the remote session.
v - String with the name of the variable.
Returns:
a boolean with the value of the indicated variable.
Throws:
java.lang.Exception

getSystemInfo

public java.util.Hashtable getSystemInfo(java.lang.String id,
                                         java.lang.String key)
                                  throws java.lang.Exception
Description copied from interface: RemotelyManageable
Method that returns system information about the connection with the database. The keys to request information are stored into static variables in the class RemoteUtilities. The available keys are:

key meaning
CONNECTION_INFO To get the connection information when exist only one connection.
IS_MULTICONNECTION To know if multiconnection is available. Returns a String "true" or "false".
MULTICONNECTION_IDLIST To get the list of Strings with the identification of the connections.
MULTICONNECTION_INFO To get the connection information of all connections available.

NOTE: the connection information contains into the Hashtable returned is:

Specified by:
getSystemInfo in interface RemotelyManageable
Parameters:
id - String with the administrator id of the remote session.
key - String indicating what information you wish to request.
Returns:
a Hashtable with the values.
Throws:
java.lang.Exception

setDEBUGValueRemote

public void setDEBUGValueRemote(java.lang.String id,
                                java.lang.String v,
                                boolean b)
                         throws java.lang.Exception
Description copied from interface: RemotelyManageable
Method to set the DEBUG Server variables.

Specified by:
setDEBUGValueRemote in interface RemotelyManageable
Parameters:
id - String with the administrator id of the remote session.
v - String with the name of the variable.
b - Boolean with the value.
Throws:
java.lang.Exception

removeEntity

public void removeEntity(java.lang.String id,
                         java.lang.String entityName)
                  throws java.lang.Exception
Specified by:
removeEntity in interface RemotelyManageable
Throws:
java.lang.Exception

getRemotePreferencesFile

public java.util.Properties getRemotePreferencesFile(java.lang.String id)
                                              throws java.lang.Exception
Description copied from interface: RemotelyManageable
Method to get remotely the Server Preferences file.

Specified by:
getRemotePreferencesFile in interface RemotelyManageable
Parameters:
id - String with the administrator id of the remote session.
Returns:
a Properties with the preferences.
Throws:
java.lang.Exception

setRemotePreferencesFile

public void setRemotePreferencesFile(java.lang.String id,
                                     java.util.Properties prop)
                              throws java.lang.Exception
Description copied from interface: RemotelyManageable
Method to set remotely the Server Preferences file.

Specified by:
setRemotePreferencesFile in interface RemotelyManageable
Parameters:
id - String with the administrator id of the remote session.
prop - The properties file to be established. This file will contain the structure of pair values: key-value.
Throws:
java.lang.Exception

closeLockedConnections

public void closeLockedConnections(java.lang.String id,
                                   java.lang.String databaseId)
                            throws java.lang.Exception
Specified by:
closeLockedConnections in interface RemotelyManageable
Throws:
java.lang.Exception

getToken

public java.lang.String getToken()
                          throws java.lang.Exception
Specified by:
getToken in interface UtilReferenceLocator
Throws:
java.lang.Exception

getUserFromCert

public java.lang.String getUserFromCert(java.lang.String stringCertificate)
                                 throws java.lang.Exception
Specified by:
getUserFromCert in interface UtilReferenceLocator
Throws:
java.lang.Exception

getPasswordFromCert

public java.lang.String getPasswordFromCert(java.lang.String stringCertificate)
                                     throws java.lang.Exception
Specified by:
getPasswordFromCert in interface UtilReferenceLocator
Throws:
java.lang.Exception

checkToken

public boolean checkToken(java.lang.String token)
                   throws java.lang.Exception
Throws:
java.lang.Exception

getPasswordFromCert

protected java.lang.String getPasswordFromCert(java.security.cert.Certificate cert)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

getUserFromCert

protected java.lang.String getUserFromCert(java.security.cert.Certificate cert)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

getContextParams

protected java.util.Hashtable getContextParams(java.lang.String password)

retrieveInitialContext

public InitialContext retrieveInitialContext(int sessionId,
                                             java.util.Hashtable params)
                                      throws java.lang.Exception
Specified by:
retrieveInitialContext in interface UtilReferenceLocator
Throws:
java.lang.Exception

Ontimize