summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lifecycle/instance/predefined/server/ServerPredefinedStepContainer.java
blob: 412c468b5bada339f28f547b71d6976156daeed1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.c2kernel.lifecycle.instance.predefined.server;

import com.c2kernel.graph.model.GraphPoint;
import com.c2kernel.lifecycle.instance.predefined.PredefinedStep;
import com.c2kernel.lifecycle.instance.predefined.PredefinedStepContainer;

/**************************************************************************
 *
 * $Revision: 1.2 $
 * $Date: 2005/06/02 10:19:33 $
 *
 * Copyright (C) 2003 CERN - European Organization for Nuclear Research
 * All rights reserved.
 **************************************************************************/

//    public static final String codeRevision = "$Revision: 1.2 $ $Date: 2005/06/02 10:19:33 $ $Author: abranson $";
public class ServerPredefinedStepContainer extends PredefinedStepContainer {


    @Override
	public void createChildren()
    {
        super.createChildren();
        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());
    }

    public void serverPredInit(String alias, String Description, PredefinedStep act)
    {
        act.setName(alias);
        act.setType(alias);
        act.getProperties().put("Description", Description);
        act.getProperties().put("Agent Role", "Admin");
        act.setCentrePoint(new GraphPoint());
        act.setIsPredefined(true);
        addChild(act, new GraphPoint(100, 75 * ++num));
    }

}