org.eclipse.wst.server.core
Interface IProjectProperties


public interface IProjectProperties

This interface holds information on the properties of a given project.

This interface is not intended to be implemented by clients.

Since:
1.0

Method Summary
 IServer getDefaultServer()
          Returns the preferred runtime server for the project.
 IRuntime getRuntimeTarget()
          Returns the current runtime target for this project.
 void setDefaultServer(IServer server, IProgressMonitor monitor)
          Sets the preferred runtime server for the project.
 void setRuntimeTarget(IRuntime runtime, IProgressMonitor monitor)
          Sets the runtime target for the project.
 

Method Detail

getDefaultServer

public IServer getDefaultServer()
Returns the preferred runtime server for the project. This method returns null if the server was never chosen or does not currently exist. (if the server is recreated or was in a closed project, etc. this method will return the original value if it becomes available again)

Returns:
the current default server, or null if there is no default server

setDefaultServer

public void setDefaultServer(IServer server,
                             IProgressMonitor monitor)
                      throws CoreException
Sets the preferred runtime server for the project. Set the server to null to clear the setting. If there is a problem saving the file, a CoreException will be thrown.

Parameters:
server - the server to set the default server, or null to unset the default
monitor - a progress monitor, or null if progress reporting and cancellation are not desired
Throws:
CoreException - if there is a problem setting the default server

getRuntimeTarget

public IRuntime getRuntimeTarget()
Returns the current runtime target for this project.

Returns:
the current runtime target, or null if the project has no runtime target

setRuntimeTarget

public void setRuntimeTarget(IRuntime runtime,
                             IProgressMonitor monitor)
                      throws CoreException
Sets the runtime target for the project.

Parameters:
runtime - the runtime to use as the target, or null to unset the target
monitor - a progress monitor, or null if progress reporting and cancellation are not desired
Throws:
CoreException - if there is a problem setting the runtime target