ludc
2024-09-14 36c2449aec5b51e5ed4e5c6841154b746060e09a
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
42
43
44
45
package com.vci.client.omd.lifecycle.ui;
 
import java.util.ArrayList;
import java.util.List;
 
import com.vci.client.omd.lifecycle.LifeCycleStart;
import com.vci.corba.omd.lcm.LifeCycle;
 
public class LifeCycleList{
/**
     * 
     */
    private static final long serialVersionUID = 1L;
    List<String> list = new ArrayList<String>();
//    @SuppressWarnings("rawtypes")
//    public LifeCycleList() throws DocumentException {
//        LifeCycle();
//    }
    
    public String[] getLifeCycles(){
        try {
            LifeCycle[] lifeCyles = LifeCycleStart.getService().getLifeCycles();
            for(int i=0;i<lifeCyles.length;i++){
                String name = lifeCyles[i].name;
                list.add(name);
            }
            return list.toArray(new String[0]);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return null;
    }
    
    //add by zhouhui
    public static void main(String[] args){
//        try {
//            LifeCycleList l = new LifeCycleList();
//            DataInjected.getInstance().setLCyleNames(l.LifeCycle());
//        } catch (DocumentException e) {
//            // TODO Auto-generated catch block
//            e.printStackTrace();
//        }
    }    
}