Faceted Project Framework
Version 1.3

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


public interface IActionDefinition

An action is an operation on a single facet within a faceted project to install, uninstall, or change the version of the facet. An action definition represents the information supplied by the facet author regarding the implementation of an action. A single action definition can apply to multiple facet versions. For instance, the facet author may choose to supply one action definition for all versions of his facet.

Author:
Konstantin Komissarchik

Field Summary
static String PROP_FROM_VERSIONS
          The name of the property that's used to constrain the starting version of the VERSION_CHANGE action definition.
 
Method Summary
 Object createConfigObject()
          Creates a new config object that can be used for parameterizing the execution of this action.
 Object createConfigObject(IProjectFacetVersion fv, String pjname)
          Deprecated.  
 IFacetedProject.Action.Type getActionType()
          Returns the action type, such as INSTALL, UNINSTALL, or VERSION_CHANGE.
 String getId()
          Returns the id of the action definition.
 IProjectFacet getProjectFacet()
          Returns the project facet that this action definition is associated with.
 Map<String,Object> getProperties()
          Returns the properties that further specify action behavior and applicability.
 Object getProperty(String name)
          Returns the property value corresponding to the provided name.
 IVersionExpr getVersionExpr()
          Returns the version expression that controls which facet versions this action definition applies to.
 

Field Detail

PROP_FROM_VERSIONS

static final String PROP_FROM_VERSIONS
The name of the property that's used to constrain the starting version of the VERSION_CHANGE action definition.

See Also:
Constant Field Values
Method Detail

getId

String getId()
Returns the id of the action definition. If not explicitly specified, a default action id is generated that takes the following form: [facet-id]#[version-expression]#[action-type](#[prop.name]=[prop.value])*.

Returns:
the id of the action definition

getProjectFacet

IProjectFacet getProjectFacet()
Returns the project facet that this action definition is associated with.

Returns:
the project facet that this action definition is associated with

getVersionExpr

IVersionExpr getVersionExpr()
Returns the version expression that controls which facet versions this action definition applies to.

Returns:
the version expression that controls which facet versions this action definition applies to

getActionType

IFacetedProject.Action.Type getActionType()
Returns the action type, such as INSTALL, UNINSTALL, or VERSION_CHANGE.

Returns:
the action type

getProperties

Map<String,Object> getProperties()
Returns the properties that further specify action behavior and applicability.

Returns:
the properties of this action definition

getProperty

Object getProperty(String name)
Returns the property value corresponding to the provided name.

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

createConfigObject

Object createConfigObject()
                          throws CoreException
Creates a new config object that can be used for parameterizing the execution of this action. If this action definition does not specify a config object factory, this method will return null.

Returns:
the new config object
Throws:
CoreException - if failed while instantiating the config object factory or creating the config object

createConfigObject

Object createConfigObject(IProjectFacetVersion fv,
                          String pjname)
                          throws CoreException
Deprecated. 

Creates a new config object that can be used for parameterizing the execution of this action. If this action definition does not specify a config object factory, this method will return null.

Parameters:
fv - the actual facet version that this config object will be used with; should be one of the versions matched by the version expression specified for this action definition
pjname - the project name
Returns:
the new config object
Throws:
CoreException - if failed while instantiating the config object factory or creating the config object

Faceted Project Framework
Version 1.3

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