@Singleton public class InstallContextImpl extends Object implements InstallContext
InstallContext
; provided by the ModuleManager
.InstallContext.Message, InstallContext.MessagePriority
Constructor and Description |
---|
InstallContextImpl(ModuleRegistry moduleRegistry) |
Modifier and Type | Method and Description |
---|---|
void |
error(String message,
Throwable th) |
javax.jcr.Session |
getConfigJCRSession() |
ModuleDefinition |
getCurrentModuleDefinition()
Allows generic tasks to know what's being installed/updated.
|
int |
getExecutedTaskCount() |
javax.jcr.Session |
getJCRSession(String workspaceName) |
Map<String,List<InstallContext.Message>> |
getMessages()
A Map of messages where the key is the module name.
|
protected String |
getModuleKey()
The key used in the map of messages.
|
javax.jcr.Node |
getModulesNode() |
javax.jcr.Node |
getOrCreateCurrentModuleConfigNode() |
javax.jcr.Node |
getOrCreateCurrentModuleNode() |
InstallStatus |
getStatus() |
int |
getTotalTaskCount() |
boolean |
hasModulesNode() |
void |
info(String message) |
boolean |
isModuleRegistered(String moduleName) |
protected void |
log(InstallContext.Message message) |
void |
restartNeeded(String message) |
void |
setCurrentModule(ModuleDefinition module) |
void |
warn(String message) |
@Inject public InstallContextImpl(ModuleRegistry moduleRegistry)
public void setCurrentModule(ModuleDefinition module)
public void info(String message)
info
in interface InstallContext
public void warn(String message)
warn
in interface InstallContext
public void error(String message, Throwable th)
error
in interface InstallContext
public void restartNeeded(String message)
restartNeeded
in interface InstallContext
public int getExecutedTaskCount()
getExecutedTaskCount
in interface InstallContext
public int getTotalTaskCount()
getTotalTaskCount
in interface InstallContext
public InstallStatus getStatus()
getStatus
in interface InstallContext
public Map<String,List<InstallContext.Message>> getMessages()
InstallContext
getMessages
in interface InstallContext
public ModuleDefinition getCurrentModuleDefinition()
InstallContext
getCurrentModuleDefinition
in interface InstallContext
public boolean isModuleRegistered(String moduleName)
isModuleRegistered
in interface InstallContext
public javax.jcr.Session getJCRSession(String workspaceName) throws javax.jcr.RepositoryException
getJCRSession
in interface InstallContext
javax.jcr.RepositoryException
public javax.jcr.Session getConfigJCRSession() throws javax.jcr.RepositoryException
getConfigJCRSession
in interface InstallContext
javax.jcr.RepositoryException
public boolean hasModulesNode()
hasModulesNode
in interface InstallContext
public javax.jcr.Node getModulesNode() throws javax.jcr.RepositoryException
getModulesNode
in interface InstallContext
javax.jcr.RepositoryException
public javax.jcr.Node getOrCreateCurrentModuleNode() throws javax.jcr.RepositoryException
getOrCreateCurrentModuleNode
in interface InstallContext
javax.jcr.RepositoryException
public javax.jcr.Node getOrCreateCurrentModuleConfigNode() throws javax.jcr.RepositoryException
getOrCreateCurrentModuleConfigNode
in interface InstallContext
javax.jcr.RepositoryException
protected void log(InstallContext.Message message)
protected String getModuleKey()
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.