org.netbeans.modules.j2eeserver/4 1.89.0 1

org.netbeans.modules.j2ee.deployment.plugins.spi
Class J2eePlatformImpl

java.lang.Object
  extended by org.netbeans.modules.j2ee.deployment.plugins.spi.J2eePlatformImpl
Direct Known Subclasses:
J2eePlatformImpl2

public abstract class J2eePlatformImpl
extends Object

Base SPI interface for J2eePlatform. The J2eePlatform describes the target environment J2EE applications are build against and subsequently deployed to. Each server instance defines its own J2EE platform.

Since:
1.5

Field Summary
static String PROP_DISPLAY_NAME
          Display name property
static String PROP_LIBRARIES
          Libraries property
static String PROP_SERVER_LIBRARIES
           
 
Constructor Summary
J2eePlatformImpl()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Register a listener which will be notified when some of the platform's properties change.
 void firePropertyChange(String propName, Object oldValue, Object newValue)
          Fire PropertyChange to all registered PropertyChangeListeners.
abstract  String getDisplayName()
          Return platform's display name.
abstract  Image getIcon()
          Return an icon describing the platform.
abstract  JavaPlatform getJavaPlatform()
          Return server J2SE platform or null if the platform is unknown, not registered in the IDE.
abstract  LibraryImplementation[] getLibraries()
          Return platform's libraries.
 LibraryImplementation[] getLibraries(Set<ServerLibraryDependency> libraries)
          Return platform's libraries including the libraries required by passed dependencies.
 Lookup getLookup()
          Lookup providing a way to find non mandatory technologies supported by the platform.
abstract  File[] getPlatformRoots()
          Return platform's root directories.
abstract  Set getSupportedJavaPlatformVersions()
          Return a set of J2SE platform versions this J2EE platform can run with.
 Set getSupportedModuleTypes()
          Deprecated. override getSupportedTypes()
 Set<org.netbeans.api.j2ee.core.Profile> getSupportedProfiles()
          Returns a set of supported profiles.
 Set<org.netbeans.api.j2ee.core.Profile> getSupportedProfiles(J2eeModule.Type moduleType)
          Returns a set of supported profiles for the given module type (one of J2eeModule.EAR, J2eeModule.EJB, J2eeModule.WAR, J2eeModule#RAR and J2eeModule#CAR).
 Set<String> getSupportedSpecVersions()
          Deprecated. override getSupportedProfiles() and #getSupportedProfiles(java.lang.Object)
 Set<String> getSupportedSpecVersions(Object moduleType)
          Deprecated. override getSupportedProfiles() and #getSupportedProfiles(java.lang.Object)
 Set<J2eeModule.Type> getSupportedTypes()
           
abstract  File[] getToolClasspathEntries(String toolName)
          Return classpath for the specified tool.
 String getToolProperty(String toolName, String propertyName)
          Deprecated. getLookup() should be used to obtain tool specifics
abstract  boolean isToolSupported(String toolName)
          Deprecated. getLookup() should be used to obtain tool specifics
 void removePropertyChangeListener(PropertyChangeListener l)
          Remove a listener registered previously.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_DISPLAY_NAME

public static final String PROP_DISPLAY_NAME
Display name property

See Also:
Constant Field Values

PROP_LIBRARIES

public static final String PROP_LIBRARIES
Libraries property

See Also:
Constant Field Values

PROP_SERVER_LIBRARIES

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

J2eePlatformImpl

public J2eePlatformImpl()
Method Detail

getLibraries

public abstract LibraryImplementation[] getLibraries()
Return platform's libraries.

Returns:
platform's libraries.

getLibraries

public LibraryImplementation[] getLibraries(Set<ServerLibraryDependency> libraries)
Return platform's libraries including the libraries required by passed dependencies. In any case the returned array should be superset or equal (containing same elements) to the return value of getLibraries().

This default implementation return the same libraries as getLibraries(). It should be overridden to handle passed dependencies as well. It is also implementors responsibility to return libraries in correct order in which these will be used on classpath.

Parameters:
libraries - the dependencies required
Returns:
platform's libraries including the libraries required by passed dependencies

getDisplayName

public abstract String getDisplayName()
Return platform's display name.

Returns:
platform's display name.

getIcon

public abstract Image getIcon()
Return an icon describing the platform. This will be mostly the icon used for server instance nodes

Returns:
an icon describing the platform
Since:
1.6

getPlatformRoots

public abstract File[] getPlatformRoots()
Return platform's root directories. This will be mostly server's installation directory.

Returns:
platform's root directories.

getToolClasspathEntries

public abstract File[] getToolClasspathEntries(String toolName)
Return classpath for the specified tool. Use the tool constants declared in the J2eePlatform.

Parameters:
toolName - tool name, for example J2eePlatform.TOOL_APP_CLIENT_RUNTIME.
Returns:
classpath for the specified tool.

isToolSupported

public abstract boolean isToolSupported(String toolName)
Deprecated. getLookup() should be used to obtain tool specifics

Specifies whether a tool of the given name is supported by this platform. Use the tool constants declared in the J2eePlatform.

Parameters:
toolName - tool name, for example J2eePlatform.TOOL_APP_CLIENT_RUNTIME .
Returns:
true if platform supports tool of the given name, false otherwise.

getSupportedSpecVersions

public Set<String> getSupportedSpecVersions()
Deprecated. override getSupportedProfiles() and #getSupportedProfiles(java.lang.Object)

Return a list of supported J2EE specification versions. Use J2EE specification versions defined in the J2eeModule class.

Returns:
list of supported J2EE specification versions.

getSupportedSpecVersions

public Set<String> getSupportedSpecVersions(Object moduleType)
Deprecated. override getSupportedProfiles() and #getSupportedProfiles(java.lang.Object)

Return a list of supported J2EE specification versions for a given module type. Implement this method if the server supports different versions of spec for different types of modules. If this method is not implemented by the plugin the IDE will use the non parametrized version of getSupportedSpecVersions.

Parameters:
moduleType - one of the constants defined in J2eeModule
Returns:
list of supported J2EE specification versions.

getSupportedProfiles

public Set<org.netbeans.api.j2ee.core.Profile> getSupportedProfiles()
Returns a set of supported profiles. By default method converts specification version returned by getSupportedSpecVersions() to profiles.

Returns:
set of supported profiles
Since:
1.58
See Also:
Profile

getSupportedProfiles

public Set<org.netbeans.api.j2ee.core.Profile> getSupportedProfiles(J2eeModule.Type moduleType)
Returns a set of supported profiles for the given module type (one of J2eeModule.EAR, J2eeModule.EJB, J2eeModule.WAR, J2eeModule#RAR and J2eeModule#CAR). By default method converts specification version returned by getSupportedSpecVersions(java.lang.Object) to profiles.

Parameters:
moduleType - type of the module
Returns:
set of supported profiles
Since:
1.59
See Also:
Profile

getSupportedModuleTypes

public Set getSupportedModuleTypes()
Deprecated. override getSupportedTypes()

Return a list of supported J2EE module types. Use module types defined in the J2eeModule class.

Returns:
list of supported J2EE module types.

getSupportedTypes

public Set<J2eeModule.Type> getSupportedTypes()
Returns:
Since:
1.59

getSupportedJavaPlatformVersions

public abstract Set getSupportedJavaPlatformVersions()
Return a set of J2SE platform versions this J2EE platform can run with. Versions should be specified as strings i.g. ("1.3", "1.4", etc.)

Since:
1.9

getJavaPlatform

public abstract JavaPlatform getJavaPlatform()
Return server J2SE platform or null if the platform is unknown, not registered in the IDE.

Returns:
server J2SE platform or null if the platform is unknown, not registered in the IDE.
Since:
1.9

addPropertyChangeListener

public final void addPropertyChangeListener(PropertyChangeListener l)
Register a listener which will be notified when some of the platform's properties change.

Parameters:
l - listener which should be added.

removePropertyChangeListener

public final void removePropertyChangeListener(PropertyChangeListener l)
Remove a listener registered previously.

Parameters:
l - listener which should be removed.

firePropertyChange

public final void firePropertyChange(String propName,
                                     Object oldValue,
                                     Object newValue)
Fire PropertyChange to all registered PropertyChangeListeners.

Parameters:
propName - property name.
oldValue - old value.
newValue - new value.

getToolProperty

public String getToolProperty(String toolName,
                              String propertyName)
Deprecated. getLookup() should be used to obtain tool specifics

Returns the property value for the specified tool.

The property value uses Ant property format and therefore may contain references to another properties defined either by the client of this API or by the tool itself.

The properties the client may be requited to define are as follows J2eePlatform.CLIENT_PROP_DIST_ARCHIVE

Parameters:
toolName - tool name, for example J2eePlatform.TOOL_APP_CLIENT_RUNTIME.
propertyName - tool property name, for example J2eePlatform.TOOL_PROP_MAIN_CLASS.
Returns:
property value or null, if the property is not defined for the specified tool.
Since:
1.16

getLookup

public Lookup getLookup()
Lookup providing a way to find non mandatory technologies supported by the platform.

The typical example of such support is a webservice stack.

Returns:
Lookup providing way to find other supported technologies
Since:
1.44

org.netbeans.modules.j2eeserver/4 1.89.0 1

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.