KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > deploy > DeploymentStatus


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.appserv.management.deploy;
24
25 import java.util.Map JavaDoc;
26 import java.util.List JavaDoc;
27 import java.util.Iterator JavaDoc;
28 import java.io.Serializable JavaDoc;
29
30 import com.sun.appserv.management.base.OperationStatus;
31
32 /**
33     Final status of a deployment.
34     
35     See {@link com.sun.appserv.management.deploy.DeploymentMgr}.getFinalDeploymentStatus()
36  */

37 public interface DeploymentStatus extends OperationStatus
38 {
39     /**
40         Value of the MapCapable.MAP_CAPABLE_CLASS_NAME_KEY when turned into a Map.
41      */

42     public final static String JavaDoc DEPLOYMENT_STATUS_CLASS_NAME =
43             "com.sun.appserv.management.deploy.DeploymentStatus";
44     
45     /**
46         Status code indicating failure due to improper initialization.
47      */

48     public final int STATUS_CODE_NOT_INITIALIZED = 0;
49     
50     
51     public static final String JavaDoc STAGE_STATUS_KEY = STATUS_CODE_KEY;
52     
53     public static final String JavaDoc STAGE_STATUS_MESSAGE_KEY = "StageStatusMessage";
54     
55     public static final String JavaDoc SUB_STAGES_KEY = "SubStages";
56     
57     public static final String JavaDoc STAGE_THROWABLE_KEY = THROWABLE_KEY;
58     
59     public static final String JavaDoc STAGE_DESCRIPTION_KEY = "StageDescription";
60     
61     public static final String JavaDoc PARENT_KEY = "Parent";
62
63     public static final String JavaDoc ADDITIONAL_STATUS_KEY = "AdditionalStatus";
64     
65         /**
66           * Key within the Map of AdditionalStatus.
67           * The unique module id of the deployed component.
68           */

69     public static final String JavaDoc MODULE_ID_KEY = "ModuleID";
70
71     /**
72         Get the sub stages for this deployment status, each of
73         which has been converted into a Map<String,Serializable>.
74         This method is included for backward compatibility; please
75         use {@link #getSubStagesList} instead.
76         @return an Iterator for the sub stages
77         @deprecated
78      */

79     public Iterator JavaDoc<Map JavaDoc<String JavaDoc,Serializable JavaDoc>> getSubStages();
80     
81     /**
82         Get the sub stages for this deployment status.
83         The list may not be modified.
84         @return List&lt;DeploymentStatus>
85      */

86     public List JavaDoc<DeploymentStatus> getSubStagesList();
87     
88     /**
89         Legal status codes include:
90         <ul>
91         <li>OperationStatus#STATUS_CODE_SUCCESS</li>
92         <li>OperationStatus#STATUS_CODE_FAILURE</li>
93         <li>OperationStatus#STATUS_CODE_WARNING</li>
94         <li>#STATUS_CODE_NOT_INITIALIZED</li>
95         </ul>
96         @return the status for this stage (ignoring sub stages status)
97      */

98     public int getStageStatus();
99         
100     /**
101      * @return a meaningful i18ned reason for failure or warning
102      */

103     public String JavaDoc getStageStatusMessage();
104     
105     /**
106      * @return the exception if an exception was thrown during
107      * the execution of the stage
108      */

109     public Throwable JavaDoc getStageThrowable();
110
111     /**
112      * @return a meaningful i18ned stage description
113      */

114     public String JavaDoc getStageDescription();
115
116     /**
117      * @return the map storing additional properties for this status
118      */

119     public Map JavaDoc<String JavaDoc,Serializable JavaDoc> getAdditionalStatus();
120
121     /**
122      * @return the parent status for this status if any
123      */

124     public DeploymentStatus getParent();
125
126     /**
127      * set the parent status for this status if any
128      * @param parent DeploymentStatus
129      */

130     public void setParent( DeploymentStatus parent );
131 }
132
133
134
135
136
137
Popular Tags