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