Style Intelligence v12.0

inetsoft.uql.service
Class RemoteEngine

java.lang.Object
  extended by inetsoft.uql.service.XEngine
      extended by inetsoft.uql.service.RemoteEngine
All Implemented Interfaces:
XDataService, XQueryRepository, XRepository

public class RemoteEngine
extends XEngine

Specialization of XEngine that delegates all query execution and meta-data retrieval to the server.

Since:
11.3

Nested Class Summary
 
Nested classes/interfaces inherited from class inetsoft.uql.service.XEngine
XEngine.MetaDataLoader
 
Nested classes/interfaces inherited from interface inetsoft.uql.XRepository
XRepository.MetaDataListener
 
Field Summary
 
Fields inherited from interface inetsoft.uql.XQueryRepository
GLOBAL_SCOPE, LOCAL_QUERY, LOCAL_SCOPE, NORMAL_QUERY
 
Constructor Summary
RemoteEngine()
          Creates a new instance of RemoteEngine.
 
Method Summary
 Object bind(Object uinfo)
          Connect to the data service.
 void clearCache()
          Clear cached data.
 void close(Object session)
          Close an active session.
 void connect(Object session, String query, VariableTable params)
          Initialize a data source connection.
 void connect(Object session, XDataSource dx, VariableTable params)
          Initialize a data source connection.
 XNode execute(Object session, XQuery xquery, VariableTable vars, Principal user, boolean resetVariables, inetsoft.util.DataCacheVisitor visitor)
          Execute the query and return the result set.
 UserVariable[] getConnectionParameters(Object session, String query)
          Get the parameters for a data source.
 UserVariable[] getConnectionParameters(Object session, XDataSource dx)
          Get the parameters for a data source.
 UserVariable[] getConnectionParameters(Object session, XQuery xquery)
          Get the parameters for a data source.
 XHandler getHandler(Object session, XDataSource dx, VariableTable params)
          Get the handler.
 XNode getMetaData(Object session, XDataSource dx, XNode mtype, boolean clone)
          Build the meta data of this data source as a XNode tree.
 UserVariable[] getQueryParameters(Object session, String query, boolean promptOnly)
          Get the parameters for a query.
 UserVariable[] getQueryParameters(Object session, XQuery xquery, boolean promptOnly)
          Get the parameters for a query.
 void refreshMetaData()
          Clear the cached meta data.
 void refreshMetaData(String dxName)
          Refresh matadata of a datasource.
 void testDataSource(Object session, XDataSource dx, VariableTable params)
          Test a data source connection.
 void updateDataSource(XDataSource dx, String oname)
          Add or replace a data source in the repository.
 void updateDataSource(XDataSource dx, String oname, Boolean actionRecord)
          Add or replace a data source in the repository.
 
Methods inherited from class inetsoft.uql.service.XEngine
execute, execute, execute, execute, execute, execute, execute, execute, execute, getDataModel, getDataSource, getDataSource, getDataSourceFolder, getDataSourceFolder, getDataSourceFolderFullNames, getDataSourceFolderNames, getDataSourceFullNames, getDataSourceNames, getDomain, getMetaData, getMetaData, getMetaDataCache, getQueries, getQuery, getQuery, getQueryDatasource, getQueryFolder, getQueryNames, getQueryNames, getQueryType, getQueryType, getSubDataSourceNames, getSubfolderNames, isQueryVisible, removeDataModel, removeDataSource, removeDataSource, removeDataSourceFolder, removeDataSourceFolder, removeDomain, removeMetaData, removeMetaDataFiles, removeQuery, renameQueryFolder, updateDataModel, updateDataSourceFolder, updateDomain, updateQuery, updateQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteEngine

public RemoteEngine()
Creates a new instance of RemoteEngine.

Method Detail

bind

public Object bind(Object uinfo)
            throws RemoteException
Connect to the data service.

Specified by:
bind in interface XDataService
Overrides:
bind in class XEngine
Parameters:
uinfo - user info.
Returns:
session object.
Throws:
RemoteException

getConnectionParameters

public UserVariable[] getConnectionParameters(Object session,
                                              String query)
                                       throws RemoteException
Get the parameters for a data source. The parameters should be filled in and passed to the connect method. If the data source is already connected or the data source does not require any connection parameter, the method returns an empty array.

Specified by:
getConnectionParameters in interface XDataService
Overrides:
getConnectionParameters in class XEngine
Parameters:
session - session object.
query - query name.
Returns:
list of variables, or null if no user variable is needed for the connection.
Throws:
RemoteException

getConnectionParameters

public UserVariable[] getConnectionParameters(Object session,
                                              XQuery xquery)
                                       throws RemoteException
Get the parameters for a data source. The parameters should be filled in and passed to the connect method. If the data source is already connected or the data source does not require any connection parameter, the method returns an empty array.

Specified by:
getConnectionParameters in interface XDataService
Overrides:
getConnectionParameters in class XEngine
Parameters:
session - session object.
xquery - query to get connection parameters.
Returns:
list of variables, or null if no user variable is needed for the connection.
Throws:
RemoteException

getConnectionParameters

public UserVariable[] getConnectionParameters(Object session,
                                              XDataSource dx)
                                       throws RemoteException
Get the parameters for a data source. The parameters should be filled in and passed to the connect method. If the data source is already connected or the data source does not require any connection parameter, the method returns an empty array.

Specified by:
getConnectionParameters in interface XDataService
Overrides:
getConnectionParameters in class XEngine
Parameters:
session - session object.
dx - data source to get connection parameters.
Throws:
RemoteException

getQueryParameters

public UserVariable[] getQueryParameters(Object session,
                                         String query,
                                         boolean promptOnly)
                                  throws RemoteException
Get the parameters for a query. The parameters should be filled in and passed to execute().

Specified by:
getQueryParameters in interface XDataService
Overrides:
getQueryParameters in class XEngine
Parameters:
session - session object.
query - query name.
promptOnly - true if only include the user variables that are declared as 'Prompt User'.
Returns:
list of variables, or null if no user variable is needed for the query.
Throws:
RemoteException

getQueryParameters

public UserVariable[] getQueryParameters(Object session,
                                         XQuery xquery,
                                         boolean promptOnly)
                                  throws RemoteException
Get the parameters for a query. The parameters should be filled in and passed to execute().

Specified by:
getQueryParameters in interface XDataService
Overrides:
getQueryParameters in class XEngine
Parameters:
session - session object.
xquery - query to get parameters.
promptOnly - true if only include the user variables that are declared as 'Prompt User'.
Returns:
list of variables, or null if no user variable is needed for the query.
Throws:
RemoteException

testDataSource

public void testDataSource(Object session,
                           XDataSource dx,
                           VariableTable params)
                    throws Exception
Test a data source connection. The data source connection is shared by a session.

Specified by:
testDataSource in interface XDataService
Overrides:
testDataSource in class XEngine
Parameters:
session - session object.
dx - the specified data source.
params - connection parameters.
Throws:
Exception

connect

public void connect(Object session,
                    String query,
                    VariableTable params)
             throws Exception
Initialize a data source connection. The data source connection is shared by a session.

Specified by:
connect in interface XDataService
Overrides:
connect in class XEngine
Parameters:
session - session object.
query - query name.
params - connection parameters.
Throws:
Exception

connect

public void connect(Object session,
                    XDataSource dx,
                    VariableTable params)
             throws Exception
Initialize a data source connection. The data source connection is shared by a session.

Specified by:
connect in interface XDataService
Overrides:
connect in class XEngine
Parameters:
session - session object.
dx - the specified data source.
params - connection parameters.
Throws:
Exception

getHandler

public XHandler getHandler(Object session,
                           XDataSource dx,
                           VariableTable params)
                    throws Exception
Get the handler.

Specified by:
getHandler in interface XDataService
Overrides:
getHandler in class XEngine
Parameters:
session - the specified session object.
dx - the specified data source.
params - the specified variable table.
Throws:
Exception

execute

public XNode execute(Object session,
                     XQuery xquery,
                     VariableTable vars,
                     Principal user,
                     boolean resetVariables,
                     inetsoft.util.DataCacheVisitor visitor)
              throws Exception
Execute the query and return the result set.

Specified by:
execute in interface XDataService
Overrides:
execute in class XEngine
Parameters:
session - session object.
xquery - query to execute.
vars - variable values for the query.
user - a Principal object that identifies the user executing the query.
resetVariables - true if should reset cached variables.
visitor - used to process cache facility.
Throws:
Exception

close

public void close(Object session)
           throws RemoteException
Close an active session.

Specified by:
close in interface XDataService
Overrides:
close in class XEngine
Parameters:
session - session object.
Throws:
RemoteException

getMetaData

public XNode getMetaData(Object session,
                         XDataSource dx,
                         XNode mtype,
                         boolean clone)
                  throws Exception
Build the meta data of this data source as a XNode tree. This method will rebuild the meta data tree everytime it's called. The meta data should be cached by the caller.

Specified by:
getMetaData in interface XRepository
Overrides:
getMetaData in class XEngine
Parameters:
session - session object.
dx - data source.
mtype - meta data type, defined in each data source.
clone - true to clone the cached node.
Returns:
return the root node of the meta data tree.
Throws:
Exception

clearCache

public void clearCache()
Clear cached data.

Specified by:
clearCache in interface XRepository
Overrides:
clearCache in class XEngine

refreshMetaData

public void refreshMetaData(String dxName)
Refresh matadata of a datasource. It will remove the related file caches and memory caches.

Specified by:
refreshMetaData in interface XRepository
Overrides:
refreshMetaData in class XEngine
Parameters:
dxName - the specified datasource name.

refreshMetaData

public void refreshMetaData()
Clear the cached meta data.

Specified by:
refreshMetaData in interface XRepository
Overrides:
refreshMetaData in class XEngine

updateDataSource

public void updateDataSource(XDataSource dx,
                             String oname)
                      throws Exception
Add or replace a data source in the repository.

Specified by:
updateDataSource in interface XRepository
Overrides:
updateDataSource in class XEngine
Parameters:
dx - new data source.
oname - old name of the data source, if the name has been changed. Otherwise it should be null.
Throws:
Exception

updateDataSource

public void updateDataSource(XDataSource dx,
                             String oname,
                             Boolean actionRecord)
                      throws Exception
Add or replace a data source in the repository.

Specified by:
updateDataSource in interface XRepository
Overrides:
updateDataSource in class XEngine
Parameters:
dx - new data source.
oname - old name of the data source, if the name has been changed. Otherwise it should be null.
actionRecord - control whether write down audit record when remote in designer. Otherwise it should be null.
Throws:
Exception

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.