Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.perspective.model.util
Class ISeriesProjectBasicUtil

java.lang.Object
  extended by com.ibm.etools.iseries.perspective.model.util.ISeriesProjectBasicUtil

public class ISeriesProjectBasicUtil
extends Object

This is a utility class for using iSeries projects.


Field Summary
static String Copyright
           
 
Constructor Summary
ISeriesProjectBasicUtil()
           
 
Method Summary
static AbstractISeriesProject findISeriesProject(IProject project)
          Finds the iSeries Project instance that represents the given IProject.
static AbstractISeriesProject[] findISeriesProjects()
          Returns all iSeries Projects.
static AbstractISeriesProject[] findISeriesProjects(IBMiConnection connection, IQSYSLibrary library)
          Find the iSeriesProject[] that have the given library and connection as its properties.
static AbstractISeriesProject[] findISeriesProjects(Properties projectProperties)
          Returns all iSeries Projects that have the given properties.
static AbstractISeriesNativeObject findSRCPF(AbstractISeriesNativeLibrary iSeriesNativeLibrary, String sourceFileName)
          Finds a source physical file in the given iSeries native library with the specified name.
static AbstractISeriesNativeObject findSRCPF(AbstractISeriesProject iSeriesProject, String sourceFileName)
          Finds a source physical file in the given iSeries project with the specified name.
static Properties getISeriesProjectProperties(IBMiConnection connection, IQSYSLibrary library)
          Returns a Properties object containing all the predefined properties of an iSeries Project.
static boolean hasISeriesProjectNature(IProject project)
          Utility method to test if a given project is an iSeries Project.
static boolean isISeriesProject(IProject project)
          Deprecated. use hasISeriesProjectNature instead.
 
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
Constructor Detail

ISeriesProjectBasicUtil

public ISeriesProjectBasicUtil()
Method Detail

findISeriesProjects

public static final AbstractISeriesProject[] findISeriesProjects(IBMiConnection connection,
                                                                 IQSYSLibrary library)
Find the iSeriesProject[] that have the given library and connection as its properties.

Parameters:
library - The associated library of the project to find.
connection - The connection associated with the project.
Returns:
AbstractISeriesProject The array of matching projects. This may be empty.

findISeriesProject

public static final AbstractISeriesProject findISeriesProject(IProject project)
Finds the iSeries Project instance that represents the given IProject.

Parameters:
project - The IProject that you want to find.
Returns:
AbstractISeriesProject that was found to match this IProject or null if no project was found.

findISeriesProjects

public static final AbstractISeriesProject[] findISeriesProjects(Properties projectProperties)
Returns all iSeries Projects that have the given properties.

Parameters:
projectProperties - The project properties to look for.
Returns:
AbstractISeriesProject[] The iSeries projects that have the given list of properties. This array may be empty.

findISeriesProjects

public static final AbstractISeriesProject[] findISeriesProjects()
Returns all iSeries Projects.

Returns:
AbstractISeriesProject[] The iSeries projects in the workspace. This array may be empty.

isISeriesProject

public static final boolean isISeriesProject(IProject project)
                                      throws CoreException
Deprecated. use hasISeriesProjectNature instead.

Utility method to test if a given project is an iSeries Project. ie: it has an iSeries project nature.

Parameters:
project - Project to test.
Returns:
boolean True of the project is an iSeries project, it exists and is open.
Throws:
CoreException - if this method fails. Reasons include: This project does not exist. This project is not open.

hasISeriesProjectNature

public static final boolean hasISeriesProjectNature(IProject project)
Utility method to test if a given project is an iSeries Project. ie: it has an iSeries project nature.

Parameters:
project - Project to test.
Returns:
boolean True of the project is an iSeries project, it exists and is open.

getISeriesProjectProperties

public static final Properties getISeriesProjectProperties(IBMiConnection connection,
                                                           IQSYSLibrary library)
Returns a Properties object containing all the predefined properties of an iSeries Project. These properties are stripped out of the passed library and connection. If a property could not be retrieved, its value is set to an empty string. i.e. Properties has all iSeries project predefined properties. Both library or connection can be null, in which case an empty string will be returned for the property value. Note: It is assumed that the library that is passed here belongs to the same host to which the connection is defined. i.e. the library instance belongs to the same connection.

Parameters:
library - becomes the associated library property of the project.
connection - connection to be associated with an iSeries project. Most iSeries project properties are obtained from this parameter.
Returns:
Properties The Properties containing all the iSeries project properties. All keys and values are stored as Strings in the Properties object.

findSRCPF

public static final AbstractISeriesNativeObject findSRCPF(AbstractISeriesProject iSeriesProject,
                                                          String sourceFileName)
Finds a source physical file in the given iSeries project with the specified name. The search is case sensitive. The returned native objects may be local or remote, ie: the method guarantees to return a source files, but may or may not be already local.

Parameters:
iSeriesProject - The iSeries project to search in.
sourceFileName - The name of the source physical file to find.
Returns:
AbstractISeriesNativeObject The source physical file, if one is found, otherwise the method returns null;

findSRCPF

public static final AbstractISeriesNativeObject findSRCPF(AbstractISeriesNativeLibrary iSeriesNativeLibrary,
                                                          String sourceFileName)
Finds a source physical file in the given iSeries native library with the specified name. The search is case sensitive. The returned native objects may be local or remote, ie: the method guarantees to return a source files, but may or may not be already local.

Parameters:
iSeriesNativeLibrary - The iSeries project to search in.
sourceFileName - The name of the source physical file to find.
Returns:
AbstractISeriesNativeObject The source physical file, if one is found, otherwise the method returns null;

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 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.