|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.util.ant.packager.GappModel
public class GappModel
| Constructor Summary | |
|---|---|
GappModel(URL gappFileURL)
|
|
GappModel(URL gappFileURL,
URL gateHomeURL)
Create a GappModel for a GAPP file. |
|
| Method Summary | |
|---|---|
void |
finish()
Finish up processing of the gapp file ready for writing. |
org.jdom.Document |
getGappDocument()
Get the JDOM Document representing this GAPP file. |
URL |
getGappFileURL()
Get the URL at which the GAPP file resides. |
Set<URL> |
getPluginURLs()
Get the plugin URLs that are referenced by relative paths in this GAPP file. |
Set<URL> |
getResourceURLs()
Get the resource URLs that are referenced by relative paths in this GAPP file. |
void |
setGappFileURL(URL gappFileURL)
Set the URL at which the GAPP file resides. |
void |
updatePathForURL(URL originalURL,
URL newURL,
boolean makeRelative)
Update the modelled content of the GAPP file to replace any relative paths referring to originalURL with those
pointing to newURL. |
void |
write()
Write out the (possibly modified) GAPP file to its new location. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GappModel(URL gappFileURL)
GappModel(URL,URL)
public GappModel(URL gappFileURL,
URL gateHomeURL)
gappFileURL - the URL of the GAPP file to model.gateHomeURL - the URL against which $gatehome$ relative paths should
be resolved. This may be null if you are sure that the GAPP you are
packaging does not contain any $gatehome$ paths. If no gateHomeURL is
provided but the application does contain a $gatehome$ path, a
GateRuntimeException will be thrown.| Method Detail |
|---|
public URL getGappFileURL()
public void setGappFileURL(URL gappFileURL)
gappFileURL - the gappFileURL to setpublic org.jdom.Document getGappDocument()
public Set<URL> getPluginURLs()
public Set<URL> getResourceURLs()
public void updatePathForURL(URL originalURL,
URL newURL,
boolean makeRelative)
originalURL with those
pointing to newURL. If makeRelative is
true, the new path will be relativized against the
current gappFileURL, so you should call
setGappFileURL(java.net.URL) with the URL at which the file will
ultimately be saved before calling this method. If
makeRelative is false the new URL
will be used directly as an absolute URL (so to replace a relative
path with the absolute URL to the same file you can call
updatePathForURL(u, u, false)).
originalURL - The original URL whose references are to be
replaced.newURL - the replacement URL.makeRelative - should we relativize the newURL before use?public void finish()
public void write()
throws IOException
IOException - if an I/O error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||