Faceted Project Framework
Version 1.3

org.eclipse.wst.common.project.facet.core
Interface IProjectFacet

All Superinterfaces:
IAdaptable

public interface IProjectFacet
extends IAdaptable

Contains metadata that describes a project facet. This interface is not intended to be implemented by clients.

Author:
Konstantin Komissarchik

Field Summary
static String PROP_HIDE_VERSION
          The name of the property that's used for suggesting to the framework that this facet's version does not convey a special meaning and should be hidden where possible.
 
Method Summary
 ICategory getCategory()
          Returns the category, if any, that this project facet belongs to.
 IProjectFacetVersion getDefaultVersion()
          Returns the facet version that should be selected by default.
 String getDescription()
          Returns the project facet description.
 String getId()
          Returns the project facet identifier.
 String getLabel()
          Returns the project facet label.
 IProjectFacetVersion getLatestSupportedVersion(IRuntime runtime)
          Returns the latest version of the project facet that is supported by the given runtime.
 IProjectFacetVersion getLatestVersion()
          Returns the latest version of the project facet that exists.
 String getPluginId()
          Returns the id of the plugin that defines this project facet.
 Map<String,Object> getProperties()
          Returns the properties that specify additional information regarding this facet.
 Object getProperty(String name)
          Returns the property value corresponding to the provided name.
 List<IProjectFacetVersion> getSortedVersions(boolean ascending)
          Returns a sorted list containing the descriptors of all versions of this project facet.
 IProjectFacetVersion getVersion(String version)
          Returns the descriptor of the given project facet version.
 Comparator<String> getVersionComparator()
          Returns the version comparator specified for this project facet.
 Set<IProjectFacetVersion> getVersions()
          Returns the descriptors of all versions of this project facet.
 Set<IProjectFacetVersion> getVersions(String expr)
           
 boolean hasVersion(String version)
          Determines whether the specified project facet version exists.
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

PROP_HIDE_VERSION

static final String PROP_HIDE_VERSION
The name of the property that's used for suggesting to the framework that this facet's version does not convey a special meaning and should be hidden where possible.

Since:
3.0
See Also:
Constant Field Values
Method Detail

getId

String getId()
Returns the project facet identifier.

Returns:
the project facet identifier

getPluginId

String getPluginId()
Returns the id of the plugin that defines this project facet. This method will return null if this facet is not defined.

Returns:
the id of the plugin that defines this project facet, or null

getLabel

String getLabel()
Returns the project facet label. The label should be used when presenting the project facet to the user.

Returns:
the project facet label

getDescription

String getDescription()
Returns the project facet description.

Returns:
the project facet description

getCategory

ICategory getCategory()
Returns the category, if any, that this project facet belongs to.

Returns:
the category that this project facet belongs to, or null

getVersions

Set<IProjectFacetVersion> getVersions()
Returns the descriptors of all versions of this project facet.

Returns:
the descriptors of all versions of this project facet

getVersions

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

hasVersion

boolean hasVersion(String version)
Determines whether the specified project facet version exists.

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

getVersion

IProjectFacetVersion getVersion(String version)
Returns the descriptor of the given project facet version.

Parameters:
version - the version string
Returns:
the descriptor of the given project facet version, or null

getLatestVersion

IProjectFacetVersion getLatestVersion()
                                      throws VersionFormatException,
                                             CoreException
Returns the latest version of the project facet that exists.

Returns:
returns the latest version of the project facet
Throws:
VersionFormatException
CoreException

getLatestSupportedVersion

IProjectFacetVersion getLatestSupportedVersion(IRuntime runtime)
                                               throws CoreException
Returns the latest version of the project facet that is supported by the given runtime.

Parameters:
runtime - the runtime
Returns:
returns the latest version of the project facet that is supported by the given runtime
Throws:
CoreException

getDefaultVersion

IProjectFacetVersion getDefaultVersion()
Returns the facet version that should be selected by default. If the default version is not explicitly specified in the facet definition, the latest version (as specified by getLatestVersion() method) will be returned.

Returns:
the facet version that should be selected by default

getSortedVersions

List<IProjectFacetVersion> getSortedVersions(boolean ascending)
                                             throws VersionFormatException,
                                                    CoreException
Returns a sorted list containing the descriptors of all versions of this project facet.

Parameters:
ascending - whether version descriptors should be sorted in ascending order
Returns:
a sorted list containing the descriptors of all versions of this project facet
Throws:
VersionFormatException
CoreException

getVersionComparator

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

Returns:
the version comparator specified for this project facet
Throws:
CoreException

getProperties

Map<String,Object> getProperties()
Returns the properties that specify additional information regarding this facet. Some of the properties are recognized and processed by the faceted project framework, while others are there for the benefit of framework's users.

Returns:
the properties of this project facet
Since:
3.0

getProperty

Object getProperty(String name)
Returns the property value corresponding to the provided name. Properties specify additional information regarding this facet. Some of the properties are recognized and processed by the faceted project framework, while others are there for the benefit of framework's users.

Parameters:
name - the name of the property
Returns:
the value of the property
Since:
3.0

Faceted Project Framework
Version 1.3

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