org.apache.cactus.eclipse.webapp.internal
Class Webapp

java.lang.Object
  extended by org.apache.cactus.eclipse.webapp.internal.Webapp

public class Webapp
extends java.lang.Object

Represents a web application for a given project. It knows how to load its values from project properties and how to persist them.

Version:
$Id: Webapp.java 238816 2004-02-29 16:36:46Z vmassol $

Constructor Summary
Webapp(org.eclipse.jdt.core.IJavaProject theJavaProject)
           
 
Method Summary
 java.io.File getAbsoluteDir()
           
 org.eclipse.jdt.core.IClasspathEntry[] getClasspath()
           
 java.lang.String getDir()
           
 java.lang.String getOutput()
           
 boolean init()
          Initialize the web app properties with default values or stored values if they exist.
 void loadDefaultValues()
          Loads the default values of a webapp.
 void loadPersistentValues()
          Loads the persistent properties for this webapp.
 boolean loadValues()
          Loads this webapp from the project properties.
 void persist()
          Saves this webapp in the project's properties
 void setClasspath(org.eclipse.jdt.core.IClasspathEntry[] theClasspath)
          Sets the classpath.
 void setDir(java.lang.String theDir)
          Sets the dir.
 void setOutput(java.lang.String theOutput)
          Sets the output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Webapp

public Webapp(org.eclipse.jdt.core.IJavaProject theJavaProject)
Parameters:
theJavaProject - the project this webapp is linked to
Method Detail

init

public final boolean init()
Initialize the web app properties with default values or stored values if they exist.

Returns:
boolean true if we loaded the default values

loadValues

public final boolean loadValues()
Loads this webapp from the project properties. If the persistent properties cannot be loaded or if a value is not set, we load the default values.

Returns:
true if the default values were loaded or false if the persistent ones were loaded

loadPersistentValues

public final void loadPersistentValues()
                                throws org.eclipse.core.runtime.CoreException
Loads the persistent properties for this webapp.

Throws:
org.eclipse.core.runtime.CoreException - if we fail to load a persistent property

loadDefaultValues

public final void loadDefaultValues()
Loads the default values of a webapp.


persist

public final void persist()
                   throws org.eclipse.core.runtime.CoreException
Saves this webapp in the project's properties

Throws:
org.eclipse.core.runtime.CoreException - if an error occurs while saving

setClasspath

public final void setClasspath(org.eclipse.jdt.core.IClasspathEntry[] theClasspath)
Sets the classpath.

Parameters:
theClasspath - The classpath to set

setDir

public final void setDir(java.lang.String theDir)
Sets the dir.

Parameters:
theDir - The dir to set

setOutput

public final void setOutput(java.lang.String theOutput)
Sets the output.

Parameters:
theOutput - The output to set

getClasspath

public final org.eclipse.jdt.core.IClasspathEntry[] getClasspath()
Returns:
IClasspathEntry[] the array of jar entries for this webapp

getDir

public final java.lang.String getDir()
Returns:
String directory of this webapp source files relative to the project path

getAbsoluteDir

public final java.io.File getAbsoluteDir()
Returns:
the absolute directory to this webapp source files

getOutput

public final java.lang.String getOutput()
Returns:
String location of the generated war


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.