Source Code Cross Referenced for JBIAdminCommandsUIMBeanImpl.java in  » ESB » open-esb » com » sun » jbi » ui » runtime » mbeans » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ESB » open esb » com.sun.jbi.ui.runtime.mbeans 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * BEGIN_HEADER - DO NOT EDIT
0003:         *
0004:         * The contents of this file are subject to the terms
0005:         * of the Common Development and Distribution License
0006:         * (the "License").  You may not use this file except
0007:         * in compliance with the License.
0008:         *
0009:         * You can obtain a copy of the license at
0010:         * https://open-esb.dev.java.net/public/CDDLv1.0.html.
0011:         * See the License for the specific language governing
0012:         * permissions and limitations under the License.
0013:         *
0014:         * When distributing Covered Code, include this CDDL
0015:         * HEADER in each file and include the License file at
0016:         * https://open-esb.dev.java.net/public/CDDLv1.0.html.
0017:         * If applicable add the following below this CDDL HEADER,
0018:         * with the fields enclosed by brackets "[]" replaced with
0019:         * your own identifying information: Portions Copyright
0020:         * [year] [name of copyright owner]
0021:         */
0022:
0023:        /*
0024:         * @(#)JBIAdminCommandsUIMBeanImpl.java
0025:         * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
0026:         *
0027:         * END_HEADER - DO NOT EDIT
0028:         */
0029:        package com.sun.jbi.ui.runtime.mbeans;
0030:
0031:        import java.io.IOException;
0032:        import java.net.MalformedURLException;
0033:        import java.net.URISyntaxException;
0034:        import java.util.Map;
0035:        import java.util.Properties;
0036:        import java.util.TreeMap;
0037:        import java.util.concurrent.ConcurrentHashMap;
0038:        import java.util.logging.Level;
0039:
0040:        import javax.management.ObjectName;
0041:        import javax.management.openmbean.CompositeData;
0042:        import javax.management.openmbean.CompositeType;
0043:        import javax.management.openmbean.TabularData;
0044:        import javax.xml.parsers.ParserConfigurationException;
0045:
0046:        import org.xml.sax.SAXException;
0047:
0048:        import com.sun.esb.management.api.administration.AdministrationService;
0049:        import com.sun.esb.management.api.runtime.RuntimeManagementService;
0050:        import com.sun.esb.management.common.ManagementRemoteException;
0051:        import com.sun.esb.management.common.data.ApplicationVerificationReport;
0052:        import com.sun.esb.management.common.data.ComponentStatisticsData;
0053:        import com.sun.esb.management.common.data.EndpointStatisticsData;
0054:        import com.sun.esb.management.common.data.FrameworkStatisticsData;
0055:        import com.sun.esb.management.common.data.IEndpointStatisticsData;
0056:        import com.sun.esb.management.common.data.NMRStatisticsData;
0057:        import com.sun.esb.management.common.data.ServiceAssemblyStatisticsData;
0058:        import com.sun.esb.management.common.data.helper.ApplicationVerificationReportReader;
0059:        import com.sun.esb.management.common.data.helper.ComponentStatisticsDataReader;
0060:        import com.sun.esb.management.common.data.helper.EndpointStatisticsDataReader;
0061:        import com.sun.esb.management.common.data.helper.FrameworkStatisticsDataReader;
0062:        import com.sun.esb.management.common.data.helper.NMRStatisticsDataReader;
0063:        import com.sun.esb.management.common.data.helper.ServiceAssemblyStatisticsDataReader;
0064:        import com.sun.jbi.EnvironmentContext;
0065:        import com.sun.jbi.ui.common.JBIArchive;
0066:        import com.sun.jbi.ui.common.JBIManagementMessage;
0067:        import com.sun.jbi.ui.common.JBIRemoteException;
0068:        import com.sun.jbi.ui.common.ServiceAssemblyDD;
0069:
0070:        /**
0071:         * This class is an implementation of the JBIAdminCommandsUIMBean interface and
0072:         * the implemenation of the JBIAdminCommands interface on the server side.
0073:         * 
0074:         * @author graj
0075:         */
0076:        public class JBIAdminCommandsUIMBeanImpl extends AbstractUIMBeanImpl
0077:                implements  JBIAdminCommandsUIMBean {
0078:
0079:            private static final String NO_OPERATION = "Not Implemented";
0080:
0081:            private final static String LOG_LEVEL_KEY = "LogLevel";
0082:
0083:            private final static String LOGGER_NAME_KEY = "LoggerName";
0084:
0085:            /**
0086:             * constructor
0087:             * 
0088:             * @param anEnvContext
0089:             */
0090:            public JBIAdminCommandsUIMBeanImpl(EnvironmentContext anEnvContext) {
0091:                super (anEnvContext);
0092:
0093:            }
0094:
0095:            /**
0096:             * deploys service assembly
0097:             * 
0098:             * @return result as a management message xml text
0099:             * @param zipFilePath
0100:             *            fie path
0101:             * @param targetName
0102:             * @throws JBIRemoteException
0103:             *             on error
0104:             * 
0105:             * @see com.sun.jbi.ui.common.JBIAdminCommands#deployServiceAssembly(java.lang.String,
0106:             *      java.lang.String)
0107:             */
0108:            public String deployServiceAssembly(String zipFilePath,
0109:                    String targetName) throws JBIRemoteException {
0110:                String resultObject = null;
0111:
0112:                resultObject = this .getDeploymentService()
0113:                        .deployServiceAssembly(zipFilePath, targetName);
0114:                return resultObject;
0115:            }
0116:
0117:            /**
0118:             * Retrieve the Service Assembly Name
0119:             * 
0120:             * @param zipFilePath
0121:             * @return the name of the Service Assembly or null
0122:             */
0123:            String validateServiceAssembly(String zipFilePath) {
0124:                JBIArchive archive = null;
0125:                ServiceAssemblyDD descriptor = null;
0126:                String name = null;
0127:
0128:                try {
0129:                    archive = new JBIArchive(zipFilePath);
0130:                    if (archive.isServiceAssemblyArchive() == true) {
0131:                        descriptor = (ServiceAssemblyDD) archive
0132:                                .getJbiDescriptor();
0133:                        name = descriptor.getName();
0134:                    }
0135:                } catch (IOException ioException) {
0136:                } catch (Exception exception) {
0137:                }
0138:
0139:                return name;
0140:            }
0141:
0142:            /**
0143:             * deploys service assembly
0144:             * 
0145:             * @param zipFilePath
0146:             *            fie path
0147:             * @param targetNames
0148:             * @return result as a management message xml text [targetName,xmlString]
0149:             *         map
0150:             * @throws JBIRemoteException
0151:             *             on error
0152:             * 
0153:             * @see com.sun.jbi.ui.common.JBIAdminCommands#deployServiceAssembly(java.lang.String,
0154:             *      java.lang.String[])
0155:             */
0156:            public Map<String, String> deployServiceAssembly(
0157:                    String zipFilePath, String[] targetNames)
0158:                    throws JBIRemoteException {
0159:                String xmlString = null;
0160:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
0161:                for (int index = 0; index < targetNames.length; index++) {
0162:                    try {
0163:                        xmlString = this .deployServiceAssembly(zipFilePath,
0164:                                targetNames[index]);
0165:                        if (xmlString != null) {
0166:                            result.putIfAbsent(targetNames[index], xmlString);
0167:                        }
0168:                    } catch (JBIRemoteException exception) {
0169:                        xmlString = this .getStackTrace(exception);
0170:                        result.putIfAbsent(targetNames[index], xmlString);
0171:                    }
0172:                }
0173:                return (Map<String, String>) result;
0174:            }
0175:
0176:            /**
0177:             * Retrieve the Component Installation descriptor for the server target.
0178:             * 
0179:             * The Installation descriptor will never be different for a component name
0180:             * in a JBI system because there's only one component allowed with that same
0181:             * name. Therefore, this implies a registry lookup for the server target.
0182:             * 
0183:             * @param Component
0184:             *            name as a string
0185:             * @return the Component Installation descriptor as a string
0186:             * @throws JBIRemoteException
0187:             *             on error
0188:             * 
0189:             * @see com.sun.jbi.ui.common.JBIAdminCommands#getComponentInstallationDescriptor(java.lang.String)
0190:             */
0191:            public String getComponentInstallationDescriptor(
0192:                    String componentName) throws JBIRemoteException {
0193:                String resultObject = null;
0194:                AdministrationService administrationService = this 
0195:                        .getAdministrationService();
0196:                resultObject = administrationService
0197:                        .getComponentInstallationDescriptor(componentName);
0198:                return resultObject;
0199:            }
0200:
0201:            /**
0202:             * Retrieve the Service Assembly Deployment descriptor for the domain
0203:             * target.
0204:             * 
0205:             * The deployment descriptor will never be different for a service assembly
0206:             * name in a JBI system because there's only one Service Assembly allowed
0207:             * with that same name. Therefore, this implies a registry lookup for the
0208:             * domain target.
0209:             * 
0210:             * @param service
0211:             *            assembly name as a string
0212:             * @return the service assembly deployment descriptor as a string
0213:             * @throws JBIRemoteException
0214:             *             on error
0215:             * 
0216:             * @see com.sun.jbi.ui.common.JBIAdminCommands#getServiceAssemblyDeploymentDescriptor(java.lang.String)
0217:             */
0218:            public String getServiceAssemblyDeploymentDescriptor(
0219:                    String serviceAssemblyName) throws JBIRemoteException {
0220:                String resultObject = null;
0221:                AdministrationService administrationService = this 
0222:                        .getAdministrationService();
0223:                resultObject = administrationService
0224:                        .getServiceAssemblyDeploymentDescriptor(serviceAssemblyName);
0225:                return resultObject;
0226:            }
0227:
0228:            /**
0229:             * Retrieve the Shared Library Installation descriptor for the server
0230:             * target.
0231:             * 
0232:             * The Installation descriptor will never be different for a Shared Library
0233:             * name in a JBI system because there's only one Shared Library allowed with
0234:             * that same name. Therefore, this implies a registry lookup for the server
0235:             * target.
0236:             * 
0237:             * @param Shared
0238:             *            Library name as a string
0239:             * @return the Shared Library Installation descriptor as a string
0240:             * @throws JBIRemoteException
0241:             *             on error
0242:             * 
0243:             * @see com.sun.jbi.ui.common.JBIAdminCommands#getSharedLibraryInstallationDescriptor(java.lang.String)
0244:             */
0245:            public String getSharedLibraryInstallationDescriptor(
0246:                    String sharedLibraryName) throws JBIRemoteException {
0247:                String resultObject = null;
0248:                AdministrationService administrationService = this 
0249:                        .getAdministrationService();
0250:                resultObject = administrationService
0251:                        .getSharedLibraryInstallationDescriptor(sharedLibraryName);
0252:                return resultObject;
0253:            }
0254:
0255:            /**
0256:             * Returns the jbi.xml Deployment Descriptor for a Service Unit.
0257:             * 
0258:             * @param the
0259:             *            name of the Service Assembly
0260:             * @param the
0261:             *            name of the Service Unit
0262:             * @return the jbi.xml deployment descriptor of the archive
0263:             * @throws JBIRemoteException
0264:             *             if error or exception occurs.
0265:             */
0266:            public String getServiceUnitDeploymentDescriptor(
0267:                    String serviceAssemblyName, String serviceUnitName)
0268:                    throws JBIRemoteException {
0269:                String resultObject = null;
0270:                AdministrationService administrationService = this 
0271:                        .getAdministrationService();
0272:                resultObject = administrationService
0273:                        .getServiceUnitDeploymentDescriptor(
0274:                                serviceAssemblyName, serviceUnitName);
0275:                return resultObject;
0276:            }
0277:
0278:            /**
0279:             * installs component ( service engine, binding component)
0280:             * 
0281:             * @return name of the component.
0282:             * @param paramProps
0283:             *            Properties object contains name/value pair.
0284:             * @param zipFilePath
0285:             *            archive file in a zip format
0286:             * @param targetName
0287:             * @throws JBIRemoteException
0288:             *             on error
0289:             * 
0290:             * @see com.sun.jbi.ui.common.JBIAdminCommands#installComponent(java.lang.String,
0291:             *      java.util.Properties, java.lang.String)
0292:             */
0293:            public String installComponent(String zipFilePath,
0294:                    Properties paramProps, String targetName)
0295:                    throws JBIRemoteException {
0296:                String resultObject = null;
0297:
0298:                resultObject = this .getInstallationService().installComponent(
0299:                        zipFilePath, paramProps, targetName);
0300:                return resultObject;
0301:            }
0302:
0303:            /**
0304:             * installs component ( service engine, binding component)
0305:             * 
0306:             * @return name of the component.
0307:             * @param zipFilePath
0308:             *            archive file in a zip format
0309:             * @param targetName
0310:             * @throws JBIRemoteException
0311:             *             on error
0312:             * 
0313:             * @see com.sun.jbi.ui.common.JBIAdminCommands#installComponent(java.lang.String,
0314:             *      java.lang.String)
0315:             */
0316:            public String installComponent(String zipFilePath, String targetName)
0317:                    throws JBIRemoteException {
0318:                Properties params = new Properties();
0319:                return this .installComponent(zipFilePath, params, targetName);
0320:            }
0321:
0322:            /**
0323:             * installs component ( service engine, binding component)
0324:             * 
0325:             * @return name of the component as map of [targetName,string].
0326:             * @param paramProps
0327:             *            Properties object contains name/value pair.
0328:             * @param zipFilePath
0329:             *            archive file in a zip format
0330:             * @param targetNames
0331:             * @throws JBIRemoteException
0332:             *             on error
0333:             * 
0334:             * @see com.sun.jbi.ui.common.JBIAdminCommands#installComponent(java.lang.String,
0335:             *      java.util.Properties, java.lang.String[])
0336:             */
0337:            public Map<String, String> installComponent(String zipFilePath,
0338:                    Properties paramProps, String[] targetNames)
0339:                    throws JBIRemoteException {
0340:
0341:                String xmlString = null;
0342:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
0343:                for (int index = 0; index < targetNames.length; index++) {
0344:                    try {
0345:                        xmlString = this .installComponent(zipFilePath,
0346:                                paramProps, targetNames[index]);
0347:                        if (xmlString != null) {
0348:                            result.putIfAbsent(targetNames[index], xmlString);
0349:                        }
0350:                    } catch (JBIRemoteException exception) {
0351:                        xmlString = this .getStackTrace(exception);
0352:                        result.putIfAbsent(targetNames[index], xmlString);
0353:                    }
0354:
0355:                }
0356:                return (Map<String, String>) result;
0357:            }
0358:
0359:            /**
0360:             * installs component ( service engine, binding component)
0361:             * 
0362:             * @return name of the component as map of [targetName,string].
0363:             * @param paramProps
0364:             *            Properties object contains name/value pair.
0365:             * @param zipFilePath
0366:             *            archive file in a zip format
0367:             * @param targetNames
0368:             * @throws JBIRemoteException
0369:             *             on error
0370:             * 
0371:             * @see com.sun.jbi.ui.common.JBIAdminCommands#installComponent(java.lang.String,
0372:             *      java.lang.String[])
0373:             */
0374:            public Map<String, String> installComponent(String zipFilePath,
0375:                    String[] targetNames) throws JBIRemoteException {
0376:
0377:                String xmlString = null;
0378:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
0379:                for (int index = 0; index < targetNames.length; index++) {
0380:                    try {
0381:                        xmlString = this .installComponent(zipFilePath,
0382:                                targetNames[index]);
0383:                        if (xmlString != null) {
0384:                            result.putIfAbsent(targetNames[index], xmlString);
0385:                        }
0386:                    } catch (JBIRemoteException exception) {
0387:                        xmlString = this .getStackTrace(exception);
0388:                        result.putIfAbsent(targetNames[index], xmlString);
0389:                    }
0390:
0391:                }
0392:                return (Map<String, String>) result;
0393:
0394:            }
0395:
0396:            /**
0397:             * installs shared library
0398:             * 
0399:             * @return shared library name.
0400:             * @param zipFilePath
0401:             *            archive file in a zip format
0402:             * @param targetName
0403:             * @throws JBIRemoteException
0404:             *             on error
0405:             * 
0406:             * @see com.sun.jbi.ui.common.JBIAdminCommands#installSharedLibrary(java.lang.String,
0407:             *      java.lang.String)
0408:             */
0409:            public String installSharedLibrary(String zipFilePath,
0410:                    String targetName) throws JBIRemoteException {
0411:                String resultObject = null;
0412:
0413:                resultObject = this .getInstallationService()
0414:                        .installSharedLibrary(zipFilePath, targetName);
0415:                return resultObject;
0416:            }
0417:
0418:            /**
0419:             * installs shared library
0420:             * 
0421:             * @param zipFilePath
0422:             *            archive file in a zip format
0423:             * @param targetNames
0424:             * @return shared library name as map of [targetName,string].
0425:             * @throws JBIRemoteException
0426:             *             on error
0427:             * 
0428:             * @see com.sun.jbi.ui.common.JBIAdminCommands#installSharedLibrary(java.lang.String,
0429:             *      java.lang.String[])
0430:             */
0431:            public Map<String, String> installSharedLibrary(String zipFilePath,
0432:                    String[] targetNames) throws JBIRemoteException {
0433:
0434:                String xmlString = null;
0435:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
0436:                for (int index = 0; index < targetNames.length; index++) {
0437:                    try {
0438:                        xmlString = this .installSharedLibrary(zipFilePath,
0439:                                targetNames[index]);
0440:                        if (xmlString != null) {
0441:                            result.putIfAbsent(targetNames[index], xmlString);
0442:                        }
0443:                    } catch (JBIRemoteException exception) {
0444:                        xmlString = this .getStackTrace(exception);
0445:                        result.putIfAbsent(targetNames[index], xmlString);
0446:                    }
0447:                }
0448:                return (Map<String, String>) result;
0449:
0450:            }
0451:
0452:            /*
0453:             * (non-Javadoc)
0454:             * 
0455:             * @see com.sun.jbi.ui.common.JBIAdminCommands#isJBIRuntimeEnabled()
0456:             */
0457:            public boolean isJBIRuntimeEnabled() throws JBIRemoteException {
0458:                boolean resultObject = false;
0459:                AdministrationService administrationService = this 
0460:                        .getAdministrationService();
0461:                resultObject = administrationService.isJBIRuntimeEnabled();
0462:                return resultObject;
0463:            }
0464:
0465:            /**
0466:             * return component info xml text that has only binding component infos.
0467:             * 
0468:             * @param targetName
0469:             * @return the component info xml text.
0470:             * @throws JBIRemoteException
0471:             *             on error
0472:             * 
0473:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listBindingComponents(java.lang.String)
0474:             */
0475:            public String listBindingComponents(String targetName)
0476:                    throws JBIRemoteException {
0477:                String resultObject = null;
0478:                RuntimeManagementService runtimeManagementService = this 
0479:                        .getRuntimeManagementService();
0480:                resultObject = runtimeManagementService
0481:                        .listBindingComponents(targetName);
0482:                return resultObject;
0483:            }
0484:
0485:            /**
0486:             * return component info xml text that has only binding component infos
0487:             * which satisfies the options passed to the method.
0488:             * 
0489:             * @param state
0490:             *            return all the binding components that are in the specified
0491:             *            state. valid states are JBIComponentInfo.STARTED, STOPPED,
0492:             *            INSTALLED or null for ANY state
0493:             * @param sharedLibraryName
0494:             *            return all the binding components that have a dependency on
0495:             *            the specified shared library. null value to ignore this
0496:             *            option.
0497:             * @param serviceAssemblyName
0498:             *            return all the binding components that have the specified
0499:             *            service assembly deployed on them. null value to ignore this
0500:             *            option.
0501:             * @param targetName
0502:             * @return xml text contain the list of binding component infos
0503:             * @throws JBIRemoteException
0504:             *             if error or exception occurs.
0505:             * 
0506:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listBindingComponents(java.lang.String,
0507:             *      java.lang.String, java.lang.String, java.lang.String)
0508:             */
0509:            public String listBindingComponents(String state,
0510:                    String sharedLibraryName, String serviceAssemblyName,
0511:                    String targetName) throws JBIRemoteException {
0512:                String resultObject = null;
0513:
0514:                resultObject = this .getRuntimeManagementService()
0515:                        .listBindingComponents(state, sharedLibraryName,
0516:                                serviceAssemblyName, targetName);
0517:                return resultObject;
0518:            }
0519:
0520:            /**
0521:             * return component info xml text that has only binding component infos.
0522:             * 
0523:             * @param targetNames
0524:             * @return the component info xml text as a Map of [targetName, xmlString].
0525:             * @throws JBIRemoteException
0526:             *             on error
0527:             * 
0528:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listBindingComponents(java.lang.String[])
0529:             */
0530:            public Map<String, String> listBindingComponents(
0531:                    String[] targetNames) throws JBIRemoteException {
0532:
0533:                String xmlString = null;
0534:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
0535:                for (int index = 0; index < targetNames.length; index++) {
0536:                    try {
0537:                        xmlString = this 
0538:                                .listBindingComponents(targetNames[index]);
0539:                        if (xmlString != null) {
0540:                            result.putIfAbsent(targetNames[index], xmlString);
0541:                        }
0542:                    } catch (JBIRemoteException exception) {
0543:                        xmlString = this .getStackTrace(exception);
0544:                        result.putIfAbsent(targetNames[index], xmlString);
0545:                    }
0546:                }
0547:                return (Map<String, String>) result;
0548:
0549:            }
0550:
0551:            /**
0552:             * return component info xml text that has only binding component infos
0553:             * which satisfies the options passed to the method.
0554:             * 
0555:             * @param state
0556:             *            return all the binding components that are in the specified
0557:             *            state. valid states are JBIComponentInfo.STARTED, STOPPED,
0558:             *            INSTALLED or null for ANY state
0559:             * @param sharedLibraryName
0560:             *            return all the binding components that have a dependency on
0561:             *            the specified shared library. null value to ignore this
0562:             *            option.
0563:             * @param serviceAssemblyName
0564:             *            return all the binding components that have the specified
0565:             *            service assembly deployed on them. null value to ignore this
0566:             *            option.
0567:             * @param targetName
0568:             * @return xml text contain the list of binding component infos as map of
0569:             *         [targetName, xmlString]
0570:             * @throws JBIRemoteException
0571:             *             if error or exception occurs.
0572:             * 
0573:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listBindingComponents(java.lang.String,
0574:             *      java.lang.String, java.lang.String, java.lang.String[])
0575:             */
0576:            public Map<String, String> listBindingComponents(String state,
0577:                    String sharedLibraryName, String serviceAssemblyName,
0578:                    String[] targetNames) throws JBIRemoteException {
0579:
0580:                String xmlString = null;
0581:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
0582:                for (int index = 0; index < targetNames.length; index++) {
0583:                    try {
0584:                        xmlString = this .listBindingComponents(state,
0585:                                sharedLibraryName, serviceAssemblyName,
0586:                                targetNames[index]);
0587:                        if (xmlString != null) {
0588:                            result.putIfAbsent(targetNames[index], xmlString);
0589:                        }
0590:                    } catch (JBIRemoteException exception) {
0591:                        xmlString = this .getStackTrace(exception);
0592:                        result.putIfAbsent(targetNames[index], xmlString);
0593:                    }
0594:                }
0595:                return (Map<String, String>) result;
0596:
0597:            }
0598:
0599:            /**
0600:             * returns a list of Service Assembly Infos in a xml format.
0601:             * 
0602:             * @param targetName
0603:             * @return xml text containing the Service Assembly infos
0604:             * @throws JBIRemoteException
0605:             *             on error
0606:             * 
0607:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listServiceAssemblies(java.lang.String)
0608:             */
0609:            public String listServiceAssemblies(String targetName)
0610:                    throws JBIRemoteException {
0611:                String resultObject = null;
0612:                resultObject = this .getRuntimeManagementService()
0613:                        .listServiceAssemblies(targetName);
0614:                return resultObject;
0615:            }
0616:
0617:            /**
0618:             * returns the list of service asssembly infos in a xml format that have the
0619:             * service unit deployed on the specified component.
0620:             * 
0621:             * @param componentName
0622:             *            to list all the service assemblies that have some deployments
0623:             *            on this component.
0624:             * @param targetName
0625:             * @return xml string contain the list of service assembly infos
0626:             * @throws JBIRemoteException
0627:             *             if error or exception occurs.
0628:             * 
0629:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listServiceAssemblies(java.lang.String,
0630:             *      java.lang.String)
0631:             */
0632:            public String listServiceAssemblies(String componentName,
0633:                    String targetName) throws JBIRemoteException {
0634:                String resultObject = null;
0635:                resultObject = this .getRuntimeManagementService()
0636:                        .listServiceAssemblies(componentName, targetName);
0637:                return resultObject;
0638:            }
0639:
0640:            /**
0641:             * returns the list of service asssembly infos in a xml format that have the
0642:             * service unit deployed on the specified component.
0643:             * 
0644:             * @param state
0645:             *            to return all the service assemblies that are in the specified
0646:             *            state. JBIServiceAssemblyInfo.STARTED, STOPPED, SHUTDOWN or
0647:             *            null for ANY state
0648:             * @param componentName
0649:             *            to list all the service assemblies that have some deployments
0650:             *            on this component.
0651:             * @param targetName
0652:             * @return xml string contain the list of service assembly infos
0653:             * @throws JBIRemoteException
0654:             *             if error or exception occurs.
0655:             * 
0656:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listServiceAssemblies(java.lang.String,
0657:             *      java.lang.String, java.lang.String)
0658:             */
0659:            public String listServiceAssemblies(String state,
0660:                    String componentName, String targetName)
0661:                    throws JBIRemoteException {
0662:                String resultObject = null;
0663:                resultObject = this 
0664:                        .getRuntimeManagementService()
0665:                        .listServiceAssemblies(state, componentName, targetName);
0666:                return resultObject;
0667:            }
0668:
0669:            /**
0670:             * returns a list of Service Assembly Infos in a xml format.
0671:             * 
0672:             * @param targetNames
0673:             * @return xml text containing the Service Assembly infos as map of
0674:             *         [targetName, xmlString]
0675:             * @throws JBIRemoteException
0676:             *             on error
0677:             * 
0678:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listServiceAssemblies(java.lang.String[])
0679:             */
0680:            public Map<String, String> listServiceAssemblies(
0681:                    String[] targetNames) throws JBIRemoteException {
0682:
0683:                String xmlString = null;
0684:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
0685:                for (int index = 0; index < targetNames.length; index++) {
0686:                    try {
0687:                        xmlString = this 
0688:                                .listServiceAssemblies(targetNames[index]);
0689:                        if (xmlString != null) {
0690:                            result.putIfAbsent(targetNames[index], xmlString);
0691:                        }
0692:                    } catch (JBIRemoteException exception) {
0693:                        xmlString = this .getStackTrace(exception);
0694:                        result.putIfAbsent(targetNames[index], xmlString);
0695:                    }
0696:                }
0697:                return (Map<String, String>) result;
0698:
0699:            }
0700:
0701:            /**
0702:             * returns the list of service asssembly infos in a xml format that have the
0703:             * service unit deployed on the specified component.
0704:             * 
0705:             * @param componentName
0706:             *            to list all the service assemblies that have some deployments
0707:             *            on this component.
0708:             * @param targetNames
0709:             * @return xml string contain the list of service assembly infos as map of
0710:             *         [targetName, xmlString]
0711:             * @throws JBIRemoteException
0712:             *             if error or exception occurs.
0713:             * 
0714:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listServiceAssemblies(java.lang.String,
0715:             *      java.lang.String[])
0716:             */
0717:            public Map<String, String> listServiceAssemblies(
0718:                    String componentName, String[] targetNames)
0719:                    throws JBIRemoteException {
0720:
0721:                String xmlString = null;
0722:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
0723:                for (int index = 0; index < targetNames.length; index++) {
0724:                    try {
0725:                        xmlString = this .listServiceAssemblies(componentName,
0726:                                targetNames[index]);
0727:                        if (xmlString != null) {
0728:                            result.putIfAbsent(targetNames[index], xmlString);
0729:                        }
0730:                    } catch (JBIRemoteException exception) {
0731:                        xmlString = this .getStackTrace(exception);
0732:                        result.putIfAbsent(targetNames[index], xmlString);
0733:                    }
0734:                }
0735:                return (Map<String, String>) result;
0736:
0737:            }
0738:
0739:            /**
0740:             * returns the list of service asssembly infos in a xml format that have the
0741:             * service unit deployed on the specified component.
0742:             * 
0743:             * @param state
0744:             *            to return all the service assemblies that are in the specified
0745:             *            state. JBIServiceAssemblyInfo.STARTED, STOPPED, SHUTDOWN or
0746:             *            null for ANY state
0747:             * @param componentName
0748:             *            to list all the service assemblies that have some deployments
0749:             *            on this component.
0750:             * @param targetNames
0751:             * @return xml string contain the list of service assembly infos as map of
0752:             *         [targetName, xmlString]
0753:             * @throws JBIRemoteException
0754:             *             if error or exception occurs.
0755:             * 
0756:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listServiceAssemblies(java.lang.String,
0757:             *      java.lang.String, java.lang.String[])
0758:             */
0759:            public Map<String, String> listServiceAssemblies(String state,
0760:                    String componentName, String[] targetNames)
0761:                    throws JBIRemoteException {
0762:
0763:                String xmlString = null;
0764:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
0765:                for (int index = 0; index < targetNames.length; index++) {
0766:                    try {
0767:                        xmlString = this .listServiceAssemblies(state,
0768:                                componentName, targetNames[index]);
0769:                        if (xmlString != null) {
0770:                            result.putIfAbsent(targetNames[index], xmlString);
0771:                        }
0772:                    } catch (JBIRemoteException exception) {
0773:                        xmlString = this .getStackTrace(exception);
0774:                        result.putIfAbsent(targetNames[index], xmlString);
0775:                    }
0776:                }
0777:                return (Map<String, String>) result;
0778:
0779:            }
0780:
0781:            /**
0782:             * return component info xml text that has only service engine infos.
0783:             * 
0784:             * @param targetName
0785:             * @return the component info xml text.
0786:             * @throws JBIRemoteException
0787:             *             on error
0788:             * 
0789:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listServiceEngines(java.lang.String)
0790:             */
0791:            public String listServiceEngines(String targetName)
0792:                    throws JBIRemoteException {
0793:                String resultObject = null;
0794:                resultObject = this .getRuntimeManagementService()
0795:                        .listServiceEngines(targetName);
0796:                return resultObject;
0797:            }
0798:
0799:            /**
0800:             * return component info xml text that has only service engine infos which
0801:             * satisfies the options passed to the method.
0802:             * 
0803:             * @param state
0804:             *            return all the service engines that are in the specified
0805:             *            state. valid states are JBIComponentInfo.STARTED, STOPPED,
0806:             *            INSTALLED or null for ANY state
0807:             * @param sharedLibraryName
0808:             *            return all the service engines that have a dependency on the
0809:             *            specified shared library. null value to ignore this option.
0810:             * @param serviceAssemblyName
0811:             *            return all the service engines that have the specified service
0812:             *            assembly deployed on them. null value to ignore this option.
0813:             * @param targetName
0814:             * @return xml text contain the list of service engine component infos
0815:             * @throws JBIRemoteException
0816:             *             if error or exception occurs.
0817:             * 
0818:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listServiceEngines(java.lang.String,
0819:             *      java.lang.String, java.lang.String, java.lang.String)
0820:             */
0821:            public String listServiceEngines(String state,
0822:                    String sharedLibraryName, String serviceAssemblyName,
0823:                    String targetName) throws JBIRemoteException {
0824:                String resultObject = null;
0825:                resultObject = this .getRuntimeManagementService()
0826:                        .listServiceEngines(state, sharedLibraryName,
0827:                                serviceAssemblyName, targetName);
0828:                return resultObject;
0829:            }
0830:
0831:            /**
0832:             * return component info xml text that has only service engine infos.
0833:             * 
0834:             * @param targetName
0835:             * @return the component info xml text as map of [targetName,xmlString].
0836:             * @throws JBIRemoteException
0837:             *             on error
0838:             * 
0839:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listServiceEngines(java.lang.String[])
0840:             */
0841:            public Map<String, String> listServiceEngines(String[] targetNames)
0842:                    throws JBIRemoteException {
0843:
0844:                String xmlString = null;
0845:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
0846:                for (int index = 0; index < targetNames.length; index++) {
0847:                    try {
0848:                        xmlString = this .listServiceEngines(targetNames[index]);
0849:                        if (xmlString != null) {
0850:                            result.putIfAbsent(targetNames[index], xmlString);
0851:                        }
0852:                    } catch (JBIRemoteException exception) {
0853:                        xmlString = this .getStackTrace(exception);
0854:                        result.putIfAbsent(targetNames[index], xmlString);
0855:                    }
0856:                }
0857:                return (Map<String, String>) result;
0858:
0859:            }
0860:
0861:            /**
0862:             * return component info xml text that has only service engine infos which
0863:             * satisfies the options passed to the method.
0864:             * 
0865:             * @param state
0866:             *            return all the service engines that are in the specified
0867:             *            state. valid states are JBIComponentInfo.STARTED, STOPPED,
0868:             *            INSTALLED or null for ANY state
0869:             * @param sharedLibraryName
0870:             *            return all the service engines that have a dependency on the
0871:             *            specified shared library. null value to ignore this option.
0872:             * @param serviceAssemblyName
0873:             *            return all the service engines that have the specified service
0874:             *            assembly deployed on them. null value to ignore this option.
0875:             * @param targetName
0876:             * @return xml text contain the map of service engine component infos as
0877:             *         [targetName, xmlString]
0878:             * @throws JBIRemoteException
0879:             *             if error or exception occurs.
0880:             * 
0881:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listServiceEngines(java.lang.String,
0882:             *      java.lang.String, java.lang.String, java.lang.String[])
0883:             */
0884:            public Map<String, String> listServiceEngines(String state,
0885:                    String sharedLibraryName, String serviceAssemblyName,
0886:                    String[] targetNames) throws JBIRemoteException {
0887:
0888:                String xmlString = null;
0889:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
0890:                for (int index = 0; index < targetNames.length; index++) {
0891:                    try {
0892:                        xmlString = this .listServiceEngines(state,
0893:                                sharedLibraryName, serviceAssemblyName,
0894:                                targetNames[index]);
0895:                        if (xmlString != null) {
0896:                            result.putIfAbsent(targetNames[index], xmlString);
0897:                        }
0898:                    } catch (JBIRemoteException exception) {
0899:                        xmlString = this .getStackTrace(exception);
0900:                        result.putIfAbsent(targetNames[index], xmlString);
0901:                    }
0902:
0903:                }
0904:                return (Map<String, String>) result;
0905:
0906:            }
0907:
0908:            /**
0909:             * return component info xml text that has only shared library infos.
0910:             * 
0911:             * @param targetName
0912:             * @return the component info xml text.
0913:             * @throws JBIRemoteException
0914:             *             on error
0915:             * 
0916:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listSharedLibraries(java.lang.String)
0917:             */
0918:            public String listSharedLibraries(String targetName)
0919:                    throws JBIRemoteException {
0920:                String resultObject = null;
0921:                resultObject = this .getRuntimeManagementService()
0922:                        .listSharedLibraries(targetName);
0923:                return resultObject;
0924:            }
0925:
0926:            /**
0927:             * returns the list of Shared Library infos in the in a xml format
0928:             * 
0929:             * @param componentName
0930:             *            to return only the shared libraries that are this component
0931:             *            dependents. null for listing all the shared libraries in the
0932:             *            system.
0933:             * @param targetName
0934:             * @return xml string contain the list of componentinfos for shared
0935:             *         libraries.
0936:             * @throws JBIRemoteException
0937:             *             if error or exception occurs.
0938:             * 
0939:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listSharedLibraries(java.lang.String,
0940:             *      java.lang.String)
0941:             */
0942:            public String listSharedLibraries(String componentName,
0943:                    String targetName) throws JBIRemoteException {
0944:                String resultObject = null;
0945:                resultObject = this .getRuntimeManagementService()
0946:                        .listSharedLibraries(componentName, targetName);
0947:                return resultObject;
0948:            }
0949:
0950:            /**
0951:             * return component info xml text that has only shared library infos.
0952:             * 
0953:             * @param targetName
0954:             * @return the component info xml text as a map of [targetName, xmlString].
0955:             * @throws JBIRemoteException
0956:             *             on error
0957:             * 
0958:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listSharedLibraries(java.lang.String[])
0959:             */
0960:            public Map<String, String> listSharedLibraries(String[] targetNames)
0961:                    throws JBIRemoteException {
0962:
0963:                String xmlString = null;
0964:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
0965:                for (int index = 0; index < targetNames.length; index++) {
0966:                    try {
0967:                        xmlString = this 
0968:                                .listSharedLibraries(targetNames[index]);
0969:                        if (xmlString != null) {
0970:                            result.putIfAbsent(targetNames[index], xmlString);
0971:                        }
0972:                    } catch (JBIRemoteException exception) {
0973:                        xmlString = this .getStackTrace(exception);
0974:                        result.putIfAbsent(targetNames[index], xmlString);
0975:                    }
0976:                }
0977:                return (Map<String, String>) result;
0978:
0979:            }
0980:
0981:            /**
0982:             * returns the list of Shared Library infos in the in a xml format
0983:             * 
0984:             * @param componentName
0985:             *            to return only the shared libraries that are this component
0986:             *            dependents. null for listing all the shared libraries in the
0987:             *            system.
0988:             * @param targetName
0989:             * @return xml string contains the map of componentinfos for shared
0990:             *         libraries as [targetName, xmlString].
0991:             * @throws JBIRemoteException
0992:             *             if error or exception occurs.
0993:             * 
0994:             * 
0995:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listSharedLibraries(java.lang.String,
0996:             *      java.lang.String[])
0997:             */
0998:            public Map<String, String> listSharedLibraries(
0999:                    String componentName, String[] targetNames)
1000:                    throws JBIRemoteException {
1001:
1002:                String xmlString = null;
1003:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
1004:                for (int index = 0; index < targetNames.length; index++) {
1005:                    try {
1006:                        xmlString = this .listSharedLibraries(componentName,
1007:                                targetNames[index]);
1008:                        if (xmlString != null) {
1009:                            result.putIfAbsent(targetNames[index], xmlString);
1010:                        }
1011:                    } catch (JBIRemoteException exception) {
1012:                        xmlString = this .getStackTrace(exception);
1013:                        result.putIfAbsent(targetNames[index], xmlString);
1014:                    }
1015:                }
1016:                return (Map<String, String>) result;
1017:
1018:            }
1019:
1020:            /**
1021:             * returns a list of Binding Component and Service Engine infos in xml
1022:             * format, that are dependent upon a specified Shared Library
1023:             * 
1024:             * @param sharedLibraryName
1025:             *            the shared library name
1026:             * @param targetName
1027:             * @return xml string containing the list of componentInfos
1028:             * @throws JBIRemoteException
1029:             *             on error
1030:             * 
1031:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listSharedLibraryDependents(java.lang.String,
1032:             *      java.lang.String)
1033:             */
1034:            public String listSharedLibraryDependents(String sharedLibraryName,
1035:                    String targetName) throws JBIRemoteException {
1036:                String resultObject = null;
1037:                resultObject = this .getRuntimeManagementService()
1038:                        .listSharedLibraryDependents(sharedLibraryName,
1039:                                targetName);
1040:                return resultObject;
1041:            }
1042:
1043:            /**
1044:             * returns a list of Binding Component and Service Engine infos in xml
1045:             * format, that are dependent upon a specified Shared Library
1046:             * 
1047:             * @param sharedLibraryName
1048:             *            the shared library name
1049:             * @param targetName
1050:             * @return xml string containing the map of componentInfos as [targetName,
1051:             *         xmlString]
1052:             * @throws JBIRemoteException
1053:             *             on error
1054:             * 
1055:             * @see com.sun.jbi.ui.common.JBIAdminCommands#listSharedLibraryDependents(java.lang.String,
1056:             *      java.lang.String[])
1057:             */
1058:            public Map<String, String> listSharedLibraryDependents(
1059:                    String sharedLibraryName, String[] targetNames)
1060:                    throws JBIRemoteException {
1061:
1062:                String xmlString = null;
1063:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
1064:                for (int index = 0; index < targetNames.length; index++) {
1065:                    try {
1066:                        xmlString = this .listSharedLibraryDependents(
1067:                                sharedLibraryName, targetNames[index]);
1068:                        if (xmlString != null) {
1069:                            result.putIfAbsent(targetNames[index], xmlString);
1070:                        }
1071:                    } catch (JBIRemoteException exception) {
1072:                        xmlString = this .getStackTrace(exception);
1073:                        result.putIfAbsent(targetNames[index], xmlString);
1074:                    }
1075:                }
1076:                return (Map<String, String>) result;
1077:
1078:            }
1079:
1080:            /**
1081:             * return component info xml text for the specified binding component if
1082:             * exists. If no binding component with that name exists, it returns the xml
1083:             * with empty list.
1084:             * 
1085:             * @param name
1086:             *            name of the binding component to lookup
1087:             * @param state
1088:             *            return the binding component that is in the specified state.
1089:             *            valid states are JBIComponentInfo.STARTED, STOPPED, INSTALLED
1090:             *            or null for ANY state
1091:             * @param sharedLibraryName
1092:             *            return the binding component that has a dependency on the
1093:             *            specified shared library. null value to ignore this option.
1094:             * @param serviceAssemblyName
1095:             *            return the binding component that has the specified service
1096:             *            assembly deployed on it. null value to ignore this option.
1097:             * @param targetName
1098:             * @return xml text contain the binding component info that confirms to the
1099:             *         component info list xml grammer.
1100:             * @throws JBIRemoteException
1101:             *             if error or exception occurs.
1102:             * 
1103:             * @see com.sun.jbi.ui.common.JBIAdminCommands#showBindingComponent(java.lang.String,
1104:             *      java.lang.String, java.lang.String, java.lang.String,
1105:             *      java.lang.String)
1106:             */
1107:            public String showBindingComponent(String name, String state,
1108:                    String sharedLibraryName, String serviceAssemblyName,
1109:                    String targetName) throws JBIRemoteException {
1110:                String resultObject = null;
1111:                resultObject = this .getRuntimeManagementService()
1112:                        .showBindingComponent(name, state, sharedLibraryName,
1113:                                serviceAssemblyName, targetName);
1114:                return resultObject;
1115:            }
1116:
1117:            /**
1118:             * return component info xml text for the specified binding component if
1119:             * exists. If no binding component with that name exists, it returns the xml
1120:             * with empty list.
1121:             * 
1122:             * @param name
1123:             *            name of the binding component to lookup
1124:             * @param state
1125:             *            return the binding component that is in the specified state.
1126:             *            valid states are JBIComponentInfo.STARTED, STOPPED, INSTALLED
1127:             *            or null for ANY state
1128:             * @param sharedLibraryName
1129:             *            return the binding component that has a dependency on the
1130:             *            specified shared library. null value to ignore this option.
1131:             * @param serviceAssemblyName
1132:             *            return the binding component that has the specified service
1133:             *            assembly deployed on it. null value to ignore this option.
1134:             * @param targetName
1135:             * @return xml text contain the binding component info that confirms to the
1136:             *         component info list xml grammer as a map of [targetName,
1137:             *         xmlString].
1138:             * @throws JBIRemoteException
1139:             *             if error or exception occurs.
1140:             * 
1141:             * @see com.sun.jbi.ui.common.JBIAdminCommands#showBindingComponent(java.lang.String,
1142:             *      java.lang.String, java.lang.String, java.lang.String,
1143:             *      java.lang.String[])
1144:             */
1145:            public Map<String, String> showBindingComponent(String name,
1146:                    String state, String sharedLibraryName,
1147:                    String serviceAssemblyName, String[] targetNames)
1148:                    throws JBIRemoteException {
1149:
1150:                String xmlString = null;
1151:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
1152:                for (int index = 0; index < targetNames.length; index++) {
1153:                    try {
1154:                        xmlString = this .showBindingComponent(name, state,
1155:                                sharedLibraryName, serviceAssemblyName,
1156:                                targetNames[index]);
1157:                        if (xmlString != null) {
1158:                            result.putIfAbsent(targetNames[index], xmlString);
1159:                        }
1160:                    } catch (JBIRemoteException exception) {
1161:                        xmlString = this .getStackTrace(exception);
1162:                        result.putIfAbsent(targetNames[index], xmlString);
1163:                    }
1164:                }
1165:                return (Map<String, String>) result;
1166:
1167:            }
1168:
1169:            /**
1170:             * return service assembly info xml text for the specified service assembly
1171:             * if exists. If no service assembly with that name exists, it returns the
1172:             * xml with empty list.
1173:             * 
1174:             * @param name
1175:             *            name of the service assembly to lookup
1176:             * @param state
1177:             *            return the service assembly that is in the specified state.
1178:             *            JBIServiceAssemblyInfo.STARTED, STOPPED, SHUTDOWN or null for
1179:             *            ANY state
1180:             * @param componentName
1181:             *            return the service assembly that has service units on this
1182:             *            component.
1183:             * @param targetName
1184:             * @return xml string contain service assembly info that confirms to the
1185:             *         service assembly list xml grammer.
1186:             * @throws JBIRemoteException
1187:             *             if error or exception occurs.
1188:             * 
1189:             * @see com.sun.jbi.ui.common.JBIAdminCommands#showServiceAssembly(java.lang.String,
1190:             *      java.lang.String, java.lang.String, java.lang.String)
1191:             */
1192:            public String showServiceAssembly(String name, String state,
1193:                    String componentName, String targetName)
1194:                    throws JBIRemoteException {
1195:                String resultObject = null;
1196:
1197:                resultObject = this .getRuntimeManagementService()
1198:                        .showServiceAssembly(name, state, componentName,
1199:                                targetName);
1200:                return resultObject;
1201:            }
1202:
1203:            /**
1204:             * return service assembly info xml text for the specified service assembly
1205:             * if exists. If no service assembly with that name exists, it returns the
1206:             * xml with empty list.
1207:             * 
1208:             * @param name
1209:             *            name of the service assembly to lookup
1210:             * @param state
1211:             *            return the service assembly that is in the specified state.
1212:             *            JBIServiceAssemblyInfo.STARTED, STOPPED, SHUTDOWN or null for
1213:             *            ANY state
1214:             * @param componentName
1215:             *            return the service assembly that has service units on this
1216:             *            component.
1217:             * @param targetNames
1218:             * @return xml string contain service assembly info that confirms to the
1219:             *         service assembly list xml grammer as [targetName, xmlString] map.
1220:             * @throws JBIRemoteException
1221:             *             if error or exception occurs.
1222:             * 
1223:             * @see com.sun.jbi.ui.common.JBIAdminCommands#showServiceAssembly(java.lang.String,
1224:             *      java.lang.String, java.lang.String, java.lang.String[])
1225:             */
1226:            public Map<String, String> showServiceAssembly(String name,
1227:                    String state, String componentName, String[] targetNames)
1228:                    throws JBIRemoteException {
1229:
1230:                String xmlString = null;
1231:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
1232:                for (int index = 0; index < targetNames.length; index++) {
1233:                    try {
1234:                        xmlString = this .showServiceAssembly(name, state,
1235:                                componentName, targetNames[index]);
1236:                        if (xmlString != null) {
1237:                            result.putIfAbsent(targetNames[index], xmlString);
1238:                        }
1239:                    } catch (JBIRemoteException exception) {
1240:                        xmlString = this .getStackTrace(exception);
1241:                        result.putIfAbsent(targetNames[index], xmlString);
1242:                    }
1243:                }
1244:                return (Map<String, String>) result;
1245:
1246:            }
1247:
1248:            /**
1249:             * return component info xml text for the specified service engine if
1250:             * exists. If no service engine with that name exists, it returns the xml
1251:             * with empty list.
1252:             * 
1253:             * @param name
1254:             *            name of the service engine to lookup
1255:             * @param state
1256:             *            return service engine that is in the specified state. valid
1257:             *            states are JBIComponentInfo.STARTED, STOPPED, INSTALLED or
1258:             *            null for ANY state
1259:             * @param sharedLibraryName
1260:             *            return service engine that has a dependency on the specified
1261:             *            shared library. null value to ignore this option.
1262:             * @param serviceAssemblyName
1263:             *            return the service engine that has the specified service
1264:             *            assembly deployed on it. null value to ignore this option.
1265:             * @param targetName
1266:             * @return xml text contain the service engine component info that confirms
1267:             *         to the component info list xml grammer.
1268:             * @throws JBIRemoteException
1269:             *             if error or exception occurs.
1270:             * 
1271:             * @see com.sun.jbi.ui.common.JBIAdminCommands#showServiceEngine(java.lang.String,
1272:             *      java.lang.String, java.lang.String, java.lang.String,
1273:             *      java.lang.String)
1274:             */
1275:            public String showServiceEngine(String name, String state,
1276:                    String sharedLibraryName, String serviceAssemblyName,
1277:                    String targetName) throws JBIRemoteException {
1278:                String resultObject = null;
1279:                resultObject = this .getRuntimeManagementService()
1280:                        .showServiceEngine(name, state, sharedLibraryName,
1281:                                serviceAssemblyName, targetName);
1282:                return resultObject;
1283:            }
1284:
1285:            /**
1286:             * return component info xml text for the specified service engine if
1287:             * exists. If no service engine with that name exists, it returns the xml
1288:             * with empty list.
1289:             * 
1290:             * @param name
1291:             *            name of the service engine to lookup
1292:             * @param state
1293:             *            return service engine that is in the specified state. valid
1294:             *            states are JBIComponentInfo.STARTED, STOPPED, INSTALLED or
1295:             *            null for ANY state
1296:             * @param sharedLibraryName
1297:             *            return service engine that has a dependency on the specified
1298:             *            shared library. null value to ignore this option.
1299:             * @param serviceAssemblyName
1300:             *            return the service engine that has the specified service
1301:             *            assembly deployed on it. null value to ignore this option.
1302:             * @param targetName
1303:             * @return xml text contain the service engine component info that confirms
1304:             *         to the component info list xml grammer as a map of [targetName,
1305:             *         xmlString].
1306:             * @throws JBIRemoteException
1307:             *             if error or exception occurs.
1308:             * 
1309:             * @see com.sun.jbi.ui.common.JBIAdminCommands#showServiceEngine(java.lang.String,
1310:             *      java.lang.String, java.lang.String, java.lang.String,
1311:             *      java.lang.String[])
1312:             */
1313:            public Map<String, String> showServiceEngine(String name,
1314:                    String state, String sharedLibraryName,
1315:                    String serviceAssemblyName, String[] targetNames)
1316:                    throws JBIRemoteException {
1317:
1318:                String xmlString = null;
1319:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
1320:                for (int index = 0; index < targetNames.length; index++) {
1321:                    try {
1322:                        xmlString = this .showServiceEngine(name, state,
1323:                                sharedLibraryName, serviceAssemblyName,
1324:                                targetNames[index]);
1325:                        if (xmlString != null) {
1326:                            result.putIfAbsent(targetNames[index], xmlString);
1327:                        }
1328:                    } catch (JBIRemoteException exception) {
1329:                        xmlString = this .getStackTrace(exception);
1330:                        result.putIfAbsent(targetNames[index], xmlString);
1331:                    }
1332:                }
1333:                return (Map<String, String>) result;
1334:
1335:            }
1336:
1337:            /**
1338:             * return component info xml text for the specified shared library if
1339:             * exists. If no shared library with that name exists, it returns the xml
1340:             * with empty list.
1341:             * 
1342:             * @param name
1343:             *            name of the shared library to lookup
1344:             * @param componentName
1345:             *            return the shared library that is this component dependents.
1346:             *            null to ignore this option.
1347:             * @param targetName
1348:             * @return xml string contain shared library component info that confirms to
1349:             *         the component info list xml grammer.
1350:             * @throws JBIRemoteException
1351:             *             if error or exception occurs.
1352:             * 
1353:             * @see com.sun.jbi.ui.common.JBIAdminCommands#showSharedLibrary(java.lang.String,
1354:             *      java.lang.String, java.lang.String)
1355:             */
1356:            public String showSharedLibrary(String name, String componentName,
1357:                    String targetName) throws JBIRemoteException {
1358:                String resultObject = null;
1359:                resultObject = this .getRuntimeManagementService()
1360:                        .showSharedLibrary(name, componentName, targetName);
1361:                return resultObject;
1362:            }
1363:
1364:            /**
1365:             * return component info xml text for the specified shared library if
1366:             * exists. If no shared library with that name exists, it returns the xml
1367:             * with empty list.
1368:             * 
1369:             * @param name
1370:             *            name of the shared library to lookup
1371:             * @param componentName
1372:             *            return the shared library that is this component dependents.
1373:             *            null to ignore this option.
1374:             * @param targetName
1375:             * @return xml string contain shared library component info that confirms to
1376:             *         the component info list xml grammer as a map of [targetName,
1377:             *         xmlString].
1378:             * @throws JBIRemoteException
1379:             *             if error or exception occurs.
1380:             * 
1381:             * @see com.sun.jbi.ui.common.JBIAdminCommands#showSharedLibrary(java.lang.String,
1382:             *      java.lang.String, java.lang.String[])
1383:             */
1384:            public Map<String, String> showSharedLibrary(String name,
1385:                    String componentName, String[] targetNames)
1386:                    throws JBIRemoteException {
1387:
1388:                String xmlString = null;
1389:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
1390:                for (int index = 0; index < targetNames.length; index++) {
1391:                    try {
1392:                        xmlString = this .showSharedLibrary(name, componentName,
1393:                                targetNames[index]);
1394:                        if (xmlString != null) {
1395:                            result.putIfAbsent(targetNames[index], xmlString);
1396:                        }
1397:                    } catch (JBIRemoteException exception) {
1398:                        xmlString = this .getStackTrace(exception);
1399:                        result.putIfAbsent(targetNames[index], xmlString);
1400:                    }
1401:                }
1402:
1403:                return (Map<String, String>) result;
1404:
1405:            }
1406:
1407:            /**
1408:             * shuts down component ( service engine, binding component)
1409:             * 
1410:             * @return name of the component
1411:             * @param componentName
1412:             *            name of the component
1413:             * @param targetName
1414:             * @throws JBIRemoteException
1415:             *             on error
1416:             * 
1417:             * @see com.sun.jbi.ui.common.JBIAdminCommands#shutdownComponent(java.lang.String,
1418:             *      java.lang.String)
1419:             */
1420:            public String shutdownComponent(String componentName,
1421:                    String targetName) throws JBIRemoteException {
1422:                String resultObject = null;
1423:                resultObject = this .getRuntimeManagementService()
1424:                        .shutdownComponent(componentName, targetName);
1425:                return resultObject;
1426:            }
1427:
1428:            /**
1429:             * shuts down component ( service engine, binding component)
1430:             * 
1431:             * @return name of the component
1432:             * @param force
1433:             *            true to force shutdown
1434:             * @param componentName
1435:             *            name of the component
1436:             * @param targetName
1437:             * @throws JBIRemoteException
1438:             *             on error
1439:             * 
1440:             * @see com.sun.jbi.ui.common.JBIAdminCommands#shutdownComponent(java.lang.String,
1441:             *      boolean, java.lang.String)
1442:             */
1443:            public String shutdownComponent(String componentName,
1444:                    boolean force, String targetName) throws JBIRemoteException {
1445:                String resultObject = null;
1446:                resultObject = this .getRuntimeManagementService()
1447:                        .shutdownComponent(componentName, force, targetName);
1448:                return resultObject;
1449:            }
1450:
1451:            /**
1452:             * shuts down component (service engine, binding component)
1453:             * 
1454:             * @param componentName
1455:             *            name of the component
1456:             * @param targetNames
1457:             * @return name of the component as [targetName, string] map
1458:             * @throws JBIRemoteException
1459:             *             on error
1460:             * 
1461:             * @see com.sun.jbi.ui.common.JBIAdminCommands#shutdownComponent(java.lang.String,
1462:             *      java.lang.String[])
1463:             */
1464:            public Map<String, String> shutdownComponent(String componentName,
1465:                    String[] targetNames) throws JBIRemoteException {
1466:
1467:                String xmlString = null;
1468:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
1469:                for (int index = 0; index < targetNames.length; index++) {
1470:                    try {
1471:                        xmlString = this .shutdownComponent(componentName,
1472:                                targetNames[index]);
1473:                        if (xmlString != null) {
1474:                            result.putIfAbsent(targetNames[index], xmlString);
1475:                        }
1476:                    } catch (JBIRemoteException exception) {
1477:                        xmlString = this .getStackTrace(exception);
1478:                        result.putIfAbsent(targetNames[index], xmlString);
1479:                    }
1480:                }
1481:                return (Map<String, String>) result;
1482:
1483:            }
1484:
1485:            /**
1486:             * shuts down component (service engine, binding component)
1487:             * 
1488:             * @param componentName
1489:             *            name of the component
1490:             * @param force
1491:             *            true to force shutdown
1492:             * @param targetNames
1493:             * @return name of the component as [targetName, string] map
1494:             * @throws JBIRemoteException
1495:             *             on error
1496:             * 
1497:             * @see com.sun.jbi.ui.common.JBIAdminCommands#shutdownComponent(java.lang.String,
1498:             *      boolean, java.lang.String[])
1499:             */
1500:            public Map<String, String> shutdownComponent(String componentName,
1501:                    boolean force, String[] targetNames)
1502:                    throws JBIRemoteException {
1503:
1504:                String xmlString = null;
1505:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
1506:                for (int index = 0; index < targetNames.length; index++) {
1507:                    try {
1508:                        xmlString = this .shutdownComponent(componentName,
1509:                                force, targetNames[index]);
1510:                        if (xmlString != null) {
1511:                            result.putIfAbsent(targetNames[index], xmlString);
1512:                        }
1513:                    } catch (JBIRemoteException exception) {
1514:                        xmlString = this .getStackTrace(exception);
1515:                        result.putIfAbsent(targetNames[index], xmlString);
1516:                    }
1517:                }
1518:                return (Map<String, String>) result;
1519:
1520:            }
1521:
1522:            /**
1523:             * shuts down service assembly
1524:             * 
1525:             * @param serviceAssemblyName
1526:             *            name of the service assembly
1527:             * @param targetName
1528:             * @throws JBIRemoteException
1529:             *             on error
1530:             * @return result as a management message xml text
1531:             * 
1532:             * @see com.sun.jbi.ui.common.JBIAdminCommands#shutdownServiceAssembly(java.lang.String,
1533:             *      java.lang.String)
1534:             */
1535:            public String shutdownServiceAssembly(String serviceAssemblyName,
1536:                    String targetName) throws JBIRemoteException {
1537:                String resultObject = null;
1538:                resultObject = this .getRuntimeManagementService()
1539:                        .shutdownServiceAssembly(serviceAssemblyName,
1540:                                targetName);
1541:                return resultObject;
1542:            }
1543:
1544:            /**
1545:             * shuts down service assembly
1546:             * 
1547:             * @param serviceAssemblyName
1548:             *            name of the service assembly
1549:             * @param forceShutdown
1550:             * @param targetName
1551:             *            name of the target for this operation
1552:             * @return Map of targetName and result as a management message xml text
1553:             *         strings.
1554:             * @throws JBIRemoteException
1555:             *             on error
1556:             */
1557:            public String shutdownServiceAssembly(String serviceAssemblyName,
1558:                    boolean forceShutdown, String targetName)
1559:                    throws JBIRemoteException {
1560:                String resultObject = null;
1561:                resultObject = this .getRuntimeManagementService()
1562:                        .shutdownServiceAssembly(serviceAssemblyName,
1563:                                forceShutdown, targetName);
1564:                return resultObject;
1565:            }
1566:
1567:            /**
1568:             * shuts down service assembly
1569:             * 
1570:             * @param serviceAssemblyName
1571:             *            name of the service assembly
1572:             * @param targetNames
1573:             * @throws JBIRemoteException
1574:             *             on error
1575:             * @return result as a management message xml text as [targetName, string]
1576:             *         map
1577:             * 
1578:             * @see com.sun.jbi.ui.common.JBIAdminCommands#shutdownServiceAssembly(java.lang.String,
1579:             *      java.lang.String[])
1580:             */
1581:            public Map<String, String> shutdownServiceAssembly(
1582:                    String serviceAssemblyName, String[] targetNames)
1583:                    throws JBIRemoteException {
1584:
1585:                String xmlString = null;
1586:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
1587:                for (int index = 0; index < targetNames.length; index++) {
1588:                    try {
1589:                        xmlString = this .shutdownServiceAssembly(
1590:                                serviceAssemblyName, targetNames[index]);
1591:                        if (xmlString != null) {
1592:                            result.putIfAbsent(targetNames[index], xmlString);
1593:                        }
1594:                    } catch (JBIRemoteException exception) {
1595:                        xmlString = this .getStackTrace(exception);
1596:                        result.putIfAbsent(targetNames[index], xmlString);
1597:                    }
1598:
1599:                }
1600:                return (Map<String, String>) result;
1601:
1602:            }
1603:
1604:            /**
1605:             * shuts down service assembly
1606:             * 
1607:             * @param serviceAssemblyName
1608:             *            name of the service assembly
1609:             * @param forceShutdown
1610:             * @param targetName
1611:             *            name of the target for this operation
1612:             * @return Map of targetName and result as a management message xml text
1613:             *         strings.
1614:             * @throws JBIRemoteException
1615:             *             on error
1616:             */
1617:            public Map<String /* targetName */, String /* targetResult */> shutdownServiceAssembly(
1618:                    String serviceAssemblyName, boolean forceShutdown,
1619:                    String[] targetNames) throws JBIRemoteException {
1620:
1621:                String xmlString = null;
1622:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
1623:                for (int index = 0; index < targetNames.length; index++) {
1624:                    try {
1625:                        xmlString = this .shutdownServiceAssembly(
1626:                                serviceAssemblyName, forceShutdown,
1627:                                targetNames[index]);
1628:                        if (xmlString != null) {
1629:                            result.putIfAbsent(targetNames[index], xmlString);
1630:                        }
1631:                    } catch (JBIRemoteException exception) {
1632:                        xmlString = this .getStackTrace(exception);
1633:                        result.putIfAbsent(targetNames[index], xmlString);
1634:                    }
1635:
1636:                }
1637:                return (Map<String, String>) result;
1638:            }
1639:
1640:            /**
1641:             * starts component ( service engine, binding component)
1642:             * 
1643:             * @param componentName
1644:             *            name of the component
1645:             * @param targetName
1646:             * @throws JBIRemoteException
1647:             *             on error
1648:             * @return name of the component
1649:             * 
1650:             * @see com.sun.jbi.ui.common.JBIAdminCommands#startComponent(java.lang.String,
1651:             *      java.lang.String)
1652:             */
1653:            public String startComponent(String componentName, String targetName)
1654:                    throws JBIRemoteException {
1655:                String resultObject = null;
1656:                resultObject = this .getRuntimeManagementService()
1657:                        .startComponent(componentName, targetName);
1658:                return resultObject;
1659:            }
1660:
1661:            /**
1662:             * starts component ( service engine, binding component)
1663:             * 
1664:             * @param componentName
1665:             *            name of the component
1666:             * @param targetNames
1667:             * @throws JBIRemoteException
1668:             *             on error
1669:             * @return name of the component as [targetName, string] map
1670:             * 
1671:             * @see com.sun.jbi.ui.common.JBIAdminCommands#startComponent(java.lang.String,
1672:             *      java.lang.String[])
1673:             */
1674:            public Map<String, String> startComponent(String componentName,
1675:                    String[] targetNames) throws JBIRemoteException {
1676:
1677:                String xmlString = null;
1678:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
1679:                for (int index = 0; index < targetNames.length; index++) {
1680:                    try {
1681:                        xmlString = this .startComponent(componentName,
1682:                                targetNames[index]);
1683:                        if (xmlString != null) {
1684:                            result.putIfAbsent(targetNames[index], xmlString);
1685:                        }
1686:                    } catch (JBIRemoteException exception) {
1687:                        xmlString = this .getStackTrace(exception);
1688:                        result.putIfAbsent(targetNames[index], xmlString);
1689:                    }
1690:
1691:                }
1692:                return (Map<String, String>) result;
1693:
1694:            }
1695:
1696:            /**
1697:             * starts service assembly
1698:             * 
1699:             * @param serviceAssemblyName
1700:             *            name of the service assembly
1701:             * @param targetName
1702:             * @throws JBIRemoteException
1703:             *             on error
1704:             * @return result as a management message xml text
1705:             * 
1706:             * @see com.sun.jbi.ui.common.JBIAdminCommands#startServiceAssembly(java.lang.String,
1707:             *      java.lang.String)
1708:             */
1709:            public String startServiceAssembly(String serviceAssemblyName,
1710:                    String targetName) throws JBIRemoteException {
1711:                String resultObject = null;
1712:                resultObject = this .getRuntimeManagementService()
1713:                        .startServiceAssembly(serviceAssemblyName, targetName);
1714:                return resultObject;
1715:            }
1716:
1717:            /**
1718:             * starts service assembly
1719:             * 
1720:             * @param serviceAssemblyName
1721:             *            name of the service assembly
1722:             * @param targetNames
1723:             * @throws JBIRemoteException
1724:             *             on error
1725:             * @return result as a management message xml text as [targetName, string]
1726:             *         map
1727:             * 
1728:             * @see com.sun.jbi.ui.common.JBIAdminCommands#startServiceAssembly(java.lang.String,
1729:             *      java.lang.String[])
1730:             */
1731:            public Map<String, String> startServiceAssembly(
1732:                    String serviceAssemblyName, String[] targetNames)
1733:                    throws JBIRemoteException {
1734:
1735:                String xmlString = null;
1736:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
1737:                for (int index = 0; index < targetNames.length; index++) {
1738:                    try {
1739:                        xmlString = this .startServiceAssembly(
1740:                                serviceAssemblyName, targetNames[index]);
1741:                        if (xmlString != null) {
1742:                            result.putIfAbsent(targetNames[index], xmlString);
1743:                        }
1744:                    } catch (JBIRemoteException exception) {
1745:                        xmlString = this .getStackTrace(exception);
1746:                        result.putIfAbsent(targetNames[index], xmlString);
1747:                    }
1748:
1749:                }
1750:                return (Map<String, String>) result;
1751:
1752:            }
1753:
1754:            /**
1755:             * stops component ( service engine, binding component)
1756:             * 
1757:             * @param componentName
1758:             *            name of the component
1759:             * @param targetName
1760:             * @throws JBIRemoteException
1761:             *             on error
1762:             * @return name of the component
1763:             * 
1764:             * @see com.sun.jbi.ui.common.JBIAdminCommands#stopComponent(java.lang.String,
1765:             *      java.lang.String)
1766:             */
1767:            public String stopComponent(String componentName, String targetName)
1768:                    throws JBIRemoteException {
1769:                String resultObject = null;
1770:                resultObject = this .getRuntimeManagementService()
1771:                        .stopComponent(componentName, targetName);
1772:                return resultObject;
1773:            }
1774:
1775:            /**
1776:             * stops component ( service engine, binding component)
1777:             * 
1778:             * @param componentName
1779:             *            name of the component
1780:             * @param targetNames
1781:             * @throws JBIRemoteException
1782:             *             on error
1783:             * @return name of the component as [targetName, string] map
1784:             * 
1785:             * @see com.sun.jbi.ui.common.JBIAdminCommands#stopComponent(java.lang.String,
1786:             *      java.lang.String[])
1787:             */
1788:            public Map<String, String> stopComponent(String componentName,
1789:                    String[] targetNames) throws JBIRemoteException {
1790:
1791:                String xmlString = null;
1792:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
1793:                for (int index = 0; index < targetNames.length; index++) {
1794:                    try {
1795:                        xmlString = this .stopComponent(componentName,
1796:                                targetNames[index]);
1797:                        if (xmlString != null) {
1798:                            result.putIfAbsent(targetNames[index], xmlString);
1799:                        }
1800:                    } catch (JBIRemoteException exception) {
1801:                        xmlString = this .getStackTrace(exception);
1802:                        result.putIfAbsent(targetNames[index], xmlString);
1803:                    }
1804:                }
1805:                return (Map<String, String>) result;
1806:
1807:            }
1808:
1809:            /**
1810:             * stops service assembly
1811:             * 
1812:             * @param serviceAssemblyName
1813:             *            name of the service assembly
1814:             * @param targetName
1815:             * @throws JBIRemoteException
1816:             *             on error
1817:             * @return result as a management message xml text
1818:             * 
1819:             * @see com.sun.jbi.ui.common.JBIAdminCommands#stopServiceAssembly(java.lang.String,
1820:             *      java.lang.String)
1821:             */
1822:            public String stopServiceAssembly(String serviceAssemblyName,
1823:                    String targetName) throws JBIRemoteException {
1824:                String resultObject = null;
1825:                resultObject = this .getRuntimeManagementService()
1826:                        .stopServiceAssembly(serviceAssemblyName, targetName);
1827:                return resultObject;
1828:            }
1829:
1830:            /**
1831:             * stops service assembly
1832:             * 
1833:             * @param serviceAssemblyName
1834:             *            name of the service assembly
1835:             * @param targetNames
1836:             * @throws JBIRemoteException
1837:             *             on error
1838:             * @return result as a management message xml text as [targetName, string]
1839:             *         map
1840:             * 
1841:             * @see com.sun.jbi.ui.common.JBIAdminCommands#stopServiceAssembly(java.lang.String,
1842:             *      java.lang.String[])
1843:             */
1844:            public Map<String, String> stopServiceAssembly(
1845:                    String serviceAssemblyName, String[] targetNames)
1846:                    throws JBIRemoteException {
1847:
1848:                String xmlString = null;
1849:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
1850:                for (int index = 0; index < targetNames.length; index++) {
1851:                    try {
1852:                        xmlString = this .stopServiceAssembly(
1853:                                serviceAssemblyName, targetNames[index]);
1854:                        if (xmlString != null) {
1855:                            result.putIfAbsent(targetNames[index], xmlString);
1856:                        }
1857:                    } catch (JBIRemoteException exception) {
1858:                        xmlString = this .getStackTrace(exception);
1859:                        result.putIfAbsent(targetNames[index], xmlString);
1860:                    }
1861:
1862:                }
1863:                return (Map<String, String>) result;
1864:
1865:            }
1866:
1867:            /**
1868:             * undeploys service assembly
1869:             * 
1870:             * @param serviceAssemblyName
1871:             *            name of the service assembly
1872:             * @param targetName
1873:             * @throws JBIRemoteException
1874:             *             on error
1875:             * @return result as a management message xml text
1876:             * 
1877:             * @see com.sun.jbi.ui.common.JBIAdminCommands#undeployServiceAssembly(java.lang.String,
1878:             *      java.lang.String)
1879:             */
1880:            public String undeployServiceAssembly(String serviceAssemblyName,
1881:                    String targetName) throws JBIRemoteException {
1882:                String resultObject = null;
1883:
1884:                resultObject = this .getDeploymentService()
1885:                        .undeployServiceAssembly(serviceAssemblyName,
1886:                                targetName);
1887:                return resultObject;
1888:            }
1889:
1890:            /**
1891:             * undeploys service assembly
1892:             * 
1893:             * @param serviceAssemblyName
1894:             *            name of the service assembly
1895:             * @param targetNames
1896:             * @throws JBIRemoteException
1897:             *             on error
1898:             * @return result as a management message xml text as [targetName, string]
1899:             *         map
1900:             * 
1901:             * @see com.sun.jbi.ui.common.JBIAdminCommands#undeployServiceAssembly(java.lang.String,
1902:             *      java.lang.String[])
1903:             */
1904:            public Map<String, String> undeployServiceAssembly(
1905:                    String serviceAssemblyName, String[] targetNames)
1906:                    throws JBIRemoteException {
1907:
1908:                String xmlString = null;
1909:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
1910:                for (int index = 0; index < targetNames.length; index++) {
1911:                    try {
1912:                        xmlString = this .undeployServiceAssembly(
1913:                                serviceAssemblyName, targetNames[index]);
1914:                        if (xmlString != null) {
1915:                            result.putIfAbsent(targetNames[index], xmlString);
1916:                        }
1917:                    } catch (JBIRemoteException exception) {
1918:                        xmlString = this .getStackTrace(exception);
1919:                        result.putIfAbsent(targetNames[index], xmlString);
1920:                    }
1921:
1922:                }
1923:                return (Map<String, String>) result;
1924:
1925:            }
1926:
1927:            /**
1928:             * uninstalls component ( service engine, binding component)
1929:             * 
1930:             * @param componentName
1931:             *            name of the component
1932:             * @param targetName
1933:             * @return name of the component.
1934:             * @throws JBIRemoteException
1935:             *             on error
1936:             * 
1937:             * @see com.sun.jbi.ui.common.JBIAdminCommands#uninstallComponent(java.lang.String,
1938:             *      java.lang.String)
1939:             */
1940:            public String uninstallComponent(String componentName,
1941:                    String targetName) throws JBIRemoteException {
1942:                String resultObject = null;
1943:
1944:                resultObject = this .getInstallationService()
1945:                        .uninstallComponent(componentName, targetName);
1946:                return resultObject;
1947:            }
1948:
1949:            /**
1950:             * uninstalls component ( service engine, binding component)
1951:             * 
1952:             * @param componentName
1953:             *            name of the component
1954:             * @param targetName
1955:             * @return name of the component.
1956:             * @throws JBIRemoteException
1957:             *             on error
1958:             * 
1959:             * @see com.sun.jbi.ui.common.JBIAdminCommands#uninstallComponent(java.lang.String,
1960:             *      java.lang.String)
1961:             */
1962:            String uninstallComponentInternal(String componentName,
1963:                    boolean force, String targetName) throws JBIRemoteException {
1964:                String resultObject = null;
1965:
1966:                resultObject = this .getInstallationService()
1967:                        .uninstallComponent(componentName, force, targetName);
1968:                return resultObject;
1969:            }
1970:
1971:            /**
1972:             * uninstalls component ( service engine, binding component)
1973:             * 
1974:             * @param componentName
1975:             *            name of the component
1976:             * @param force
1977:             * @param retainInDomain
1978:             * @param targetName
1979:             * @return name of the component.
1980:             * @throws JBIRemoteException
1981:             *             on error
1982:             */
1983:            String uninstallComponentInternal(String componentName,
1984:                    boolean force, boolean retainInDomain, String targetName)
1985:                    throws JBIRemoteException {
1986:                String resultObject = null;
1987:
1988:                resultObject = this .getInstallationService()
1989:                        .uninstallComponent(componentName, force,
1990:                                retainInDomain, targetName);
1991:                return resultObject;
1992:            }
1993:
1994:            /**
1995:             * uninstalls component ( service engine, binding component)
1996:             * 
1997:             * @param componentName
1998:             *            name of the component
1999:             * @param targetNames
2000:             * @return name of the component as [targetName, String] map.
2001:             * @throws JBIRemoteException
2002:             *             on error
2003:             * 
2004:             * @see com.sun.jbi.ui.common.JBIAdminCommands#uninstallComponent(java.lang.String,
2005:             *      java.lang.String[])
2006:             */
2007:            public Map<String, String> uninstallComponent(String componentName,
2008:                    String[] targetNames) throws JBIRemoteException {
2009:
2010:                String xmlString = null;
2011:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
2012:                for (int index = 0; index < targetNames.length; index++) {
2013:                    try {
2014:                        xmlString = this .uninstallComponent(componentName,
2015:                                targetNames[index]);
2016:                        if (xmlString != null) {
2017:                            result.putIfAbsent(targetNames[index], xmlString);
2018:                        }
2019:                    } catch (JBIRemoteException exception) {
2020:                        xmlString = this .getStackTrace(exception);
2021:                        result.putIfAbsent(targetNames[index], xmlString);
2022:                    }
2023:                }
2024:                return (Map<String, String>) result;
2025:
2026:            }
2027:
2028:            /**
2029:             * uninstalls shared library
2030:             * 
2031:             * @param sharedLibraryName
2032:             *            name of the shared library
2033:             * @param targetName
2034:             * @throws JBIRemoteException
2035:             *             on error
2036:             * @return shared library name.
2037:             * 
2038:             * @see com.sun.jbi.ui.common.JBIAdminCommands#uninstallSharedLibrary(java.lang.String,
2039:             *      java.lang.String)
2040:             */
2041:            public String uninstallSharedLibrary(String sharedLibraryName,
2042:                    String targetName) throws JBIRemoteException {
2043:                String resultObject = null;
2044:
2045:                resultObject = this .getInstallationService()
2046:                        .uninstallSharedLibrary(sharedLibraryName, targetName);
2047:                return resultObject;
2048:            }
2049:
2050:            /**
2051:             * uninstalls shared library
2052:             * 
2053:             * @param sharedLibraryName
2054:             *            name of the shared library
2055:             * @param targetNames
2056:             * @throws JBIRemoteException
2057:             *             on error
2058:             * @return shared library name as [targetName, string] map.
2059:             * 
2060:             * @see com.sun.jbi.ui.common.JBIAdminCommands#uninstallSharedLibrary(java.lang.String,
2061:             *      java.lang.String[])
2062:             */
2063:            public Map<String, String> uninstallSharedLibrary(
2064:                    String sharedLibraryName, String[] targetNames)
2065:                    throws JBIRemoteException {
2066:
2067:                String xmlString = null;
2068:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
2069:                for (int index = 0; index < targetNames.length; index++) {
2070:                    try {
2071:                        xmlString = this .uninstallSharedLibrary(
2072:                                sharedLibraryName, targetNames[index]);
2073:                        if (xmlString != null) {
2074:                            result.putIfAbsent(targetNames[index], xmlString);
2075:                        }
2076:                    } catch (JBIRemoteException exception) {
2077:                        xmlString = this .getStackTrace(exception);
2078:                        result.putIfAbsent(targetNames[index], xmlString);
2079:                    }
2080:
2081:                }
2082:                return (Map<String, String>) result;
2083:
2084:            }
2085:
2086:            /**
2087:             * installs component ( service engine, binding component)
2088:             * 
2089:             * @param componentName
2090:             *            name of the component.
2091:             * @param targetName
2092:             *            name of the target for this operation
2093:             * @return result.
2094:             * @throws JBIRemoteException
2095:             *             on error
2096:             */
2097:            public String installComponentFromDomain(String componentName,
2098:                    String targetName) throws JBIRemoteException {
2099:                String resultObject = null;
2100:
2101:                resultObject = this .getInstallationService()
2102:                        .installComponentFromDomain(componentName, targetName);
2103:                return resultObject;
2104:            }
2105:
2106:            /**
2107:             * installs component ( service engine, binding component)
2108:             * 
2109:             * @param componentName
2110:             *            name of the component.
2111:             * @param component
2112:             *            configuration properties
2113:             * @param targetName
2114:             *            name of the target for this operation
2115:             * @return result.
2116:             * @throws JBIRemoteException
2117:             *             on error
2118:             */
2119:            public String installComponentFromDomain(String componentName,
2120:                    Properties properties, String targetName)
2121:                    throws JBIRemoteException {
2122:                String resultObject = null;
2123:
2124:                resultObject = this .getInstallationService()
2125:                        .installComponentFromDomain(componentName, properties,
2126:                                targetName);
2127:                return resultObject;
2128:            }
2129:
2130:            /**
2131:             * uninstalls component ( service engine, binding component)
2132:             * 
2133:             * @param componentName
2134:             *            name of the component
2135:             * @param forceDelete
2136:             *            true to delete, false to not
2137:             * @param targetName
2138:             *            name of the target for this operation
2139:             * @return Map of targetName and component name strings.
2140:             * @throws JBIRemoteException
2141:             *             on error
2142:             */
2143:
2144:            public String uninstallComponent(String componentName,
2145:                    boolean forceDelete, String targetName)
2146:                    throws JBIRemoteException {
2147:                String resultObject = null;
2148:
2149:                resultObject = this .getInstallationService()
2150:                        .uninstallComponent(componentName, forceDelete,
2151:                                targetName);
2152:                return resultObject;
2153:            }
2154:
2155:            /**
2156:             * installs shared library
2157:             * 
2158:             * @param libraryName
2159:             *            Shared Library Name
2160:             * @param targetName
2161:             *            name of the target for this operation
2162:             * @return Map of targetName and shared library name strings.
2163:             * @throws JBIRemoteException
2164:             *             on error
2165:             */
2166:            public String installSharedLibraryFromDomain(String libraryName,
2167:                    String targetName) throws JBIRemoteException {
2168:                String resultObject = null;
2169:
2170:                resultObject = this 
2171:                        .getInstallationService()
2172:                        .installSharedLibraryFromDomain(libraryName, targetName);
2173:                return resultObject;
2174:            }
2175:
2176:            /**
2177:             * uninstalls shared library
2178:             * 
2179:             * @param sharedLibraryName
2180:             *            name of the shared library
2181:             * @param forceDelete
2182:             *            true to delete, false to not
2183:             * @param targetName
2184:             *            name of the target for this operation
2185:             * @return Map of targetName and shared library name strings.
2186:             * @throws JBIRemoteException
2187:             *             on error
2188:             */
2189:            public String uninstallSharedLibrary(String sharedLibraryName,
2190:                    boolean forceDelete, String targetName)
2191:                    throws JBIRemoteException {
2192:                String resultObject = null;
2193:
2194:                resultObject = this .getInstallationService()
2195:                        .uninstallSharedLibrary(sharedLibraryName, forceDelete,
2196:                                targetName);
2197:                return resultObject;
2198:            }
2199:
2200:            /**
2201:             * deploys service assembly
2202:             * 
2203:             * @param assemblyName
2204:             *            service assembly name
2205:             * @param targetName
2206:             *            name of the target for this operation
2207:             * @return Map of targetName and management message xml text strings.
2208:             * @throws JBIRemoteException
2209:             *             on error
2210:             */
2211:            public String deployServiceAssemblyFromDomain(String assemblyName,
2212:                    String targetName) throws JBIRemoteException {
2213:                String resultObject = null;
2214:
2215:                resultObject = this .getDeploymentService()
2216:                        .deployServiceAssemblyFromDomain(assemblyName,
2217:                                targetName);
2218:                return resultObject;
2219:            }
2220:
2221:            /**
2222:             * undeploys service assembly
2223:             * 
2224:             * @param serviceAssemblyName
2225:             *            name of the service assembly
2226:             * @param forceDelete
2227:             *            forces deletion of the assembly if true, false if not
2228:             * @param targetName
2229:             *            name of the target for this operation
2230:             * @return Map of targetName and result as a management message xml text
2231:             *         strings.
2232:             * @throws JBIRemoteException
2233:             *             on error
2234:             */
2235:            public String undeployServiceAssembly(String serviceAssemblyName,
2236:                    boolean forceDelete, String targetName)
2237:                    throws JBIRemoteException {
2238:                String resultObject = null;
2239:
2240:                resultObject = this .getDeploymentService()
2241:                        .undeployServiceAssembly(serviceAssemblyName,
2242:                                forceDelete, targetName);
2243:                return resultObject;
2244:            }
2245:
2246:            /**
2247:             * installs component from Domain( service engine, binding component)
2248:             * 
2249:             * @param componentName
2250:             *            name of the component
2251:             * @param targetNames
2252:             *            array of targets for this operation
2253:             * @return Map of targetName and component name strings.
2254:             * @throws JBIRemoteException
2255:             *             on error
2256:             */
2257:            public Map<String /* targetName */, String /* targetResult */> installComponentFromDomain(
2258:                    String componentName, String[] targetNames)
2259:                    throws JBIRemoteException {
2260:                String xmlString = null;
2261:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
2262:                for (int index = 0; index < targetNames.length; index++) {
2263:                    try {
2264:                        xmlString = this .installComponentFromDomain(
2265:                                componentName, targetNames[index]);
2266:                        if (xmlString != null) {
2267:                            result.putIfAbsent(targetNames[index], xmlString);
2268:                        }
2269:                    } catch (JBIRemoteException exception) {
2270:                        xmlString = this .getStackTrace(exception);
2271:                        result.putIfAbsent(targetNames[index], xmlString);
2272:                    }
2273:
2274:                }
2275:                return (Map<String, String>) result;
2276:            }
2277:
2278:            /**
2279:             * installs component from Domain( service engine, binding component)
2280:             * 
2281:             * @param componentName
2282:             *            name of the component
2283:             * @param component
2284:             *            configuration properties
2285:             * @param targetNames
2286:             *            array of targets for this operation
2287:             * @return Map of targetName and component name strings.
2288:             * @throws JBIRemoteException
2289:             *             on error
2290:             */
2291:            public Map<String /* targetName */, String /* targetResult */> installComponentFromDomain(
2292:                    String componentName, Properties properties,
2293:                    String[] targetNames) throws JBIRemoteException {
2294:                String xmlString = null;
2295:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
2296:                for (int index = 0; index < targetNames.length; index++) {
2297:                    try {
2298:                        xmlString = this .installComponentFromDomain(
2299:                                componentName, properties, targetNames[index]);
2300:                        if (xmlString != null) {
2301:                            result.putIfAbsent(targetNames[index], xmlString);
2302:                        }
2303:                    } catch (JBIRemoteException exception) {
2304:                        xmlString = this .getStackTrace(exception);
2305:                        result.putIfAbsent(targetNames[index], xmlString);
2306:                    }
2307:
2308:                }
2309:                return (Map<String, String>) result;
2310:            }
2311:
2312:            /**
2313:             * uninstalls component ( service engine, binding component)
2314:             * 
2315:             * @param componentName
2316:             *            name of the component
2317:             * @param forceDelete
2318:             *            true to delete, false to not
2319:             * @param targetName
2320:             *            name of the target for this operation
2321:             * @return Map of targetName and component name strings.
2322:             * @throws JBIRemoteException
2323:             *             on error
2324:             */
2325:            public Map<String /* targetName */, String /* targetResult */> uninstallComponent(
2326:                    String componentName, boolean forceDelete,
2327:                    String[] targetNames) throws JBIRemoteException {
2328:                String xmlString = null;
2329:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
2330:                for (int index = 0; index < targetNames.length; index++) {
2331:                    try {
2332:                        xmlString = this .uninstallComponent(componentName,
2333:                                forceDelete, targetNames[index]);
2334:                        if (xmlString != null) {
2335:                            result.putIfAbsent(targetNames[index], xmlString);
2336:                        }
2337:                    } catch (JBIRemoteException exception) {
2338:                        xmlString = this .getStackTrace(exception);
2339:                        result.putIfAbsent(targetNames[index], xmlString);
2340:                    }
2341:
2342:                }
2343:                return (Map<String, String>) result;
2344:
2345:            }
2346:
2347:            /**
2348:             * installs shared library
2349:             * 
2350:             * @param libraryName
2351:             *            name of the library
2352:             * @param targetName
2353:             *            name of the target for this operation
2354:             * @return Map of targetName and shared library name strings.
2355:             * @throws JBIRemoteException
2356:             *             on error
2357:             */
2358:            public Map<String /* targetName */, String /* targetResult */> installSharedLibraryFromDomain(
2359:                    String libraryName, String[] targetNames)
2360:                    throws JBIRemoteException {
2361:                String xmlString = null;
2362:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
2363:                for (int index = 0; index < targetNames.length; index++) {
2364:                    try {
2365:                        xmlString = this .installSharedLibraryFromDomain(
2366:                                libraryName, targetNames[index]);
2367:                        if (xmlString != null) {
2368:                            result.putIfAbsent(targetNames[index], xmlString);
2369:                        }
2370:                    } catch (JBIRemoteException exception) {
2371:                        xmlString = this .getStackTrace(exception);
2372:                        result.putIfAbsent(targetNames[index], xmlString);
2373:                    }
2374:
2375:                }
2376:                return (Map<String, String>) result;
2377:
2378:            }
2379:
2380:            /**
2381:             * uninstalls shared library
2382:             * 
2383:             * @param sharedLibraryName
2384:             *            name of the shared library
2385:             * @param forceDelete
2386:             *            true to delete, false to not
2387:             * @param targetName
2388:             *            name of the target for this operation
2389:             * @return Map of targetName and shared library name strings.
2390:             * @throws JBIRemoteException
2391:             *             on error
2392:             */
2393:            public Map<String /* targetName */, String /* targetResult */> uninstallSharedLibrary(
2394:                    String sharedLibraryName, boolean forceDelete,
2395:                    String[] targetNames) throws JBIRemoteException {
2396:                String xmlString = null;
2397:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
2398:                for (int index = 0; index < targetNames.length; index++) {
2399:                    try {
2400:                        xmlString = this .uninstallSharedLibrary(
2401:                                sharedLibraryName, forceDelete,
2402:                                targetNames[index]);
2403:                        if (xmlString != null) {
2404:                            result.putIfAbsent(targetNames[index], xmlString);
2405:                        }
2406:                    } catch (JBIRemoteException exception) {
2407:                        xmlString = this .getStackTrace(exception);
2408:                        result.putIfAbsent(targetNames[index], xmlString);
2409:                    }
2410:
2411:                }
2412:                return (Map<String, String>) result;
2413:            }
2414:
2415:            /**
2416:             * deploys service assembly
2417:             * 
2418:             * @param assemblyName
2419:             *            name of the service assembly
2420:             * @param targetName
2421:             *            name of the target for this operation
2422:             * @return Map of targetName and management message xml text strings.
2423:             * @throws JBIRemoteException
2424:             *             on error
2425:             */
2426:            public Map<String /* targetName */, String /* targetResult */> deployServiceAssemblyFromDomain(
2427:                    String assemblyName, String[] targetNames)
2428:                    throws JBIRemoteException {
2429:                String xmlString = null;
2430:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
2431:                for (int index = 0; index < targetNames.length; index++) {
2432:                    try {
2433:                        xmlString = this .deployServiceAssemblyFromDomain(
2434:                                assemblyName, targetNames[index]);
2435:                        if (xmlString != null) {
2436:                            result.putIfAbsent(targetNames[index], xmlString);
2437:                        }
2438:                    } catch (JBIRemoteException exception) {
2439:                        xmlString = this .getStackTrace(exception);
2440:                        result.putIfAbsent(targetNames[index], xmlString);
2441:                    }
2442:
2443:                }
2444:                return (Map<String, String>) result;
2445:
2446:            }
2447:
2448:            /**
2449:             * undeploys service assembly
2450:             * 
2451:             * @param serviceAssemblyName
2452:             *            name of the service assembly
2453:             * @param forceDelete
2454:             *            true to delete, false to not
2455:             * @param targetName
2456:             *            name of the target for this operation
2457:             * @return Map of targetName and result as a management message xml text
2458:             *         strings.
2459:             * @throws JBIRemoteException
2460:             *             on error
2461:             */
2462:            public Map<String /* targetName */, String /* targetResult */> undeployServiceAssembly(
2463:                    String serviceAssemblyName, boolean forceDelete,
2464:                    String[] targetNames) throws JBIRemoteException {
2465:                String xmlString = null;
2466:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
2467:                for (int index = 0; index < targetNames.length; index++) {
2468:                    try {
2469:                        xmlString = this .undeployServiceAssembly(
2470:                                serviceAssemblyName, forceDelete,
2471:                                targetNames[index]);
2472:                        if (xmlString != null) {
2473:                            result.putIfAbsent(targetNames[index], xmlString);
2474:                        }
2475:                    } catch (JBIRemoteException exception) {
2476:                        xmlString = this .getStackTrace(exception);
2477:                        result.putIfAbsent(targetNames[index], xmlString);
2478:                    }
2479:
2480:                }
2481:                return (Map<String, String>) result;
2482:
2483:            }
2484:
2485:            // //////////////////////////////////
2486:            // Retain in Domain
2487:            // //////////////////////////////////
2488:            /**
2489:             * uninstalls component ( service engine, binding component)
2490:             * 
2491:             * @param componentName
2492:             *            name of the component
2493:             * @param forceDelete
2494:             *            true to delete, false to not
2495:             * @param retainInDomain
2496:             *            true to not delete it from the domain target, false to also
2497:             *            delete it from the domain target.
2498:             * @param targetName
2499:             *            name of the target for this operation
2500:             * @return component name string.
2501:             * @throws JBIRemoteException
2502:             *             on error
2503:             */
2504:
2505:            public String uninstallComponent(String componentName,
2506:                    boolean forceDelete, boolean retainInDomain,
2507:                    String targetName) throws JBIRemoteException {
2508:                String resultObject = null;
2509:
2510:                resultObject = this .getInstallationService()
2511:                        .uninstallComponent(componentName, forceDelete,
2512:                                retainInDomain, targetName);
2513:                return resultObject;
2514:            }
2515:
2516:            /**
2517:             * uninstalls shared library
2518:             * 
2519:             * @param sharedLibraryName
2520:             *            name of the shared library
2521:             * @param forceDelete
2522:             *            true to delete, false to not
2523:             * @param retainInDomain
2524:             *            true to not delete it from the domain target, false to also
2525:             *            delete it from the domain target.
2526:             * @param targetName
2527:             *            name of the target for this operation
2528:             * @return shared library name string.
2529:             * @throws JBIRemoteException
2530:             *             on error
2531:             */
2532:            public String uninstallSharedLibrary(String sharedLibraryName,
2533:                    boolean forceDelete, boolean retainInDomain,
2534:                    String targetName) throws JBIRemoteException {
2535:                String resultObject = null;
2536:
2537:                resultObject = this .getInstallationService()
2538:                        .uninstallSharedLibrary(sharedLibraryName, forceDelete,
2539:                                retainInDomain, targetName);
2540:                return resultObject;
2541:            }
2542:
2543:            /**
2544:             * undeploys service assembly
2545:             * 
2546:             * @param serviceAssemblyName
2547:             *            name of the service assembly
2548:             * @param forceDelete
2549:             *            forces deletion of the assembly if true, false if not
2550:             * @param retainInDomain
2551:             *            true to not delete it from the domain target, false to also
2552:             *            delete it from the domain target.
2553:             * @param targetName
2554:             *            name of the target for this operation
2555:             * @return result as a management message xml text string.
2556:             * @throws JBIRemoteException
2557:             *             on error
2558:             */
2559:            public String undeployServiceAssembly(String serviceAssemblyName,
2560:                    boolean forceDelete, boolean retainInDomain,
2561:                    String targetName) throws JBIRemoteException {
2562:                String resultObject = null;
2563:
2564:                resultObject = this .getDeploymentService()
2565:                        .undeployServiceAssembly(serviceAssemblyName,
2566:                                forceDelete, retainInDomain, targetName);
2567:                return resultObject;
2568:            }
2569:
2570:            /**
2571:             * uninstalls component ( service engine, binding component)
2572:             * 
2573:             * @param componentName
2574:             *            name of the component
2575:             * @param forceDelete
2576:             *            true to delete, false to not
2577:             * @param retainInDomain
2578:             *            true to not delete it from the domain target, false to also
2579:             *            delete it from the domain target.
2580:             * @param targetNames
2581:             *            array of targets for this operation
2582:             * @return Map of targetName and component name strings.
2583:             * @throws JBIRemoteException
2584:             *             on error
2585:             */
2586:
2587:            public Map<String /* targetName */, String /* targetResult */> uninstallComponent(
2588:                    String componentName, boolean forceDelete,
2589:                    boolean retainInDomain, String[] targetNames)
2590:                    throws JBIRemoteException {
2591:                String xmlString = null;
2592:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
2593:                for (int index = 0; index < targetNames.length; index++) {
2594:                    try {
2595:                        xmlString = this 
2596:                                .uninstallComponent(componentName, forceDelete,
2597:                                        retainInDomain, targetNames[index]);
2598:                        if (xmlString != null) {
2599:                            result.putIfAbsent(targetNames[index], xmlString);
2600:                        }
2601:                    } catch (JBIRemoteException exception) {
2602:                        xmlString = this .getStackTrace(exception);
2603:                        result.putIfAbsent(targetNames[index], xmlString);
2604:                    }
2605:
2606:                }
2607:                return (Map<String, String>) result;
2608:            }
2609:
2610:            /**
2611:             * uninstalls shared library
2612:             * 
2613:             * @param sharedLibraryName
2614:             *            name of the shared library
2615:             * @param forceDelete
2616:             *            true to delete, false to not
2617:             * @param retainInDomain
2618:             *            true to not delete it from the domain target, false to also
2619:             *            delete it from the domain target.
2620:             * @param targetNames
2621:             *            array of targets for this operation
2622:             * @return Map of targetName and shared library name strings.
2623:             * @throws JBIRemoteException
2624:             *             on error
2625:             */
2626:            public Map<String /* targetName */, String /* targetResult */> uninstallSharedLibrary(
2627:                    String sharedLibraryName, boolean forceDelete,
2628:                    boolean retainInDomain, String[] targetNames)
2629:                    throws JBIRemoteException {
2630:                String xmlString = null;
2631:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
2632:                for (int index = 0; index < targetNames.length; index++) {
2633:                    try {
2634:                        xmlString = this .uninstallSharedLibrary(
2635:                                sharedLibraryName, forceDelete, retainInDomain,
2636:                                targetNames[index]);
2637:                        if (xmlString != null) {
2638:                            result.putIfAbsent(targetNames[index], xmlString);
2639:                        }
2640:                    } catch (JBIRemoteException exception) {
2641:                        xmlString = this .getStackTrace(exception);
2642:                        result.putIfAbsent(targetNames[index], xmlString);
2643:                    }
2644:
2645:                }
2646:                return (Map<String, String>) result;
2647:            }
2648:
2649:            /**
2650:             * undeploys service assembly
2651:             * 
2652:             * @param serviceAssemblyName
2653:             *            name of the service assembly
2654:             * @param forceDelete
2655:             *            forces deletion of the assembly if true, false if not
2656:             * @param retainInDomain
2657:             *            true to not delete it from the domain target, false to also
2658:             *            delete it from the domain target.
2659:             * @param targetNames
2660:             *            array of targets for this operation
2661:             * @return Map of targetName and result as a management message xml text
2662:             *         strings.
2663:             * @throws JBIRemoteException
2664:             *             on error
2665:             */
2666:            public Map<String /* targetName */, String /* targetResult */> undeployServiceAssembly(
2667:                    String serviceAssemblyName, boolean forceDelete,
2668:                    boolean retainInDomain, String[] targetNames)
2669:                    throws JBIRemoteException {
2670:                String xmlString = null;
2671:                ConcurrentHashMap<String, String> result = new ConcurrentHashMap<String, String>();
2672:                for (int index = 0; index < targetNames.length; index++) {
2673:                    try {
2674:                        xmlString = this .undeployServiceAssembly(
2675:                                serviceAssemblyName, forceDelete,
2676:                                retainInDomain, targetNames[index]);
2677:                        if (xmlString != null) {
2678:                            result.putIfAbsent(targetNames[index], xmlString);
2679:                        }
2680:                    } catch (JBIRemoteException exception) {
2681:                        xmlString = this .getStackTrace(exception);
2682:                        result.putIfAbsent(targetNames[index], xmlString);
2683:                    }
2684:
2685:                }
2686:                return (Map<String, String>) result;
2687:
2688:            }
2689:
2690:            /**
2691:             * Gets the component custom loggers and their levels
2692:             * 
2693:             * @param componentName
2694:             *            name of the component
2695:             * @param targetName
2696:             *            name of the target (e.g., cluster1, server, etc.)
2697:             * @param targetInstanceName
2698:             *            name of the target instance (e.g., cluster1-instance1, etc.)
2699:             * @return a Map of loggerName to their log levels
2700:             * @throws JBIRemoteException
2701:             *             on error
2702:             */
2703:            public Map<String /* loggerName */, Level /* logLevel */> getComponentLoggerLevels(
2704:                    String componentName, String targetName,
2705:                    String targetInstanceName) throws JBIRemoteException {
2706:                Map<String, Level> resultObject = new TreeMap<String, Level>();
2707:                resultObject = this .getConfigurationService()
2708:                        .getComponentLoggerLevels(componentName, targetName,
2709:                                targetInstanceName);
2710:                return resultObject;
2711:            }
2712:
2713:            /**
2714:             * Gets the component custom loggers and their display names.
2715:             * 
2716:             * @param componentName
2717:             *            name of the component
2718:             * @param targetName
2719:             *            name of the target (e.g., cluster1, server, etc.)
2720:             * @param targetInstanceName
2721:             *            name of the target instance (e.g., cluster1-instance1, etc.)
2722:             * @return a Map of loggerName to their display names
2723:             * @throws JBIRemoteException
2724:             *             on error
2725:             */
2726:            public Map<String /* loggerName */, String /* displayName */> getComponentLoggerDisplayNames(
2727:                    String componentName, String targetName,
2728:                    String targetInstanceName) throws JBIRemoteException {
2729:                Map<String, String> resultObject = new TreeMap<String, String>();
2730:                resultObject = this .getConfigurationService()
2731:                        .getComponentLoggerDisplayNames(componentName,
2732:                                targetName, targetInstanceName);
2733:                return resultObject;
2734:            }
2735:
2736:            /**
2737:             * Sets the component log level for a given logger
2738:             * 
2739:             * @param componentName
2740:             *            name of the component
2741:             * @param loggerName
2742:             *            the component logger name
2743:             * @param logLevel
2744:             *            the level to set the logger; when null, reverts the logger to
2745:             *            inherit its level from its parent logger
2746:             * @param targetName
2747:             *            name of the target (e.g., cluster1, server, etc.)
2748:             * @param targetInstanceName
2749:             *            name of the target instance (e.g., cluster1-instance1, etc.)
2750:             * @throws JBIRemoteException
2751:             *             on error
2752:             */
2753:            public void setComponentLoggerLevel(String componentName,
2754:                    String loggerName, Level logLevel, String targetName,
2755:                    String targetInstanceName) throws JBIRemoteException {
2756:                this .getConfigurationService().setComponentLoggerLevel(
2757:                        componentName, loggerName, logLevel, targetName,
2758:                        targetInstanceName);
2759:            }
2760:
2761:            /**
2762:             * Gets all the runtime loggers and their levels
2763:             * 
2764:             * @param targetName
2765:             *            name of the target (e.g., cluster1, server, etc.)
2766:             * @param targetInstanceName
2767:             *            name of the target instance (e.g., cluster1-instance1, etc.)
2768:             * @return a Map of runtimeLoggerName to their log levels
2769:             * @throws JBIRemoteException
2770:             *             on error
2771:             * @deprecated
2772:             */
2773:            public Map<String /* runtimeLoggerName */, Level /* logLevel */> getRuntimeLoggerLevels(
2774:                    String targetName, String targetInstanceName)
2775:                    throws JBIRemoteException {
2776:
2777:                return getRuntimeLoggerLevels(targetName);
2778:
2779:            }
2780:
2781:            /**
2782:             * Lookup the level of one runtime logger
2783:             * 
2784:             * @param runtimeLoggerName
2785:             *            name of the runtime logger (e.g.  com.sun.jbi.framework
2786:             * @param targetName
2787:             *            name of the target (e.g., cluster1, server, etc.)
2788:             * @param targetInstanceName
2789:             *            name of the target instance (e.g., cluster1-instance1, etc.)
2790:             * @return the matching Log Level.
2791:             * @throws JBIRemoteException
2792:             *             on error
2793:             * @deprecated
2794:             */
2795:            public Level getRuntimeLoggerLevel(String runtimeLoggerName,
2796:                    String targetName, String targetInstanceName)
2797:                    throws JBIRemoteException {
2798:
2799:                return getRuntimeLoggerLevel(runtimeLoggerName, targetName);
2800:
2801:            }
2802:
2803:            /**
2804:             * Gets all the runtime loggers and their display names
2805:             * 
2806:             * @param targetName
2807:             *            name of the target (e.g., cluster1, server, etc.)
2808:             * @param targetInstanceName
2809:             *            name of the target instance (e.g., cluster1-instance1, etc.)
2810:             * @return a Map of display names to their logger MBeans
2811:             * @throws JBIRemoteException
2812:             *             on error
2813:             * @deprecated
2814:             */
2815:            public Map<String /* display name */, String /* logger name */> getRuntimeLoggerNames(
2816:                    String targetName, String targetInstanceName)
2817:                    throws JBIRemoteException {
2818:                return getRuntimeLoggerNames(targetName);
2819:            }
2820:
2821:            /**
2822:             * Return the display name for a runtime logger
2823:             * 
2824:             * @param runtimeLoggerName
2825:             *            name of the logger (e.g. com.sun.jbi.framework)
2826:             * @param targetName
2827:             *            name of the target (e.g., cluster1, server, etc.)
2828:             * @param targetInstanceName
2829:             *            name of the target instance (e.g., cluster1-instance1, etc.)
2830:             * @return the display name for the given logger
2831:             * @throws JBIRemoteException
2832:             *             on error
2833:             * @deprecated
2834:             */
2835:            public String getRuntimeLoggerDisplayName(String runtimeLoggerName,
2836:                    String targetName, String targetInstanceName)
2837:                    throws JBIRemoteException {
2838:                return getRuntimeLoggerDisplayName(runtimeLoggerName,
2839:                        targetName);
2840:            }
2841:
2842:            /**
2843:             * Gets all the runtime loggers and their levels.
2844:             * 
2845:             * @param targetName
2846:             *            name of the target (e.g., cluster1, server, etc.)
2847:             * @return a Map of runtimeLoggerName to their log levels
2848:             * @throws JBIRemoteException
2849:             *             on error
2850:             */
2851:            public Map<String /* runtimeLoggerName */, Level /* logLevel */> getRuntimeLoggerLevels(
2852:                    String targetName) throws JBIRemoteException {
2853:
2854:                Map<String, Level> resultObject = new TreeMap<String, Level>();
2855:                resultObject = this .getConfigurationService()
2856:                        .getRuntimeLoggerLevels(targetName);
2857:                return resultObject;
2858:            }
2859:
2860:            /**
2861:             * Lookup the level of one runtime logger
2862:             * 
2863:             * @param runtimeLoggerName
2864:             *            name of the runtime logger (e.g. com.sun.jbi.framework
2865:             * @param targetName
2866:             *            name of the target (e.g., cluster1, server, etc.)
2867:             * @param targetInstanceName
2868:             *            name of the target instance (e.g., cluster1-instance1, etc.)
2869:             * @return the matching Log Level.
2870:             * @throws JBIRemoteException
2871:             *             on error
2872:             */
2873:            public Level getRuntimeLoggerLevel(String runtimeLoggerName,
2874:                    String targetName) throws JBIRemoteException {
2875:
2876:                Level resultObject = null;
2877:                resultObject = this .getConfigurationService()
2878:                        .getRuntimeLoggerLevel(runtimeLoggerName, targetName);
2879:                return resultObject;
2880:            }
2881:
2882:            /**
2883:             * Gets all the runtime loggers and their display names
2884:             * 
2885:             * @param targetName
2886:             *            name of the target (e.g., cluster1, server, etc.)
2887:             * @param targetInstanceName
2888:             *            name of the target instance (e.g., cluster1-instance1, etc.)
2889:             * @return a Map of display names to their logger MBeans
2890:             * @throws JBIRemoteException
2891:             *             on error
2892:             */
2893:            public Map<String /* display name */, String /* logger name */> getRuntimeLoggerNames(
2894:                    String targetName) throws JBIRemoteException {
2895:                Map<String, String> resultObject = new TreeMap<String, String>();
2896:                resultObject = this .getConfigurationService()
2897:                        .getRuntimeLoggerNames(targetName);
2898:                return resultObject;
2899:            }
2900:
2901:            /**
2902:             * Return the display name for a runtime logger
2903:             * 
2904:             * @param runtimeLoggerName
2905:             *            name of the logger (e.g. com.sun.jbi.framework)
2906:             * @param targetName
2907:             *            name of the target (e.g., cluster1, server, etc.)
2908:             * @return the display name for the given logger
2909:             * @throws JBIRemoteException
2910:             *             on error
2911:             */
2912:            public String getRuntimeLoggerDisplayName(String runtimeLoggerName,
2913:                    String targetName) throws JBIRemoteException {
2914:
2915:                String resultObject = null;
2916:                resultObject = this .getConfigurationService()
2917:                        .getRuntimeLoggerDisplayName(runtimeLoggerName,
2918:                                targetName);
2919:                return resultObject;
2920:            }
2921:
2922:            /**
2923:             * Gets the extension MBean object names
2924:             * 
2925:             * @param componentName
2926:             *            name of the component
2927:             * @param extensionName
2928:             *            the name of the extension (e.g., Configuration, Logger, etc.)
2929:             * @param targetName
2930:             *            name of the target (e.g., cluster1, server, etc.)
2931:             * @return
2932:             * @throws JBIRemoteException
2933:             *             on error
2934:             */
2935:            public Map<String /* targetInstanceName */, ObjectName[]> getComponentExtensionMBeanObjectNames(
2936:                    String componentName, String extensionName,
2937:                    String targetName) throws JBIRemoteException {
2938:                Map<String, ObjectName[]> resultObject = null;
2939:                resultObject = this .getConfigurationService()
2940:                        .getComponentExtensionMBeanObjectNames(componentName,
2941:                                extensionName, targetName);
2942:                return resultObject;
2943:            }
2944:
2945:            /**
2946:             * Gets the extension MBean object names
2947:             * 
2948:             * @param componentName
2949:             *            name of the component
2950:             * @param extensionName
2951:             *            the name of the extension (e.g., Configuration, Logger, etc.)
2952:             * @param targetName
2953:             *            name of the target (e.g., cluster1, server, etc.)
2954:             * @param targetInstanceName
2955:             *            name of the target instance (e.g., cluster1-instance1, etc.)
2956:             * @return an array of ObjectName(s)
2957:             * @throws JBIRemoteException
2958:             *             on error
2959:             */
2960:            public ObjectName[] getComponentExtensionMBeanObjectNames(
2961:                    String componentName, String extensionName,
2962:                    String targetName, String targetInstanceName)
2963:                    throws JBIRemoteException {
2964:                ObjectName[] resultObject = null;
2965:                resultObject = this .getConfigurationService()
2966:                        .getComponentExtensionMBeanObjectNames(componentName,
2967:                                extensionName, targetName, targetInstanceName);
2968:                return resultObject;
2969:            }
2970:
2971:            /**
2972:             * Will return jbi mgmt message with success, failure, or partial success
2973:             * per instance. The Map entry per instance will have value as Properties
2974:             * object. String object should be returned when there is a failure to
2975:             * retrieve the configuration on a particular instance. The other way is to
2976:             * have Properties object in both success and failure case, but in the
2977:             * failure case, the Properties object will have a predefined name, value
2978:             * pair ("com.sun.jbi.cluster.instance.error", "xml text" ) in the
2979:             * properties object.
2980:             * 
2981:             * @param componentName
2982:             * @param configurationValues
2983:             * @param targetName
2984:             * @return
2985:             * @deprecated
2986:             */
2987:            public Properties /* targetName, success/failure */
2988:            setComponentConfiguration(String componentName,
2989:                    Properties configurationValues, String targetName)
2990:                    throws JBIRemoteException {
2991:                Properties resultObject = new Properties();
2992:                String result = "";
2993:                result = this .getConfigurationService()
2994:                        .setComponentConfiguration(componentName,
2995:                                configurationValues, targetName);
2996:                if (result == null) {
2997:                    result = "";
2998:                }
2999:                resultObject.put("result", result);
3000:                return resultObject;
3001:            }
3002:
3003:            /**
3004:             * Set the component static configuration. This operation uses the facade
3005:             * component configuration MBean to set the component properties.
3006:             * 
3007:             * @param componentName
3008:             * @param targetName
3009:             * @param configurationValues
3010:             * @return a management message indicating the status of the operation. If
3011:             *         the operation fails a JBIException ( encapsulated in the
3012:             *         JBIRemoteException ) is thrown, the exception message is a
3013:             *         management XML message and gives the failure details.
3014:             */
3015:            public String setComponentConfiguration(String componentName,
3016:                    String targetName, Properties configurationValues)
3017:                    throws JBIRemoteException {
3018:                String resultObject = null;
3019:                resultObject = this .getConfigurationService()
3020:                        .setComponentConfiguration(componentName,
3021:                                configurationValues, targetName);
3022:                return resultObject;
3023:            }
3024:
3025:            /**
3026:             * updates component ( service engine, binding component)
3027:             * 
3028:             * @param componentName
3029:             *            Name of the component to update.
3030:             * @param zipFilePath
3031:             *            archive file in a zip format
3032:             * @return The name of the component if successful
3033:             * @throws JBIRemoteException
3034:             *             on error
3035:             */
3036:            public String updateComponent(String componentName,
3037:                    String zipFilePath) throws JBIRemoteException {
3038:                String resultObject = null;
3039:
3040:                resultObject = this .getInstallationService().upgradeComponent(
3041:                        componentName, zipFilePath);
3042:                return resultObject;
3043:
3044:            }
3045:
3046:            /**
3047:             * Sets the log level for a given runtime logger
3048:             * 
3049:             * @param runtimeLoggerName
3050:             *            name of the runtime logger
3051:             * @param logLevel
3052:             *            the level to set the logger
3053:             * @param targetName
3054:             *            name of the target (e.g., cluster1, server, etc.)
3055:             * @param targetInstanceName
3056:             *            name of the target instance (e.g., cluster1-instance1, etc.)
3057:             * @throws JBIRemoteException
3058:             *             on error
3059:             * @deprecated
3060:             */
3061:            public void setRuntimeLoggerLevel(String runtimeLoggerName,
3062:                    Level logLevel, String targetName, String targetInstanceName)
3063:                    throws JBIRemoteException {
3064:                setRuntimeLoggerLevel(runtimeLoggerName, logLevel, targetName);
3065:            }
3066:
3067:            /**
3068:             * Sets the log level for a given runtime logger
3069:             * 
3070:             * @param runtimeLoggerName
3071:             *            name of the runtime logger
3072:             * @param logLevel
3073:             *            the level to set the logger
3074:             * @param targetName
3075:             *            name of the target (e.g., cluster1, server, etc.)
3076:             * @throws JBIRemoteException
3077:             *             on error
3078:             */
3079:            public void setRuntimeLoggerLevel(String runtimeLoggerName,
3080:                    Level logLevel, String targetName)
3081:                    throws JBIRemoteException {
3082:                this .getConfigurationService().setRuntimeLoggerLevel(
3083:                        runtimeLoggerName, logLevel, targetName);
3084:            }
3085:
3086:            /**
3087:             * Checks to see if the Target (server, cluster) is up or down.
3088:             * 
3089:             * @param targetName
3090:             *            name of the target (e.g., cluster1, server, etc.)
3091:             * @return true if Target is up, false if not
3092:             * @throws JBIRemoteException
3093:             *             if error or exception occurs.
3094:             */
3095:            public boolean isTargetUp(String targetName)
3096:                    throws JBIRemoteException {
3097:                boolean resultObject = false;
3098:                resultObject = this .getAdministrationService().isTargetUp(
3099:                        targetName);
3100:                return resultObject;
3101:            }
3102:
3103:            // ///////////////////////////////////////////////////////
3104:            // -- Runtime Configuration --
3105:            // ///////////////////////////////////////////////////////
3106:            /**
3107:             * This method returns the runtime configuration metadata associated with
3108:             * the specified property. The metadata contain name-value pairs like:
3109:             * default, descriptionID, descriptorType, displayName, displayNameId,
3110:             * isStatic, name, resourceBundleName, tooltip, tooltipId, etc.
3111:             * 
3112:             * @param propertyKeyName
3113:             * @return Properties that represent runtime configuration metadata
3114:             * @throws JBIRemoteException
3115:             */
3116:            public Properties getRuntimeConfigurationMetaData(
3117:                    String propertyKeyName) throws JBIRemoteException {
3118:                Properties resultObject = null;
3119:                resultObject = this .getConfigurationService()
3120:                        .getRuntimeConfigurationMetaData(propertyKeyName);
3121:                return resultObject;
3122:            }
3123:
3124:            /**
3125:             * This method sets one or more configuration parameters on the runtime with
3126:             * a list of name/value pairs passed as a properties object. The property
3127:             * name in the properties object should be an existing configuration
3128:             * parameter name. If user try to set the parameter that is not in the
3129:             * configuration parameters list, this method will throw an exception.
3130:             * 
3131:             * The value of the property can be any object. If the value is non string
3132:             * object, its string value (Object.toString()) will be used as a value that
3133:             * will be set on the configuration.
3134:             * 
3135:             * This method first validates whether all the paramters passed in
3136:             * properties object exist in the runtime configuration or not. If any one
3137:             * the parameters passed is not existing, it will return an error without
3138:             * settings the parameters that are passed in the properties including a
3139:             * valid parameters.
3140:             * 
3141:             * If there is an error in setting a paramter, this method throws an
3142:             * exception with the list of parameters that were not set.
3143:             * 
3144:             * @param Properties
3145:             *            params Properties object that contains name/value pairs
3146:             *            corresponding to the configuration parameters to be set on the
3147:             *            runtime.
3148:             * 
3149:             * @param targetName
3150:             *            cluster or instance name ( e.g. cluster1, instance1 ) on which
3151:             *            configuration parameters will be set. null to represent the
3152:             *            default instance which is admin server
3153:             * 
3154:             * @return true if server restart is required, false if not
3155:             * 
3156:             * @throws JBIRemoteException
3157:             *             if there is a jmx error or a invalid parameter is passed in
3158:             *             the params properties object. In case of an error setting the
3159:             *             a particular parameter, the error message should list the
3160:             *             invalid parameters.
3161:             */
3162:            public boolean setRuntimeConfiguration(Properties parameters,
3163:                    String targetName) throws JBIRemoteException {
3164:                boolean resultObject = false;
3165:                resultObject = this .getConfigurationService()
3166:                        .setRuntimeConfiguration(parameters, targetName);
3167:                return resultObject;
3168:            }
3169:
3170:            /**
3171:             * This method returns a tabular data of a complex open data objects that
3172:             * represent the runtime configuration parameter descriptor. The parameter
3173:             * descriptor should contain the following data that represents the
3174:             * parameter.
3175:             * 
3176:             * name : name of the parameter value : value of the parameter as a String
3177:             * type. type : type of the parameter. Basic data types only. description:
3178:             * (optional) description of the parameter. displayName: (optional) display
3179:             * name of the parameter readOnly : true/false validValues : (optional) list
3180:             * of string values with ',' as delimiter. or a range value with - with a
3181:             * '-' as delimiter. min and max strings will be converted to the parameter
3182:             * type and then used to validate the value of the parameter.
3183:             * 
3184:             * @param targetName
3185:             *            cluster or instance name ( e.g. cluster1, instance1 ) on which
3186:             *            configuration parameters will be set. null to represent the
3187:             *            default instance which is admin server
3188:             * 
3189:             * @return Properties that represents the list of configuration parameter
3190:             *         descriptors.
3191:             * 
3192:             * @throws JBIRemoteException
3193:             *             if there is a jmx error accessing the instance
3194:             */
3195:            public Properties getRuntimeConfiguration(String targetName)
3196:                    throws JBIRemoteException {
3197:                Properties resultObject = null;
3198:                resultObject = this .getConfigurationService()
3199:                        .getRuntimeConfiguration(targetName);
3200:                return resultObject;
3201:            }
3202:
3203:            /**
3204:             * This method returns a tabular data of a complex open data objects that
3205:             * represent the runtime configuration parameter descriptor. The parameter
3206:             * descriptor should contain the following data that represents the
3207:             * parameter.
3208:             * 
3209:             * name : name of the parameter value : value of the parameter as a String
3210:             * type. type : type of the parameter. Basic data types only. description:
3211:             * (optional) description of the parameter. displayName: (optional) display
3212:             * name of the parameter readOnly : true/false validValues : (optional) list
3213:             * of string values with ',' as delimiter. or a range value with - with a
3214:             * '-' as delimiter. min and max strings will be converted to the parameter
3215:             * type and then used to validate the value of the parameter.
3216:             * 
3217:             * @param targetName
3218:             *            cluster or instance name ( e.g. cluster1, instance1 ) on which
3219:             *            configuration parameters will be set. null to represent the
3220:             *            default instance which is admin server
3221:             * 
3222:             * @return Properties that represents the list of configuration parameter
3223:             *         descriptors.
3224:             * 
3225:             * @throws JBIRemoteException
3226:             *             if there is a jmx error accessing the instance
3227:             */
3228:            public Properties getDefaultRuntimeConfiguration()
3229:                    throws JBIRemoteException {
3230:                Properties resultObject = null;
3231:                resultObject = this .getConfigurationService()
3232:                        .getDefaultRuntimeConfiguration();
3233:                return resultObject;
3234:            }
3235:
3236:            /**
3237:             * checks if the server need to be restarted to apply the changes made to
3238:             * some of the configuration parameters.
3239:             * 
3240:             * @return true if server need to be restarted for updated configuration to
3241:             *         take effect. false if no server restart is needed.
3242:             */
3243:            public boolean isServerRestartRequired() throws JBIRemoteException {
3244:                boolean resultObject = false;
3245:                resultObject = this .getConfigurationService()
3246:                        .isServerRestartRequired();
3247:                return resultObject;
3248:            }
3249:
3250:            /**
3251:             * Detect the components support for component configuration. This method
3252:             * returns true if the component has a configuration MBean with configurable
3253:             * attributes
3254:             *
3255:             * @param componentName 
3256:             *            component identification
3257:             * @param targetName 
3258:             *              identification of the target. Can be a standalone server,
3259:             *              cluster or clustered instance.
3260:             * @return true if the components configuration MBean has configuration 
3261:             *              attributes
3262:             * @throws JBIRemoteException if the component is not installed or is not 
3263:             *         in the Started state.
3264:             * 
3265:             */
3266:            public boolean isComponentConfigSupported(String componentName,
3267:                    String targetName) throws JBIRemoteException {
3268:                Boolean resultObject = null;
3269:                resultObject = this .getConfigurationService()
3270:                        .isComponentConfigSupported(componentName, targetName);
3271:                return resultObject;
3272:            }
3273:
3274:            /*----------------------------------------------------------------------------------*\
3275:             *              Operations for Application Variable Management                      *
3276:            \*----------------------------------------------------------------------------------*/
3277:
3278:            /**
3279:             * Detect the components support for application variables. This method
3280:             * returns true if the component has a configuration MBean and implements 
3281:             * all the operations for application variable management.
3282:             *
3283:             * @param componentName 
3284:             *            component identification
3285:             * @param targetName 
3286:             *              identification of the target. Can be a standalone server,
3287:             *              cluster or clustered instance.
3288:             * @return true if the components configuration MBean implements all the
3289:             *         operations for application variables.
3290:             * @throws JBIRemoteException if the component is not installed or is not 
3291:             *         in the Started state.
3292:             * 
3293:             */
3294:            public boolean isAppVarsSupported(String componentName,
3295:                    String targetName) throws JBIRemoteException {
3296:                Boolean resultObject = null;
3297:                resultObject = this .getConfigurationService()
3298:                        .isAppVarsSupported(componentName, targetName);
3299:                return resultObject;
3300:            }
3301:
3302:            /**
3303:             * Add application variables to a component installed on a given target. If
3304:             * even a variable from the set is already set on the component, this
3305:             * operation fails.
3306:             * 
3307:             * @param componentName
3308:             *            component identification
3309:             * @param targetName
3310:             *            identification of the target. Can be a standalone server,
3311:             *            cluster or clustered instance.
3312:             * @param appVariables -
3313:             *            set of application variables to add. The values of the
3314:             *            application variables have the application variable type and
3315:             *            value and the format is "[type]value"
3316:             * @return a JBI Management message indicating the status of the operation.
3317:             *         In case a variable is not added the management message has a
3318:             *         ERROR task status message giving the details of the failure.
3319:             * @throws JBIRemoteException
3320:             *             if there is a jmx error accessing the instance
3321:             */
3322:            public String addApplicationVariables(String componentName,
3323:                    String targetName, Properties appVariables)
3324:                    throws JBIRemoteException {
3325:                String resultObject = null;
3326:                resultObject = this .getConfigurationService()
3327:                        .addApplicationVariables(componentName, targetName,
3328:                                appVariables);
3329:                return resultObject;
3330:            }
3331:
3332:            /**
3333:             * Set application variables on a component installed on a given target. If
3334:             * even a variable from the set has not been added to the component, this
3335:             * operation fails.
3336:             * 
3337:             * @param componentName
3338:             *            component identification
3339:             * @param targetName
3340:             *            identification of the target. Can be a standalone server,
3341:             *            cluster or clustered instance.
3342:             * @param appVariables -
3343:             *            set of application variables to update. The values of the
3344:             *            application variables have the application variable type and
3345:             *            value and the format is "[type]value"
3346:             * @return a JBI Management message indicating the status of the operation.
3347:             *         In case a variable is not set the management message has a ERROR
3348:             *         task status message giving the details of the failure.
3349:             * @throws JBIRemoteException
3350:             *             if there is a jmx error accessing the instance
3351:             */
3352:            public String setApplicationVariables(String componentName,
3353:                    String targetName, Properties appVariables)
3354:                    throws JBIRemoteException {
3355:                String resultObject = null;
3356:                resultObject = this .getConfigurationService()
3357:                        .setApplicationVariables(componentName, appVariables,
3358:                                targetName);
3359:                return resultObject;
3360:            }
3361:
3362:            /**
3363:             * Delete application variables from a component installed on a given
3364:             * target. If even a variable from the set has not been added to the
3365:             * component, this operation fails.
3366:             * 
3367:             * @param componentName
3368:             *            component identification
3369:             * @param targetName
3370:             *            identification of the target. Can be a standalone server,
3371:             *            cluster or clustered instance.
3372:             * @param appVariableNames -
3373:             *            names of application variables to delete.
3374:             * @return a JBI Management message indicating the status of the operation.
3375:             *         In case a variable is not deleted the management message has a
3376:             *         ERROR task status message giving the details of the failure.
3377:             * @throws JBIRemoteException
3378:             *             if there is a jmx error accessing the instance
3379:             */
3380:            public String deleteApplicationVariables(String componentName,
3381:                    String targetName, String[] appVariableNames)
3382:                    throws JBIRemoteException {
3383:                String resultObject = null;
3384:                resultObject = this .getConfigurationService()
3385:                        .deleteApplicationVariables(componentName, targetName,
3386:                                appVariableNames);
3387:                return resultObject;
3388:            }
3389:
3390:            /**
3391:             * Get all the application variables set on a component.
3392:             * 
3393:             * @return all the application variables et on the component. The return
3394:             *         proerties set has the name="[type]value" pairs for the
3395:             *         application variables.
3396:             * @return a JBI Management message indicating the status of the operation.
3397:             * @throws JBIRemoteException
3398:             *             if there is a jmx error accessing the instance
3399:             */
3400:            public Properties getApplicationVariables(String componentName,
3401:                    String targetName) throws JBIRemoteException {
3402:                Properties resultObject = null;
3403:                resultObject = this .getConfigurationService()
3404:                        .getApplicationVariables(componentName, targetName);
3405:                return resultObject;
3406:            }
3407:
3408:            /*----------------------------------------------------------------------------------*\
3409:             *              Operations for Application Configuration Management                 *
3410:            \*----------------------------------------------------------------------------------*/
3411:
3412:            /**
3413:             * Detect the components support for application configuration. This method
3414:             * returns true if the component has a configuration MBean and implements 
3415:             * all the operations for application configuration management.
3416:             *
3417:             * @param componentName 
3418:             *            component identification
3419:             * @param targetName 
3420:             *              identification of the target. Can be a standalone server,
3421:             *              cluster or clustered instance.
3422:             * @return true if the components configuration MBean implements all the
3423:             *         operations for application configuration.
3424:             * @throws JBIRemoteException if the component is not installed or is not 
3425:             *         in the Started state.
3426:             * 
3427:             */
3428:            public boolean isAppConfigSupported(String componentName,
3429:                    String targetName) throws JBIRemoteException {
3430:                Boolean resultObject = null;
3431:                resultObject = this .getConfigurationService()
3432:                        .isAppConfigSupported(componentName, targetName);
3433:                return resultObject;
3434:            }
3435:
3436:            /**
3437:             * Get the CompositeType definition for the components application configuration 
3438:             *
3439:             * @param componentName
3440:             *            component identification
3441:             * @param targetName
3442:             *            identification of the target. Can be a standalone server,
3443:             *            cluster or clustered instance.
3444:             * @return the CompositeType for the components application configuration.
3445:             */
3446:            public CompositeType queryApplicationConfigurationType(
3447:                    String componentName, String targetName)
3448:                    throws JBIRemoteException {
3449:                CompositeType resultObject = null;
3450:                resultObject = this .getConfigurationService()
3451:                        .queryApplicationConfigurationType(componentName,
3452:                                targetName);
3453:                return resultObject;
3454:            }
3455:
3456:            /**
3457:             * Add a named application configuration to a component installed on a given
3458:             * target.
3459:             * 
3460:             * @param componentName
3461:             *            component identification
3462:             * @param targetName
3463:             *            identification of the target. Can be a standalone server,
3464:             *            cluster or clustered instance.
3465:             * @param name
3466:             *            application configuration name
3467:             * @param config
3468:             *            application configuration represented as a set of properties.
3469:             * @return a JBI Management message indicating the status of the operation.
3470:             * @throws JBIRemoteException
3471:             *             if there is a jmx error accessing the instance
3472:             */
3473:            public String addApplicationConfiguration(String componentName,
3474:                    String targetName, String name, Properties config)
3475:                    throws JBIRemoteException {
3476:                String resultObject = null;
3477:                resultObject = this .getConfigurationService()
3478:                        .addApplicationConfiguration(componentName, targetName,
3479:                                name, config);
3480:                return resultObject;
3481:            }
3482:
3483:            /**
3484:             * Update a named application configuration in a component installed on a
3485:             * given target.
3486:             * 
3487:             * @param componentName
3488:             *            component identification
3489:             * @param targetName
3490:             *            identification of the target. Can be a standalone server,
3491:             *            cluster or clustered instance.
3492:             * @param name
3493:             *            application configuration name
3494:             * @param config
3495:             *            application configuration represented as a set of properties.
3496:             * @return a JBI Management message indicating the status of the operation.
3497:             * @throws JBIRemoteException
3498:             *             if there is a jmx error accessing the instance
3499:             */
3500:            public String setApplicationConfiguration(String componentName,
3501:                    String targetName, String name, Properties config)
3502:                    throws JBIRemoteException {
3503:                String resultObject = null;
3504:                resultObject = this .getConfigurationService()
3505:                        .setApplicationConfiguration(componentName, name,
3506:                                config, targetName);
3507:                return resultObject;
3508:            }
3509:
3510:            /**
3511:             * Delete a named application configuration in a component installed on a
3512:             * given target.
3513:             * 
3514:             * @param componentName
3515:             *            component identification
3516:             * @param targetName
3517:             *            identification of the target. Can be a standalone server,
3518:             *            cluster or clustered instance.
3519:             * @param name
3520:             *            name of application configuration to be deleted
3521:             * @return a JBI Management message indicating the status of the operation.
3522:             * @throws JBIRemoteException
3523:             *             if there is a jmx error accessing the instance
3524:             */
3525:            public String deleteApplicationConfiguration(String componentName,
3526:                    String targetName, String name) throws JBIRemoteException {
3527:                String resultObject = null;
3528:                resultObject = this .getConfigurationService()
3529:                        .deleteApplicationConfiguration(componentName,
3530:                                targetName, name);
3531:                return resultObject;
3532:            }
3533:
3534:            /**
3535:             * List all the application configurations in a component.
3536:             * 
3537:             * @param componentName
3538:             *            component identification
3539:             * @param targetName
3540:             *            identification of the target. Can be a standalone server,
3541:             *            cluster or clustered instance.
3542:             * @return an array of names of all the application configurations.
3543:             * @throws JBIRemoteException
3544:             *             if there is a jmx error accessing the instance
3545:             */
3546:            public String[] listApplicationConfigurationNames(
3547:                    String componentName, String targetName)
3548:                    throws JBIRemoteException {
3549:                String[] resultObject = null;
3550:                resultObject = this .getConfigurationService()
3551:                        .listApplicationConfigurationNames(componentName,
3552:                                targetName);
3553:                return resultObject;
3554:            }
3555:
3556:            /**
3557:             * Get a specific named configuration. If the named configuration does not
3558:             * exist in the component the returned properties is an empty set.
3559:             * 
3560:             * @param componentName
3561:             *            component identification
3562:             * @param targetName
3563:             *            identification of the target. Can be a standalone server,
3564:             *            cluster or clustered instance.
3565:             * @return the application configuration represented as a set of properties.
3566:             * @throws JBIRemoteException
3567:             *             if there is a jmx error accessing the instance
3568:             */
3569:            public Properties getApplicationConfiguration(String componentName,
3570:                    String targetName, String name) throws JBIRemoteException {
3571:                Properties resultObject = null;
3572:                resultObject = this .getConfigurationService()
3573:                        .getApplicationConfiguration(componentName, name,
3574:                                targetName);
3575:                return resultObject;
3576:            }
3577:
3578:            /**
3579:             * Get all the application configurations set on a component.
3580:             * 
3581:             * @param componentName
3582:             *            component identification
3583:             * @param targetName
3584:             *            identification of the target. Can be a standalone server,
3585:             *            cluster or clustered instance.
3586:             * @return a map of all the application configurations keyed by the
3587:             *         configuration name.
3588:             * @throws JBIRemoteException
3589:             *             if there is a jmx error accessing the instance
3590:             */
3591:            public Map<String, Properties> getApplicationConfigurations(
3592:                    String componentName, String targetName)
3593:                    throws JBIRemoteException {
3594:                Map<String, Properties> resultObject = null;
3595:                resultObject = this 
3596:                        .getConfigurationService()
3597:                        .getApplicationConfigurations(componentName, targetName);
3598:                return resultObject;
3599:            }
3600:
3601:            /**
3602:             * Retrieve component configuration
3603:             * 
3604:             * @param componentName
3605:             * @param targetName
3606:             * @return the targetName as key and the name/value pairs as properties
3607:             */
3608:            public Properties getComponentConfiguration(String componentName,
3609:                    String targetName) throws JBIRemoteException {
3610:                Properties resultObject = null;
3611:                resultObject = this .getConfigurationService()
3612:                        .getComponentConfiguration(componentName, targetName);
3613:                return resultObject;
3614:            }
3615:
3616:            /**
3617:             * Returns the stack-trace of the exception
3618:             * 
3619:             * @param exception
3620:             * @return stack traces as a string
3621:             */
3622:            private String getStackTrace(JBIRemoteException exception) {
3623:                String buffer = "";
3624:                if (exception != null) {
3625:                    JBIManagementMessage message = exception
3626:                            .extractJBIManagementMessage();
3627:                    if (message != null) {
3628:                        buffer = message.getStackTrace();
3629:                    }
3630:                    if ((buffer == null) || (buffer.trim().length() == 0)) {
3631:                        buffer = "";
3632:                        StringBuffer cause = exception.getCauseStackTrace();
3633:                        if (cause != null) {
3634:                            buffer += AbstractUIMBeanImpl
3635:                                    .getI18NBundle()
3636:                                    .getMessage(
3637:                                            "ui.mbean.stacktrace.caused.by.info")
3638:                                    + ":\n" + cause.toString();
3639:                            buffer += "\n";
3640:                        } else {
3641:                            String[] elements = exception
3642:                                    .getCauseMessageTrace();
3643:                            if (elements != null) {
3644:                                buffer += AbstractUIMBeanImpl
3645:                                        .getI18NBundle()
3646:                                        .getMessage(
3647:                                                "ui.mbean.stacktrace.caused.by.info")
3648:                                        + ":\n";
3649:                                for (int index = 0; index < elements.length; index++) {
3650:                                    if (elements[index] != null) {
3651:                                        buffer += elements[index].toString();
3652:                                        buffer += "\n";
3653:                                    }
3654:                                }
3655:                            }
3656:                        }
3657:                        StackTraceElement[] elements = exception
3658:                                .getStackTrace();
3659:                        if (elements != null) {
3660:                            buffer += AbstractUIMBeanImpl
3661:                                    .getI18NBundle()
3662:                                    .getMessage(
3663:                                            "ui.mbean.stacktrace.stack.trace.info")
3664:                                    + ":\n";
3665:                            for (int index = 0; index < elements.length; index++) {
3666:                                if (elements[index] != null) {
3667:                                    buffer += elements[index].toString();
3668:                                    buffer += "\n";
3669:                                }
3670:                            }
3671:                        }
3672:                    }
3673:                }
3674:                return buffer;
3675:            }
3676:
3677:            /**
3678:             * This method is used to verify if the application variables and 
3679:             * application configuration objects used in the given 
3680:             * application are available in JBI runtime in the specified target. 
3681:             * Also this method verifies if all necessary  components are installed.
3682:             * If generateTemplates is true templates for missing application variables 
3683:             * and application configurations are generated. A command script that uses
3684:             * the template files to set configuration objects is generated.
3685:             *
3686:             * @param applicationURL the URL for the application zip file
3687:             * @param targetName the target on which the application has to be verified
3688:             * @param generateTemplates true if templates have to be generated
3689:             * @param templateDir the dir to store the generated templates
3690:             * @param includeDeployCommand true if the generated script should include
3691:             * deploy command 
3692:             *
3693:             * @returns CompositeData the verification report
3694:             * 
3695:             * CompositeType of verification report
3696:             *  String          - "ServiceAssemblyName",
3697:             *  String          - "ServiceAssemblyDescription",
3698:             *  Integer         - "NumServiceUnits",
3699:             *  Boolean         - "AllComponentsInstalled",
3700:             *  String[]        - "MissingComponentsList",
3701:             *  CompositeData[] - "EndpointInfo",
3702:             *  CompositeData[] - "JavaEEVerifierReport"
3703:             *  String          - "TemplateZIPID"
3704:             * 
3705:             * CompositeType of each EndpointInfo
3706:             *  String    - "EndpointName",
3707:             *  String    - "ServiceUnitName",
3708:             *  String    - "ComponentName",
3709:             *  String    - "Status"
3710:             *  String[]  - "MissingApplicationVariables"
3711:             *  String[]  - "MissingApplicationConfigurations"
3712:             * 
3713:             * CompositeType of each JavaEEVerifierReport
3714:             *  String        - "ServiceUnitName"
3715:             *  TabularData   - "JavaEEVerifierReport"
3716:             *
3717:             * TabularType of each JavaEEVerifierReport
3718:             * 
3719:             * SimpleType.STRING  - "Ear Filename"
3720:             * SimpleType.STRING  - "Referrence By"
3721:             * SimpleType.STRING  - "Referrence Class"
3722:             * SimpleType.STRING  - "JNDI Name"
3723:             * SimpleType.STRING  - "JNDI Class Type"
3724:             * SimpleType.STRING  - "Message"
3725:             * SimpleType.INTEGER - "Status"
3726:             * 
3727:             * @throws JBIRemoteException if the application could not be verified
3728:             * 
3729:             * Note: param templateDir is used between ant/cli and common client client
3730:             * TemplateZIPID is used between common client server and common client client
3731:             */
3732:            public CompositeData verifyApplication(String applicationURL,
3733:                    String targetName, boolean generateTemplates,
3734:                    String templateDir, boolean includeDeployCommand)
3735:                    throws JBIRemoteException {
3736:                CompositeData resultObject = null;
3737:                String rawXMLData = null;
3738:                ApplicationVerificationReport report = null;
3739:
3740:                rawXMLData = this .getConfigurationService().verifyApplication(
3741:                        applicationURL, generateTemplates, templateDir,
3742:                        includeDeployCommand, targetName);
3743:                if ((rawXMLData != null) && (rawXMLData.length() > 0)) {
3744:                    try {
3745:                        report = ApplicationVerificationReportReader
3746:                                .parseFromXMLData(rawXMLData);
3747:                    } catch (MalformedURLException e) {
3748:                        throw new JBIRemoteException(e);
3749:                    } catch (ParserConfigurationException e) {
3750:                        throw new JBIRemoteException(e);
3751:                    } catch (SAXException e) {
3752:                        throw new JBIRemoteException(e);
3753:                    } catch (URISyntaxException e) {
3754:                        throw new JBIRemoteException(e);
3755:                    } catch (IOException e) {
3756:                        throw new JBIRemoteException(e);
3757:                    }
3758:                }
3759:                resultObject = report.generateCompositeData();
3760:
3761:                return resultObject;
3762:            }
3763:
3764:            /**
3765:             * This method is used to export the application variables and application
3766:             * configuration objects used by the given application in the specified
3767:             * target.
3768:             * 
3769:             * @param applicationName
3770:             *            the name of the application
3771:             * @param targetName
3772:             *            the target whose configuration has to be exported
3773:             * @param configDir
3774:             *            the dir to store the configurations
3775:             * @returns String the id for the zip file with exported configurations
3776:             * 
3777:             * @throws JBIRemoteException
3778:             *             if the application configuration could not be exported
3779:             * 
3780:             * Note: param configDir is used between ant/cli and common client client.
3781:             * The return value is used between common client server and common client
3782:             * client.
3783:             */
3784:            public String exportApplicationConfiguration(
3785:                    String applicationName, String targetName, String configDir)
3786:                    throws JBIRemoteException {
3787:                String resultObject = null;
3788:                resultObject = this .getConfigurationService()
3789:                        .exportApplicationConfiguration(applicationName,
3790:                                targetName, configDir);
3791:                return resultObject;
3792:            }
3793:
3794:            /*---------------------------------------------------------------------------------*\
3795:             *            Operations Component Configuration meta-data Management              *
3796:            \*---------------------------------------------------------------------------------*/
3797:
3798:            /**
3799:             * Retrieves the component specific configuration schema.
3800:             * 
3801:             * @param componentName
3802:             *            component identification
3803:             * @param targetName
3804:             *            identification of the target. Can be a standalone server,
3805:             *            cluster or clustered instance.
3806:             * @return a String containing the configuration schema.
3807:             * @throws ManagementRemoteException
3808:             *             on errors.
3809:             */
3810:            public String retrieveConfigurationDisplaySchema(
3811:                    String componentName, String targetName)
3812:                    throws JBIRemoteException {
3813:                String resultObject = "";
3814:                resultObject = this .getConfigurationService()
3815:                        .retrieveConfigurationDisplaySchema(componentName,
3816:                                targetName);
3817:                return resultObject;
3818:            }
3819:
3820:            /**
3821:             * Retrieves the component configuration metadata. The XML data conforms to
3822:             * the component configuration schema.
3823:             * 
3824:             * @param componentName
3825:             *            component identification
3826:             * @param targetName
3827:             *            identification of the target. Can be a standalone server,
3828:             *            cluster or clustered instance.
3829:             * @return a String containing the configuration metadata.
3830:             * @throws ManagementRemoteException
3831:             *             on errors
3832:             */
3833:            public String retrieveConfigurationDisplayData(
3834:                    String componentName, String targetName)
3835:                    throws JBIRemoteException {
3836:                String resultObject = "";
3837:                resultObject = this .getConfigurationService()
3838:                        .retrieveConfigurationDisplayData(componentName,
3839:                                targetName);
3840:                return resultObject;
3841:            }
3842:
3843:            /**
3844:             * This method is used to provide JBIFramework statistics in the
3845:             * given target.
3846:             * @param target target name.
3847:             * @return TabularData table of framework statistics in the given target.
3848:             *
3849:             * If the target is a standalone instance the table will have one entry.
3850:             * If the target is a cluster the table will have an entry for each instance.
3851:             *
3852:             * For more information about the type of the entries in table please refer
3853:             * to <code>JBIStatisticsMBean</code>
3854:             */
3855:            public TabularData getFrameworkStats(String targetName)
3856:                    throws JBIRemoteException {
3857:                return this .getPerformanceMeasurementService()
3858:                        .getFrameworkStatisticsAsTabularData(targetName);
3859:            }
3860:
3861:            /**
3862:             * This method is used to provide statistics for the given component
3863:             * in the given target
3864:             * @param targetName target name
3865:             * @param componentName component name
3866:             * @return TabularData table of component statistics
3867:             *
3868:             * If the target is a standalone instance the table will have one entry.
3869:             * If the target is a cluster the table will have an entry for each instance.
3870:             *
3871:             * For more information about the type of the entries in table please refer
3872:             * to <code>JBIStatisticsMBean</code>
3873:             *
3874:             */
3875:            public TabularData getComponentStats(String componentName,
3876:                    String targetName) throws JBIRemoteException {
3877:                return this .getPerformanceMeasurementService()
3878:                        .getComponentStatisticsAsTabularData(componentName,
3879:                                targetName);
3880:            }
3881:
3882:            /**
3883:             * This method is used to provide statistic information about the given 
3884:             * endpoint in the given target
3885:             * @param targetName target name
3886:             * @param endpointName the endpoint Name
3887:             * @return TabularData table of endpoint statistics
3888:             *
3889:             * If the target is a standalone instance the table will have one entry.
3890:             * If the target is a cluster the table will have an entry for each instance.
3891:             *
3892:             * For more information about the type of the entries in table please refer
3893:             * to <code>JBIStatisticsMBean</code>
3894:             */
3895:            public TabularData getEndpointStats(String endpointName,
3896:                    String targetName) throws JBIRemoteException {
3897:                return this .getPerformanceMeasurementService()
3898:                        .getEndpointStatisticsAsTabularData(endpointName,
3899:                                targetName);
3900:            }
3901:
3902:            /**
3903:             * This method is used to provide statistics about the message service in the
3904:             * given target.
3905:             * @param target target name.
3906:             * @return TabularData table of NMR statistics in the given target.
3907:             *
3908:             * If the target is a standalone instance the table will have one entry.
3909:             * If the target is a cluster the table will have an entry for each instance.
3910:             *
3911:             * For more information about the type of the entries in table please refer
3912:             * to <code>JBIStatisticsMBean</code>
3913:             */
3914:            public TabularData getNMRStats(String targetName)
3915:                    throws JBIRemoteException {
3916:                return this .getPerformanceMeasurementService()
3917:                        .getNMRStatisticsAsTabularData(targetName);
3918:            }
3919:
3920:            /**
3921:             * This method is used to provide statistics about a Service Assembly
3922:             * in the given target.
3923:             * @param target target name.
3924:             * @param saName the service assembly name.
3925:             * @return TabularData table of NMR statistics in the given target.
3926:             *
3927:             * If the target is a standalone instance the table will have one entry.
3928:             * If the target is a cluster the table will have an entry for each instance.
3929:             *
3930:             * For more information about the type of the entries in table please refer
3931:             * to <code>JBIStatisticsMBean</code>
3932:             */
3933:            public TabularData getServiceAssemblyStats(String saName,
3934:                    String targetName) throws JBIRemoteException {
3935:                return this .getPerformanceMeasurementService()
3936:                        .getServiceAssemblyStatisticsAsTabularData(saName,
3937:                                targetName);
3938:            }
3939:
3940:            /**
3941:             * This method is used to provide a list of consuming endpoints for a component.
3942:             * @param componentName component name
3943:             * @param target target name.
3944:             * @return TabularData list of consuming endpoints 
3945:             *
3946:             * If the target is a standalone instance the table will have one entry.
3947:             * If the target is a cluster the table will have an entry for each instance.
3948:             *
3949:             * For more information about the type of the entries in table please refer
3950:             * to <code>JBIStatisticsMBean</code>
3951:             */
3952:            public TabularData getConsumingEndpointsForComponent(
3953:                    String componentName, String targetName)
3954:                    throws JBIRemoteException {
3955:                return this .getPerformanceMeasurementService()
3956:                        .getConsumingEndpointsForComponentAsTabularData(
3957:                                componentName, targetName);
3958:            }
3959:
3960:            /**
3961:             * This method is used to provide a list of provisioning endpoints for a component.
3962:             * @param componentName component name
3963:             * @param target target name.
3964:             * @return TabularData list of provisioning endpoints 
3965:             *
3966:             * If the target is a standalone instance the table will have one entry.
3967:             * If the target is a cluster the table will have an entry for each instance.
3968:             *
3969:             * For more information about the type of the entries in table please refer
3970:             * to <code>JBIStatisticsMBean</code>
3971:             */
3972:            public TabularData getProvidingEndpointsForComponent(
3973:                    String componentName, String targetName)
3974:                    throws JBIRemoteException {
3975:                return this.getPerformanceMeasurementService()
3976:                        .getProvidingEndpointsForComponentAsTabularData(
3977:                                componentName, targetName);
3978:            }
3979:
3980:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.