com.ibm.di.admin.remote
Class RemoteConfigProxy

java.lang.Object
  extended by com.ibm.di.admin.remote.RemoteConfigProxy

public class RemoteConfigProxy
extends Object


Constructor Summary
RemoteConfigProxy()
           
RemoteConfigProxy(RemoteConfigURL url)
          Construct the proxy with RemoteConfigURL
RemoteConfigProxy(String ip, int port, String path, String username, String password)
           
 
Method Summary
 Hashtable[] getAvailableSystemComponents(int type)
           
 Vector getRemoteInstances()
          Returns a Vector of the file names of all configurations in the codebase folder com.ibm.di.config.codebase The configurations file paths returned are relative to the TDI Server configuration codebase folder.
 String getServerInfo()
           
 boolean killProcess()
           
 MetamergeConfig newRemote()
          Creates a new empty configuration, immediately checks it out and loads a temporary Config Instance on the Server.
 MetamergeConfig openRemote()
          Loads a configuration for editing on a Remote TDI Server and starts a temporary Config Instance on the Server
 MetamergeConfig openRemote(RemoteConfigURL remoteURL)
          Loads a configuration for editing on a Remote TDI Server and starts a temporary Config Instance on the Server
 void runRemoteTask(ExecuteTask et, String type, String name, Entry inputData)
          Run remote task AL or EH
 boolean saveRemote(MetamergeConfig mc, boolean saveAndClose)
          Check in the specified configuration and leaves it checked out by invoking server's api method checkInAndLeaveCheckedOut if saveAndClose is false and checkInConfiguration if saveAndClose is true
 boolean undoCheckOutConfig()
          Releases the lock on the specified configuration, aborting all changes being done by executing server's api method undoCheckOut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteConfigProxy

public RemoteConfigProxy()

RemoteConfigProxy

public RemoteConfigProxy(RemoteConfigURL url)
Construct the proxy with RemoteConfigURL

Parameters:
url - url representing remote file
Throws:
Exception - throws an exception if the url is malformed or the server is down

RemoteConfigProxy

public RemoteConfigProxy(String ip,
                         int port,
                         String path,
                         String username,
                         String password)
                  throws MalformedURLException
Throws:
MalformedURLException
Method Detail

newRemote

public MetamergeConfig newRemote()
                          throws Exception
Creates a new empty configuration, immediately checks it out and loads a temporary Config Instance on the Server.

Returns:
a metamergeconfig object representing the remote config null in case of error
Throws:
Exception - if new config cannot be created on the remote server

undoCheckOutConfig

public boolean undoCheckOutConfig()
Releases the lock on the specified configuration, aborting all changes being done by executing server's api method undoCheckOut

Returns:
boolean success CheckOut

saveRemote

public boolean saveRemote(MetamergeConfig mc,
                          boolean saveAndClose)
                   throws Exception
Check in the specified configuration and leaves it checked out by invoking server's api method checkInAndLeaveCheckedOut if saveAndClose is false and checkInConfiguration if saveAndClose is true

Parameters:
mc - the Metamerge Config to be Checks in
saveAndClose -
Returns:
boolean success
Throws:
Exception

openRemote

public MetamergeConfig openRemote()
                           throws Exception
Loads a configuration for editing on a Remote TDI Server and starts a temporary Config Instance on the Server

Returns:
The method returns the MetamergeConfig object.
Throws:
Exception

openRemote

public MetamergeConfig openRemote(RemoteConfigURL remoteURL)
                           throws Exception
Loads a configuration for editing on a Remote TDI Server and starts a temporary Config Instance on the Server

Returns:
The method returns the MetamergeConfig object.
Throws:
Exception

getRemoteInstances

public Vector getRemoteInstances()
                          throws RemoteException,
                                 DIException
Returns a Vector of the file names of all configurations in the codebase folder com.ibm.di.config.codebase The configurations file paths returned are relative to the TDI Server configuration codebase folder. Invoke server's api method listAllConfigurations

Returns:
Vector with all remote configuration paths
Throws:
DIException, - RemoteException
RemoteException
DIException

getAvailableSystemComponents

public Hashtable[] getAvailableSystemComponents(int type)
                                         throws RemoteException,
                                                DIException
Parameters:
type - type of folder
Returns:
hastable containing a list of requested folder type
Throws:
Exception
RemoteException
DIException

getServerInfo

public String getServerInfo()
                     throws RemoteException,
                            DIException
Returns:
string containing hostname ip, boot time and version of the remote server use it in RemoteVersionTable class
Throws:
Exception
RemoteException
DIException

killProcess

public boolean killProcess()
Returns:
false if the process is still running, else true

runRemoteTask

public void runRemoteTask(ExecuteTask et,
                          String type,
                          String name,
                          Entry inputData)
                   throws Exception
Run remote task AL or EH

Parameters:
et - The ExecuteTask object created on clicking run AL/EH
type - AL or EH
name - name of the excutable unit(AL/EH name)
Throws:
Exception