org.netbeans.modules.j2eeserver/4 1.55.0 1

org.netbeans.modules.j2ee.deployment.devmodules.api
Class Deployment

java.lang.Object
  extended by org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment

public final class Deployment
extends Object


Nested Class Summary
static class Deployment.DeploymentException
           
static interface Deployment.Logger
           
 
Method Summary
 void addInstanceListener(InstanceListener l)
          Register an instance listener that will listen to server instances changes.
 boolean canFileDeploy(String instanceId, J2eeModule mod)
          Determine if a server instance will attempt to use file deployment for a J2eeModule.
 String deploy(J2eeModuleProvider jmp, boolean debugmode, String clientModuleUrl, String clientUrlPart, boolean forceRedeploy)
          Deploys a web J2EE module to server.
 String deploy(J2eeModuleProvider jmp, boolean debugmode, String clientModuleUrl, String clientUrlPart, boolean forceRedeploy, Deployment.Logger logger)
           
 void disableCompileOnSaveSupport(J2eeModuleProvider provider)
           
 void enableCompileOnSaveSupport(J2eeModuleProvider provider)
           
static Deployment getDefault()
           
 String getDefaultServerInstanceID()
          Deprecated. this API is broken by design - the client should choose the instance by usage getServerInstanceIDs() and selection of appropriate server instance. Method will be removed in near future. See issue 83934.
 String[] getInstancesOfServer(String id)
           
 J2eePlatform getJ2eePlatform(String serverInstanceID)
          Deprecated. use getServerInstance(serverInstanceID).getJ2eePlatform()
 String getServerDisplayName(String id)
          Returns the display name of the server with given id.
 String getServerID(String instanceId)
          Deprecated. use getServerInstance(serverInstanceID).getServerID()
 String[] getServerIDs()
           
 ServerInstance getServerInstance(String serverInstanceId)
          Returns the server instance allowing client to query its properties and/or status.
 String getServerInstanceDisplayName(String id)
          Deprecated. use getServerInstance(serverInstanceID).getDisplayName()
 String[] getServerInstanceIDs()
           
 String[] getServerInstanceIDs(Object[] moduleTypes)
          Return ServerInstanceIDs of all registered server instances that support specified module types.
 String[] getServerInstanceIDs(Object[] moduleTypes, String specVersion)
          Return ServerInstanceIDs of all registered server instances that support specified module types and J2EE specification versions.
 String[] getServerInstanceIDs(Object[] moduleTypes, String specVersion, String[] tools)
          Return ServerInstanceIDs of all registered server instances that support specified module types, J2EE specification version and tools.
 boolean isRunning(String serverInstanceID)
          Deprecated. use getServerInstance(serverInstanceID).isRunning()
 void removeInstanceListener(InstanceListener l)
          Remove an instance listener which has been registered previously.
 void undeploy(J2eeModuleProvider jmp, boolean startServer, Deployment.Logger logger)
          Undeploys the project (if it is deployed and available).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefault

public static Deployment getDefault()

deploy

public String deploy(J2eeModuleProvider jmp,
                     boolean debugmode,
                     String clientModuleUrl,
                     String clientUrlPart,
                     boolean forceRedeploy)
              throws Deployment.DeploymentException
Deploys a web J2EE module to server.

Parameters:
clientModuleUrl - URL of module within a J2EE Application that should be used as a client (can be null for standalone modules)

Note: if null for J2EE application the first web or client module will be used.

Returns:
complete URL to be displayed in browser (server part plus the client module and/or client part provided as a parameter)
Throws:
Deployment.DeploymentException

deploy

public String deploy(J2eeModuleProvider jmp,
                     boolean debugmode,
                     String clientModuleUrl,
                     String clientUrlPart,
                     boolean forceRedeploy,
                     Deployment.Logger logger)
              throws Deployment.DeploymentException
Throws:
Deployment.DeploymentException

undeploy

public void undeploy(J2eeModuleProvider jmp,
                     boolean startServer,
                     Deployment.Logger logger)
              throws Deployment.DeploymentException
Undeploys the project (if it is deployed and available).

Parameters:
jmp - provider representing the project
startServer - if true server may be started while trying to determine whether the project is deployed
logger - logger for undeploy related events
Throws:
Deployment.DeploymentException
Since:
1.52

enableCompileOnSaveSupport

public void enableCompileOnSaveSupport(J2eeModuleProvider provider)

disableCompileOnSaveSupport

public void disableCompileOnSaveSupport(J2eeModuleProvider provider)

getServerInstanceIDs

public String[] getServerInstanceIDs()

getServerInstanceIDs

public String[] getServerInstanceIDs(Object[] moduleTypes)
Return ServerInstanceIDs of all registered server instances that support specified module types.

Parameters:
moduleTypes - list of module types that the server instance must support.
Returns:
ServerInstanceIDs of all registered server instances that meet the specified requirements.
Since:
1.6

getServerInstanceIDs

public String[] getServerInstanceIDs(Object[] moduleTypes,
                                     String specVersion)
Return ServerInstanceIDs of all registered server instances that support specified module types and J2EE specification versions.

Parameters:
moduleTypes - list of module types that the server instance must support.
specVersion - lowest J2EE specification version that the server instance must support.
Returns:
ServerInstanceIDs of all registered server instances that meet the specified requirements.
Since:
1.6

getServerInstanceIDs

public String[] getServerInstanceIDs(Object[] moduleTypes,
                                     String specVersion,
                                     String[] tools)
Return ServerInstanceIDs of all registered server instances that support specified module types, J2EE specification version and tools.

Parameters:
moduleTypes - list of module types that the server instance must support.
specVersion - lowest J2EE specification version that the server instance must support.
tools - list of tools that the server instance must support.
Returns:
ServerInstanceIDs of all registered server instances that meet the specified requirements.
Since:
1.6

getServerInstanceDisplayName

public String getServerInstanceDisplayName(String id)
Deprecated. use getServerInstance(serverInstanceID).getDisplayName()

Returns the display name of the instance identified by the given id.

Parameters:
id - id of the instance
Returns:
the display name of the instance, null if the instance does not exist or not defined

getServerID

public String getServerID(String instanceId)
Deprecated. use getServerInstance(serverInstanceID).getServerID()

Returns the id of the server to which the instance represented by the id belongs to.

Parameters:
instanceId - id of the instance
Returns:
the id of the server, null if the instance does not exist

getDefaultServerInstanceID

public String getDefaultServerInstanceID()
Deprecated. this API is broken by design - the client should choose the instance by usage getServerInstanceIDs() and selection of appropriate server instance. Method will be removed in near future. See issue 83934.

Returns the default server instance or null if no default instance configured.

This method is deprecated, so don't expect it will return any useful default instance. Method will be removed in near future.

Returns:
the default server instance

canFileDeploy

public boolean canFileDeploy(String instanceId,
                             J2eeModule mod)
Determine if a server instance will attempt to use file deployment for a J2eeModule.

Parameters:
instanceId - The target instance's server id
mod - The module to be deployed
Returns:
Whether file deployment will be used
Since:
1.27

getInstancesOfServer

public String[] getInstancesOfServer(String id)

getServerInstance

public ServerInstance getServerInstance(String serverInstanceId)
Returns the server instance allowing client to query its properties and/or status.

Parameters:
serverInstanceId - id of the server instance
Returns:
server instance
Since:
1.45

getServerIDs

public String[] getServerIDs()

getJ2eePlatform

public J2eePlatform getJ2eePlatform(String serverInstanceID)
Deprecated. use getServerInstance(serverInstanceID).getJ2eePlatform()

Return server instance's J2eePlatform.

Parameters:
serverInstanceID - server instance ID.
Returns:
J2eePlatform for the given server instance, null if server instance of the specified ID does not exist.
Since:
1.5

getServerDisplayName

public String getServerDisplayName(String id)
Returns the display name of the server with given id.

Client is usually searching for the display name of the server for particular instance. For this use getServerInstance(serverInstanceID).getServerDisplyName().

Parameters:
id - id of the server
Returns:
the display name of the server with given id, null if the server does not exist

isRunning

public boolean isRunning(String serverInstanceID)
Deprecated. use getServerInstance(serverInstanceID).isRunning()

Returns true if the given server instance exists and is running, false otherwise.

Never call this method from the event dispatch thread since it might take several seconds before it finishes.

Parameters:
serverInstanceID - server instance ID.
Returns:
true if the given server instance is running, false otherwise.
Throws:
NullPointerException - if serverInstanceID is null.
Since:
1.32

addInstanceListener

public final void addInstanceListener(InstanceListener l)
Register an instance listener that will listen to server instances changes.

Parameters:
l - listener which should be added.
Since:
1.6

removeInstanceListener

public final void removeInstanceListener(InstanceListener l)
Remove an instance listener which has been registered previously.

Parameters:
l - listener which should be removed.
Since:
1.6

org.netbeans.modules.j2eeserver/4 1.55.0 1

Built on November 20 2008.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.