rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
deleteFolder(popupNode);
while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newFolder(popupNode);
public void actionPerformed(ActionEvent e) { deleteFolder(popupNode); }
renameFolder(popupNode);
deleteFolder(popupNode);
public void actionPerformed(ActionEvent e) { renameFolder(popupNode); }
DefaultMutableTreeNode newNode = addExperimentToWorkspace(newExperiment, experimentNode); workspace.setSelection(newNode); GUIUtils.timeConsumingTaskEnd(c); }
synchronized (root) { while (true) { try { long now = System.currentTimeMillis(); if (updateNeeded && now > nextUpdate) { save(workspaceFileName); updateNeeded = false; root.notifyAll(); } else if (updateNeeded) { long delay = nextUpdate - now; if (delay > 0) { root.wait(delay); } } else { root.wait(); } } catch (Inter...
public void run() { DefaultMutableTreeNode newNode = addExperimentToWorkspace(newExperiment, experimentNode); workspace.setSelection(newNode); // restore default cursor and allow input GUIUtils.timeConsumingTaskEnd(c); }
selectExperimentFromDatabase(popupNode); }
GUIUtils.timeConsumingTaskStart(organizer); try { new Thread("") { public void run() { selectExperimentFromDatabase(popupNode); GUIUtils.timeConsumingTaskEnd(organizer); } }.start(); } catch (RuntimeException re) { System.out.println("Runtime exception creating experiment: " + re); re.printStackTrace(); GUIUtils.timeCo...
public void actionPerformed(ActionEvent e) { selectExperimentFromDatabase(popupNode); }
startExperimentBuilder(popupNode, e.getActionCommand().equals("Configure"));
newExperiment(popupNode);
public void actionPerformed(ActionEvent e) { startExperimentBuilder(popupNode, e.getActionCommand().equals("Configure")); }
startConsole(popupNode);
startExperimentBuilder(popupNode, e.getActionCommand().equals("Configure"));
public void actionPerformed(ActionEvent e) { startConsole(popupNode); }
organizer = this;
public Organizer(CSMART csmart) { this(csmart, null); }
final DefaultMutableTreeNode experimentNode = node; final Experiment newExperiment = experiment; final java.awt.Component glass = ((JFrame)SwingUtilities.getRoot(this)).getGlassPane(); final java.awt.Component c = this; try { SwingUtilities.invokeLater(new Runnable() { public void run() { DefaultMutableTreeNode newNode...
workspace.setSelection(addExperimentToWorkspace(experiment, node));
private void createCMTExperiment(DefaultMutableTreeNode node, String experimentName, String experimentId, String trialId, boolean isCloned) { // System.out.println("Creating so...
final DefaultMutableTreeNode parentNode = node; final String newExperimentName = dialog.getExperimentName(); final String newExperimentId = dialog.getExperimentId(); final boolean isCloned = dialog.isCloned();
private void selectExperimentFromDatabase(DefaultMutableTreeNode node) { // TODO: put up wait cursor while accessing database // the following does NOT work as the display is not updated // when the wait cursor is put up// final java.awt.Component c = this;// // put up wait cursor and block input//...
GUIUtils.timeConsumingTaskStart(this); try { new Thread("") { public void run() { createCMTExperiment(parentNode, newExperimentName, newExperimentId, trialId, isCloned); } }.start(); } catch (RuntimeException e) { System.err.println("Runtime exception creating experiment: " + e); e.printStackTrace(); }
createCMTExperiment(node, dialog.getExperimentName(), dialog.getExperimentId(), trialId, dialog.isCloned());
private void selectExperimentFromDatabase(DefaultMutableTreeNode node) { // TODO: put up wait cursor while accessing database // the following does NOT work as the display is not updated // when the wait cursor is put up// final java.awt.Component c = this;// // put up wait cursor and block input//...
Enumeration enum = nodeModels.keys(); while (enum.hasMoreElements()) { String nodeName = (String) enum.nextElement();
Enumeration en = nodeModels.keys(); while (en.hasMoreElements()) { String nodeName = (String) en.nextElement();
private void destroyOldNodes() { Enumeration enum = nodeModels.keys(); while (enum.hasMoreElements()) { String nodeName = (String) enum.nextElement(); NodeModel model = (NodeModel) nodeModels.get(nodeName); if (model.getState().equals(NodeModel.STATE_STOPPED)) { setChanged(); notify...
}
private void destroyOldNodes() { Enumeration enum = nodeModels.keys(); while (enum.hasMoreElements()) { String nodeName = (String) enum.nextElement(); NodeModel model = (NodeModel) nodeModels.get(nodeName); if (model.getState().equals(NodeModel.STATE_STOPPED)) { setChanged(); notify...
Enumeration enum = this.nodeModels.keys(); while (enum.hasMoreElements()) { Object key = enum.nextElement();
Enumeration en = this.nodeModels.keys(); while (en.hasMoreElements()) { Object key = en.nextElement();
private void startNodes() { Enumeration enum = this.nodeModels.keys(); while (enum.hasMoreElements()) { Object key = enum.nextElement(); NodeModel model = (NodeModel) nodeModels.get(key); if (model.getState().equals(NodeModel.STATE_RUNNING)) continue; model.start(); }
setChanged(); notifyObservers(START_EXPERIMENT_TIMER); }
private void startNodes() { Enumeration enum = this.nodeModels.keys(); while (enum.hasMoreElements()) { Object key = enum.nextElement(); NodeModel model = (NodeModel) nodeModels.get(key); if (model.getState().equals(NodeModel.STATE_RUNNING)) continue; model.start(); }
Enumeration enum = this.nodeModels.elements(); while (enum.hasMoreElements()) { NodeModel nodeModel = (NodeModel) enum.nextElement();
Enumeration en = this.nodeModels.elements(); while (en.hasMoreElements()) { NodeModel nodeModel = (NodeModel) en.nextElement();
public void stopNodes() { // FIXME: Really should call glsClient.stop() if we have a glsClient Enumeration enum = this.nodeModels.elements(); while (enum.hasMoreElements()) { NodeModel nodeModel = (NodeModel) enum.nextElement(); if (nodeModel.getState().equals(NodeModel.STATE_RUNNING)) { if ...
setChanged(); notifyObservers(STOP_EXPERIMENT_TIMER); }
public void stopNodes() { // FIXME: Really should call glsClient.stop() if we have a glsClient Enumeration enum = this.nodeModels.elements(); while (enum.hasMoreElements()) { NodeModel nodeModel = (NodeModel) enum.nextElement(); if (nodeModel.getState().equals(NodeModel.STATE_RUNNING)) { if ...
if (rel.getProperty(PROP_TYPE) == null) {
if (rel.getProperty(RelationshipBase.PROP_TYPE) == null) {
public ComponentData addComponentData(ComponentData data) { AgentAssetData assetData = new AgentAssetData((AgentComponentData)data); assetData.setType(((Integer)propAssetType.getValue()).intValue()); assetData.setAssetClass((String)propAssetClass.getValue()); assetData.setUniqueID((String)propUniqueID.get...
rData.setType((String)rel.getProperty(PROP_TYPE).getValue());
rData.setType((String)rel.getProperty(RelationshipBase.PROP_TYPE).getValue());
public ComponentData addComponentData(ComponentData data) { AgentAssetData assetData = new AgentAssetData((AgentComponentData)data); assetData.setType(((Integer)propAssetType.getValue()).intValue()); assetData.setAssetClass((String)propAssetClass.getValue()); assetData.setUniqueID((String)propUniqueID.get...
xslt.init();
private void gengraph(Ivy ivy, File cache, String organisation, String module, String conf) throws IOException { // process the report with xslt to generate graphml File out; if (_todir != null) { out = _todir; } else { out = new File("."); } X...
xslt.init();
private void genreport(Ivy ivy, File cache, String organisation, String module, String conf) throws IOException { // first process the report with xslt XSLTProcess xslt = new XSLTProcess(); xslt.setTaskName(getTaskName()); xslt.setProject(getProject()); xslt.setIn(new File...
_messageEncoding = browser().messageEncodingForLanguage(language());
if (browser() != null) { _messageEncoding = browser().messageEncodingForLanguage(language()); }
public ERXMessageEncoding messageEncoding() { if (_messageEncoding == null) { _messageEncoding = browser().messageEncodingForLanguage(language()); } return _messageEncoding; }
_messageEncoding = browser().messageEncodingForLanguage(_localizer.language());
if (browser() != null) { _messageEncoding = browser().messageEncodingForLanguage(_localizer.language()); }
public void setLanguages(NSArray languageList) { super.setLanguages(languageList); ERXLocalizer newLocalizer = ERXLocalizer.localizerForLanguages(languageList); if (! newLocalizer.equals(_localizer)) { if (_localizer == null && ! WOApplication.application().isCachingEnabled()) ...
this.experiment = experiment;
setExperiment(experiment);
public ExperimentBuilder(CSMART csmart, Experiment experiment) { this.csmart = csmart; this.experiment = experiment; isEditable = experiment.isEditable(); isRunnable = experiment.isRunnable(); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); JMenu fileMenu = new JMenu(FILE_M...
if (modified) saveHelper(); else JOptionPane.showMessageDialog(this, "No modifications were made.");
if (!modified) { String[] msg = { "No modifications were made.", "Do you want to save this experiment anyway?" }; int answer = JOptionPane.showConfirmDialog(this, msg, "No Modifications", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE); if (answer != JOptionPane.OK_OPTION) return; setModified(true); } saveHe...
private void save() { if (!experiment.isInDatabase()) return; if (modified) saveHelper(); else JOptionPane.showMessageDialog(this, "No modifications were made."); }
super (bevelType);
public BevelBorderUIResource(int bevelType) { }
super (outsideBorder, insideBorder);
public CompoundBorderUIResource(Border outsideBorder, Border insideBorder) { }
super (color);
public LineBorderUIResource(Color color) { }
super (top, left, bottom, right, color);
public MatteBorderUIResource(int top, int left, int bottom, int right, Color color) { }
super (title);
TitledBorderUIResource(String title) { }
super ();
public BorderUIResource(Border delegate) { this.delegate = delegate; }
return new PacketError(element);
return new PacketError(error);
public PacketError getError() { Element error = element.element("error"); if (error != null) { return new PacketError(element); } return null; }
} else if (origExperimentId != null && origExperimentId.equals(experiment)) {
} else if (origExperimentId != null && origExperimentId.equals(experimentId)) {
public Experiment createExperiment(String originalExperimentName, String experimentName, String experimentId, String trialId) { createLogger(); // get assembly ids for trial ArrayList assemblyIds = get...
if (log.isDebugEnabled()) { log.debug("createExpt somehow still no Comm ASB. Create a new one");
if (log.isInfoEnabled()) { log.info("createExpt somehow still no Comm ASB. Create a new one. OrigExptID: " + origExperimentId + ", exptID: " + experimentId);
public Experiment createExperiment(String originalExperimentName, String experimentName, String experimentId, String trialId) { createLogger(); // get assembly ids for trial ArrayList assemblyIds = get...
if (peer != null) { peer = Toolkit.getDefaultToolkit ().createMenu (this); } super.addNotify ();
public void addNotify() { // FIXME }
return 0;
return array_offset;
public final int arrayOffset () { if (backing_buffer == null) throw new UnsupportedOperationException (); if (isReadOnly ()) throw new ReadOnlyBufferException (); return 0; }
public String getDescription();
String getDescription();
public String getDescription();
public String getPublisher();
String getPublisher();
public String getPublisher();
public ClusterIdentifier getSource();
ClusterIdentifier getSource();
public ClusterIdentifier getSource();
if ( findAncestorWithClass( GuardTag.class ) == null ) { throw new JellyException( "Unable to locate guard" ); } throw new JellyException( new FailException() );
throw new FailException();
public void doTag(XMLOutput output) throws Exception { if ( findAncestorWithClass( GuardTag.class ) == null ) { throw new JellyException( "Unable to locate guard" ); } throw new JellyException( new FailException() ); }
_displayGroup=(WODisplayGroup)super.valueForBinding("displayGroup");
_displayGroup=(WODisplayGroup)super.valueForBinding(Keys.displayGroup);
public WODisplayGroup displayGroup() { if (_displayGroup==null && !synchronizesVariablesWithBindings()) _displayGroup=(WODisplayGroup)super.valueForBinding("displayGroup"); return _displayGroup; }
setVisible(false);
Window() { setVisible(false); setLayout(new BorderLayout()); }
public WindowPeer createEmbeddedWindow (int window_id, int width, int height);
public EmbeddedWindowPeer createEmbeddedWindow (EmbeddedWindow w);
public WindowPeer createEmbeddedWindow (int window_id, int width, int height);
public Analyzer(CSMART csmart, Experiment experiment) { createLogger(); this.csmart = csmart; this.experiment = experiment; myFrame = this; JMenu fileMenu = new JMenu(FILE_MENU); JMenuItem openMenuItem = new JMenuItem(OPEN_MENU_ITEM); openMenuItem.addActionListener(this); fileMenu.add(openMenuItem); JMenuItem exitMenuI...
public Analyzer(CSMART csmart) { this(csmart, null);
public Analyzer(CSMART csmart, Experiment experiment) { createLogger(); this.csmart = csmart; this.experiment = experiment; myFrame = this; JMenu fileMenu = new JMenu(FILE_MENU); JMenuItem openMenuItem = new JMenuItem(OPEN_MENU_ITEM); openMenuItem.addActionListener(this); fileMenu.add(openMenu...
File resultsDir = experiment.getResultDirectory();
File resultsDir = null; if (experiment == null) resultsDir = csmart.getResultDir(); else resultsDir = experiment.getResultDirectory();
private void showExcelFile() { File resultsDir = experiment.getResultDirectory(); if (resultsDir == null) { JOptionPane.showMessageDialog(this, "No Results (Metrics) Directory for Experiment", "No Results Directory", JOptionPane.WARNING_MESSAGE); return; } resultsDir = new...
resultsDir = new File(resultsDir, experiment.getExperimentName());
private void showExcelFile() { File resultsDir = experiment.getResultDirectory(); if (resultsDir == null) { JOptionPane.showMessageDialog(this, "No Results (Metrics) Directory for Experiment", "No Results Directory", JOptionPane.WARNING_MESSAGE); return; } resultsDir = new...
fileChooser.setFileFilter(new MyFileFilter(experiment));
if (experiment != null) { resultsDir = new File(resultsDir, experiment.getExperimentName()); fileChooser.setFileFilter(new MyFileFilter(experiment)); }
private void showExcelFile() { File resultsDir = experiment.getResultDirectory(); if (resultsDir == null) { JOptionPane.showMessageDialog(this, "No Results (Metrics) Directory for Experiment", "No Results Directory", JOptionPane.WARNING_MESSAGE); return; } resultsDir = new...
if (sig.getName().equals(Constants.STATIC_NAME)) {
if (sig.getName().equals(Constants.CONSTRUCTOR_NAME)) {
protected Emitter getEmitter(ClassVisitor cv) { return new Emitter(cv) { public void begin_class(int access, String className, Type superType, Type[] interfaces, String sourceFile) { Type[] all = TypeUtils.add(interfaces, TypeUtils.getTypes(delegateIf)); super.begin_c...
if (sig.getName().equals(Constants.STATIC_NAME)) {
if (sig.getName().equals(Constants.CONSTRUCTOR_NAME)) {
public CodeVisitor begin_method(int access, Signature sig, Type[] exceptions) { CodeVisitor v = super.begin_method(access, sig, exceptions); if (sig.getName().equals(Constants.STATIC_NAME)) { return new CodeAdapter(v) { private boolean ...
OutputStream out = new java.io.FileOutputStream("/home/smeyer/1.pdf");
Log4JLogger fopLogger = new Log4JLogger(logger); ByteArrayOutputStream out = new ByteArrayOutputStream();
public void transform() throws ilTransformerException { try { OutputStream out = new java.io.FileOutputStream("/home/smeyer/1.pdf"); Driver driver = new Driver(); logger.info("Started driver"); driver.setOutputStream(out); ...
driver.setRenderer(Driver.RENDER_PDF); driver.setInputSource(new InputSource(getFoInputStream()));
public void transform() throws ilTransformerException { try { OutputStream out = new java.io.FileOutputStream("/home/smeyer/1.pdf"); Driver driver = new Driver(); logger.info("Started driver"); driver.setOutputStream(out); ...
setPdfString(out.toString());
this.setPdf(out.toByteArray());
public void transform() throws ilTransformerException { try { OutputStream out = new java.io.FileOutputStream("/home/smeyer/1.pdf"); Driver driver = new Driver(); logger.info("Started driver"); driver.setOutputStream(out); ...
in = new FileInputStream(chooser.getSelectedFile());
in = new FileInputStream(sel);
private void readPropertiesFromFile() { String dirName = "."; try { dirName = System.getProperty("org.cougaar.install.path"); } catch (RuntimeException e) { // just use default } if (dirName == null) dirName = "."; JFileChooser chooser = new JFileChooser(dirName); int result = choo...
Class loaded = loadHelper(new AddStaticInitTransformer(m), Example.class);
ClassTransformer t = new AddStaticInitTransformer(m); Class loaded = loadHelper(t, Example.class);
public void testAddStatic() throws Exception { Method m = ReflectUtils.findMethod("net.sf.cglib.transform.impl.TestTransformingLoader.initStatic(Class)"); Class loaded = loadHelper(new AddStaticInitTransformer(m), Example.class); Object obj = loaded.newInstance(); // TODO }
errorKeyOrder.addObject(d2wContext().displayNameForProperty()); errorMessages.setObjectForKey(erv.getMessage(), d2wContext().displayNameForProperty()); keyPathsWithValidationExceptions.addObject(erv.propertyKey()); if (erv.eoObject() != null && erv.propertyKey() != null && shouldSetFailedValidationValue()) { try { er...
if ( d2wContext().propertyKey() != null ) { errorKeyOrder.addObject(d2wContext().displayNameForProperty()); errorMessages.setObjectForKey(erv.getMessage(), d2wContext().displayNameForProperty()); keyPathsWithValidationExceptions.addObject(erv.propertyKey()); if (erv.eoObject() != null && erv.propertyKey() != null && ...
public void validationFailedWithException(Throwable e, Object value, String keyPath) { if (validationLog.isDebugEnabled()) { validationLog.debug("Validation failed with exception: " + e + " value: " + value + " keyPath: " + keyPath); } if (shouldCollectValidationExceptions()) { ...
if (log.isDebugEnabled()) log.debug("addComponentData found my agent " + child.getName() + " which currently says isModified=" + child.isModified());
public ComponentData addComponentData(ComponentData data) { ComponentData[] children = data.getChildren(); for(int i=0; i < children.length; i++) { ComponentData child = children[i]; // for each child component data, if it's an agent's component data if (child.getType() == ComponentData.AGENT) { ...
if (nodes[i] == null)
if (nodes[j] == null)
public boolean hasConfiguration() { if (hosts.isEmpty() || nodes.isEmpty() || getAgents() == null || getAgents().length == 0) { return false; } // An experiment has a configuration if it has at least one host // which has at least one Node // which has at least one Agent HostComponent[] hosts =...
for (int i = 0; i < getComponentCount(); i++) if (!((ModifiableConfigurableComponent)getComponent(i)).isEditable()) return false;
public boolean isEditable() { if (editable) { // make sure that societies are editable too for (int i = 0; i < getComponentCount(); i++) if (!((ModifiableConfigurableComponent)getComponent(i)).isEditable()) return false; return true; } return false; }
if (hasUnboundProperties()) setRunnable(false);
if (! hasConfiguration() || hasUnboundProperties()) { return false; }
public boolean isRunnable() { // if (! hasConfiguration() || hasUnboundProperties()) if (hasUnboundProperties()) // FIXME!!! Restore check of hasConfiguration once it works!! // if (! hasConfiguration()) setRunnable(false); return runnable; }
timeout_ = DEFAULT_TIMEOUT;
public SerialComm(String appName, String portName) { appName_ = appName; portName_ = portName; bitRate_ = DEFAULT_BIT_RATE; dataBits_ = SerialPort.DATABITS_8; stopBits_ = SerialPort.STOPBITS_1; parity_ = SerialPort.PARITY_NONE; flowControl_ = SerialPort.FLOWCONTRO...
if (timeout_ > 0) { try { serialPort_.enableReceiveTimeout(timeout_); } catch (UnsupportedCommOperationException e) { log_.warn("enableReceiveTimeout failed", e); } } else { serialPort_.disableReceiveTimeout(); }
public void open() throws IOException { try { serialPort_ = openSerialPort(portName_); log_.debug("Opened port : " + serialPort_); } catch (PortInUseException piuEx) { log_.error("Failed to open serial port", piuEx); throw (IOException) new IOExce...
XmlModuleDescriptorWriter.write(md, destFile);
try { XmlModuleDescriptorWriter.write(md, destFile); } finally { if (is != null) { is.close(); } }
public void toIvyFile(InputStream is, Resource res, File destFile, ModuleDescriptor md) throws ParseException, IOException { XmlModuleDescriptorWriter.write(md, destFile); }
public AgentFileComponent(String name, String classname) {
public AgentFileComponent(String name, String filename, String classname) {
public AgentFileComponent(String name, String classname) { super(name); this.name = name; this.classname = classname; filename = name + ".ini"; createLogger(); if(log.isDebugEnabled()) { log.debug("Creating Agent: " + name); } }
filename = name + ".ini";
this.filename = filename;
public AgentFileComponent(String name, String classname) { super(name); this.name = name; this.classname = classname; filename = name + ".ini"; createLogger(); if(log.isDebugEnabled()) { log.debug("Creating Agent: " + name); } }
String modelName = EOModelGroup.defaultGroup().entityNamed(entityName).model().name();
String modelName = EOModelGroup.modelGroupForObjectStoreCoordinator(osc).entityNamed(entityName).model().name();
private static synchronized EODatabaseContext databaseContextForEntityNamed(String entityName, ObjectStoreCoordinator osc) { String modelName = EOModelGroup.defaultGroup().entityNamed(entityName).model().name(); Hashtable h = osc.databaseContextsForModels(); EODatabaseContext db...
EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName);
EOEntity entity = EOModelGroup.modelGroupForObjectStoreCoordinator(sender).entityNamed(entityName);
private synchronized void processUpdates(NSDictionary updatedEntDict, ObjectStoreCoordinator sender) { NSArray entityNames = updatedEntDict.allKeys(); Enumeration entitiesEnumerator = entityNames.objectEnumerator(); while (entitiesEnumerator.hasMoreElements()) { S...
public final Object getContent() throws IOException
public Object getContent() throws IOException
public final Object getContent() throws IOException { return openConnection().getContent(); }
public void experimentTerminated();
void experimentTerminated();
public void experimentTerminated();
public boolean isMonitoring();
boolean isMonitoring();
public boolean isMonitoring();
closeZipEntry();
closeEntry();
public ZipEntry getNextEntry () throws IOException { if (current != null) closeZipEntry(); if (in.read() != 'P' || in.read() != 'K') return null; int code = in.read(); while (code == '\001') { code = in.read(); if (code != '\002') return null; in.skip(16); int size = read4(); in.skip(4);...
long newMod = 0l;
private static Set getAvailableQueries() { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.recipe.RecipeQueryProperty"); if (availableQueries == null) { try { availableQueries = new HashSet(); // Get the base queries for (Iterator i = DBProperties.readQueryFile(PDbBase.QUERY...
return pos + super.available();
return (buf.length - pos) + super.available();
public int available() throws IOException { return pos + super.available(); }
if (assembly_id.equals("CSMI-0001") && log.isErrorEnabled()) { log.error("clnAsb for CSMI0001! Sub: " + substitutions, new Throwable("Who called cleanAssemblyFor csmi-0001")); }
private void cleanAssembly(String assembly_id, boolean partial) throws SQLException { if (assembly_id == null || assembly_id.equals("")) return; substitutions.put(":assemblies_to_clean:", "(" + sqlQuote(assembly_id) + ")"); cleanAssemblies(partial); }
if (log.isDebugEnabled()) { log.debug("cleanOldConfigSoc with subs " + substitutions); }
private void cleanOldConfigSocietyAssemblies() throws SQLException { ResultSet rs = executeQuery(stmt, dbp.getQuery("queryOldSocietyConfigAssembliesToClean", substitutions)); while (rs.next()) { String asb = rs.getString(1); if (asb == null || asb.equals("")) continue; if (log.isDebugEnabled...
if (asb.equals("CSMI-0001") && log.isErrorEnabled()) { log.error("clnOldRuntime wants to delete CSMI-0001! Sub: " + substitutions, new Throwable("Who is the culprit?")); }
private void cleanOldRuntimeSocietyAssemblies() throws SQLException { ResultSet rs = executeQuery(stmt, dbp.getQuery("queryOldSocietyRuntimeAssembliesToClean", substitutions)); while (rs.next()) { String asb = rs.getString(1); if (asb == null || asb.equals("")) continue; substitutions.put(":...
if (rs.next()) { boolean first = true; StringBuffer assembliesToDelete = new StringBuffer(); assembliesToDelete.append("("); StringBuffer assembliesToReallyDelete = new StringBuffer(); assembliesToReallyDelete.append("("); boolean rfirst = true; String asb = null; do { if (first) { first = false;
boolean first = true; StringBuffer assembliesToDelete = new StringBuffer(); assembliesToDelete.append("("); StringBuffer assembliesToReallyDelete = new StringBuffer(); assembliesToReallyDelete.append("("); boolean rfirst = true; String asb = null; while (rs.next()) { if (first) { first = false; } else { assembliesToDe...
private void cleanTrial(String cmtType, String hnaType, String csmiType, String oldTrialId) throws SQLException { // Basically we'll drop the HNA, CSMI assembly and recipes. It will drop // the CMT assembly too, but only if cmtType is null // Also drop any CSA in runtime if cmtType is not a CSA if(log...
assembliesToDelete.append(", ");
assembliesToReallyDelete.append(", ");
private void cleanTrial(String cmtType, String hnaType, String csmiType, String oldTrialId) throws SQLException { // Basically we'll drop the HNA, CSMI assembly and recipes. It will drop // the CMT assembly too, but only if cmtType is null // Also drop any CSA in runtime if cmtType is not a CSA if(log...
asb = rs.getString(1);
assembliesToReallyDelete.append(sqlQuote(asb)); } else if (log.isDebugEnabled()) { log.debug("cleanTrial not deleting asb " + asb + " cause its still in use outside trial " + trialId); } if (asb.equals("CSMI-0001") && log.isErrorEnabled()) { log.error("CleanTrial adding CSMI0001 to list of assemblies to remove from run...
private void cleanTrial(String cmtType, String hnaType, String csmiType, String oldTrialId) throws SQLException { // Basically we'll drop the HNA, CSMI assembly and recipes. It will drop // the CMT assembly too, but only if cmtType is null // Also drop any CSA in runtime if cmtType is not a CSA if(log...
if (! isAssemblyUsed(asb)) { if (log.isDebugEnabled()) { log.debug("assembly " + asb + " not used, except in trial " + trialId + " which we are deleting"); } if (rfirst) { rfirst = false; } else { assembliesToReallyDelete.append(", "); } assembliesToReallyDelete.append(sqlQuote(asb)); } else if (log.isDebugEnabled()) {...
if(log.isDebugEnabled()) { log.debug("cleanTrial Substitutions: " + substitutions); } assembliesToDelete.append(")"); assembliesToReallyDelete.append(")"); if (! first) {
private void cleanTrial(String cmtType, String hnaType, String csmiType, String oldTrialId) throws SQLException { // Basically we'll drop the HNA, CSMI assembly and recipes. It will drop // the CMT assembly too, but only if cmtType is null // Also drop any CSA in runtime if cmtType is not a CSA if(log...
if (! rfirst) { substitutions.put(":assemblies_to_clean:", assembliesToReallyDelete.toString()); cleanAssemblies(false); }
private void cleanTrial(String cmtType, String hnaType, String csmiType, String oldTrialId) throws SQLException { // Basically we'll drop the HNA, CSMI assembly and recipes. It will drop // the CMT assembly too, but only if cmtType is null // Also drop any CSA in runtime if cmtType is not a CSA if(log...
rs.close(); if(log.isDebugEnabled()) { log.debug("cleanTrial Substitutions: " + substitutions);
if (! rfirst) { substitutions.put(":assemblies_to_clean:", assembliesToReallyDelete.toString()); log.debug("Assemblies to completely delete: " + assembliesToReallyDelete); cleanAssemblies(false);
private void cleanTrial(String cmtType, String hnaType, String csmiType, String oldTrialId) throws SQLException { // Basically we'll drop the HNA, CSMI assembly and recipes. It will drop // the CMT assembly too, but only if cmtType is null // Also drop any CSA in runtime if cmtType is not a CSA if(log...
if (log.isDebugEnabled()) { log.debug("Cloning trial " + oldTrialId); }
private void cloneTrial(String oldTrialId, String experimentName, String description) throws SQLException { // Create new experiment in DB with given name, // set global expt_id variable newExperiment("EXPT", experimentName, description); // greate trial with given name, set global variable newTria...
if (log.isDebugEnabled()) { log.debug("Pag for " + data.getName() + " at PropGroupData " + i + " with name " + pgName + " has " + props.length + " props, of which #" + j + " is " + propInfo.toString()); }
private void populateAgent(ComponentData data, boolean isAdded) throws SQLException { if(log.isDebugEnabled()) { log.debug("populating Agent: " + data.getName()); } AgentAssetData assetData = data.getAgentAssetData(); if (assetData == null) return; substitutions.put(":agent_org_class:", sqlQ...
if (log.isDebugEnabled()) { log.debug("pagent " + data.getName() + " inserting pgval under pgattid " + propInfo.getAttributeLibId() + ", val " + values[k] + " into assembly " + substitutions.get(":assembly_id:")); } executeUpdate(dbp.getQuery("insertAttribute", substitutions)); }
if ((count > 1 && hasval) || (count == 1 && values.length == 1 && hasval)) { if (log.isDebugEnabled()) { log.debug("PopAgent not inserting PG multival " + values[k] + " for pagent " + data.getName() + " under attlibid " + propInfo.getAttributeLibId() + ", cause already have " + count + " values all with order 0, inclu...
private void populateAgent(ComponentData data, boolean isAdded) throws SQLException { if(log.isDebugEnabled()) { log.debug("populating Agent: " + data.getName()); } AgentAssetData assetData = data.getAgentAssetData(); if (assetData == null) return; substitutions.put(":agent_org_class:", sqlQ...
if (log.isErrorEnabled() && assembly_id.equals("CSMI-0001")) { log.error("Who is deleting CSMI-0001 from runtime?", new Throwable("Who is the culprit?")); }
private void removeRuntimeAssembly(String assembly_id) throws SQLException { if (assembly_id == null || assembly_id.equals("")) return; substitutions.put(":assemblies_to_clean:", "(" + sqlQuote(assembly_id) + ")"); if (log.isDebugEnabled()) { log.debug("Removing assembly from runtime: " + assembly_...
is = ClassLoader.getSystemResourceAsStream (localizedName.replace('.', '/') + ".properties");
is = ClassLoader.getSystemResourceAsStream (resourceName);
private static final ResourceBundle tryBundle(String localizedName, Locale locale, ClassLoader classloader, ResourceBundle bundle, HashMap cache) { { // First look into the cache. // XXX We should remove cleared references from the cache. Reference ref = (Reference) cache.get(lo...
is = classloader.getResourceAsStream (localizedName.replace('.', '/') + ".properties");
is = classloader.getResourceAsStream (resourceName);
private static final ResourceBundle tryBundle(String localizedName, Locale locale, ClassLoader classloader, ResourceBundle bundle, HashMap cache) { { // First look into the cache. // XXX We should remove cleared references from the cache. Reference ref = (Reference) cache.get(lo...
ResourceBundle rb = new PropertyResourceBundle(is); rb.parent = bundle; rb.locale = locale; bundle = rb;
foundBundle = new PropertyResourceBundle(is); foundBundle.parent = bundle; foundBundle.locale = locale;
private static final ResourceBundle tryBundle(String localizedName, Locale locale, ClassLoader classloader, ResourceBundle bundle, HashMap cache) { { // First look into the cache. // XXX We should remove cleared references from the cache. Reference ref = (Reference) cache.get(lo...
ResourceBundle rb = (ResourceBundle) rbClass.newInstance(); rb.parent = bundle; rb.locale = locale; bundle = rb;
foundBundle = (ResourceBundle) rbClass.newInstance(); foundBundle.parent = bundle; foundBundle.locale = locale;
private static final ResourceBundle tryBundle(String localizedName, Locale locale, ClassLoader classloader, ResourceBundle bundle, HashMap cache) { { // First look into the cache. // XXX We should remove cleared references from the cache. Reference ref = (Reference) cache.get(lo...
if (bundle != null) cache.put(localizedName, new SoftReference(bundle));
if (foundBundle != null) cache.put(localizedName, new SoftReference(foundBundle));
private static final ResourceBundle tryBundle(String localizedName, Locale locale, ClassLoader classloader, ResourceBundle bundle, HashMap cache) { { // First look into the cache. // XXX We should remove cleared references from the cache. Reference ref = (Reference) cache.get(lo...
return bundle;
return foundBundle != null ? foundBundle : bundle;
private static final ResourceBundle tryBundle(String localizedName, Locale locale, ClassLoader classloader, ResourceBundle bundle, HashMap cache) { { // First look into the cache. // XXX We should remove cleared references from the cache. Reference ref = (Reference) cache.get(lo...
if (locale.getLanguage().length() > 0)
final String language = locale.getLanguage(); if (language.length() > 0)
private static final ResourceBundle tryLocalBundle(String baseName, Locale locale, ClassLoader classloader, ResourceBundle bundle, HashMap cache) { if (locale.getLanguage().length() > 0) { String name = baseName + "_" + locale.getLanguage(); if (locale.getCountry().len...
String name = baseName + "_" + locale.getLanguage();
final String country = locale.getCountry(); String name = baseName + "_" + language;
private static final ResourceBundle tryLocalBundle(String baseName, Locale locale, ClassLoader classloader, ResourceBundle bundle, HashMap cache) { if (locale.getLanguage().length() > 0) { String name = baseName + "_" + locale.getLanguage(); if (locale.getCountry().len...
if (locale.getCountry().length() != 0)
if (country.length() != 0)
private static final ResourceBundle tryLocalBundle(String baseName, Locale locale, ClassLoader classloader, ResourceBundle bundle, HashMap cache) { if (locale.getLanguage().length() > 0) { String name = baseName + "_" + locale.getLanguage(); if (locale.getCountry().len...
new Locale(locale.getLanguage(), ""),
new Locale(language, ""),
private static final ResourceBundle tryLocalBundle(String baseName, Locale locale, ClassLoader classloader, ResourceBundle bundle, HashMap cache) { if (locale.getLanguage().length() > 0) { String name = baseName + "_" + locale.getLanguage(); if (locale.getCountry().len...
name += "_" + locale.getCountry();
name += "_" + country;
private static final ResourceBundle tryLocalBundle(String baseName, Locale locale, ClassLoader classloader, ResourceBundle bundle, HashMap cache) { if (locale.getLanguage().length() > 0) { String name = baseName + "_" + locale.getLanguage(); if (locale.getCountry().len...
if (locale.getVariant().length() != 0)
final String variant = locale.getVariant(); if (variant.length() != 0)
private static final ResourceBundle tryLocalBundle(String baseName, Locale locale, ClassLoader classloader, ResourceBundle bundle, HashMap cache) { if (locale.getLanguage().length() > 0) { String name = baseName + "_" + locale.getLanguage(); if (locale.getCountry().len...
new Locale(locale.getLanguage(), locale.getCountry()),
new Locale(language, country),
private static final ResourceBundle tryLocalBundle(String baseName, Locale locale, ClassLoader classloader, ResourceBundle bundle, HashMap cache) { if (locale.getLanguage().length() > 0) { String name = baseName + "_" + locale.getLanguage(); if (locale.getCountry().len...
name += "_" + locale.getVariant();
name += "_" + variant;
private static final ResourceBundle tryLocalBundle(String baseName, Locale locale, ClassLoader classloader, ResourceBundle bundle, HashMap cache) { if (locale.getLanguage().length() > 0) { String name = baseName + "_" + locale.getLanguage(); if (locale.getCountry().len...
java.util.Vector vector2 = (java.util.Vector)Enhancer.enhance( java.util.Vector.class, new Class[]{java.util.List.class},interceptor );
public void testEnhance()throws Throwable{ MethodInterceptor interceptor = new MethodInterceptor(){ public boolean invokeSuper( Object obj,java.lang.reflect.Method method, Object args[] ) throws java.lang.Throwable{ ...
assertTrue("Cache failed",vector.getClass() == vector2.getClass()); String value = "VALUE"; vector.add(null); vector.elements(); vector.size(); vector.add(value); vector.remove(value); vector.remove(value); vector.contains(value); vector.get(0); vector.contains(value); vector.toArray(new Object[]{});
java.util.Vector vector2 = (java.util.Vector)Enhancer.enhance( java.util.Vector.class, new Class[]{java.util.List.class},interceptor ); assertTrue("Cache failed",vector.getClass() == vector2.getClass()); String value = "VALUE"; vector.add(null); vector.elements(); vector.size(); vector.add(value); vector.remove...
public void testEnhance()throws Throwable{ MethodInterceptor interceptor = new MethodInterceptor(){ public boolean invokeSuper( Object obj,java.lang.reflect.Method method, Object args[] ) throws java.lang.Throwable{ ...