rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public javax.mail.Session newSession () { return javax.mail.Session.getInstance (System.getProperties ());
public javax.mail.Session newSession (Properties props) { javax.mail.Session session = javax.mail.Session.getInstance (props); session.setDebug (this.debugEnabled ()); return session;
public javax.mail.Session newSession () { return javax.mail.Session.getInstance (System.getProperties ()); }
if (this.defaultSession () == null) log.warn("Unable to create default mail session!");
public void initializeFrameworkFromSystemProperties () { // Admin Email String adminEmail = System.getProperty ("er.javamail.adminEmail"); if ((adminEmail == null) || (adminEmail.length () == 0)) throw new RuntimeException ("ERJavaMail: the property er.javamail.adminEmail is not spec...
setVisible(true);
show();
public CMTDialog(JFrame parent, Organizer organizer, String experimentName, String experimentId) { super(parent, "Threads and Groups", true); // modal dialog this.organizer = organizer; // to get unique names this.experimentName = experimentName; this.experimentId = exp...
setVisible(false);
cancelled = true; hide();
private void cancel_actionPerformed() { setVisible(false); trialId = null; }
d.setVisible(true);
d.show();
public static void main(String[] args) { ArrayList trialNames = new ArrayList(); CMTDialog d = new CMTDialog(null, null, "ExperimentName", "ExperimentID"); d.setVisible(true); }
setVisible(false);
cancelled = false; hide();
private void ok_actionPerformed() { setVisible(false); }
log = CSMART.createLogger(this.getClass().getName());
public void setupSubscriptions() { log = CSMART.createLogger(this.getClass().getName()); if (log.isDebugEnabled()) { log.debug("setupSubscriptions: " + this + ":Entering"); } allocSub = (IncrementalSubscription)subscribe(allocP); }
protected final void publishChangeAt( Object o, long timeMillis, UnaryPredicate pred) { publishChangeAfter(o, (timeMillis - currentTimeMillis()), pred);
protected final void publishChangeAt(Object o, long timeMillis) { publishChangeAt(o, timeMillis, null);
protected final void publishChangeAt( Object o, long timeMillis, UnaryPredicate pred) { publishChangeAfter(o, (timeMillis - currentTimeMillis()), pred); }
public Property addParameter(int param) { return addProperty(PROP_PARAM + nParameters++, new Integer(param));
public Property addParameter(final int param) { Property result = addInvisibleProperty(PROP_PARAM + nParameters++, new Integer(param)); return result;
public Property addParameter(int param) { return addProperty(PROP_PARAM + nParameters++, new Integer(param)); }
if (e.key() == null || e.object() == null)
if (e.key() == null || e.object() == null || (e.object() != null && !(e.object() instanceof EOEnterpriseObject)))
public Object validateValueForKey(Object value, String key) throws NSValidation.ValidationException { if (validation.isDebugEnabled()) validation.debug("ValidateValueForKey on eo: " + this + " value: " + value + " key: " + key); if (key==null) // better to raise before calling super which w...
boolean _raiseOnMissingEditingContextDelegate = ERXProperties.booleanForKeyWithDefault("er.extensions.ERXRaiseOnMissingEditingContextDelegate", true);
public static boolean _checkEditingContextDelegate(EOEditingContext editingContext) { if(editingContext instanceof ERXEC) { return true; } Object delegate=editingContext.delegate(); if (delegate==null) { EOObjectStore parent = editingContext.parentObjectStor...
treePane = createTreeDisplay(experiment);
treePane = createTreeDisplay();
public CommunityPanel(Experiment experiment) { communityTable = createTable(); splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); splitPane.setLeftComponent(new JScrollPane(communityTable)); treePane = createTreeDisplay(experiment); splitPane.setRightComponent(treePane); splitPane.setDividerLo...
private void addHostsFromExperiment(JTree hostTree, Experiment experiment) {
private void addHostsFromExperiment() {
private void addHostsFromExperiment(JTree hostTree, Experiment experiment) { DefaultMutableTreeNode root = (DefaultMutableTreeNode)hostTree.getModel().getRoot(); DefaultTreeModel model = (DefaultTreeModel)hostTree.getModel(); HostComponent[] hosts = experiment.getHostComponents(); for (int i = 0; i ...
communityTree.addNode(node, entityName, entityType);
communityTree.addNode(node, entityName, entityType, communityName);
private void addToTree(DefaultMutableTreeNode node, String communityName) { ArrayList entityNames = CommunityDBUtils.getEntities(communityName); if (entityNames == null || entityNames.size() == 0) return; for (int i = 0; i < entityNames.size(); i++) { String entityName = (String)entityNames.get(i);...
private void addUnassignedAgentsFromExperiment(JTree agentTree, Experiment experiment) {
private void addUnassignedAgentsFromExperiment() {
private void addUnassignedAgentsFromExperiment(JTree agentTree, Experiment experiment) { Set unassignedAgents; unassignedAgents = new TreeSet(dbBaseComponentComparator); AgentComponent[] agents = experiment.getAgents(); NodeComponent[] nodes = experiment.get...
private void addUnassignedNodesFromExperiment(JTree nodeTree, Experiment experiment) {
private void addUnassignedNodesFromExperiment() {
private void addUnassignedNodesFromExperiment(JTree nodeTree, Experiment experiment) { Set unassignedNodes; unassignedNodes = new TreeSet(dbBaseComponentComparator); HostComponent[] hosts = experiment.getHostComponents(); NodeComponent[] nodes = experiment.g...
private JSplitPane createTreeDisplay(Experiment experiment) {
private JSplitPane createTreeDisplay() {
private JSplitPane createTreeDisplay(Experiment experiment) { DefaultMutableTreeNode root = new DefaultMutableTreeNode(new CommunityTreeObject("Community")); DefaultTreeModel treeModel = new DefaultTreeModel(root, true) { public void valueForPathChanged(TreePath path, Object newValue) { if (ne...
JTree hostTree = new EntityDNDTree(new DefaultTreeModel(hostRoot, true));
hostTree = new EntityDNDTree(new DefaultTreeModel(hostRoot, true));
private JSplitPane createTreeDisplay(Experiment experiment) { DefaultMutableTreeNode root = new DefaultMutableTreeNode(new CommunityTreeObject("Community")); DefaultTreeModel treeModel = new DefaultTreeModel(root, true) { public void valueForPathChanged(TreePath path, Object newValue) { if (ne...
JTree nodeTree = new EntityDNDTree(new DefaultTreeModel(nodeRoot, true));
nodeTree = new EntityDNDTree(new DefaultTreeModel(nodeRoot, true));
private JSplitPane createTreeDisplay(Experiment experiment) { DefaultMutableTreeNode root = new DefaultMutableTreeNode(new CommunityTreeObject("Community")); DefaultTreeModel treeModel = new DefaultTreeModel(root, true) { public void valueForPathChanged(TreePath path, Object newValue) { if (ne...
JTree agentTree = new EntityDNDTree(new DefaultTreeModel(agentRoot, true));
agentTree = new EntityDNDTree(new DefaultTreeModel(agentRoot, true));
private JSplitPane createTreeDisplay(Experiment experiment) { DefaultMutableTreeNode root = new DefaultMutableTreeNode(new CommunityTreeObject("Community")); DefaultTreeModel treeModel = new DefaultTreeModel(root, true) { public void valueForPathChanged(TreePath path, Object newValue) { if (ne...
addHostsFromExperiment(hostTree, experiment); addUnassignedNodesFromExperiment(nodeTree, experiment); addUnassignedAgentsFromExperiment(agentTree, experiment);
addHostsFromExperiment(); addUnassignedNodesFromExperiment(); addUnassignedAgentsFromExperiment();
private JSplitPane createTreeDisplay(Experiment experiment) { DefaultMutableTreeNode root = new DefaultMutableTreeNode(new CommunityTreeObject("Community")); DefaultTreeModel treeModel = new DefaultTreeModel(root, true) { public void valueForPathChanged(TreePath path, Object newValue) { if (ne...
addToTree(communityTree.addNode(null, communityName, "Community"),
addToTree(communityTree.addNode(null, communityName, "Community", null),
private void displayCommunityInformation() { String communityName = selectCommunityToDisplay(); if (communityName == null) return; // display community information in table communityTableUtils.getAllCommunityInfo(communityName); communityTree.getModel().removeTreeModelListener(treeModelListener); ...
treePane = createTreeDisplay(experiment);
treePane = createTreeDisplay();
public void reinit(Experiment experiment) { splitPane.remove(treePane); treePane = createTreeDisplay(experiment); splitPane.setRightComponent(treePane); }
for (Enumeration e = aSortedArray.objectEnumerator(); e.hasMoreElements();) { eo = (EOEnterpriseObject)e.nextElement(); localArray.addObject((ec != eo.editingContext() && ERXEOControlUtilities.localInstanceOfObject(ec, eo) != null ? ERXEOControlUtilities.localInstanceOfObject(ec, eo) : eo));
if (ec != null) { try { ec.lock(); for (Enumeration e = aSortedArray.objectEnumerator(); e.hasMoreElements();) { eo = (EOEnterpriseObject)e.nextElement(); localArray.addObject((ec != eo.editingContext() && ERXEOControlUtilities.localInstanceOfObject(ec, eo) != null ? ERXEOControlUtilities.localInstanceOfObject(ec, eo) ...
public NSArray theList() { NSMutableArray aSortedArray; NSArray anUnsortedArray; if (_privateList()==null ) { EODataSource aDataSource = _localDataSource(); // Need to make sure that the eos are in the right editingContext. // ak: We get a dictionary as object if we us...
aSortedArray=localArray;
public NSArray theList() { NSMutableArray aSortedArray; NSArray anUnsortedArray; if (_privateList()==null ) { EODataSource aDataSource = _localDataSource(); // Need to make sure that the eos are in the right editingContext. // ak: We get a dictionary as object if we us...
ec.unlock();
try { ec.unlock(); } catch (Exception e) { log.error(e,e); }
public NSArray theList() { NSMutableArray aSortedArray; NSArray anUnsortedArray; if (_privateList()==null ) { EODataSource aDataSource = _localDataSource(); // Need to make sure that the eos are in the right editingContext. // ak: We get a dictionary as object if we us...
if (selection != null && selection instanceof EOEnterpriseObject) { EOEnterpriseObject eo = (EOEnterpriseObject)selection; if (eo.editingContext() != editingContext()) { selection = ERXEOControlUtilities.localInstanceOfObject(editingContext(), eo); } }
public Object selection() { if (_selection == null) { Object object = realSourceObject(); String key = realRelationshipKey(); Object selection = NSKeyValueCoding.Utility.valueForKey(object,key); setSelection(selection); } // deal with isMandatory ...
log = CSMART.createLogger("org.cougaar.tools.csmart.experiment");
createLogger();
public Trial(String name) { super(name); trialParameters = new ArrayList(); trialValues = new ArrayList(); trialResults = new ArrayList(); log = CSMART.createLogger("org.cougaar.tools.csmart.experiment"); }
if (!userExists(edit.getId())) return false;
if (!userExists(edit.getEid())) return false;
public boolean getUser(UserEdit edit) { if (!userExists(edit.getId())) return false; edit.setEmail(edit.getId() + "@" + m_domain); edit.setType("kerberos"); return true; } // getUser
edit.setEmail(edit.getId() + "@" + m_domain);
edit.setEmail(edit.getEid() + "@" + m_domain);
public boolean getUser(UserEdit edit) { if (!userExists(edit.getId())) return false; edit.setEmail(edit.getId() + "@" + m_domain); edit.setType("kerberos"); return true; } // getUser
public boolean selectionManditory() { return ERXUtilities.booleanValue(d2wContext().valueForKey("selectionManditory")); }
public boolean selectionManditory() { return ERXValueUtilities.booleanValue(d2wContext().valueForKey("selectionManditory")); }
public boolean selectionManditory() { return ERXUtilities.booleanValue(d2wContext().valueForKey("selectionManditory")); }
if (log.isDebugEnabled()) { log.debug("No " + RecipeComponent.RECIPE_QUERY_FILE + " recipeQueries.q file found."); }
public PDbBase() throws SQLException, IOException { createLogger(); if (logQueries) pwlog = new PrintWriter(new FileWriter(getLogName())); dbp = DBProperties.readQueryFile(QUERY_FILE); try { dbp.addQueryFile(RecipeComponent.RECIPE_QUERY_FILE); } catch (FileNotFoundException e) { // T...
return pluginList.substring(0,(pluginList.length()-1));
if (pluginList != "") { return pluginList.substring(0,(pluginList.length()-1)); } else { return null; }
public String getSelectedPlugins() { String pluginList = ""; if (selectedPlugins != null) { for (Iterator iterator = selectedPlugins.iterator(); iterator .hasNext();) { pluginList= (pluginList + iterator.next().toString() + ","); } } return pluginList.substring(0,(pluginList.length()-1)); }
public abstract byte get ();
public ByteBuffer get (byte[] dst, int offset, int length) { if ((offset < 0) || (offset > dst.length) || (length < 0) || (length > (dst.length - offset))) throw new IndexOutOfBoundsException (); for (int i = offset; i < offset + length; i++) { dst [i] = get (); } return this; }
public abstract byte get ();
public abstract CharBuffer put (char b);
public CharBuffer put (CharBuffer src) { if (src == this) throw new IllegalArgumentException (); if (src.remaining () > remaining ()) throw new BufferOverflowException (); if (src.remaining () > 0) { char[] toPut = new char [src.remaining ()]; src.get (toPut); src.put (toPut); } return this; }
public abstract CharBuffer put (char b);
public abstract char get ();
public CharBuffer get (char[] dst, int offset, int length) { for (int i = offset; i < offset + length; i++) { dst [i] = get (); } return this; }
public abstract char get ();
Vector l = org.cougaar.util.StringUtility.parseCSV(arg); for (Iterator it = l.iterator(); it.hasNext();) { c.add((String)parseE(etype, (String)it.next()));
Collection coll = org.cougaar.util.CSVUtility.parseToCollection(arg); for (Iterator iterator = coll.iterator(); iterator.hasNext();) { String o = (String) iterator.next(); c.add(parseE(etype, o));
private Object parseE(String type, String arg) { int i; type = type.trim(); arg = arg.trim(); if ((i = type.indexOf("<")) >= 0) { int j = type.lastIndexOf(">"); String ctype = type.substring(0, i).trim(); String etype = type.substring(i + 1, j).trim(); Collection c = null; if (cty...
Vector l = org.cougaar.util.StringUtility.parseCSV(arg); for (Iterator it = l.iterator(); it.hasNext();) { c.add((String)parseE(etype, (String)it.next()));
Collection coll = org.cougaar.util.CSVUtility.parseToCollection(arg); for (Iterator iterator = coll.iterator(); iterator.hasNext();) { String str = (String) iterator.next(); c.add(parseE(etype, str));
public Object parseExpr(String type, String arg) { int i; type = type.trim(); arg = arg.trim(); if ((i = type.indexOf("<")) >= 0) { int j = type.lastIndexOf(">"); String ctype = type.substring(0, i).trim(); String etype = type.substring(i + 1, j).trim(); Collection c = null; if (c...
protected void not_equals(Class clazz, final String label) {
protected void not_equals(Class clazz, final String notEquals) {
protected void not_equals(Class clazz, final String label) { (new ProcessArrayCallback() { public void processElement(Class type) { not_equals_helper(type, label, this); } }).processElement(clazz); }
not_equals_helper(type, label, this);
not_equals_helper(type, notEquals, this);
protected void not_equals(Class clazz, final String label) { (new ProcessArrayCallback() { public void processElement(Class type) { not_equals_helper(type, label, this); } }).processElement(clazz); }
not_equals_helper(type, label, this);
not_equals_helper(type, notEquals, this);
public void processElement(Class type) { not_equals_helper(type, label, this); }
private void not_equals_helper(Class clazz, String label, ProcessArrayCallback callback) { if (clazz.isArray()) { process_array(clazz, callback); } else if (clazz.isPrimitive()) {
private void not_equals_helper(Class clazz, String notEquals, ProcessArrayCallback callback) { if (clazz.isPrimitive()) {
private void not_equals_helper(Class clazz, String label, ProcessArrayCallback callback) { if (clazz.isArray()) { process_array(clazz, callback); } else if (clazz.isPrimitive()) { if (returnType.equals(Double.TYPE)) { dcmpg(); ifne(label); ...
ifne(label);
ifne(notEquals);
private void not_equals_helper(Class clazz, String label, ProcessArrayCallback callback) { if (clazz.isArray()) { process_array(clazz, callback); } else if (clazz.isPrimitive()) { if (returnType.equals(Double.TYPE)) { dcmpg(); ifne(label); ...
if_icmpne(label);
if_icmpne(notEquals);
private void not_equals_helper(Class clazz, String label, ProcessArrayCallback callback) { if (clazz.isArray()) { process_array(clazz, callback); } else if (clazz.isPrimitive()) { if (returnType.equals(Double.TYPE)) { dcmpg(); ifne(label); ...
String oneIsNull = newLabel();
private void not_equals_helper(Class clazz, String label, ProcessArrayCallback callback) { if (clazz.isArray()) { process_array(clazz, callback); } else if (clazz.isPrimitive()) { if (returnType.equals(Double.TYPE)) { dcmpg(); ifne(label); ...
dup(); ifnull(oneIsNull); swap(); invoke(equalsMethod); ifne(label); goTo(end); nop(oneIsNull); pop(); ifnonnull(label);
nullcmp(notEquals, end); if (clazz.isArray()) { String checkContents = newLabel(); dup2(); arraylength(); swap(); arraylength(); if_icmpeq(checkContents); pop2(); goTo(notEquals); nop(checkContents); process_arrays(clazz, callback); } else { invoke(equalsMethod); ifeq(notEquals); }
private void not_equals_helper(Class clazz, String label, ProcessArrayCallback callback) { if (clazz.isArray()) { process_array(clazz, callback); } else if (clazz.isPrimitive()) { if (returnType.equals(Double.TYPE)) { dcmpg(); ifne(label); ...
if (result==null || ERXUtilities.booleanValue(result)) {
if (result==null || ERXValueUtilities.booleanValue(result)) {
public void switchSubmitTab() { Object result = null; if (submitActionName() != null && !submitActionName().equals("")) { //FIXME: This should be more robust. result = parent() != null ? parent().valueForKey(submitActionName()) : null; } if (result==null || ERXUtilities.booleanVa...
_useLinkForTabSwitch = ERXUtilities.booleanValue(session().valueForKeyPath("browser.isIE")) && ERXUtilities.booleanValue(session().valueForKey("javaScriptEnabled")) ? Boolean.TRUE : Boolean.FALSE;
_useLinkForTabSwitch = ERXValueUtilities.booleanValue(session().valueForKeyPath("browser.isIE")) && ERXValueUtilities.booleanValue(session().valueForKey("javaScriptEnabled")) ? Boolean.TRUE : Boolean.FALSE;
public boolean useLinkForTabSwitch() { if (_useLinkForTabSwitch == null) { _useLinkForTabSwitch = ERXUtilities.booleanValue(session().valueForKeyPath("browser.isIE")) && ERXUtilities.booleanValue(session().valueForKey("javaScriptEnabled")) ? Boolean.TRUE : Boolean.FALSE; } ...
public FileFilter getCleanupFileFilter();
FileFilter getCleanupFileFilter();
public FileFilter getCleanupFileFilter();
public ConfigurationWriter getConfigurationWriter(NodeComponent[] nodes, String nodeFileAddition);
ConfigurationWriter getConfigurationWriter(NodeComponent[] nodes, String nodeFileAddition);
public ConfigurationWriter getConfigurationWriter(NodeComponent[] nodes, String nodeFileAddition);
public FileFilter getResultFileFilter();
FileFilter getResultFileFilter();
public FileFilter getResultFileFilter();
NSLog.setAllowedDebugLevel(NSLog.DebugLevelDetailed);
protected Object fireRuleForKeyPathInContext(String keyPath, D2WContext context) { String[] significantKeys=(String[])_significantKeysPerKey.get(keyPath); if (significantKeys==null) return null; short s=(short)significantKeys.length; ERXMultiKey k=new ERXMultiKey((short)(s+1)); Ob...
int i = 1;
protected void refetch() { EODatabaseDataSource ds = (EODatabaseDataSource) dataSource(); EOFetchSpecification spec = ds.fetchSpecificationForFetch(); EOEditingContext ec = ds.editingContext(); int rowCount = ERXEOAccessUtilities.rowCountForFetchSpecification(ec, spec); ...
NSArray objects = ERXEOControlUtilities.faultsForRawRowsFromEntityInEditingContext(primKeys, spec.entityName(), ec);
NSArray faults = ERXEOControlUtilities.faultsForRawRowsFromEntity(ec, primKeys, spec.entityName()); NSArray objects = ERXEOControlUtilities.objectsForFaults(ec, faults);
protected void refetch() { EODatabaseDataSource ds = (EODatabaseDataSource) dataSource(); EOFetchSpecification spec = ds.fetchSpecificationForFetch(); EOEditingContext ec = ds.editingContext(); int rowCount = ERXEOAccessUtilities.rowCountForFetchSpecification(ec, spec); ...
ResourceBundle rb = ResourceBundle.getBundle(bundleName, new Locale("", ""));
ResourceBundle rb = getBundle(new Locale("", ""));
public static synchronized Locale[] getAvailableLocales() { ResourceBundle rb = ResourceBundle.getBundle(bundleName, new Locale("", "")); return (Locale[]) rb.getObject("availableLocales"); }
public Locale(String language, String country)
public Locale(String language, String country, String variant)
public Locale(String language, String country) { this(language, country, ""); }
this(language, country, "");
if (defaultLocale != null) { language = convertLanguage(language).intern(); country = country.toUpperCase().intern(); variant = variant.intern(); } this.language = language; this.country = country; this.variant = variant; hashcode = language.hashCode() ^ country.hashCode() ^ variant.hashCode();
public Locale(String language, String country) { this(language, country, ""); }
if(child.getProperty(PROP_TARGET_COMPONENT_QUERY) != null) {
Property prop = child.getProperty(PROP_TARGET_COMPONENT_QUERY); if(prop != null) { String propName = prop.getName().toString(); for(int j=0; j < component.getChildCount(); j++) { ConfigurableComponent newChild = (ConfigurableComponent)component.getChild(j); if(newChild.getShortName().equals(child.getShortName())) newCh...
public ModifiableComponent copy(String name) { ComponentData cdata = getComponentData(); cdata.setName(name); RecipeComponent component = new ComponentCollectionRecipe(cdata, null); component.initProperties(); ((ComponentCollectionRecipe)component).modified = this.modified; ((ComponentCollectionReci...
buf.append(", Child[" + i + "]: \n" + children[i] + "\n");
buf.append(", Child[" + i + "]: \n" + children[i].getName() + "\n");
public String toString() { StringBuffer buf = new StringBuffer(); buf.append(this.getClass().toString() + ": "); buf.append("Name: " + getName()); buf.append(", Type: " + getType()); buf.append(", Class: " + getClassName()); buf.append(", Priority: " + getPriority()); if (owner != null) { bu...
return (PropGroupData[])propGroups.toArray(new String[propGroups.size()]);
return (PropGroupData[]) propGroups.toArray(new PropGroupData[propGroups.size()]);
public PropGroupData[] getPropGroups() { return (PropGroupData[])propGroups.toArray(new String[propGroups.size()]); }
_impl.progress();
if (_impl != null) { _impl.progress(); } else { System.out.println("."); }
public static void progress() { if (_showProgress) { _impl.progress(); } }
if (parser._md.isMappingOverride()) { Message.debug("enabling mapping-override from imported configurations file"); _md.setMappingOverride(true); }
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { try { if ("ivy-module".equals(qName)) { String version = attributes.getValue("version"); int versionIndex = ALLOWED_VERSIONS.indexOf(version); ...
_artifacts.add(artifact);
_revisionArtifacts.add(artifact);
public void parse() throws Exception { SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser(); saxParser.parse(_report, new DefaultHandler() { private String _organisation; private String _module; private String _revision; ...
} public void endElement(String uri, String localName, String qname) throws SAXException { if ("dependencies".equals(qname)) { for (Iterator it = _revisionsMap.values().iterator(); it.hasNext(); ) { List artifacts = (List) it.next(); _artifacts.addAll(artifacts); } } } private int getMaxPos() { return _revisionsMap....
public void parse() throws Exception { SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser(); saxParser.parse(_report, new DefaultHandler() { private String _organisation; private String _module; private String _revision; ...
_artifacts.add(artifact);
_revisionArtifacts.add(artifact);
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if ("module".equals(qName)) { _organisation = attributes.getValue("organisation"); _module = attributes.getValue("name"); ...
log.info("Using: " + title + "-" + version);
log.info("Using: " + title + " " + version);
public void start() throws GaspException { checkInitDone(); log.debug("Starting application"); final Package pkg = getClass().getPackage(); final String title = pkg.getSpecificationTitle(); final String version = pkg.getSpecificationVersion(); if (!StringUtils.isBlank(title...
log = CSMART.createLogger("org.cougaar.tools.csmart.runtime.ldm.lps");
createLogger();
public ImpactsLP(LogPlanServesLogicProvider logplan, ClusterServesLogicProvider cluster) { super(logplan, cluster); log = CSMART.createLogger("org.cougaar.tools.csmart.runtime.ldm.lps"); }
}; };
}
private static UnaryPredicate getSelfPred() { return new UnaryPredicate() { public boolean execute(Object obj) { if (obj instanceof Asset) { Asset asset = (Asset)obj; if ((asset instanceof HasRelationships) && ((HasRelationships)asset).isLocal() && asset.hasClusterPG()) return true; // ...
};
}
public boolean execute(Object obj) { if (obj instanceof Asset) { Asset asset = (Asset)obj; if ((asset instanceof HasRelationships) && ((HasRelationships)asset).isLocal() && asset.hasClusterPG()) return true; // if ((asset.hasCommunityPG(new Date().getTime())) && // (asset.hasCluste...
Collection resolved = (Collection)_selectedRevs.get(new ModuleIdConf(mid, rootModuleConf)); if (resolved == null) { return new HashSet(); } else { return new HashSet(resolved); }
Collection resolved = (Collection)_selectedDeps.get(new ModuleIdConf(mid, rootModuleConf)); if (resolved == null) { return new HashSet(); } else { Collection resolvedRevs = new HashSet(); for (Iterator iter = resolved.iterator(); iter.hasNext();) { IvyNode node = (IvyNode)iter.next(); resolvedRevs.add(node.getId()); re...
public Collection getResolvedRevisions(ModuleId mid, String rootModuleConf) { Collection resolved = (Collection)_selectedRevs.get(new ModuleIdConf(mid, rootModuleConf)); if (resolved == null) { return new HashSet(); } else { return new HashSet(resolved); } }
Collection resolvedRevs = new HashSet(); for (Iterator iter = resolved.iterator(); iter.hasNext();) { IvyNode node = (IvyNode)iter.next(); resolvedRevs.add(node.getId()); resolvedRevs.add(node.getResolvedId()); } _selectedRevs.put(moduleIdConf, resolvedRevs);
public void setResolvedNodes(ModuleId moduleId, String rootModuleConf, Collection resolved) { ModuleIdConf moduleIdConf = new ModuleIdConf(moduleId, rootModuleConf); _selectedDeps.put(moduleIdConf, new HashSet(resolved)); Collection resolvedRevs = new HashSet(); for (Iterator iter = reso...
substitutions.put(":attribute_type:", propSubtype);
substitutions.put(":attribute_type:", (propSubtype == null) ? "Fixme" : propSubtype);
private void setPropertyInfo(String pgName, String propName, String propType, String propSubtype) throws SQLException { if(log.isDebugEnabled()) { log.debug("setPropertyInfo("+pgName+", "+propName+", "+ propType+", "+propSubtype+")"); } Statement stmt = dbCon...
addresses.addObject (anAddress.toUnicodeString ());
String emailAddress = anAddress.toUnicodeString (); addresses.addObject (emailAddress);
public static NSArray convertInternetAddressesToNSArray (InternetAddress [] addressesArray) throws AddressException { NSMutableArray addresses = new NSMutableArray (addressesArray.length); for (int i = 0 ; i < addressesArray.length ; i++) { InternetAddress anAddress = (InternetAddres...
RecipeComponent[] recipes = experimentCopy.getRecipes();
RecipeComponent[] recipes = experimentCopy.getRecipeComponents();
public void runBuilder(ModifiableComponent cc, boolean alwaysNew) { // note that cc is guaranteed non-null when this is called Class[] paramClasses = { CSMART.class, ModifiableComponent.class }; Object[] params = new Object[2]; params[0] = this; if (cc instanceof Experiment) { ...
experimentCopy.removeRecipe(recipes[i]);
experimentCopy.removeRecipeComponent(recipes[i]);
public void runBuilder(ModifiableComponent cc, boolean alwaysNew) { // note that cc is guaranteed non-null when this is called Class[] paramClasses = { CSMART.class, ModifiableComponent.class }; Object[] params = new Object[2]; params[0] = this; if (cc instanceof Experiment) { ...
if(log.isDebugEnabled()) {
if(log.isInfoEnabled()) {
public void refresh() { Collection objectsFromServlet = CSMARTUL.getObjectsFromServlet(ClientServletUtil.METRICS_SERVLET); if (objectsFromServlet == null) return; if(log.isDebugEnabled()) { log.info("Received metrics: " + objectsFromServlet.size()); } ArrayList names = new ArrayList(); ...
if(log.isDebugEnabled()) { log.error("Exception: " + e);
if(log.isErrorEnabled()) { log.error("Exception: ", e);
private void saveMetrics(File outputFile) { if( outputFile == null ) { return; } String pathname = outputFile.getPath(); String extension = ""; int i = pathname.lastIndexOf('.'); if(i > 0 && i < pathname.length()-1) { extension = pathname.substring(i+1).toLowerCase(); } if(extension....
if (pdb.populateHNA(theSoc, 1)) setCloned(true);
if (pdb.populateHNA(theSoc)) setCloned(true);
public void saveToDb(PopulateDb.ConflictHandler ch) { try { Set writtenNodes = new HashSet(); List components = getComponents(); NodeComponent[] nodesToWrite = getNodes(); ComponentData theSoc = new GenericComponentData(); theSoc.setType(ComponentData.SOCIETY); theSoc.setName(getExper...
if (pdb.populateCSMI(theSoc, 1)) setCloned(true);
if (pdb.populateCSMI(theSoc)) setCloned(true);
public void saveToDb(PopulateDb.ConflictHandler ch) { try { Set writtenNodes = new HashSet(); List components = getComponents(); NodeComponent[] nodesToWrite = getNodes(); ComponentData theSoc = new GenericComponentData(); theSoc.setType(ComponentData.SOCIETY); theSoc.setName(getExper...
if (!component.isEditable()) { int result = JOptionPane.showConfirmDialog(this, "Component is in use; delete anyway?", "Component Not Editable", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); if (result != JOptionPane.YES_OPTION) return;
else { if (!component.isEditable()) { int result = JOptionPane.showConfirmDialog(this, "Component is in use; delete anyway?", "Component Not Editable", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); if (result != JOptionPane.YES_OPTION) return; } model.removeNodeFromParent(node); componentNames.remove(compo...
private void deleteComponent(DefaultMutableTreeNode node) { ModifiableConfigurableComponent component = (ModifiableConfigurableComponent)node.getUserObject(); if (component instanceof SocietyComponent) deleteSociety(node); else if (component instanceof ImpactComponent) deleteImpact(node); else i...
model.removeNodeFromParent(node); componentNames.remove(component.getShortName());
private void deleteComponent(DefaultMutableTreeNode node) { ModifiableConfigurableComponent component = (ModifiableConfigurableComponent)node.getUserObject(); if (component instanceof SocietyComponent) deleteSociety(node); else if (component instanceof ImpactComponent) deleteImpact(node); else i...
public int read (byte[] data, int offset, int length) throws IOException
public int read () throws IOException
public int read (byte[] data, int offset, int length) throws IOException { if (this.readDataFromBlock) { if (this.blockDataPosition + length > this.blockDataBytes) { int remain = this.blockDataBytes - this.blockDataPosition; if (remain != 0) { System.arraycopy (this.blockData, this.blockData...
if (this.blockDataPosition + length > this.blockDataBytes) { int remain = this.blockDataBytes - this.blockDataPosition; if (remain != 0) { System.arraycopy (this.blockData, this.blockDataPosition, data, offset, remain); offset += remain; length -= remain; } readNextBlock (); } System.arraycopy (this.blockData, this.bl...
if (this.blockDataPosition >= this.blockDataBytes) readNextBlock (); return (this.blockData[this.blockDataPosition++] & 0xff);
public int read (byte[] data, int offset, int length) throws IOException { if (this.readDataFromBlock) { if (this.blockDataPosition + length > this.blockDataBytes) { int remain = this.blockDataBytes - this.blockDataPosition; if (remain != 0) { System.arraycopy (this.blockData, this.blockData...
return this.realInputStream.read (data, offset, length);
return this.realInputStream.read ();
public int read (byte[] data, int offset, int length) throws IOException { if (this.readDataFromBlock) { if (this.blockDataPosition + length > this.blockDataBytes) { int remain = this.blockDataBytes - this.blockDataPosition; if (remain != 0) { System.arraycopy (this.blockData, this.blockData...
public void write (byte b[], int off, int len) throws IOException
public void write (int data) throws IOException
public void write (byte b[], int off, int len) throws IOException { if (writeDataAsBlocks) { if (len < 0) throw new IndexOutOfBoundsException (); if (blockDataCount + len < BUFFER_SIZE) { System.arraycopy (b, off, blockData, blockDataCount, len); blockDataCount += len; } else { dr...
if (len < 0) throw new IndexOutOfBoundsException ();
if (blockDataCount == BUFFER_SIZE) drain ();
public void write (byte b[], int off, int len) throws IOException { if (writeDataAsBlocks) { if (len < 0) throw new IndexOutOfBoundsException (); if (blockDataCount + len < BUFFER_SIZE) { System.arraycopy (b, off, blockData, blockDataCount, len); blockDataCount += len; } else { dr...
if (blockDataCount + len < BUFFER_SIZE) { System.arraycopy (b, off, blockData, blockDataCount, len); blockDataCount += len; } else { drain (); writeBlockDataHeader (len); realOutput.write (b, off, len); }
blockData[ blockDataCount++ ] = (byte)data;
public void write (byte b[], int off, int len) throws IOException { if (writeDataAsBlocks) { if (len < 0) throw new IndexOutOfBoundsException (); if (blockDataCount + len < BUFFER_SIZE) { System.arraycopy (b, off, blockData, blockDataCount, len); blockDataCount += len; } else { dr...
realOutput.write (b, off, len);
realOutput.write (data);
public void write (byte b[], int off, int len) throws IOException { if (writeDataAsBlocks) { if (len < 0) throw new IndexOutOfBoundsException (); if (blockDataCount + len < BUFFER_SIZE) { System.arraycopy (b, off, blockData, blockDataCount, len); blockDataCount += len; } else { dr...
public void addNodeFrame(NodeComponent node, ConsoleNodeListener listener, InternalFrameListener frameListener, JScrollPane pane, JRadioButton statusButton, String logFileName, RemoteProcess remoteNode, CSMARTConsole console) { JInternalFrame frame = new ConsoleInternalFrame(node, listener, pane, statusButton, logFileN...
public void addNodeFrame(JInternalFrame frame, String nodeName) {
public void addNodeFrame(NodeComponent node, ConsoleNodeListener listener, InternalFrameListener frameListener, JScrollPane pane, JRadioButton statusButton, String logFileName, ...
frame.addInternalFrameListener(frameListener);
public void addNodeFrame(NodeComponent node, ConsoleNodeListener listener, InternalFrameListener frameListener, JScrollPane pane, JRadioButton statusButton, String logFileName, ...
myFrames.put(node.getShortName(), frame);
myFrames.put(nodeName, frame);
public void addNodeFrame(NodeComponent node, ConsoleNodeListener listener, InternalFrameListener frameListener, JScrollPane pane, JRadioButton statusButton, String logFileName, ...
didUpdate();
public void appendToResponse(WOResponse r, WOContext c) { setupPhase(); _rowFlip = true; if(_hasToUpdate) { displayGroup().fetch(); _hasToUpdate = false; } super.appendToResponse(r,c); }
public ERDDeletionDelegate(EOEnterpriseObject object, EODataSource dataSource,WOComponent nextPage) { _object=object; _dataSource=dataSource; _followPage=nextPage; if (_object != null) _ec = _object.editingContext();
public ERDDeletionDelegate(EOEnterpriseObject object, WOComponent nextPage) { this(object, null, nextPage);
public ERDDeletionDelegate(EOEnterpriseObject object, EODataSource dataSource,WOComponent nextPage) { _object=object; _dataSource=dataSource; _followPage=nextPage; if (_object != null) _ec = _object.editingContext(); }
public static NSArray sortedArraySortedWithKey(NSArray array, String key, NSSelector selector) { ERXAssert.PRE.notNull("Attempting to sort null array of objects.", array); ERXAssert.PRE.notNull("Attepting to sort array of objects with null key.", key); NSArray order=new NSArray(new Object[] {EOSortOrdering.sortOrdering...
public static NSArray sortedArraySortedWithKey(NSArray array, String key) { return sortedArraySortedWithKey(array, key, null);
public static NSArray sortedArraySortedWithKey(NSArray array, String key, NSSelector selector) { ERXAssert.PRE.notNull("Attempting to sort null array of objects.", array); ERXAssert.PRE.notNull("Attepting to sort array of objects with null key.", key); NSArray order=new NSArray(new Object[] {EO...
System.out.println("WOHelperFunctionHTMLTemplateParser.parserHelperAssociation: " + ognlKeyPath);
protected WOAssociation parserHelperAssociation(WOAssociation originalAssociation) { WOAssociation association = originalAssociation; String originalKeyPath = null; if (association instanceof WOKeyValueAssociation) { WOKeyValueAssociation kvAssociation = (WOKeyValueAssociation) association; origina...
startOfWebObjectTag(token.substring(tagIndex, token.length()));
if (token.endsWith("/")) { startOfWebObjectTag(token.substring(tagIndex, token.length() - 1)); endOfWebObjectTag("/"); } else { startOfWebObjectTag(token.substring(tagIndex, token.length())); }
public void parseHTML() throws WOHTMLFormatException, WODeclarationFormatException, ClassNotFoundException { Object obj = null; StringTokenizer templateTokenizer = new StringTokenizer(_unparsedTemplate, "<"); boolean flag = true; int parserState = STATE_OUTSIDE; String token; if (_unparsedTemplate.s...
ucplogin.setField(ucplogin.FIELD_OAdC,"u0000854");
ucplogin.setField(ucplogin.FIELD_OAdC,userid);
public byte[] buildLogin(String userid, String pwd) throws SmsException { UcpUtil util = new UcpUtil(); UCPSeries60 ucplogin = new UCPSeries60(UCPSeries60.OP_OPEN_SESSION); ucplogin.setTRN(0x01); ucplogin.setField(ucplogin.FIELD_OAdC,"u0000854"); ucplogin.setField(ucplogin.FIELD_OTON,"6"); ucplogin.s...
ucplogin.setField(ucplogin.FIELD_PWD,util.encodeInIRA("cjSBtqk7"));
ucplogin.setField(ucplogin.FIELD_PWD,util.encodeInIRA(pwd));
public byte[] buildLogin(String userid, String pwd) throws SmsException { UcpUtil util = new UcpUtil(); UCPSeries60 ucplogin = new UCPSeries60(UCPSeries60.OP_OPEN_SESSION); ucplogin.setTRN(0x01); ucplogin.setField(ucplogin.FIELD_OAdC,"u0000854"); ucplogin.setField(ucplogin.FIELD_OTON,"6"); ucplogin.s...
System.out.println(msg.length());
public byte[] buildSubmit(byte dcs, SmsPdu pdu, boolean moreToSend, SmsAddress sender, SmsAddress dest) throws SmsException { String ud; byte udhData[]; UcpUtil util = new UcpUtil(); UcpSeries50 ucpSubmit = new UcpSeries50(UcpSeries50.OP_SUBMIT_SHORT_MESSAGE); byte[] udh...
byte [] message = buildLogin("",""); System.out.println("SMSC response: " + sendUcp(message));
if (myDoUCP60Login) { byte [] message = buildLogin("",""); System.out.println("SMSC response: " + sendUcp(message)); }
public void connect() throws SmsException { //Logging into the Remote Host via UCP 60; byte [] message = buildLogin("",""); System.out.println("SMSC response: " + sendUcp(message)); }