1 26 27 package org.objectweb.openccm.command.lib; 28 29 import org.objectweb.openccm.command.api.CommandOnIR3; 31 import org.objectweb.util.cmdline.api.CommandLine; 32 33 40 41 abstract public class CommandOnIR3Base 42 extends ApplicationBase 43 implements CommandOnIR3 44 { 45 51 52 private org.objectweb.openccm.ir3.api.ComponentRepository componentRepository_; 53 54 60 61 public 62 CommandOnIR3Base() 63 { 64 super(); 66 67 componentRepository_ = null; 69 } 70 71 76 public 77 CommandOnIR3Base(CommandLine commandLine) 78 { 79 super(commandLine); 81 82 componentRepository_ = null; 84 } 85 86 92 98 104 110 116 121 public boolean 122 checkComponentRepository() 123 { 124 try 125 { 126 componentRepository_ = org.objectweb.openccm.ir3.api.ComponentRepositoryHelper.narrow( 128 org.objectweb.openccm.corba.TheInterfaceRepository.getRepository()); 129 } 130 catch(Exception ex) 131 { 132 getConsole().error("Problem to obtain the OpenCCM Interface Repository reference!"); 133 report_exception(ex); 134 return false; 135 } 136 return true; 137 } 138 139 144 public org.objectweb.openccm.ir3.api.ComponentRepository 145 getComponentRepository() 146 { 147 if(componentRepository_ == null) { 148 checkComponentRepository(); 149 } 150 return componentRepository_; 151 } 152 153 } 159 | Popular Tags |