]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.agent/src/main/java/org/argeo/slc/ant/deploy/SlcManagerTask.java
c4cc74bb1c1bfb11411b912065a3a97aeca34b48
1 package org
.argeo
.slc
.ant
.deploy
;
3 import java
.lang
.reflect
.Method
;
5 import org
.argeo
.slc
.ant
.structure
.SAwareTask
;
6 import org
.argeo
.slc
.core
.SlcException
;
7 import org
.argeo
.slc
.core
.deploy
.DeployedSystem
;
8 import org
.argeo
.slc
.core
.deploy
.DeployedSystemManager
;
10 public class SlcManagerTask
extends SAwareTask
{
11 private String action
;
12 private String manager
;
15 protected void executeActions(String mode
) {
16 DeployedSystemManager
<DeployedSystem
> systemManager
= getBean(manager
);
19 Method method
= systemManager
.getClass().getMethod(action
, null);
20 method
.invoke(systemManager
, null);
21 } catch (Exception e
) {
22 throw new SlcException("Cannot execute action " + action
23 + " for manager " + manager
, e
);
27 public void setAction(String action
) {
31 public void setManager(String manager
) {
32 this.manager
= manager
;