Faceted Project Framework
Version 1.3

org.eclipse.wst.common.project.facet.core
Class DefaultConfigurationPresetFactory

java.lang.Object
  extended by org.eclipse.wst.common.project.facet.core.DefaultConfigurationPresetFactory
All Implemented Interfaces:
IPresetFactory

public class DefaultConfigurationPresetFactory
extends Object
implements IPresetFactory

Preset factory for the default.configuration preset. The contents of this preset are calculated as follows:

  1. If a runtime is selected, this preset will contain default facets as specified by IRuntime.getDefaultFacets(Set).
  2. If no runtime is selected, this preset will contain default versions for all of the fixed facets as specified by IProjectFacet.getDefaultVersion().

Since:
3.0
Author:
Konstantin Komissarchik

Field Summary
static String PRESET_ID
           
 
Constructor Summary
DefaultConfigurationPresetFactory()
           
 
Method Summary
 PresetDefinition createPreset(String presetId, Map<String,Object> context)
          The factory method for creating a preset definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRESET_ID

public static final String PRESET_ID
See Also:
Constant Field Values
Constructor Detail

DefaultConfigurationPresetFactory

public DefaultConfigurationPresetFactory()
Method Detail

createPreset

public PresetDefinition createPreset(String presetId,
                                     Map<String,Object> context)
                              throws CoreException
Description copied from interface: IPresetFactory
The factory method for creating a preset definition. The definition contains all of the information necessary for the system to create a preset. The factory can take into account the context that the preset will be used in when creating a preset definition. See IDynamicPreset for documentation on what type of information the context can contain.

Specified by:
createPreset in interface IPresetFactory
Parameters:
presetId - the id of the preset
context - the information about context that this preset will be used in
Returns:
the created preset definition or null if this factory is not applicable to the provided context
Throws:
CoreException - if failed while creating the preset definition

Faceted Project Framework
Version 1.3

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