Rational Developer for i
7.5.0

com.ibm.etools.systems.as400.debug.sep.internal
Class PhantomServiceEntryPointListManager

java.lang.Object
  extended by com.ibm.etools.systems.as400.debug.sep.internal.PhantomServiceEntryPointListManager

public class PhantomServiceEntryPointListManager
extends Object

PhantomServiceEntryPointLocationListManager represents a model of service entry points. PhantomServiceEntryPointLocationListManager will fire events when a service entry point whenever service entry point(s) is(are) added, modified, removed , enabled/disabled.


Nested Class Summary
static interface PhantomServiceEntryPointListManager.IPhantomServiceEntryPointModelListener
          PhantomServiceEntryPointLocationModelListener is the interface that listening PhantomServiceEntryPointListManager events.
 
Field Summary
static String ALL
           
static String copyright
           
static int MODULELEVEL
           
static int PGMLEVEL
           
static int PROCEDURELEVEL
           
static int ROOTLEVEL
           
static int USERPROFILELEVEL
           
 
Constructor Summary
PhantomServiceEntryPointListManager()
          Constructor.
 
Method Summary
 boolean addServiceEntryPoint(int sepID, String hostName, String setterUserProfile, String programDestination, String programName, String programType, String moduleName, String procedureName, String connectionName, String hitterUserProfile)
          Add a new service entry point into model.
 boolean addServiceEntryPoint(int sepID, String hostName, String setterUserProfile, String programDestination, String programName, String programType, String moduleName, String procedureName, String connectionName, String hitterUserProfile, long timeStamp)
          Add a new service entry point into model.
 void addServiceEntryPointListener(PhantomServiceEntryPointListManager.IPhantomServiceEntryPointModelListener listener)
          Add a specific listener for SEP model event
 boolean enableServiceEntryPoint(PhantomServiceEntryPoint phantomServiceEntryPoint, boolean enablement)
          Update the enablement status of a service entry point.
 PhantomServiceEntryPoint findConflictSEPForThisOne(String hostName, String setterUserProfile, String programDestination, String programName, String programType, String moduleName, String procedureName, List<PhantomServiceEntryPoint> conflictList)
          Find conflict service entry points for a specific service entry point user wants to set.
 void findConflictServiceEntryPoints(List<PhantomServiceEntryPointInfo> futureServiceEntryPointInfoList, List<PhantomServiceEntryPoint> explicitConflictList, List<PhantomServiceEntryPoint> conflictList)
          Find all the conflict service entry points It includes explicit conflict and implicit conflict.
 List<PhantomServiceEntryPoint> findServiceEntryPoints(String hostName, String connectionName)
          Find service entry points for specific host, setter and connection from model
 Object[] getALLServiceEntryPoints()
          Get all service entry points in the model
 Object[] getALLServiceEntryPoints(String hostName, String setterUserProfile, String programDestination, String programName, String programType)
          Get all service entry points in the model
 void getServiceEntryPointsFromID(String hostName, String setterUserProfile, String programDestination, String programName, String programType, List<Integer> SEPIDs, List<PhantomServiceEntryPoint> SEPs)
          Get service entry points from corresponding service entry point IDs.
 boolean hasExistingServiceEntryPoint(String hostName, String setterUserProfile, String programDestination, String programName, String programType, String moduleName, String procedureName)
          Check if the specific location has any existing Service entry point.
 boolean modifyServiceEntryPoint(PhantomServiceEntryPoint phantomServiceEntryPoint, String newHitterserProfile, String newModuleName, String newProcedureName)
          Modify attributes of a service entry point.
 boolean removeServiceEntryPoint(PhantomServiceEntryPoint phantomServiceEntryPoint)
          Remove a service entry point from model.
 boolean removeServiceEntryPoint(String hostName, String setterUserProfile)
          Remove a new service entry point from model
 boolean removeServiceEntryPoint(String hostName, String setterUserProfile, String programDestination, String programName, String programType)
          Remove a new service entry point from model
 boolean removeServiceEntryPoint(String hostName, String setterUserProfile, String programDestination, String programName, String programType, String moduleName, String procedureName)
          Remove a new service entry point from model
 void removeServiceEntryPointListener(PhantomServiceEntryPointListManager.IPhantomServiceEntryPointModelListener listener)
          Remove a specific listener for SEP model event
 void removeServiceEntryPoints(List<PhantomServiceEntryPoint> phantomServiceEntryPoints)
          Remove a list of service entry points.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

ROOTLEVEL

public static final int ROOTLEVEL
See Also:
Constant Field Values

USERPROFILELEVEL

public static final int USERPROFILELEVEL
See Also:
Constant Field Values

PGMLEVEL

public static final int PGMLEVEL
See Also:
Constant Field Values

MODULELEVEL

public static final int MODULELEVEL
See Also:
Constant Field Values

PROCEDURELEVEL

public static final int PROCEDURELEVEL
See Also:
Constant Field Values

ALL

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

PhantomServiceEntryPointListManager

public PhantomServiceEntryPointListManager()
Constructor.

Method Detail

findConflictServiceEntryPoints

public void findConflictServiceEntryPoints(List<PhantomServiceEntryPointInfo> futureServiceEntryPointInfoList,
                                           List<PhantomServiceEntryPoint> explicitConflictList,
                                           List<PhantomServiceEntryPoint> conflictList)
Find all the conflict service entry points It includes explicit conflict and implicit conflict.

Parameters:
futureServiceEntryPointInfoList - : list contains information of all the service entry points user wants to set.
explicitConflictList: - return value, will be populated by explicit conflict service entry points.
conflictList: - return value, will be populated by all the conflict service entry points.

findServiceEntryPoints

public List<PhantomServiceEntryPoint> findServiceEntryPoints(String hostName,
                                                             String connectionName)
Find service entry points for specific host, setter and connection from model

Parameters:
hostName - : the host
connectionName: - the connection name associated with the SEP
Returns:
Vector if service entry points found, null otherwise.

findConflictSEPForThisOne

public PhantomServiceEntryPoint findConflictSEPForThisOne(String hostName,
                                                          String setterUserProfile,
                                                          String programDestination,
                                                          String programName,
                                                          String programType,
                                                          String moduleName,
                                                          String procedureName,
                                                          List<PhantomServiceEntryPoint> conflictList)
Find conflict service entry points for a specific service entry point user wants to set. It will put all the conflict service entry points into conflictList. And it also returns the explicit conflict service entry point. Some scenarios: location to be checked return pgm A module *ALL All SEPs for pgm A pgm A module X procedure *ALL ALL SEPs for pgm A module X pgm A module X procedure Y The SEP for pgm A module X procedure Y

Parameters:
hostName - : the host
setterUserProfile: - the user profile who sets the SEP
programDestination: - the program path , i.e. library name for now
programName: - the program name
programType: - the program type
moduleName - : the module name
procedureName: - the procedure name
Returns:
explicit conflict service entry point objects or null if not found. Since it is quite a complicate search algorithm, I will describe here: . Use hostName, setterUserProfile, programName, program type and library to get ModuleTable from ProgramTable. . if moduleName == *ALL (user wants to set a program SEP) .If ModuleTable contains ALL it is the explicit conflict, update the explicit conflict SEP. .Get all the SEPs contains in this ModuleTable, since it is conflict, and add them into conflictList. . else (User wants to set SEP for a specific module .If ModuleTable contains ALL (i.e., there is a SEP set to program, it is an implicit conflict) add this one (ALL one) into conflictList .Use this moduleName to find ProcedureTable .If procedureName == *ALL (user wants to set a SEP on module level) .if ProcedureTable contains "*ALL" it is an explicit conflict, update the explicit conflict SEP .All the entries in the ProcedureTable will be the conflict one. Put them into the conflictList. .else (user wants to set SEP on a specific entry) .if ProcedureTable contains "*ALL", it is an implicit conflict. add it into the conflictList .Use this procedureName to find inside the ProcedureTable. .If found, it is the explicit conflict, update the explicit conflict SEP. also add it into conflictList.

hasExistingServiceEntryPoint

public boolean hasExistingServiceEntryPoint(String hostName,
                                            String setterUserProfile,
                                            String programDestination,
                                            String programName,
                                            String programType,
                                            String moduleName,
                                            String procedureName)
Check if the specific location has any existing Service entry point. Any intercept will be treated as conflict. Some scenarios of intercept : location to be checked existing location pgm A module *ALL pgm A module X pgm A module X pgm A module *ALL pgm A module X procedure *ALL pgm A module X procedure Y pgm A module X procedure Y pgm A module X procedure *ALL

Parameters:
hostName - : the host
setterUserProfile: - the user profile who sets the SEP
programDestination: - the program path , i.e. library name for now
programName: - the program name
programType: - the program type
moduleName - : the module name
procedureName: - the procedure name
Returns:
true if there is an existing SEP location for specific program. false otherwise.

addServiceEntryPoint

public boolean addServiceEntryPoint(int sepID,
                                    String hostName,
                                    String setterUserProfile,
                                    String programDestination,
                                    String programName,
                                    String programType,
                                    String moduleName,
                                    String procedureName,
                                    String connectionName,
                                    String hitterUserProfile)
Add a new service entry point into model. To make sure the sepID is unique , the caller always need to do a search before calling this method.

Parameters:
id: - the ID of service entry point
hostName - : the host
setterUserProfile: - the user profile who sets the SEP
programDestination: - the program path , i.e. library name for now
programName: - the program name
programType: - the program type
moduleName - : the module name
procedureName: - the procedure name
connectionName: - the connection name
hitterUserProfile - : the user profile who will hit the service enty
Returns:
true if the service entry point is added successfully. false otherwise.

addServiceEntryPoint

public boolean addServiceEntryPoint(int sepID,
                                    String hostName,
                                    String setterUserProfile,
                                    String programDestination,
                                    String programName,
                                    String programType,
                                    String moduleName,
                                    String procedureName,
                                    String connectionName,
                                    String hitterUserProfile,
                                    long timeStamp)
Add a new service entry point into model. To make sure the sepID is unique , the caller always need to do a search before calling this method.

Parameters:
id: - the ID of service entry point
hostName - : the host
setterUserProfile: - the user profile who sets the SEP
programDestination: - the program path , i.e. library name for now
programName: - the program name
programType: - the program type
moduleName - : the module name
procedureName: - the procedure name
connectionName: - the connection name
hitterUserProfile - : the user profile who will hit the service enty
timeStamp: - the timeStamp of program object when the SEP is set
Returns:
true if the service entry point is added successfully. false otherwise.

removeServiceEntryPoint

public boolean removeServiceEntryPoint(PhantomServiceEntryPoint phantomServiceEntryPoint)
Remove a service entry point from model.

Parameters:
phantomServiceEntryPoint - : the service entry point object to be removed.
Returns:
true if the service entry point is removed from the model successfully, false otherwise.

removeServiceEntryPoint

public boolean removeServiceEntryPoint(String hostName,
                                       String setterUserProfile)
Remove a new service entry point from model

Parameters:
hostName - : the host
setterUserProfile: - the user profile who sets the SEP
Returns:
true if the service entry points are removed successfully, false otherwise

removeServiceEntryPoint

public boolean removeServiceEntryPoint(String hostName,
                                       String setterUserProfile,
                                       String programDestination,
                                       String programName,
                                       String programType)
Remove a new service entry point from model

Parameters:
hostName - : the host
setterUserProfile: - the user profile who sets the SEP
programDestination: - the program library
programName - : the program name
programType - : the program type
Returns:
true if the service entry points are removed successfully, false otherwise

removeServiceEntryPoint

public boolean removeServiceEntryPoint(String hostName,
                                       String setterUserProfile,
                                       String programDestination,
                                       String programName,
                                       String programType,
                                       String moduleName,
                                       String procedureName)
Remove a new service entry point from model

Parameters:
hostName - : the host
setterUserProfile: - the user profile who sets the SEP
programDestination: - the program path , i.e. library name for now
programName: - the program name
programType: - the program type
moduleName - : the module name
procedureName: - the procedure name
Returns:
true if the service entry point is removed successfully, false otherwise

modifyServiceEntryPoint

public boolean modifyServiceEntryPoint(PhantomServiceEntryPoint phantomServiceEntryPoint,
                                       String newHitterserProfile,
                                       String newModuleName,
                                       String newProcedureName)
Modify attributes of a service entry point.

Parameters:
phantomServiceEntryPoint - : the service entry point to be modified
newHitterUserProfile - : new user profile to be hit for this service entry point
newModuleName - : new module name
newProcedureName - : new procedure name

enableServiceEntryPoint

public boolean enableServiceEntryPoint(PhantomServiceEntryPoint phantomServiceEntryPoint,
                                       boolean enablement)
Update the enablement status of a service entry point.

Parameters:
phantomServiceEntryPoint - : the service entry point to be enabled/disabled
enablement: - true to enable , false for disable
Returns:
true if the enablement is updated successfully, false otherwise. Always true now.

getALLServiceEntryPoints

public Object[] getALLServiceEntryPoints()
Get all service entry points in the model

Returns:
an array including all service entry points

getALLServiceEntryPoints

public Object[] getALLServiceEntryPoints(String hostName,
                                         String setterUserProfile,
                                         String programDestination,
                                         String programName,
                                         String programType)
Get all service entry points in the model

Returns:
an array including all service entry points

addServiceEntryPointListener

public void addServiceEntryPointListener(PhantomServiceEntryPointListManager.IPhantomServiceEntryPointModelListener listener)
Add a specific listener for SEP model event

Parameters:
listener - the listener to be added

removeServiceEntryPointListener

public void removeServiceEntryPointListener(PhantomServiceEntryPointListManager.IPhantomServiceEntryPointModelListener listener)
Remove a specific listener for SEP model event

Parameters:
listener - the listener to be removed

getServiceEntryPointsFromID

public void getServiceEntryPointsFromID(String hostName,
                                        String setterUserProfile,
                                        String programDestination,
                                        String programName,
                                        String programType,
                                        List<Integer> SEPIDs,
                                        List<PhantomServiceEntryPoint> SEPs)
Get service entry points from corresponding service entry point IDs.


removeServiceEntryPoints

public void removeServiceEntryPoints(List<PhantomServiceEntryPoint> phantomServiceEntryPoints)
Remove a list of service entry points.


Rational Developer for i
7.5.0

Copyright 2009 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.