com.alveole.studio.web.wizard
Class Struts2FeatureWizard

java.lang.Object
  extended by com.alveole.studio.web.wizard.Struts2FeatureWizard
All Implemented Interfaces:
IFeatureWizard

public class Struts2FeatureWizard
extends java.lang.Object
implements IFeatureWizard

This wizard enables Struts2 feature. It may be used to drop struts2 dependencies into web project.

Author:
sylvain

Constructor Summary
Struts2FeatureWizard()
           
 
Method Summary
static void copyDependencies(java.lang.String targetDir, ProjectContext ctx, boolean force)
          Copies JAR files on project.
 org.eclipse.jface.wizard.IWizardPage[] getPages()
          Get wizard pages.
 void perform()
          Perform feature enabling.
 void setProject(Project project)
          Set project.
static boolean updateDependencies(java.lang.String targetDir, ProjectContext ctx, java.lang.String oldVersion)
          Updates JAR files on project.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Struts2FeatureWizard

public Struts2FeatureWizard()
Method Detail

getPages

public org.eclipse.jface.wizard.IWizardPage[] getPages()
Get wizard pages.

Specified by:
getPages in interface IFeatureWizard
Returns:
The list of panels to be displayed.

copyDependencies

public static void copyDependencies(java.lang.String targetDir,
                                    ProjectContext ctx,
                                    boolean force)
Copies JAR files on project.


updateDependencies

public static boolean updateDependencies(java.lang.String targetDir,
                                         ProjectContext ctx,
                                         java.lang.String oldVersion)
Updates JAR files on project. This method is called when a project is updated from older version to current. First check that file already exists. Then erase it. If file does not exist, and if it was absent from previous versions, simply add it.

Parameters:
targetDir - The default target dir.
ctx - The project context.
oldVersion - The version of the project being updated.

perform

public void perform()
Perform feature enabling.

Specified by:
perform in interface IFeatureWizard

setProject

public void setProject(Project project)
Set project.

Specified by:
setProject in interface IFeatureWizard
Parameters:
project - The reference to current project.