|
org.netbeans.modules.j2ee.dd/1 1.13.0 2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CommonDDBean
Parent of all DD API interfaces.
Important note: Do not provide an implementation of this interface unless you are a DD API provider!
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener pcl)
Adds property change listener to particular CommonDDBean object (WebApp object). |
Object |
clone()
Returns the clonned CommonDDBean object. |
String |
getId()
Returns the id attribute for related dd element. In most cases the id attribute is not specified. |
Object |
getValue(String propertyName)
Returns the CommonDDBean object or array of CommonDDBean object for given property. E.g. |
void |
removePropertyChangeListener(PropertyChangeListener pcl)
Removes property change listener from CommonDDBean object. |
void |
setId(String value)
Sets the id attribute for related dd element. |
void |
write(OutputStream os)
Writes the whole DD or its fraction (element related to CommonDDBean) to output stream. For DD root object there is more convenient to use the RootInterface.write(org.openide.filesystems.FileObject) method.The correct usage with file objects is : |
| Method Detail |
|---|
void addPropertyChangeListener(PropertyChangeListener pcl)
pcl - property change listenervoid removePropertyChangeListener(PropertyChangeListener pcl)
pcl - property change listenervoid setId(String value)
<servlet id="xyz"> ... </servlet>
value - the value for id attributeString getId()
Object clone()
Object getValue(String propertyName)
propertyName - name of the property the value is looking for
void write(OutputStream os)
throws IOException
RootInterface.write(org.openide.filesystems.FileObject) method.
WebApp ejb;
FileObject fo;
...
// code that initializes and modifies the ejb object
...
FileLock lock;
try {
lock=fo.lock();
} catch (FileAlreadyLockedException e) {
// handling the exception
}
if (lock!=null) {
try {
OutputStream os=fo.getOutputStream(lock);
try {
ejb.write(os);
} finally {
os.close();
}
} finally {
lock.releaseLock();
}
}
...
os - output stream for writing
IOException
|
org.netbeans.modules.j2ee.dd/1 1.13.0 2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||