public interface ModuleAdminAgent
SpecialistsBroker.requireSpecialist(ModuleAdminAgent.TYPE)
Modifier and Type | Interface and Description |
---|---|
static interface |
ModuleAdminAgent.ModuleResult
The module installation/update result containing the installed/upgraded module descriptor
and the process log message.
|
Modifier and Type | Field and Description |
---|---|
static SpecialistType<ModuleAdminAgent> |
TYPE
Agent providing administrative methods for maintaining FirstSpirit server modules.
|
Modifier and Type | Method and Description |
---|---|
GlobalWebAppId |
createGlobalWebApp(String globalWebAppId,
String contextName,
String description)
Creates a global web-app.
|
InputStream |
downloadWebApp(WebAppId webAppId)
Download the specified web app as
.war -file. |
Collection<GlobalWebAppId> |
getGlobalWebApps()
Returns all global web-apps.
|
String |
getInstalledVersion(String moduleName)
Returns the version of the given module.
|
Collection<ModuleDescriptor> |
getModules()
Return descriptors of all installed modules.
|
FileSystem<?> |
getProjectAppConfig(String moduleName,
String projectAppName,
Project project)
Returns an access to the project-app configuration directory; read-write-access if the user is project admin,
read-only-access if the user is project user, otherwise a
SecurityException will be thrown. |
Collection<Project> |
getProjectAppUsages(String moduleName,
String projectAppName)
Returns all project ids using the specified project application.
|
Collection<WebAppId> |
getWebAppUsages(String moduleName,
String webAppComponent)
Returns all usages of the given web-app component.
|
ModuleAdminAgent.ModuleResult |
install(InputStream fsmStream,
boolean updateUsages)
Installs or updates the given module.
|
void |
installProjectApp(String moduleName,
String projectAppName,
Project project)
Installs or updates a project application to the specified project.
|
void |
installWebApp(String moduleName,
String webAppComponent,
WebAppId webAppId)
Installs or updates the given web-app component into the specified web app and deploys the web app
to it's web-server.
|
void |
removeGlobalWebApp(GlobalWebAppId globalWebAppId)
Undeploys and destroys the given global web-app.
|
void |
startService(String serviceName)
Starts the service with the given
serviceName . |
void |
stopService(String serviceName)
Stops the service with the given
serviceName . |
void |
uninstall(String moduleName,
boolean removeUsages)
Uninstalls the given module.
|
void |
uninstallProjectApp(String moduleName,
String projectAppName,
Project project)
Removes the project application from the specified project.
|
void |
uninstallWebApp(String moduleName,
String webAppComponent,
WebAppId webAppId)
Removes the given web-app component from the specified web app and deploys the web
to it's web-server.
|
static final SpecialistType<ModuleAdminAgent> TYPE
SpecialistsBroker
.@NotNull ModuleAdminAgent.ModuleResult install(InputStream fsmStream, boolean updateUsages) throws IOException, ModuleException
updateUsages
is true
all project-app
and web-app components will be updated and the appropriate web-apps will be deployed.
Important:
fsmStream
will be closed, automatically. The caller is not responsible for
closing the stream.fsmStream
- fsm file stream.updateUsages
- true
to update all project- and web-components (appropriate web-apps will be deployed).IOException
- if any io operation fails.ModuleException
- if the fsm isn't valid or in case of a circular dependency (e.g. module A needs B, B needs C, C needs A).uninstall(String, boolean)
void uninstall(String moduleName, boolean removeUsages) throws ModuleException
removeUsages
is true
all project-app and
and web-app components will be removed and appropriate web-apps will be deployed.
If removeUsages
is false
and there still exist any usages, a
ModuleException
will be thrown.moduleName
- name of the module which should be uninstalled.removeUsages
- true
to remove all usages.ModuleException
- if unloading of the given module fails.install(InputStream, boolean)
void installProjectApp(String moduleName, String projectAppName, @NotNull Project project) throws ModuleException
moduleName
- name of the module containing the project application.projectAppName
- name of the project-app component.project
- where to install the component.ModuleException
- if installing the component fails.uninstallProjectApp(String, String, Project)
@NotNull FileSystem<?> getProjectAppConfig(String moduleName, String projectAppName, @NotNull Project project) throws SecurityException
SecurityException
will be thrown.moduleName
- name of the module containing the project application.projectAppName
- name of the project-app component.project
- project where the app is installed.SecurityException
- if the current user has no project access.@NotNull Collection<Project> getProjectAppUsages(String moduleName, String projectAppName)
moduleName
- name of the module containing the project application.projectAppName
- name of project-app component.void uninstallProjectApp(String moduleName, String projectAppName, @NotNull Project project) throws ModuleException
moduleName
- name of the module containing the project application.projectAppName
- name of the project-app component.project
- target project.ModuleException
- if uninstalling the project-app fails.installProjectApp(String, String, Project)
void installWebApp(String moduleName, String webAppComponent, @NotNull WebAppId webAppId) throws ModuleException
moduleName
- name of the module containing the web-app component.webAppComponent
- web-app component name.webAppId
- target web-app.ModuleException
uninstallWebApp(String, String, WebAppId)
@NotNull InputStream downloadWebApp(WebAppId webAppId) throws IOException
.war
-file.webAppId
- identifies the web-app to download..war
-fileIOException
- if any io related operation fails.@NotNull Collection<WebAppId> getWebAppUsages(String moduleName, String webAppComponent)
moduleName
- name of the module containing the web-app component.webAppComponent
- web-app component name.void uninstallWebApp(String moduleName, String webAppComponent, WebAppId webAppId) throws ModuleException
moduleName
- name of the module containing the web-app component.webAppComponent
- web-app component name.webAppId
- target web-app.ModuleException
installWebApp(String, String, WebAppId)
GlobalWebAppId createGlobalWebApp(String globalWebAppId, String contextName, String description)
globalWebAppId
- new global web-app identifier.contextName
- web-server context where to install the web-app.description
- description for this global web-app, visible in the FirstSpirit ServerManager.removeGlobalWebApp(GlobalWebAppId)
@NotNull Collection<GlobalWebAppId> getGlobalWebApps()
void removeGlobalWebApp(GlobalWebAppId globalWebAppId)
globalWebAppId
- global web-app identifier.createGlobalWebApp(String, String, String)
@Nullable String getInstalledVersion(String moduleName) throws IllegalArgumentException
moduleName
- name of module to look for.IllegalArgumentException
- if the module couldn't be foundCollection<ModuleDescriptor> getModules()
void startService(String serviceName) throws ServiceNotFoundException
serviceName
.serviceName
- service nameServiceNotFoundException
- if the specified service couldn't be found.void stopService(String serviceName) throws ServiceNotFoundException
serviceName
.serviceName
- service nameServiceNotFoundException
- if the specified service couldn't be found.Copyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408