001: /*
002: * BEGIN_HEADER - DO NOT EDIT
003: *
004: * The contents of this file are subject to the terms
005: * of the Common Development and Distribution License
006: * (the "License"). You may not use this file except
007: * in compliance with the License.
008: *
009: * You can obtain a copy of the license at
010: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011: * See the License for the specific language governing
012: * permissions and limitations under the License.
013: *
014: * When distributing Covered Code, include this CDDL
015: * HEADER in each file and include the License file at
016: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017: * If applicable add the following below this CDDL HEADER,
018: * with the fields enclosed by brackets "[]" replaced with
019: * your own identifying information: Portions Copyright
020: * [year] [name of copyright owner]
021: */
022:
023: /*
024: * @(#)EndpointInformation.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: package com.sun.esb.management.common.data;
030:
031: import java.io.Serializable;
032:
033: /**
034: * Provides Endpoint Information
035: *
036: * @author graj
037: */
038: public class EndpointInformation implements Serializable {
039: static final long serialVersionUID = -1L;
040:
041: String endpointName;
042:
043: String serviceUnitName;
044:
045: String componentName;
046:
047: String status;
048:
049: /** missing application variables */
050: String[] missingAppVars;
051:
052: /** missing application configurations */
053: String[] missingAppConfigs;
054:
055: /**
056: *
057: */
058: public EndpointInformation() {
059: // TODO Auto-generated constructor stub
060: }
061:
062: /**
063: * @return the endpointName
064: */
065: public String getEndpointName() {
066: return this .endpointName;
067: }
068:
069: /**
070: * @param endpointName
071: * the endpointName to set
072: */
073: public void setEndpointName(String endpointName) {
074: this .endpointName = endpointName;
075: }
076:
077: /**
078: * @return the serviceUnitName
079: */
080: public String getServiceUnitName() {
081: return this .serviceUnitName;
082: }
083:
084: /**
085: * @param serviceUnitName
086: * the serviceUnitName to set
087: */
088: public void setServiceUnitName(String serviceUnitName) {
089: this .serviceUnitName = serviceUnitName;
090: }
091:
092: /**
093: * @return the componentName
094: */
095: public String getComponentName() {
096: return this .componentName;
097: }
098:
099: /**
100: * @param componentName
101: * the componentName to set
102: */
103: public void setComponentName(String componentName) {
104: this .componentName = componentName;
105: }
106:
107: /**
108: * @return the status
109: */
110: public String getStatus() {
111: return this .status;
112: }
113:
114: /**
115: * @param status
116: * the status to set
117: */
118: public void setStatus(String status) {
119: this .status = status;
120: }
121:
122: /**
123: * @return the missing application variables list
124: */
125: public String[] getMissingApplicationVariables() {
126: return this .missingAppVars;
127: }
128:
129: /**
130: * Sets missing application variables
131: * @param the list of missing application variables
132: */
133: public void setMissingApplicationVariables(String[] appvars) {
134: this .missingAppVars = appvars;
135: }
136:
137: /**
138: * @return the missing application configuration list
139: */
140: public String[] getMissingApplicationConfigurations() {
141: return this .missingAppConfigs;
142: }
143:
144: /**
145: * Sets missing application configuration list
146: * @param appConfigs missing application configurations
147: */
148: public void setMissingApplicationConfigurations(String[] appConfigs) {
149: this .missingAppConfigs = appConfigs;
150: }
151:
152: /**
153: * Return a displayable string of values
154: * @return
155: */
156: public String getDisplayString() {
157: StringBuffer buffer = new StringBuffer();
158: buffer.append("\n Endpoint Name" + "=" + this .endpointName);
159: buffer.append("\n Service Unit Name" + "="
160: + this .getServiceUnitName());
161: buffer.append("\n Component Name" + "="
162: + this .getComponentName());
163: buffer.append("\n Status" + "=" + this .getStatus());
164:
165: if (this .getMissingApplicationVariables() != null
166: && this .getMissingApplicationVariables().length > 0) {
167: String[] missingVars = this
168: .getMissingApplicationVariables();
169: buffer.append("\n Missing Application Variables:\n");
170: for (int i = 0; i < missingVars.length; i++)
171: buffer.append("\n\t " + missingVars[i]);
172: }
173:
174: if (this .getMissingApplicationConfigurations() != null
175: && this .getMissingApplicationConfigurations().length > 0) {
176: String[] missingConfigs = this
177: .getMissingApplicationConfigurations();
178: buffer
179: .append("\n Missing Application Configurations :\n");
180: for (int i = 0; i < missingConfigs.length; i++)
181: buffer.append("\n\t " + missingConfigs[i]);
182: }
183:
184: buffer.append("\n");
185: return buffer.toString();
186: }
187:
188: }
|