From c85dc62591ab2ce9eec3fd93004ba474f7b1fb19 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Wed, 9 Apr 2014 23:17:03 +0200 Subject: Expanded server predefined steps to include server and agent maintenance steps. Fixes #174 --- .../predefined/ServerPredefinedStepContainer.java | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src/main/java/com/c2kernel/lifecycle/instance/predefined/ServerPredefinedStepContainer.java') diff --git a/src/main/java/com/c2kernel/lifecycle/instance/predefined/ServerPredefinedStepContainer.java b/src/main/java/com/c2kernel/lifecycle/instance/predefined/ServerPredefinedStepContainer.java index d11c05b..667ae5d 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/predefined/ServerPredefinedStepContainer.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/predefined/ServerPredefinedStepContainer.java @@ -3,6 +3,11 @@ package com.c2kernel.lifecycle.instance.predefined; import com.c2kernel.graph.model.GraphPoint; import com.c2kernel.lifecycle.instance.predefined.entitycreation.CreateNewAgent; import com.c2kernel.lifecycle.instance.predefined.entitycreation.CreateNewItem; +import com.c2kernel.lifecycle.instance.predefined.server.AddDomainContext; +import com.c2kernel.lifecycle.instance.predefined.server.RemoveAgent; +import com.c2kernel.lifecycle.instance.predefined.server.RemoveDomainContext; +import com.c2kernel.lifecycle.instance.predefined.server.SetAgentPassword; +import com.c2kernel.lifecycle.instance.predefined.server.SetAgentRoles; /************************************************************************** * @@ -21,18 +26,22 @@ public class ServerPredefinedStepContainer extends PredefinedStepContainer { public void createChildren() { super.createChildren(); - serverPredInit("CreateNewItem", "Creates a new Item in this Server without description.", new CreateNewItem(), "NewItem"); - serverPredInit("CreateNewAgent", "Creates a new Agent in this Server without description.", new CreateNewAgent(), "NewAgent"); + serverPredInit("CreateNewItem", "Creates a new Item in this Server without description.", new CreateNewItem()); + serverPredInit("CreateNewAgent", "Creates a new Agent in this Server without description.", new CreateNewAgent()); + serverPredInit("RemoveDomainContext", "Deletes an existing context in the domain tree, but only if empty", new RemoveDomainContext()); + serverPredInit("AddDomainContext", "Creates an empty domain context in the tree", new AddDomainContext()); + //TODO: remove the following when agents have workflows + serverPredInit("RemoveAgent", "Deletes the named Agent in this Server.", new RemoveAgent()); + serverPredInit("SetAgentPassword", "Changes the named Agent's password in this Server.", new SetAgentPassword()); + serverPredInit("SetAgentRoles", "Sets the roles of the named Agent.", new SetAgentRoles()); } - public void serverPredInit(String alias, String Description, PredefinedStep act, String schema) + public void serverPredInit(String alias, String Description, PredefinedStep act) { act.setName(alias); act.setType(alias); act.getProperties().put("Description", Description); - act.getProperties().put("SchemaType", schema); - act.getProperties().put("SchemaVersion", "0"); - act.getProperties().put("AgentRole", "Admin"); + act.getProperties().put("Agent Role", "Admin"); act.setCentrePoint(new GraphPoint()); act.setIsPredefined(true); addChild(act, new GraphPoint(100, 75 * ++num)); -- cgit v1.2.3