|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.modules.j2ee.deployment.plugins.api.InstanceProperties
public abstract class InstanceProperties
A way to ask the IDE to store customized information about a server instance and make it available to a plugin. Typical usage for create new instance would be like this: InstanceProperties props = InstanceProperties.getInstanceProperties(url); if (props == null) props = InstanceProperties.createInstanceProperties(url, user, password, displayName); props.setProperty(prop1, value1); . . .
Field Summary | |
---|---|
static String |
DISPLAY_NAME_ATTR
Display name property, its value is used by IDE to represent server instance. |
static String |
HTTP_PORT_NUMBER
HTTP port property, The port where the instance runs |
static String |
PASSWORD_ATTR
Password property, its value is used by the deployment manager. |
static String |
REMOVE_FORBIDDEN
Remove forbidden property, if its value is set to true , it
won't be allowed to remove the server instance from the server registry. |
static String |
URL_ATTR
URL property, its value is used as a connection string to get the deployment manager (e.g. |
static String |
USERNAME_ATTR
Username property, its value is used by the deployment manager. |
Constructor Summary | |
---|---|
InstanceProperties()
|
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add PropertyChangeListener which will be notified of
InstanceProperties changes. |
static InstanceProperties |
createInstanceProperties(String url,
String username,
String password)
Deprecated. use the factory method with displayName parameter. |
static InstanceProperties |
createInstanceProperties(String url,
String username,
String password,
String displayName)
Create new instance and returns instance properties for the server instance. |
protected void |
firePropertyChange(PropertyChangeEvent evt)
This method should be called to notify interested listeners when InstanceProperties change. |
static InstanceProperties |
getDefaultInstance()
Return default instance properties. |
abstract javax.enterprise.deploy.spi.Target |
getDefaultTarget()
Return default Target object for the target server from this instance, if any. |
abstract javax.enterprise.deploy.spi.DeploymentManager |
getDeploymentManager()
Return DeploymentManager associated with this instance. |
static String[] |
getInstanceList()
Returns list of URL strings of all registered instances |
static InstanceProperties |
getInstanceProperties(String url)
Returns instance properties for the server instance. |
abstract String |
getProperty(String propname)
Get instance property |
abstract boolean |
isDefaultInstance()
Is the target server the default J2EE server for deployment? |
abstract Enumeration |
propertyNames()
Get instance property keys |
abstract void |
refreshServerInstance()
Ask the server instance to reset cached deployment manager, J2EE management objects and refresh it UI elements. |
abstract void |
setAsDefaultServer(String targetName)
Set the target server the default server. |
abstract void |
setProperties(Properties props)
Set instance properties. |
abstract void |
setProperty(String propname,
String value)
Set instance property |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String URL_ATTR
public static final String USERNAME_ATTR
public static final String PASSWORD_ATTR
public static final String DISPLAY_NAME_ATTR
public static final String REMOVE_FORBIDDEN
true
, it
won't be allowed to remove the server instance from the server registry.
public static final String HTTP_PORT_NUMBER
Constructor Detail |
---|
public InstanceProperties()
Method Detail |
---|
public static InstanceProperties getInstanceProperties(String url)
url
- the url connection string to get the instance deployment manager.
public static InstanceProperties createInstanceProperties(String url, String username, String password) throws InstanceCreationException
url
- the url connection string to get the instance deployment managerusername
- username which is used by the deployment manager.password
- password which is used by the deployment manager.
InstanceProperties
object, null
if
instance does not exists
InstanceCreationException
- when instance with same url already
registered.public static InstanceProperties createInstanceProperties(String url, String username, String password, String displayName) throws InstanceCreationException
url
- the url connection string to get the instance deployment manager.username
- username which is used by the deployment manager.password
- password which is used by the deployment manager.displayName
- display name which is used by IDE to represent this
server instance.
InstanceProperties
object, null
if
instance does not exists.
InstanceCreationException
- when instance with same url already
registered.public static String[] getInstanceList()
public static InstanceProperties getDefaultInstance()
public abstract void setProperties(Properties props) throws IllegalStateException
props
- properties to set for this server instance.
IllegalStateException
- when instance already removed or not created yetpublic abstract void setProperty(String propname, String value) throws IllegalStateException
propname
- name of propertyvalue
- property string value
IllegalStateException
- when instance already removed or not created yetpublic abstract String getProperty(String propname) throws IllegalStateException
propname
- name of property
IllegalStateException
- when instance already removed or not created yetpublic abstract Enumeration propertyNames() throws IllegalStateException
IllegalStateException
- when instance already removed or not created yetpublic abstract boolean isDefaultInstance()
public abstract javax.enterprise.deploy.spi.DeploymentManager getDeploymentManager()
public abstract javax.enterprise.deploy.spi.Target getDefaultTarget()
public abstract void setAsDefaultServer(String targetName)
targetName
- name of the target server; null if admin server is also single target.public abstract void refreshServerInstance()
public void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener
which will be notified of
InstanceProperties
changes.
PropertyChangeListener
- which will be notified of
InstanceProperties
changes.protected void firePropertyChange(PropertyChangeEvent evt)
evt
- A PropertyChangeEvent object describing the event source
and the property that has changed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |