Rational Developer for Power Systems Software
V7.6

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

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

public class ISeriesProjectUtil
extends Object

This is a utility class for creating and using iSeries projects.


Field Summary
static String COPYRIGHT
           
protected static int nextLocationCounter
          counter for generating unique random file system locations
 
Constructor Summary
ISeriesProjectUtil()
           
 
Method Summary
static AbstractISeriesProject createISeriesProject(IProjectDescription description, IProject projectHandle, Properties projectProperties, IProgressMonitor monitor)
          This is a low level utility method for creating an iSeries project given the project handle and description.
static AbstractISeriesProject createISeriesProject(String projectName, Properties projectProperties, IProgressMonitor monitor)
          Creates a new iSeries project given its properties.
static AbstractISeriesProject createISeriesProject(String projectName, Properties projectProperties, IRunnableContext context, Shell shell)
          Creates a new iSeries project given its properties.
static String getAssociatedLibrary(IProject project)
           
static String getAssociatedSystem(IProject project)
           
static String getTempPath(String path)
          Constructs temp directory name
 
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

nextLocationCounter

protected static int nextLocationCounter
counter for generating unique random file system locations

Constructor Detail

ISeriesProjectUtil

public ISeriesProjectUtil()
Method Detail

createISeriesProject

public static final AbstractISeriesProject createISeriesProject(String projectName,
                                                                Properties projectProperties,
                                                                IProgressMonitor monitor)
                                                         throws SystemMessageException
Creates a new iSeries project given its properties.

The main work of this method is encapsulated in an IWorkspaceRunnable, and so all resource modifications are reported as one delta when operation succeeds.

Parameters:
projectName -
projectProperties - the project properties.
Returns:
an IProject that is the newly created project.
Throws:
SystemMessageException - if the project cannot be created for any reason.
See Also:
IProject#create, ISeriesModelConstants

createISeriesProject

public static final AbstractISeriesProject createISeriesProject(String projectName,
                                                                Properties projectProperties,
                                                                IRunnableContext context,
                                                                Shell shell)
Creates a new iSeries project given its properties.

This method is run as a WorkspaceModifyOperation, and so all resource modifications are reported as one delta when operation succeeds.

Parameters:
projectName -
projectProperties - the project properties.
Returns:
the newly created project, or null if method fails.
See Also:
IProject#create, ISeriesModelConstants

createISeriesProject

public static final AbstractISeriesProject createISeriesProject(IProjectDescription description,
                                                                IProject projectHandle,
                                                                Properties projectProperties,
                                                                IProgressMonitor monitor)
                                                         throws SystemMessageException
This is a low level utility method for creating an iSeries project given the project handle and description.

This should be run as a WorkspaceModifyOperation so that all resource modifications are reported as one delta when operation succeeds.

Parameters:
description - The IProjectDescription to create a project resource for. A nature ID for an iSeries project is added if not present.
projectHandle - the project handle (IProject) to be created
monitor - a progress monitor, or null if progress reporting and cancellation are not desired.
projectProperties - the project properties.
Throws:
CoreException - if the operation fails.
OperationCanceledException - if the operation is canceled.
SystemMessageException
See Also:
IProject#create

getAssociatedLibrary

public static String getAssociatedLibrary(IProject project)

getAssociatedSystem

public static String getAssociatedSystem(IProject project)

getTempPath

public static String getTempPath(String path)
Constructs temp directory name


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.