Faceted Project Framework
Version 1.3

org.eclipse.wst.common.project.facet.core.runtime
Class RuntimeManager

java.lang.Object
  extended by org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager

public final class RuntimeManager
extends Object

Author:
Konstantin Komissarchik

Method Summary
static void addListener(IRuntimeLifecycleListener listener, IRuntimeLifecycleEvent.Type... types)
           
static void addRuntimeListener(IListener listener)
           
static IRuntimeComponent createRuntimeComponent(IRuntimeComponentVersion rcv, Map<String,String> properties)
          Creates a new runtime componenet.
static IRuntime defineRuntime(String name, List<IRuntimeComponent> components, Map<String,String> properties)
          Defines a new runtime.
static void deleteRuntime(IRuntime runtime)
          Deletes the runtime from the registry.
static IRuntime getRuntime(String name)
          Returns the runtime corresponding to the specified name.
static IRuntimeComponentType getRuntimeComponentType(String id)
          Returns the IRuntimeComponentType object corresponding to the specified runtime component type id.
static Set<IRuntimeComponentType> getRuntimeComponentTypes()
          Returns all of the available runtime component types.
static Set<IRuntime> getRuntimes()
          Returns all of the defined runtimes.
static Set<IRuntime> getRuntimes(Set<IProjectFacetVersion> facets)
          Returns the runtimes that support all of the specified facets.
static boolean isRuntimeComponentTypeDefined(String id)
          Determines whether the specified runtime component type exists.
static boolean isRuntimeDefined(String name)
          Determines whether the specified runtime has been defined.
static void removeListener(IRuntimeLifecycleListener listener)
           
static void removeRuntimeListener(IListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRuntimeComponentTypes

public static Set<IRuntimeComponentType> getRuntimeComponentTypes()
Returns all of the available runtime component types.

Returns:
all of the available runtime component types

isRuntimeComponentTypeDefined

public static boolean isRuntimeComponentTypeDefined(String id)
Determines whether the specified runtime component type exists.

Parameters:
id - the runtime component type id
Returns:
true if the specified runtime component type exists, false otherwise

getRuntimeComponentType

public static IRuntimeComponentType getRuntimeComponentType(String id)
Returns the IRuntimeComponentType object corresponding to the specified runtime component type id.

Parameters:
id - the runtime componenet type id
Returns:
the IRuntimeComponentType object corresponding to the specified runtime componenet type id
Throws:
IllegalArgumentException - if the runtime component type id is not recognized

getRuntimes

public static Set<IRuntime> getRuntimes()
Returns all of the defined runtimes.

Returns:
all of the defined runtimes

getRuntimes

public static Set<IRuntime> getRuntimes(Set<IProjectFacetVersion> facets)
Returns the runtimes that support all of the specified facets.

Parameters:
facets - the facets that need to be supported
Returns:
the runtimes that support all of the specified facets

isRuntimeDefined

public static boolean isRuntimeDefined(String name)
Determines whether the specified runtime has been defined.

Parameters:
name - the runtime name
Returns:
true if the specified runtime is defined, false otherwise

getRuntime

public static IRuntime getRuntime(String name)
Returns the runtime corresponding to the specified name.

Parameters:
name - the runtime name
Returns:
the runtime corresponding to the specified name
Throws:
IllegalArgumentException - if the runtime name is not recognized

defineRuntime

public static IRuntime defineRuntime(String name,
                                     List<IRuntimeComponent> components,
                                     Map<String,String> properties)
Defines a new runtime.

Parameters:
name - the runtime name
components - the list of runtime componenets
properties - the runtime properties
Returns:
the new runtime

deleteRuntime

public static void deleteRuntime(IRuntime runtime)
Deletes the runtime from the registry.

Parameters:
runtime - the runtime to delete

createRuntimeComponent

public static IRuntimeComponent createRuntimeComponent(IRuntimeComponentVersion rcv,
                                                       Map<String,String> properties)
Creates a new runtime componenet. This method is intended to be used in conjunction with the defineRuntime(String,List,Map) method.

Parameters:
rcv - the runtime component version
properties - the runtime component properties
Returns:
the new runtime component

addRuntimeListener

public static void addRuntimeListener(IListener listener)

removeRuntimeListener

public static void removeRuntimeListener(IListener listener)

addListener

public static void addListener(IRuntimeLifecycleListener listener,
                               IRuntimeLifecycleEvent.Type... types)

removeListener

public static void removeListener(IRuntimeLifecycleListener listener)

Faceted Project Framework
Version 1.3

Copyright (c) 2008 BEA Systems, Inc. and others. All rights reserved.