org.eclipse.tigerstripe.workbench
Class TigerstripeCore

java.lang.Object
  extended by org.eclipse.tigerstripe.workbench.TigerstripeCore

public class TigerstripeCore
extends java.lang.Object

The entry point for all interactions with the Tigerstripe API This is a singleton class that acts as the factory class for any Tigerstripe Project. Throughout the Tigerstripe API, a set of patterns are used:

The API contains 2 major entry points:

Since:
0.3
Author:
Eric Dillon

Method Summary
static void addTigerstripeChangeListener(ITigerstripeChangeListener listener, int changeLevel)
          Register a new ITigerstripeChangeListener
static IAbstractTigerstripeProject[] allProjects()
          Returns an array containing all Tigerstripe Projects present in the workspace
static IAbstractTigerstripeProject createProject(java.lang.String projectName, IProjectDetails projectDetails, IPath location, java.lang.Class projectType, java.util.Map<java.lang.String,java.lang.Object> properties, IProgressMonitor monitor)
          Creates a project of the given type at the given folder, and returns a handle on that project
static IAbstractTigerstripeProject findProject(IPath path)
          Returns a IAbstractTigerstripeProject corresponding to the given path.
static IRuntimeDetails getRuntimeDetails()
          Returns the runtime details for this install
static java.util.Collection<java.lang.Class> getSupportedProjectTypes()
          Returns a collection of Tigerstripe project types that are supported
static IWorkbenchProfileSession getWorkbenchProfileSession()
          Returns the default IWorkbenchProfileSession (Singleton) which provides access to the Active Profile and to the create/edit additional profiles programmatically.
static IProjectDetails makeProjectDetails()
           
static java.util.List<IAbstractTigerstripeProject> projects()
           
static void removeTigerstripeChangeListener(ITigerstripeChangeListener listener)
          Un-Register a ITigerstripeChangeListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWorkbenchProfileSession

public static IWorkbenchProfileSession getWorkbenchProfileSession()
Returns the default IWorkbenchProfileSession (Singleton) which provides access to the Active Profile and to the create/edit additional profiles programmatically.

Returns:
IWorkbenchProfileSession - the default IWorkbenchProfileSession (Singleton)

getRuntimeDetails

public static final IRuntimeDetails getRuntimeDetails()
Returns the runtime details for this install

Returns:

findProject

public static IAbstractTigerstripeProject findProject(IPath path)
                                               throws TigerstripeException
Returns a IAbstractTigerstripeProject corresponding to the given path. The path is expected to be the folder where the project is stored. if no tigerstripe-related project descriptor is found there, no project is returned.

Parameters:
path -
Returns:
Throws:
TigerstripeException

projects

public static java.util.List<IAbstractTigerstripeProject> projects()

allProjects

public static IAbstractTigerstripeProject[] allProjects()
                                                 throws TigerstripeException
Returns an array containing all Tigerstripe Projects present in the workspace

Returns:
Throws:
TigerstripeException

createProject

public static IAbstractTigerstripeProject createProject(java.lang.String projectName,
                                                        IProjectDetails projectDetails,
                                                        IPath location,
                                                        java.lang.Class projectType,
                                                        java.util.Map<java.lang.String,java.lang.Object> properties,
                                                        IProgressMonitor monitor)
                                                 throws TigerstripeException
Creates a project of the given type at the given folder, and returns a handle on that project

Parameters:
projectName -
projectDetails - - if null, default implementation is used.
location - - location for the project to create, if null the default location is used
projectType - - one of the types as returned by
monitor - -
Returns:
Throws:
TigerstripeException

makeProjectDetails

public static IProjectDetails makeProjectDetails()

getSupportedProjectTypes

public static java.util.Collection<java.lang.Class> getSupportedProjectTypes()
Returns a collection of Tigerstripe project types that are supported

Returns:

addTigerstripeChangeListener

public static void addTigerstripeChangeListener(ITigerstripeChangeListener listener,
                                                int changeLevel)
Register a new ITigerstripeChangeListener

Parameters:
listener - the listener to register
changeLevel - valid values are ITigerstripeChangeListener.MODEL, ITigerstripeChangeListener.PROJECT or ITigerstripeChangeListener.ALL

removeTigerstripeChangeListener

public static void removeTigerstripeChangeListener(ITigerstripeChangeListener listener)
Un-Register a ITigerstripeChangeListener

Parameters:
listener -