public class LaunchContextImpl extends java.lang.Object implements LaunchContext
LaunchContext.WritableProject
FRAMEWORK_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
LaunchException
public java.lang.String getScopeCode()
getScopeCode
in interface LaunchContext
public java.util.ResourceBundle getBundle()
public java.io.File getCacheDir()
LaunchContext
getCacheDir
in interface LaunchContext
public java.io.File getResourceDir()
LaunchContext
getResourceDir
in interface LaunchContext
public void log(java.lang.String message, java.lang.Object... args)
LaunchContext
getLog().printf(message, args); getLog().println();
log
in interface LaunchContext
public java.io.PrintWriter getLog()
LaunchContext
getLog
in interface LaunchContext
public java.lang.String getLogContents()
public java.io.File getTranslationDBLocation()
LaunchContext
getTranslationDBLocation
in interface LaunchContext
public void setTranDBLocation(java.io.File tranDBLocation)
public LaunchManifest getLaunchManifest()
LaunchContext
getLaunchManifest
in interface LaunchContext
public void setLaunchManifest(LaunchManifest launchManifest)
public LaunchManifest getDownloadRequiredManifest()
public void setDownloadRequiredManifest(LaunchManifest downloadRequiredManifest)
public java.io.File getGwCacheDir()
LaunchContext
getGwCacheDir
in interface LaunchContext
public void setGwCacheDir(java.io.File gwCacheDir)
public java.lang.String getMainClass()
LaunchContext
getMainClass
in interface LaunchContext
public java.util.List<GatewayAddress> getGatewayAddresses()
getGatewayAddresses
in interface LaunchContext
public void setGatewayAddresses(java.util.List<GatewayAddress> gatewayAddresses)
public void updateGatewayAddressListCache(java.util.List<GatewayAddress> addrs)
LaunchContext
updateGatewayAddressListCache
in interface LaunchContext
public GatewayAddress getGatewayAddress()
getGatewayAddress
in interface LaunchContext
public void setGatewayAddress(GatewayAddress gatewayAddress)
public java.lang.String getProjectName()
LaunchContext
getProjectName
in interface LaunchContext
public java.lang.String getProjectVersion()
LaunchContext
getProjectVersion
in interface LaunchContext
public java.lang.String getPlatformEdition()
LaunchContext
getPlatformEdition
in interface LaunchContext
public byte[] getProjectCacheBytes()
getProjectCacheBytes
in interface LaunchContext
public void setProjectCacheBytes(byte[] projectBytes)
public byte[] getGlobalProjectCacheBytes()
getGlobalProjectCacheBytes
in interface LaunchContext
public 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
LaunchContext
updateProjectCache
in interface LaunchContext
java.io.IOException
public void updateProjectCache(LaunchContext.WritableProject project, long editCount, java.util.UUID uuid) throws java.io.IOException
LaunchContext
updateProjectCache
in interface LaunchContext
java.io.IOException
public void updateGlobalProjectCache(byte[] projectBytes, long editCount, java.util.UUID uuid) throws java.io.IOException
updateGlobalProjectCache
in interface LaunchContext
java.io.IOException
public void updateGlobalProjectCache(LaunchContext.WritableProject project, long editCount, java.util.UUID uuid) throws java.io.IOException
updateGlobalProjectCache
in interface LaunchContext
java.io.IOException
public byte[] getProjectDownloadBytes()
getProjectDownloadBytes
in interface LaunchContext
public void setProjectDownloadBytes(byte[] projectDiffBytes)
public byte[] getGlobalProjectDownloadBytes()
getGlobalProjectDownloadBytes
in interface LaunchContext
public void setGlobalProjectDownloadBytes(byte[] projectDiffBytes)
public LaunchParent getParent()
getParent
in interface LaunchContext
public byte[] getUserObject()
LaunchContext
getUserObject
in interface LaunchContext
public <T> T getAttribute(java.lang.String key)
LaunchContext
getAttribute
in interface LaunchContext
public <T> T getAttribute(java.lang.String key, T defaultValue)
getAttribute
in interface LaunchContext
public void setAttribute(java.lang.String key, java.lang.Object value)
setAttribute
in interface LaunchContext
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
LaunchContext
getAttributes
in interface LaunchContext