Faceted Project Framework
Version 1.3

org.eclipse.wst.common.project.facet.core.runtime
Interface IRuntimeComponentType

All Superinterfaces:
IAdaptable

public interface IRuntimeComponentType
extends IAdaptable

Represents the type of a runtime component. A runtime instance is composed of multiple runtime components, each of which has a type and a version.

This interface is not intended to be implemented outside of this framework. Runtime component types are declared using org.eclipse.wst.common.project.facet.core.runtimes extension point. Once declared, client code can get access to IRuntimeComponentType objects by using methods on the RuntimeManager class.

Author:
Konstantin Komissarchik
See Also:
RuntimeManager.getRuntimeComponentTypes(), RuntimeManager.getRuntimeComponentType(String), RuntimeManager.isRuntimeComponentTypeDefined(String)

Method Summary
 String getId()
          Returns the runtime component type id.
 IRuntimeComponentVersion getLatestVersion()
          Returns the latest version of this runtime component as specified by the version comparator.
 String getPluginId()
          Returns the plugin id of where this runtime component type is defined.
 List<IRuntimeComponentVersion> getSortedVersions(boolean ascending)
          Returns a sorted list containing all of the versions of this runtime component type.
 IRuntimeComponentVersion getVersion(String version)
          Returns the IRuntimeComponentVersion object corresponding to the provided version string.
 Comparator<String> getVersionComparator()
          Returns the version comparator specified for this runtime component type.
 Set<IRuntimeComponentVersion> getVersions()
          Returns all of the versions of this runtime component type.
 Set<IRuntimeComponentVersion> getVersions(String expr)
           
 boolean hasVersion(String version)
          Determines whether the specified version of this runtime component type exists.
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Method Detail

getId

String getId()
Returns the runtime component type id.

Returns:
the runtime component type id

getPluginId

String getPluginId()
Returns the plugin id of where this runtime component type is defined.

Returns:
the plugin id of where this runtime component type is defined

getVersions

Set<IRuntimeComponentVersion> getVersions()
Returns all of the versions of this runtime component type.

Returns:
all of the versions of this runtime component type

getVersions

Set<IRuntimeComponentVersion> getVersions(String expr)
                                          throws CoreException
Throws:
CoreException

hasVersion

boolean hasVersion(String version)
Determines whether the specified version of this runtime component type exists.

Parameters:
version - the version string
Returns:
true if the specified version exists, false otherwise

getVersion

IRuntimeComponentVersion getVersion(String version)
Returns the IRuntimeComponentVersion object corresponding to the provided version string.

Parameters:
version - the version string
Returns:
the IRuntimeComponentVersion object corresponding to the provided version string
Throws:
IllegalArgumentException - if the version does not exist

getLatestVersion

IRuntimeComponentVersion getLatestVersion()
                                          throws CoreException
Returns the latest version of this runtime component as specified by the version comparator.

Returns:
returns the latest version of this runtime component
Throws:
CoreException

getSortedVersions

List<IRuntimeComponentVersion> getSortedVersions(boolean ascending)
                                                 throws CoreException
Returns a sorted list containing all of the versions of this runtime component type. The sort order is determined by the version comparator.

Parameters:
ascending - whether versions should be sorted in ascending order
Returns:
a sorted list containing all of the versions of this runtime component type
Throws:
CoreException

getVersionComparator

Comparator<String> getVersionComparator()
                                        throws CoreException
Returns the version comparator specified for this runtime component type. If no version comparator is specified, this method will return an instance of the DefaultVersionComparator.

Returns:
the version comparator specified for this runtime component type
Throws:
CoreException

Faceted Project Framework
Version 1.3

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