Faceted Project Framework
Version 1.3

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

All Superinterfaces:
Comparable, IVersion

public interface IProjectFacetVersion
extends Comparable, IVersion

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

Author:
Konstantin Komissarchik

Method Summary
 boolean conflictsWith(IProjectFacetVersion fv)
           
 Object createActionConfig(IFacetedProject.Action.Type type, String pjname)
          Deprecated. this method will not behave correctly in presence of multiple action definitions of the same type as can be the case with VERSION_CHANGE actions; instead use IActionDefinition.createConfigObject()
 IActionDefinition getActionDefinition(Set<IProjectFacetVersion> base, IFacetedProject.Action.Type type)
          Returns the action definition corresponding to a particular action type over this project facet version.
 Set<IActionDefinition> getActionDefinitions()
          Returns all of the action definitions for this project facet version.
 Set<IActionDefinition> getActionDefinitions(IFacetedProject.Action.Type type)
          Returns the action definitions corresponding to a particular action type over this project facet version.
 IConstraint getConstraint()
          Returns the constraint that has to be satisfied prior to installing this project facet.
 String getPluginId()
          Returns the id of the plugin that defines this project facet version.
 IProjectFacet getProjectFacet()
          Returns the project facet descriptor.
 Map<String,Object> getProperties()
          Returns the properties that specify additional information regarding this facet version.
 Object getProperty(String name)
          Returns the property value corresponding to the provided name.
 String getVersionString()
          Returns the version string.
 boolean isSameActionConfig(IFacetedProject.Action.Type type, IProjectFacetVersion fv)
          Deprecated. this method will not behave correctly in presence of multiple action definitions of the same type as can be the case with VERSION_CHANGE actions; instead compare appropriate IActionDefinition objects directly
 boolean isValidFor(Set<IProjectFacet> fixed)
          Determines whether this facet version is valid for projects that have the provided set of fixed facets.
 boolean supports(IFacetedProject.Action.Type type)
          Deprecated. use supports( Set, IFacetedProject.Action.Type) instead
 boolean supports(Set<IProjectFacetVersion> base, IFacetedProject.Action.Type type)
          Determines whether this project facet version supports a particular action type.
 

Method Detail

getProjectFacet

IProjectFacet getProjectFacet()
Returns the project facet descriptor.

Returns:
the project facet descriptor

getVersionString

String getVersionString()
Returns the version string.

Specified by:
getVersionString in interface IVersion
Returns:
the version string

getPluginId

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

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

getConstraint

IConstraint getConstraint()
Returns the constraint that has to be satisfied prior to installing this project facet.

Returns:
the constraint that has to be satisfied prior to installing this project facet

supports

boolean supports(Set<IProjectFacetVersion> base,
                 IFacetedProject.Action.Type type)
Determines whether this project facet version supports a particular action type. For instance, some project facets may not be uninstallable, in which case they will not support Action.Type.UNINSTALL.

Parameters:
base - the set of facets currently installed in the project that the desired action type would be executed against
type - action type
Returns:
true if and only if this project facet supports the provided action type

supports

boolean supports(IFacetedProject.Action.Type type)
Deprecated. use supports( Set, IFacetedProject.Action.Type) instead

Determines whether this project facet version supports a particular action type. For instance, some project facets may not be uninstallable, in which case they will not support Action.Type.UNINSTALL.

Parameters:
type - action type
Returns:
true if this project facet supports the provided action type, false otherwise

getActionDefinitions

Set<IActionDefinition> getActionDefinitions()
Returns all of the action definitions for this project facet version.

Returns:
all of the action definitions for this project facet version

getActionDefinitions

Set<IActionDefinition> getActionDefinitions(IFacetedProject.Action.Type type)
Returns the action definitions corresponding to a particular action type over this project facet version. For INSTALL and UNINSTALL action types, this method will return a set of length 0 or 1. For VERSION_CHANGE action type, the returned set may contain more than one item as there may exist multiple action definitions for converting from various versions.

Parameters:
type - action type
Returns:
a set containing action definitions corresponding to a particular action type over this project facet version

getActionDefinition

IActionDefinition getActionDefinition(Set<IProjectFacetVersion> base,
                                      IFacetedProject.Action.Type type)
                                      throws CoreException
Returns the action definition corresponding to a particular action type over this project facet version. The supports( Set, IFacetedProject.Action.Type ) method can be used to check whether the action is supported prior to calling this method.

Parameters:
base - the set of facets currently installed in the project that the desired action type would be executed against
type - action type
Returns:
the action definition corresponding to a particular action type over this project facet version
Throws:
CoreException - if this project facet version does not support the provided action type

createActionConfig

Object createActionConfig(IFacetedProject.Action.Type type,
                          String pjname)
                          throws CoreException
Deprecated. this method will not behave correctly in presence of multiple action definitions of the same type as can be the case with VERSION_CHANGE actions; instead use IActionDefinition.createConfigObject()

Creates a new instance of the config object associated with the specified action on this facet. Will return null if the action requires no config.

Parameters:
type - the type of the action.
pjname - the name of the project that this action will be executed on
Returns:
the action config object, or null
Throws:
CoreException - if this project facet version does not support the specified action type or if failed while creating the action config object

isSameActionConfig

boolean isSameActionConfig(IFacetedProject.Action.Type type,
                           IProjectFacetVersion fv)
                           throws CoreException
Deprecated. this method will not behave correctly in presence of multiple action definitions of the same type as can be the case with VERSION_CHANGE actions; instead compare appropriate IActionDefinition objects directly

Throws:
CoreException

isValidFor

boolean isValidFor(Set<IProjectFacet> fixed)
Determines whether this facet version is valid for projects that have the provided set of fixed facets. The determination is done by checking to see whether this facet or any of its dependencies are in conflict with any of the fixed facets.

Parameters:
fixed - the set of fixed facets
Returns:
true if this facet version is valid for the projects that have the provided set of fixed facets

conflictsWith

boolean conflictsWith(IProjectFacetVersion fv)

getProperties

Map<String,Object> getProperties()
Returns the properties that specify additional information regarding this facet version. 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 version
Since:
3.0

getProperty

Object getProperty(String name)
Returns the property value corresponding to the provided name. Properties specify additional information regarding this facet version. 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.