|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.xar.script.XarScriptService
@Component @Named(value="xar") @Unstable public class XarScriptService
Provide APIs to manipulate XAR files.
| Field Summary | |
|---|---|
static String |
ERROR_KEY
The key under which the last encountered error is stored in the current execution context. |
protected org.xwiki.context.Execution |
execution
Provides access to the current context. |
| Constructor Summary | |
|---|---|
XarScriptService()
|
|
| Method Summary | |
|---|---|
Exception |
getLastError()
Get the error generated while performing the previously called action. |
XarPackage |
getXarPackage(File file)
Generate a XarPackage from the passed XAR file. |
XarPackage |
getXarPackage(InputStream stream,
boolean close)
Generate a XarPackage from the passed XAR file. |
protected void |
setError(Exception e)
Store a caught exception in the context, so that it can be later retrieved using getLastError(). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ERROR_KEY
@Inject protected org.xwiki.context.Execution execution
| Constructor Detail |
|---|
public XarScriptService()
| Method Detail |
|---|
public Exception getLastError()
null if no exception was thrownprotected void setError(Exception e)
getLastError().
e - the exception to store, can be null to clear the previously stored exceptiongetLastError()public XarPackage getXarPackage(File file)
XarPackage from the passed XAR file.
file - the XAR file
public XarPackage getXarPackage(InputStream stream,
boolean close)
XarPackage from the passed XAR file.
stream - the XAR fileclose - indicate if the passed stream should be closed at the end
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||