public class LaunchContextImpl extends java.lang.Object implements LaunchContext
LaunchContext.WritableProjectFRAMEWORK_ATTRIBUTE, SSO_PASSWORD, SSO_USERNAME| Constructor and Description |
|---|
LaunchContextImpl(java.util.ResourceBundle bundle,
LaunchSpec spec,
java.io.File cacheDir,
LaunchParent parent,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getAttribute(java.lang.String key)
A free-for-all map of objects that clients can use to communicate between launches.
|
<T> T |
getAttribute(java.lang.String key,
T defaultValue) |
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Retrieves the raw attribute map
|
java.util.ResourceBundle |
getBundle() |
java.io.File |
getCacheDir()
The base of the cache dirs: %USER_HOME%/.ignition/cache/
|
LaunchManifest |
getDownloadRequiredManifest() |
GatewayAddress |
getGatewayAddress() |
java.util.List<GatewayAddress> |
getGatewayAddresses() |
byte[] |
getGlobalProjectCacheBytes() |
java.io.File |
getGlobalProjectCacheChkFile() |
java.io.File |
getGlobalProjectCacheFile() |
byte[] |
getGlobalProjectDownloadBytes() |
java.io.File |
getGwCacheDir()
The actual cache directory for the specific gateway that we ended up connecting to.
|
LaunchManifest |
getLaunchManifest()
This LaunchManifest is downloaded from the gateway during ConnectStep.
|
java.io.PrintWriter |
getLog()
A PrintWriter that steps can use to log their progress.
|
java.lang.String |
getLogContents() |
java.lang.String |
getMainClass()
The name of the class that should be started during StartupStep
|
LaunchParent |
getParent() |
java.lang.String |
getPlatformEdition()
The platform edition.
|
byte[] |
getProjectCacheBytes() |
java.io.File |
getProjectCacheChkFile() |
java.io.File |
getProjectCacheFile() |
byte[] |
getProjectDownloadBytes() |
java.lang.String |
getProjectName()
The name of the project.
|
java.lang.String |
getProjectVersion()
The version of the project to use.
|
java.io.File |
getResourceDir()
The base of the cached resources: %USER_HOME%/.ignition/cache/resources/
|
java.lang.String |
getScopeCode() |
java.io.File |
getTranslationDBLocation()
Returns the location of the cached translation term db file.
|
byte[] |
getUserObject()
Returns a serialized user object (if any) that was passed as part of a restart
|
void |
log(java.lang.String message,
java.lang.Object... args)
A shortcut for:
|
void |
setAttribute(java.lang.String key,
java.lang.Object value) |
void |
setDownloadRequiredManifest(LaunchManifest downloadRequiredManifest) |
void |
setGatewayAddress(GatewayAddress gatewayAddress) |
void |
setGatewayAddresses(java.util.List<GatewayAddress> gatewayAddresses) |
void |
setGlobalProjectCacheBytes(byte[] projectBytes) |
void |
setGlobalProjectDownloadBytes(byte[] projectDiffBytes) |
void |
setGwCacheDir(java.io.File gwCacheDir) |
void |
setLaunchManifest(LaunchManifest launchManifest) |
void |
setProjectCacheBytes(byte[] projectBytes) |
void |
setProjectDownloadBytes(byte[] projectDiffBytes) |
void |
setTranDBLocation(java.io.File tranDBLocation) |
void |
updateGatewayAddressListCache(java.util.List<GatewayAddress> addrs)
Updates the cache with a list of gateway addresses that will be available for use next time this project is
loaded.
|
void |
updateGlobalProjectCache(byte[] projectBytes,
long editCount,
java.util.UUID uuid) |
void |
updateGlobalProjectCache(LaunchContext.WritableProject project,
long editCount,
java.util.UUID uuid) |
void |
updateProjectCache(byte[] projectBytes,
long editCount,
java.util.UUID uuid)
Updates the project file (and associated chk file) that are stored in the current cache.
|
void |
updateProjectCache(LaunchContext.WritableProject project,
long editCount,
java.util.UUID uuid)
This overload of updateProjectCache takes a WriteableProject, which lets the project be streamed.
|
public LaunchContextImpl(java.util.ResourceBundle bundle,
LaunchSpec spec,
java.io.File cacheDir,
LaunchParent parent,
java.util.Map<java.lang.String,java.lang.Object> attributes)
throws LaunchException
LaunchExceptionpublic java.lang.String getScopeCode()
getScopeCode in interface LaunchContextpublic java.util.ResourceBundle getBundle()
public java.io.File getCacheDir()
LaunchContextgetCacheDir in interface LaunchContextpublic java.io.File getResourceDir()
LaunchContextgetResourceDir in interface LaunchContextpublic void log(java.lang.String message,
java.lang.Object... args)
LaunchContext
getLog().printf(message, args); getLog().println();
log in interface LaunchContextpublic java.io.PrintWriter getLog()
LaunchContextgetLog in interface LaunchContextpublic java.lang.String getLogContents()
public java.io.File getTranslationDBLocation()
LaunchContextgetTranslationDBLocation in interface LaunchContextpublic void setTranDBLocation(java.io.File tranDBLocation)
public LaunchManifest getLaunchManifest()
LaunchContextgetLaunchManifest in interface LaunchContextpublic void setLaunchManifest(LaunchManifest launchManifest)
public LaunchManifest getDownloadRequiredManifest()
public void setDownloadRequiredManifest(LaunchManifest downloadRequiredManifest)
public java.io.File getGwCacheDir()
LaunchContextgetGwCacheDir in interface LaunchContextpublic void setGwCacheDir(java.io.File gwCacheDir)
public java.lang.String getMainClass()
LaunchContextgetMainClass in interface LaunchContextpublic java.util.List<GatewayAddress> getGatewayAddresses()
getGatewayAddresses in interface LaunchContextpublic void setGatewayAddresses(java.util.List<GatewayAddress> gatewayAddresses)
public void updateGatewayAddressListCache(java.util.List<GatewayAddress> addrs)
LaunchContextupdateGatewayAddressListCache in interface LaunchContextpublic GatewayAddress getGatewayAddress()
getGatewayAddress in interface LaunchContextpublic void setGatewayAddress(GatewayAddress gatewayAddress)
public java.lang.String getProjectName()
LaunchContextgetProjectName in interface LaunchContextpublic java.lang.String getProjectVersion()
LaunchContextgetProjectVersion in interface LaunchContextpublic java.lang.String getPlatformEdition()
LaunchContextgetPlatformEdition in interface LaunchContextpublic byte[] getProjectCacheBytes()
getProjectCacheBytes in interface LaunchContextpublic void setProjectCacheBytes(byte[] projectBytes)
public byte[] getGlobalProjectCacheBytes()
getGlobalProjectCacheBytes in interface LaunchContextpublic void setGlobalProjectCacheBytes(byte[] projectBytes)
public java.io.File getProjectCacheFile()
public java.io.File getProjectCacheChkFile()
public java.io.File getGlobalProjectCacheFile()
public java.io.File getGlobalProjectCacheChkFile()
public void updateProjectCache(byte[] projectBytes,
long editCount,
java.util.UUID uuid)
throws java.io.IOException
LaunchContextupdateProjectCache in interface LaunchContextjava.io.IOExceptionpublic void updateProjectCache(LaunchContext.WritableProject project, long editCount, java.util.UUID uuid) throws java.io.IOException
LaunchContextupdateProjectCache in interface LaunchContextjava.io.IOExceptionpublic void updateGlobalProjectCache(byte[] projectBytes,
long editCount,
java.util.UUID uuid)
throws java.io.IOException
updateGlobalProjectCache in interface LaunchContextjava.io.IOExceptionpublic void updateGlobalProjectCache(LaunchContext.WritableProject project, long editCount, java.util.UUID uuid) throws java.io.IOException
updateGlobalProjectCache in interface LaunchContextjava.io.IOExceptionpublic byte[] getProjectDownloadBytes()
getProjectDownloadBytes in interface LaunchContextpublic void setProjectDownloadBytes(byte[] projectDiffBytes)
public byte[] getGlobalProjectDownloadBytes()
getGlobalProjectDownloadBytes in interface LaunchContextpublic void setGlobalProjectDownloadBytes(byte[] projectDiffBytes)
public LaunchParent getParent()
getParent in interface LaunchContextpublic byte[] getUserObject()
LaunchContextgetUserObject in interface LaunchContextpublic <T> T getAttribute(java.lang.String key)
LaunchContextgetAttribute in interface LaunchContextpublic <T> T getAttribute(java.lang.String key,
T defaultValue)
getAttribute in interface LaunchContextpublic void setAttribute(java.lang.String key,
java.lang.Object value)
setAttribute in interface LaunchContextpublic java.util.Map<java.lang.String,java.lang.Object> getAttributes()
LaunchContextgetAttributes in interface LaunchContext