join-cvs Mailing List for Join Integration Management System (Page 2)
Brought to you by:
lbroudoux
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(68) |
Aug
(146) |
Sep
(35) |
Oct
(30) |
Nov
(56) |
Dec
(45) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
|
Feb
(48) |
Mar
(56) |
Apr
(13) |
May
(15) |
Jun
(37) |
Jul
(113) |
Aug
(41) |
Sep
(24) |
Oct
(44) |
Nov
(52) |
Dec
|
| 2005 |
Jan
(73) |
Feb
(14) |
Mar
(19) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(90) |
Sep
(51) |
Oct
(5) |
Nov
(24) |
Dec
(1) |
| 2006 |
Jan
(26) |
Feb
(6) |
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(165) |
Aug
(4) |
Sep
(5) |
Oct
(48) |
Nov
(3) |
Dec
(10) |
| 2007 |
Jan
(38) |
Feb
(48) |
Mar
(3) |
Apr
(31) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
(9) |
Dec
|
| 2008 |
Jan
(21) |
Feb
(41) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(12) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
| 2009 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Laurent B. <lbr...@us...> - 2008-02-03 23:08:18
|
Update of /cvsroot/join/join1/src/web/scripts/editor/themes/complete/jscripts In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12898/jscripts Log Message: Directory /cvsroot/join/join1/src/web/scripts/editor/themes/complete/jscripts added to the repository |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 23:08:18
|
Update of /cvsroot/join/join1/src/web/scripts/editor/themes/complete/langs In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12898/langs Log Message: Directory /cvsroot/join/join1/src/web/scripts/editor/themes/complete/langs added to the repository |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 23:08:04
|
Update of /cvsroot/join/join1/src/web/scripts/editor/themes/complete In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12513/complete Log Message: Directory /cvsroot/join/join1/src/web/scripts/editor/themes/complete added to the repository |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 23:07:38
|
Update of /cvsroot/join/join1/src/web/scripts/editor/utils In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12473/utils Log Message: Directory /cvsroot/join/join1/src/web/scripts/editor/utils added to the repository |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 23:07:38
|
Update of /cvsroot/join/join1/src/web/scripts/editor/themes In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12473/themes Log Message: Directory /cvsroot/join/join1/src/web/scripts/editor/themes added to the repository |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 23:07:37
|
Update of /cvsroot/join/join1/src/web/scripts/editor/langs In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12473/langs Log Message: Directory /cvsroot/join/join1/src/web/scripts/editor/langs added to the repository |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 23:07:22
|
Update of /cvsroot/join/join1/src/web/scripts/editor In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12460/editor Log Message: Directory /cvsroot/join/join1/src/web/scripts/editor added to the repository |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 23:06:08
|
Update of /cvsroot/join/join1/src/web/scripts In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11702/scripts Added Files: controls.js Log Message: Add required library for ajaxtags --- NEW FILE: controls.js --- // Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) // (c) 2005 Ivan Krstic (http://blogs.law.harvard.edu/ivan) // (c) 2005 Jon Tirsen (http://www.tirsen.com) // Contributors: // Richard Livsey // Rahul Bhargava // Rob Wills // // See scriptaculous.js for full license. // Autocompleter.Base handles all the autocompletion functionality // that's independent of the data source for autocompletion. This // includes drawing the autocompletion menu, observing keyboard // and mouse events, and similar. // // Specific autocompleters need to provide, at the very least, // a getUpdatedChoices function that will be invoked every time // the text inside the monitored textbox changes. This method // should get the text for which to provide autocompletion by // invoking this.getToken(), NOT by directly accessing // this.element.value. This is to allow incremental tokenized // autocompletion. Specific auto-completion logic (AJAX, etc) // belongs in getUpdatedChoices. // // Tokenized incremental autocompletion is enabled automatically // when an autocompleter is instantiated with the 'tokens' option // in the options parameter, e.g.: // new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' }); // will incrementally autocomplete with a comma as the token. // Additionally, ',' in the above example can be replaced with // a token array, e.g. { tokens: [',', '\n'] } which // enables autocompletion on multiple tokens. This is most // useful when one of the tokens is \n (a newline), as it // allows smart autocompletion after linebreaks. var Autocompleter = {} Autocompleter.Base = function() {}; Autocompleter.Base.prototype = { baseInitialize: function(element, update, options) { this.element = $(element); this.update = $(update); this.hasFocus = false; this.changed = false; this.active = false; this.index = 0; this.entryCount = 0; if (this.setOptions) this.setOptions(options); else this.options = options || {}; this.options.paramName = this.options.paramName || this.element.name; this.options.tokens = this.options.tokens || []; this.options.frequency = this.options.frequency || 0.4; this.options.minChars = this.options.minChars || 1; this.options.onShow = this.options.onShow || function(element, update){ if(!update.style.position || update.style.position=='absolute') { update.style.position = 'absolute'; Position.clone(element, update, {setHeight: false, offsetTop: element.offsetHeight}); } Effect.Appear(update,{duration:0.15}); }; this.options.onHide = this.options.onHide || function(element, update){ new Effect.Fade(update,{duration:0.15}) }; if (typeof(this.options.tokens) == 'string') this.options.tokens = new Array(this.options.tokens); this.observer = null; this.element.setAttribute('autocomplete','off'); Element.hide(this.update); Event.observe(this.element, "blur", this.onBlur.bindAsEventListener(this)); Event.observe(this.element, "keypress", this.onKeyPress.bindAsEventListener(this)); }, show: function() { if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update); if(!this.iefix && (navigator.appVersion.indexOf('MSIE')>0) && (navigator.userAgent.indexOf('Opera')<0) && (Element.getStyle(this.update, 'position')=='absolute')) { new Insertion.After(this.update, '<iframe id="' + this.update.id + '_iefix" '+ 'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' + 'src="javascript:false;" frameborder="0" scrolling="no"></iframe>'); this.iefix = $(this.update.id+'_iefix'); } if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50); }, fixIEOverlapping: function() { Position.clone(this.update, this.iefix); this.iefix.style.zIndex = 1; this.update.style.zIndex = 2; Element.show(this.iefix); }, hide: function() { this.stopIndicator(); if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update); if(this.iefix) Element.hide(this.iefix); }, startIndicator: function() { if(this.options.indicator) Element.show(this.options.indicator); }, stopIndicator: function() { if(this.options.indicator) Element.hide(this.options.indicator); }, onKeyPress: function(event) { if(this.active) switch(event.keyCode) { case Event.KEY_TAB: case Event.KEY_RETURN: this.selectEntry(); Event.stop(event); case Event.KEY_ESC: this.hide(); this.active = false; Event.stop(event); return; case Event.KEY_LEFT: case Event.KEY_RIGHT: return; case Event.KEY_UP: this.markPrevious(); this.render(); if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event); return; case Event.KEY_DOWN: this.markNext(); this.render(); if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event); return; } else if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN) return; this.changed = true; this.hasFocus = true; if(this.observer) clearTimeout(this.observer); this.observer = setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000); }, activate: function() { this.changed = false; this.hasFocus = true; this.getUpdatedChoices(); }, onHover: function(event) { var element = Event.findElement(event, 'LI'); if(this.index != element.autocompleteIndex) { this.index = element.autocompleteIndex; this.render(); } Event.stop(event); }, onClick: function(event) { var element = Event.findElement(event, 'LI'); this.index = element.autocompleteIndex; this.selectEntry(); this.hide(); }, onBlur: function(event) { // needed to make click events working setTimeout(this.hide.bind(this), 250); this.hasFocus = false; this.active = false; }, render: function() { if(this.entryCount > 0) { for (var i = 0; i < this.entryCount; i++) this.index==i ? Element.addClassName(this.getEntry(i),"selected") : Element.removeClassName(this.getEntry(i),"selected"); if(this.hasFocus) { this.show(); this.active = true; } } else { this.active = false; this.hide(); } }, markPrevious: function() { if(this.index > 0) this.index-- else this.index = this.entryCount-1; }, markNext: function() { if(this.index < this.entryCount-1) this.index++ else this.index = 0; }, getEntry: function(index) { return this.update.firstChild.childNodes[index]; }, getCurrentEntry: function() { return this.getEntry(this.index); }, selectEntry: function() { this.active = false; this.updateElement(this.getCurrentEntry()); }, updateElement: function(selectedElement) { if (this.options.updateElement) { this.options.updateElement(selectedElement); return; } var value = ''; if (this.options.select) { var nodes = document.getElementsByClassName(this.options.select, selectedElement) || []; if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select); } else value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal'); var lastTokenPos = this.findLastToken(); if (lastTokenPos != -1) { var newValue = this.element.value.substr(0, lastTokenPos + 1); var whitespace = this.element.value.substr(lastTokenPos + 1).match(/^\s+/); if (whitespace) newValue += whitespace[0]; this.element.value = newValue + value; } else { this.element.value = value; } this.element.focus(); if (this.options.afterUpdateElement) this.options.afterUpdateElement(this.element, selectedElement); }, updateChoices: function(choices) { if(!this.changed && this.hasFocus) { this.update.innerHTML = choices; Element.cleanWhitespace(this.update); Element.cleanWhitespace(this.update.firstChild); if(this.update.firstChild && this.update.firstChild.childNodes) { this.entryCount = this.update.firstChild.childNodes.length; for (var i = 0; i < this.entryCount; i++) { var entry = this.getEntry(i); entry.autocompleteIndex = i; this.addObservers(entry); } } else { this.entryCount = 0; } this.stopIndicator(); this.index = 0; this.render(); } }, addObservers: function(element) { Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this)); Event.observe(element, "click", this.onClick.bindAsEventListener(this)); }, onObserverEvent: function() { this.changed = false; if(this.getToken().length>=this.options.minChars) { this.startIndicator(); this.getUpdatedChoices(); } else { this.active = false; this.hide(); } }, getToken: function() { var tokenPos = this.findLastToken(); if (tokenPos != -1) var ret = this.element.value.substr(tokenPos + 1).replace(/^\s+/,'').replace(/\s+$/,''); else var ret = this.element.value; return /\n/.test(ret) ? '' : ret; }, findLastToken: function() { var lastTokenPos = -1; for (var i=0; i<this.options.tokens.length; i++) { var thisTokenPos = this.element.value.lastIndexOf(this.options.tokens[i]); if (thisTokenPos > lastTokenPos) lastTokenPos = thisTokenPos; } return lastTokenPos; } } Ajax.Autocompleter = Class.create(); Object.extend(Object.extend(Ajax.Autocompleter.prototype, Autocompleter.Base.prototype), { initialize: function(element, update, url, options) { this.baseInitialize(element, update, options); this.options.asynchronous = true; this.options.onComplete = this.onComplete.bind(this); this.options.defaultParams = this.options.parameters || null; this.url = url; }, getUpdatedChoices: function() { entry = encodeURIComponent(this.options.paramName) + '=' + encodeURIComponent(this.getToken()); this.options.parameters = this.options.callback ? this.options.callback(this.element, entry) : entry; if(this.options.defaultParams) this.options.parameters += '&' + this.options.defaultParams; new Ajax.Request(this.url, this.options); }, onComplete: function(request) { this.updateChoices(request.responseText); } }); // The local array autocompleter. Used when you'd prefer to // inject an array of autocompletion options into the page, rather // than sending out Ajax queries, which can be quite slow sometimes. // // The constructor takes four parameters. The first two are, as usual, // the id of the monitored textbox, and id of the autocompletion menu. // The third is the array you want to autocomplete from, and the fourth // is the options block. // // Extra local autocompletion options: // - choices - How many autocompletion choices to offer // // - partialSearch - If false, the autocompleter will match entered // text only at the beginning of strings in the // autocomplete array. Defaults to true, which will // match text at the beginning of any *word* in the // strings in the autocomplete array. If you want to // search anywhere in the string, additionally set // the option fullSearch to true (default: off). // // - fullSsearch - Search anywhere in autocomplete array strings. // // - partialChars - How many characters to enter before triggering // a partial match (unlike minChars, which defines // how many characters are required to do any match // at all). Defaults to 2. // // - ignoreCase - Whether to ignore case when autocompleting. // Defaults to true. // // It's possible to pass in a custom function as the 'selector' // option, if you prefer to write your own autocompletion logic. // In that case, the other options above will not apply unless // you support them. Autocompleter.Local = Class.create(); Autocompleter.Local.prototype = Object.extend(new Autocompleter.Base(), { initialize: function(element, update, array, options) { this.baseInitialize(element, update, options); this.options.array = array; }, getUpdatedChoices: function() { this.updateChoices(this.options.selector(this)); }, setOptions: function(options) { this.options = Object.extend({ choices: 10, partialSearch: true, partialChars: 2, ignoreCase: true, fullSearch: false, selector: function(instance) { var ret = []; // Beginning matches var partial = []; // Inside matches var entry = instance.getToken(); var count = 0; for (var i = 0; i < instance.options.array.length && ret.length < instance.options.choices ; i++) { var elem = instance.options.array[i]; var foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase()) : elem.indexOf(entry); while (foundPos != -1) { if (foundPos == 0 && elem.length != entry.length) { ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" + elem.substr(entry.length) + "</li>"); break; } else if (entry.length >= instance.options.partialChars && instance.options.partialSearch && foundPos != -1) { if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" + elem.substr(foundPos, entry.length) + "</strong>" + elem.substr( foundPos + entry.length) + "</li>"); break; } } foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : elem.indexOf(entry, foundPos + 1); } } if (partial.length) ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)) return "<ul>" + ret.join('') + "</ul>"; } }, options || {}); } }); // AJAX in-place editor // // see documentation on http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor // Use this if you notice weird scrolling problems on some browsers, // the DOM might be a bit confused when this gets called so do this // waits 1 ms (with setTimeout) until it does the activation Field.scrollFreeActivate = function(field) { setTimeout(function() { Field.activate(field); }, 1); } Ajax.InPlaceEditor = Class.create(); Ajax.InPlaceEditor.defaultHighlightColor = "#FFFF99"; Ajax.InPlaceEditor.prototype = { initialize: function(element, url, options) { this.url = url; this.element = $(element); this.options = Object.extend({ okButton: true, okText: "ok", cancelLink: true, cancelText: "cancel", savingText: "Saving...", clickToEditText: "Click to edit", okText: "ok", rows: 1, onComplete: function(transport, element) { new Effect.Highlight(element, {startcolor: this.options.highlightcolor}); }, onFailure: function(transport) { alert("Error communicating with the server: " + transport.responseText.stripTags()); }, callback: function(form) { return Form.serialize(form); }, handleLineBreaks: true, loadingText: 'Loading...', savingClassName: 'inplaceeditor-saving', loadingClassName: 'inplaceeditor-loading', formClassName: 'inplaceeditor-form', highlightcolor: Ajax.InPlaceEditor.defaultHighlightColor, highlightendcolor: "#FFFFFF", externalControl: null, submitOnBlur: false, ajaxOptions: {}, evalScripts: false }, options || {}); if(!this.options.formId && this.element.id) { this.options.formId = this.element.id + "-inplaceeditor"; if ($(this.options.formId)) { // there's already a form with that name, don't specify an id this.options.formId = null; } } if (this.options.externalControl) { this.options.externalControl = $(this.options.externalControl); } this.originalBackground = Element.getStyle(this.element, 'background-color'); if (!this.originalBackground) { this.originalBackground = "transparent"; } this.element.title = this.options.clickToEditText; this.onclickListener = this.enterEditMode.bindAsEventListener(this); this.mouseoverListener = this.enterHover.bindAsEventListener(this); this.mouseoutListener = this.leaveHover.bindAsEventListener(this); Event.observe(this.element, 'click', this.onclickListener); Event.observe(this.element, 'mouseover', this.mouseoverListener); Event.observe(this.element, 'mouseout', this.mouseoutListener); if (this.options.externalControl) { Event.observe(this.options.externalControl, 'click', this.onclickListener); Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener); Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener); } }, enterEditMode: function(evt) { if (this.saving) return; if (this.editing) return; this.editing = true; this.onEnterEditMode(); if (this.options.externalControl) { Element.hide(this.options.externalControl); } Element.hide(this.element); this.createForm(); this.element.parentNode.insertBefore(this.form, this.element); Field.scrollFreeActivate(this.editField); // stop the event to avoid a page refresh in Safari if (evt) { Event.stop(evt); } return false; }, createForm: function() { this.form = document.createElement("form"); this.form.id = this.options.formId; Element.addClassName(this.form, this.options.formClassName) this.form.onsubmit = this.onSubmit.bind(this); this.createEditField(); if (this.options.textarea) { var br = document.createElement("br"); this.form.appendChild(br); } if (this.options.okButton) { okButton = document.createElement("input"); okButton.type = "submit"; okButton.value = this.options.okText; okButton.className = 'editor_ok_button'; this.form.appendChild(okButton); } if (this.options.cancelLink) { cancelLink = document.createElement("a"); cancelLink.href = "#"; cancelLink.appendChild(document.createTextNode(this.options.cancelText)); cancelLink.onclick = this.onclickCancel.bind(this); cancelLink.className = 'editor_cancel'; this.form.appendChild(cancelLink); } }, hasHTMLLineBreaks: function(string) { if (!this.options.handleLineBreaks) return false; return string.match(/<br/i) || string.match(/<p>/i); }, convertHTMLLineBreaks: function(string) { return string.replace(/<br>/gi, "\n").replace(/<br\/>/gi, "\n").replace(/<\/p>/gi, "\n").replace(/<p>/gi, ""); }, createEditField: function() { var text; if(this.options.loadTextURL) { text = this.options.loadingText; } else { text = this.getText(); } var obj = this; if (this.options.rows == 1 && !this.hasHTMLLineBreaks(text)) { this.options.textarea = false; var textField = document.createElement("input"); textField.obj = this; textField.type = "text"; textField.name = "value"; textField.value = text; textField.style.backgroundColor = this.options.highlightcolor; textField.className = 'editor_field'; var size = this.options.size || this.options.cols || 0; if (size != 0) textField.size = size; if (this.options.submitOnBlur) textField.onblur = this.onSubmit.bind(this); this.editField = textField; } else { this.options.textarea = true; var textArea = document.createElement("textarea"); textArea.obj = this; textArea.name = "value"; textArea.value = this.convertHTMLLineBreaks(text); textArea.rows = this.options.rows; textArea.cols = this.options.cols || 40; textArea.className = 'editor_field'; if (this.options.submitOnBlur) textArea.onblur = this.onSubmit.bind(this); this.editField = textArea; } if(this.options.loadTextURL) { this.loadExternalText(); } this.form.appendChild(this.editField); }, getText: function() { return this.element.innerHTML; }, loadExternalText: function() { Element.addClassName(this.form, this.options.loadingClassName); this.editField.disabled = true; new Ajax.Request( this.options.loadTextURL, Object.extend({ asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) }, this.options.ajaxOptions) ); }, onLoadedExternalText: function(transport) { Element.removeClassName(this.form, this.options.loadingClassName); this.editField.disabled = false; this.editField.value = transport.responseText.stripTags(); }, onclickCancel: function() { this.onComplete(); this.leaveEditMode(); return false; }, onFailure: function(transport) { this.options.onFailure(transport); if (this.oldInnerHTML) { this.element.innerHTML = this.oldInnerHTML; this.oldInnerHTML = null; } return false; }, onSubmit: function() { // onLoading resets these so we need to save them away for the Ajax call var form = this.form; var value = this.editField.value; // do this first, sometimes the ajax call returns before we get a chance to switch on Saving... // which means this will actually switch on Saving... *after* we've left edit mode causing Saving... // to be displayed indefinitely this.onLoading(); if (this.options.evalScripts) { new Ajax.Request( this.url, Object.extend({ parameters: this.options.callback(form, value), onComplete: this.onComplete.bind(this), onFailure: this.onFailure.bind(this), asynchronous:true, evalScripts:true }, this.options.ajaxOptions)); } else { new Ajax.Updater( { success: this.element, // don't update on failure (this could be an option) failure: null }, this.url, Object.extend({ parameters: this.options.callback(form, value), onComplete: this.onComplete.bind(this), onFailure: this.onFailure.bind(this) }, this.options.ajaxOptions)); } // stop the event to avoid a page refresh in Safari if (arguments.length > 1) { Event.stop(arguments[0]); } return false; }, onLoading: function() { this.saving = true; this.removeForm(); this.leaveHover(); this.showSaving(); }, showSaving: function() { this.oldInnerHTML = this.element.innerHTML; this.element.innerHTML = this.options.savingText; Element.addClassName(this.element, this.options.savingClassName); this.element.style.backgroundColor = this.originalBackground; Element.show(this.element); }, removeForm: function() { if(this.form) { if (this.form.parentNode) Element.remove(this.form); this.form = null; } }, enterHover: function() { if (this.saving) return; this.element.style.backgroundColor = this.options.highlightcolor; if (this.effect) { this.effect.cancel(); } Element.addClassName(this.element, this.options.hoverClassName) }, leaveHover: function() { if (this.options.backgroundColor) { this.element.style.backgroundColor = this.oldBackground; } Element.removeClassName(this.element, this.options.hoverClassName) if (this.saving) return; this.effect = new Effect.Highlight(this.element, { startcolor: this.options.highlightcolor, endcolor: this.options.highlightendcolor, restorecolor: this.originalBackground }); }, leaveEditMode: function() { Element.removeClassName(this.element, this.options.savingClassName); this.removeForm(); this.leaveHover(); this.element.style.backgroundColor = this.originalBackground; Element.show(this.element); if (this.options.externalControl) { Element.show(this.options.externalControl); } this.editing = false; this.saving = false; this.oldInnerHTML = null; this.onLeaveEditMode(); }, onComplete: function(transport) { this.leaveEditMode(); this.options.onComplete.bind(this)(transport, this.element); }, onEnterEditMode: function() {}, onLeaveEditMode: function() {}, dispose: function() { if (this.oldInnerHTML) { this.element.innerHTML = this.oldInnerHTML; } this.leaveEditMode(); Event.stopObserving(this.element, 'click', this.onclickListener); Event.stopObserving(this.element, 'mouseover', this.mouseoverListener); Event.stopObserving(this.element, 'mouseout', this.mouseoutListener); if (this.options.externalControl) { Event.stopObserving(this.options.externalControl, 'click', this.onclickListener); Event.stopObserving(this.options.externalControl, 'mouseover', this.mouseoverListener); Event.stopObserving(this.options.externalControl, 'mouseout', this.mouseoutListener); } } }; Ajax.InPlaceCollectionEditor = Class.create(); Object.extend(Ajax.InPlaceCollectionEditor.prototype, Ajax.InPlaceEditor.prototype); Object.extend(Ajax.InPlaceCollectionEditor.prototype, { createEditField: function() { if (!this.cached_selectTag) { var selectTag = document.createElement("select"); var collection = this.options.collection || []; var optionTag; collection.each(function(e,i) { optionTag = document.createElement("option"); optionTag.value = (e instanceof Array) ? e[0] : e; if(this.options.value==optionTag.value) optionTag.selected = true; optionTag.appendChild(document.createTextNode((e instanceof Array) ? e[1] : e)); selectTag.appendChild(optionTag); }.bind(this)); this.cached_selectTag = selectTag; } this.editField = this.cached_selectTag; if(this.options.loadTextURL) this.loadExternalText(); this.form.appendChild(this.editField); this.options.callback = function(form, value) { return "value=" + encodeURIComponent(value); } } }); // Delayed observer, like Form.Element.Observer, // but waits for delay after last key input // Ideal for live-search fields Form.Element.DelayedObserver = Class.create(); Form.Element.DelayedObserver.prototype = { initialize: function(element, delay, callback) { this.delay = delay || 0.5; this.element = $(element); this.callback = callback; this.timer = null; this.lastValue = $F(this.element); Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this)); }, delayedListener: function(event) { if(this.lastValue == $F(this.element)) return; if(this.timer) clearTimeout(this.timer); this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000); this.lastValue = $F(this.element); }, onTimerEvent: function() { this.timer = null; this.callback(this.element, $F(this.element)); } }; |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 23:05:14
|
Update of /cvsroot/join/join1/src/web/scripts In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11675/scripts Modified Files: calendar.js Log Message: Convert functin in vars for Ajax support Index: calendar.js =================================================================== RCS file: /cvsroot/join/join1/src/web/scripts/calendar.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** calendar.js 30 Jul 2006 19:50:47 -0000 1.1 --- calendar.js 3 Feb 2008 23:05:11 -0000 1.2 *************** *** 18,22 **** /* Get the style of this div tag */ ! function getDivStyle(divname){ var style; if (isDOM){ --- 18,22 ---- /* Get the style of this div tag */ ! var getDivStyle = function(divname){ var style; if (isDOM){ *************** *** 30,39 **** /* Hide the given element */ ! function hideElement(divname){ getDivStyle(divname).visibility = 'hidden'; } /* Get number of days into month */ ! function getDays(month, year){ // Test for leap year when February is selected. if (1 == month){ --- 30,39 ---- /* Hide the given element */ ! var hideElement = function(divname){ getDivStyle(divname).visibility = 'hidden'; } /* Get number of days into month */ ! var getDays = function(month, year){ // Test for leap year when February is selected. if (1 == month){ *************** *** 45,54 **** } ! function getToday() { ! // Generate today's date. ! this.now = new Date(); ! this.year = this.now.getFullYear(); ! this.month = this.now.getMonth(); ! this.day = this.now.getDate(); } --- 45,54 ---- } ! var getToday = function(){ ! // Generate today's date. ! this.now = new Date(); ! this.year = this.now.getFullYear(); ! this.month = this.now.getMonth(); ! this.day = this.now.getDate(); } *************** *** 57,61 **** /* Create a new calendar */ ! function newCalendar(eltName, attachedElement){ if (attachedElement){ if (displayDivName && displayDivName != eltName){ --- 57,61 ---- /* Create a new calendar */ ! var newCalendar = function(eltName, attachedElement){ if (attachedElement){ if (displayDivName && displayDivName != eltName){ *************** *** 93,97 **** /* Increment month of displayed calendar */ ! function incMonth(delta, eltName){ displayMonth += delta; if (displayMonth >= 12){ --- 93,97 ---- /* Increment month of displayed calendar */ ! var incMonth = function(delta, eltName){ displayMonth += delta; if (displayMonth >= 12){ *************** *** 109,113 **** /* Increment year of displayed calendar */ ! function incYear(delta,eltName){ displayYear = parseInt(displayYear + '') + delta; newCalendar(eltName); --- 109,113 ---- /* Increment year of displayed calendar */ ! var incYear = function(delta,eltName){ displayYear = parseInt(displayYear + '') + delta; newCalendar(eltName); *************** *** 115,119 **** /* Build a days grid in html */ ! function makeDaysGrid(startDay, day, intDaysInMonth, newCal, eltName) { var daysGrid; var month = newCal.getMonth(); --- 115,119 ---- /* Build a days grid in html */ ! var makeDaysGrid = function(startDay, day, intDaysInMonth, newCal, eltName){ var daysGrid; var month = newCal.getMonth(); *************** *** 184,188 **** /* Set the day into form element */ ! function setDay(day, eltName){ if (day < 10) day = '0' + day; if (displayPattern == "dd/MM/yyyy"){ --- 184,188 ---- /* Set the day into form element */ ! var setDay = function(day, eltName){ if (day < 10) day = '0' + day; if (displayPattern == "dd/MM/yyyy"){ *************** *** 196,200 **** /* Display or hide the calendar */ ! function toggleVisible(divname){ divstyle = getDivStyle(divname); if (divstyle.visibility == 'visible' || divstyle.visibility == 'show') { --- 196,200 ---- /* Display or hide the calendar */ ! var toggleVisible = function(divname){ divstyle = getDivStyle(divname); if (divstyle.visibility == 'visible' || divstyle.visibility == 'show') { *************** *** 207,211 **** /* Main function, called by onmouseover event */ ! function toggleDatePicker(eltName, formElt, pattern){ var x = formElt.indexOf('.'); var formName = formElt.substring(0,x); --- 207,211 ---- /* Main function, called by onmouseover event */ ! toggleDatePicker = function(eltName, formElt, pattern){ var x = formElt.indexOf('.'); var formName = formElt.substring(0,x); |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 23:03:42
|
Update of /cvsroot/join/join1/src/web/jsp In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv10919/jsp Modified Files: messages.jsp Log Message: Add a rich text editor for messages Index: messages.jsp =================================================================== RCS file: /cvsroot/join/join1/src/web/jsp/messages.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** messages.jsp 30 Jul 2006 19:16:26 -0000 1.1 --- messages.jsp 3 Feb 2008 23:03:38 -0000 1.2 *************** *** 7,10 **** --- 7,17 ---- <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/calendar.js"></script> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/editor/tiny_mce.js"></script> + <script language="javascript" type="text/javascript"> + tinyMCE.init({ + theme : "complete", + mode : "textareas" + }); + </script> <div class="h3"> |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 23:01:37
|
Update of /cvsroot/join/join1/src/web/jsp In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv10144/jsp Modified Files: consumerdetails.jsp consumers.jsp deliverabletypes.jsp info.jsp Log Message: Add ajax support and nifty cubes for nice rounded corners ! Index: consumerdetails.jsp =================================================================== RCS file: /cvsroot/join/join1/src/web/jsp/consumerdetails.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** consumerdetails.jsp 30 Jul 2006 19:16:26 -0000 1.1 --- consumerdetails.jsp 3 Feb 2008 23:01:33 -0000 1.2 *************** *** 1,9 **** <% // $Revision$ %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/displaytag-12.tld" prefix="display" %> ! <script type="text/javascript" src="<%= request.getContextPath() %>/scripts/main.js"></script> <div class="h3"> --- 1,13 ---- <% // $Revision$ %> + <%@ taglib uri="/WEB-INF/ajaxtags.tld" prefix="ajax" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/displaytag-12.tld" prefix="display" %> ! <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/main.js"></script> ! <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/prototype.js"></script> ! <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/scriptaculous.js"></script> ! <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/ajaxtags.js"></script> <div class="h3"> *************** *** 61,77 **** <h4><bean:message bundle="gui" key="title.consumer.scriptinfos"/></br></br></h4> <div align="center"> ! <display:table id="row" htmlId="doctab" name="scriptLogInfos" export="true" bgcolor="#ffffff" ! requestURI="<%="/action/consumer?op=details&name=" + name%>" excludedParams="*"> ! <display:column titleKey="label.scriptinfo.date" property="creationDate" sortable="true" width="80"/> ! <display:column titleKey="label.scriptinfo.file" width="140" property="scriptFile"> ! <a href ="<bean:write name="row" property="scriptFile"/>"><bean:write name="row" property="scriptFile"/></a> ! </display:column> ! <display:column titleKey="label.scriptinfo.message" property="exceptionMsg" width="200"/> ! <display:column titleKey="label.scriptinfo.log" width="140"> ! <bean:write name="row" property="logFile"/> ! <a href="javascript:launch('<%= request.getContextPath() %>/action/browseLogs?rd=popup&op=file&id=<bean:write name="row" property="logFile"/>', 2, '')"> ! <html:img page="/images/16x16/txt.gif" alt="Log file" align="absmiddle"/></a> ! </display:column> ! </display:table> </div> </div> --- 65,89 ---- <h4><bean:message bundle="gui" key="title.consumer.scriptinfos"/></br></br></h4> <div align="center"> ! <ajax:displayTag id="adtFrame" tableClass="disptab"> ! <display:table id="row" styleClass="disptab" name="scriptLogInfos" export="true" bgcolor="#ffffff" ! requestURI="<%="/action/consumer?op=details&rd=none&name=" + name%>" excludedParams="*"> ! <display:column titleKey="label.scriptinfo.date" property="creationDate" sortable="true" width="80"/> ! <display:column titleKey="label.scriptinfo.file" width="140" property="scriptFile"> ! <a href ="<bean:write name="row" property="scriptFile"/>"><bean:write name="row" property="scriptFile"/></a> ! </display:column> ! <display:column titleKey="label.scriptinfo.message" property="exceptionMsg" sortable="true" width="200"/> ! <display:column titleKey="label.scriptinfo.log" width="140"> ! <bean:define id="logFile" name="row" property="logFile"/> ! <% ! // Make a shorter file name. ! String log = (String)logFile; ! String logName = log.substring(log.lastIndexOf('/') + 1); ! %> ! <%= logName %> ! <a href="javascript:launch('<%= request.getContextPath() %>/action/browseLogs?rd=popup&op=file&id=<bean:write name="row" property="logFile"/>', 2, '')"> ! <html:img page="/images/16x16/txt.gif" alt="Log file" align="absmiddle"/></a> ! </display:column> ! </display:table> ! </ajax:displayTag> </div> </div> Index: deliverabletypes.jsp =================================================================== RCS file: /cvsroot/join/join1/src/web/jsp/deliverabletypes.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** deliverabletypes.jsp 8 Apr 2007 22:35:15 -0000 1.2 --- deliverabletypes.jsp 3 Feb 2008 23:01:33 -0000 1.3 *************** *** 1,4 **** --- 1,5 ---- <% // $Revision$ %> + <%@ taglib uri="/WEB-INF/ajaxtags.tld" prefix="ajax" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> *************** *** 6,19 **** <%@ taglib uri="/WEB-INF/displaytag-12.tld" prefix="display" %> <script language="Javascript" type="text/javascript"> ! function showVcs(){ if (document.getElementById("vcs")) document.getElementById("vcs").style.display = "block"; } ! function hideVcs(){ if (document.getElementById("vcs")) document.getElementById("vcs").style.display = "none"; } ! function initVcs(){ if (document.forms['deliverableTypeForm'].elements['vcsDeliverableStr'][0].checked) showVcs(); --- 7,24 ---- <%@ taglib uri="/WEB-INF/displaytag-12.tld" prefix="display" %> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/prototype.js"></script> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/scriptaculous.js"></script> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/ajaxtags.js"></script> + <script language="Javascript" type="text/javascript"> ! showVcs = function(){ if (document.getElementById("vcs")) document.getElementById("vcs").style.display = "block"; } ! hideVcs = function(){ if (document.getElementById("vcs")) document.getElementById("vcs").style.display = "none"; } ! initVcs = function(){ if (document.forms['deliverableTypeForm'].elements['vcsDeliverableStr'][0].checked) showVcs(); *************** *** 21,25 **** hideVcs(); } ! function changeVcsImpl(){ if (document.getElementById("vcsImpl")){ var index = document.forms['deliverableTypeForm'].elements['vcsImpl'].selectedIndex; --- 26,30 ---- hideVcs(); } ! changeVcsImpl = function(){ if (document.getElementById("vcsImpl")){ var index = document.forms['deliverableTypeForm'].elements['vcsImpl'].selectedIndex; *************** *** 46,61 **** <h4><bean:message bundle="gui" key="title.deliverabletype.managed"/></h4> <div align="center"> ! <display:table id="row" htmlId="doctab" name="applicationScope.cacheAccessor.cachedDeliverableTypes" export="true" ! requestURI="/action/deliverableType" excludedParams="*"> ! <display:column titleKey="label.deliverabletype.key" property="key" sortable="true" width="60"/> ! <display:column titleKey="label.deliverabletype.label" property="label" sortable="true" width="100"/> ! <display:column titleKey="label.deliverabletype.versionable" property="versionable" width="80"/> ! <display:column titleKey="label.deliverabletype.mandatory" property="mandatory" width="80"/> ! <display:column titleKey="label.deliverabletype.vcsdeliverable" property="vcsDeliverable" width="80"/> ! <display:column headerClass="empty" media="html" ! url="/action/deliverableType?op=load" paramId="key" paramProperty="key"> ! <html:img page="/images/redo.gif" alt="Edit deliverable category properties"/> ! </display:column> ! </display:table> </div> </div> --- 51,68 ---- <h4><bean:message bundle="gui" key="title.deliverabletype.managed"/></h4> <div align="center"> ! <ajax:displayTag id="adtFrame" tableClass="disptab"> ! <display:table id="row" styleClass="disptab" name="applicationScope.cacheAccessor.cachedDeliverableTypes" export="true" ! requestURI="/action/deliverableType?rd=none" excludedParams="*"> ! <display:column titleKey="label.deliverabletype.key" property="key" sortable="true" width="60"/> ! <display:column titleKey="label.deliverabletype.label" property="label" sortable="true" width="100"/> ! <display:column titleKey="label.deliverabletype.versionable" property="versionable" width="80"/> ! <display:column titleKey="label.deliverabletype.mandatory" property="mandatory" width="80"/> ! <display:column titleKey="label.deliverabletype.vcsdeliverable" property="vcsDeliverable" width="80"/> ! <display:column headerClass="empty" media="html" ! url="/action/deliverableType?op=load" paramId="key" paramProperty="key"> ! <html:img page="/images/redo.gif" alt="Edit deliverable category properties"/> ! </display:column> ! </display:table> ! </ajax:displayTag> </div> </div> Index: info.jsp =================================================================== RCS file: /cvsroot/join/join1/src/web/jsp/info.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** info.jsp 14 Jan 2007 18:07:55 -0000 1.2 --- info.jsp 3 Feb 2008 23:01:33 -0000 1.3 *************** *** 69,71 **** </logic:present> </tr> ! </table> --- 69,71 ---- </logic:present> </tr> ! </table> \ No newline at end of file Index: consumers.jsp =================================================================== RCS file: /cvsroot/join/join1/src/web/jsp/consumers.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** consumers.jsp 14 Jan 2007 18:07:55 -0000 1.2 --- consumers.jsp 3 Feb 2008 23:01:33 -0000 1.3 *************** *** 1,8 **** <% // $Revision$ %> ! <%@ page import="java.util.ArrayList, ! java.util.HashMap"%> <%@ taglib uri="/WEB-INF/join.tld" prefix="join" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> --- 1,8 ---- <% // $Revision$ %> ! <%@ page import="java.util.ArrayList,java.util.HashMap"%> <%@ taglib uri="/WEB-INF/join.tld" prefix="join" %> + <%@ taglib uri="/WEB-INF/ajaxtags.tld" prefix="ajax" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> *************** *** 24,27 **** --- 24,30 ---- implementations.put("org.figure8.join.services.notification.im.XMPPNotifierJMSAdapter", "Jabber/XMPP Notifier"); %> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/prototype.js"></script> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/scriptaculous.js"></script> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/ajaxtags.js"></script> <script language="Javascript" type="text/javascript"> function changeConsumerImpl(){ *************** *** 51,80 **** <logic:equal name="displayType" value="all"> <div align="center"> ! <display:table id="row" htmlId="doctab" name="requestScope.consumers" export="true" ! requestURI="/action/consumer" excludedParams="*"> ! <display:column titleKey="label.consumer.name" property="name" sortable="true" width="80"/> ! <display:column titleKey="label.consumer.destination" property="destination" sortable="true"/> ! <display:column titleKey="label.consumer.active" property="active" width="60"/> ! <display:column titleKey="label.consumer.consumerBeanClass" width="140"> ! <bean:define id="consumerClass" name="row" property="consumerBeanClass" toScope="page"/> ! <% ! String consumer = (String)pageContext.findAttribute("consumerClass"); ! String alias = (String)implementations.get(consumer); ! if (alias != null && alias.length() > 0){ ! %> <%= alias %><% ! } ! else {%> <%= consumer %><%} ! %> ! </display:column> ! <display:column titleKey="label.consumer.threadSafe" property="threadSafe"/> ! <display:column headerClass="empty" media="html" ! url="/action/consumer?op=load" paramId="name" paramProperty="name"> ! <html:img page="/images/redo.gif" alt="Edit consumer properties"/> ! </display:column> ! <display:column headerClass="empty" media="html" ! url="/action/consumer?op=details" paramId="name" paramProperty="name"> ! <html:img page="/images/16x16/details.gif" alt="Consumer details"/> ! </display:column> ! </display:table> </div> </logic:equal> --- 54,85 ---- <logic:equal name="displayType" value="all"> <div align="center"> ! <ajax:displayTag id="adtFrame" tableClass="disptab"> ! <display:table id="row" styleClass="disptab" name="requestScope.consumers" export="true" ! requestURI="/action/consumer?rd=none" excludedParams="*"> ! <display:column titleKey="label.consumer.name" property="name" sortable="true" width="80"/> ! <display:column titleKey="label.consumer.destination" property="destination" sortable="true"/> ! <display:column titleKey="label.consumer.active" property="active" width="60"/> ! <display:column titleKey="label.consumer.consumerBeanClass" width="140"> ! <bean:define id="consumerClass" name="row" property="consumerBeanClass" toScope="page"/> ! <% ! String consumer = (String)pageContext.findAttribute("consumerClass"); ! String alias = (String)implementations.get(consumer); ! if (alias != null && alias.length() > 0){ ! %> <%= alias %><% ! } ! else {%> <%= consumer %><%} ! %> ! </display:column> ! <display:column titleKey="label.consumer.threadSafe" property="threadSafe"/> ! <display:column headerClass="empty" media="html" ! url="/action/consumer?op=load" paramId="name" paramProperty="name"> ! <html:img page="/images/redo.gif" alt="Edit consumer properties"/> ! </display:column> ! <display:column headerClass="empty" media="html" ! url="/action/consumer?op=details" paramId="name" paramProperty="name"> ! <html:img page="/images/16x16/details.gif" alt="Consumer details"/> ! </display:column> ! </display:table> ! </ajax:displayTag> </div> </logic:equal> |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 23:00:00
|
Update of /cvsroot/join/join1/src/web/jsp/environment In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv9210/jsp/environment Modified Files: machines.jsp resources.jsp resourceversions.jsp Log Message: Add ajax support and nifty cubes for nice rounded corners ! Index: resources.jsp =================================================================== RCS file: /cvsroot/join/join1/src/web/jsp/environment/resources.jsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** resources.jsp 1 Mar 2007 00:04:09 -0000 1.3 --- resources.jsp 3 Feb 2008 22:59:56 -0000 1.4 *************** *** 1,4 **** --- 1,5 ---- <% // $Revision$ %> + <%@ taglib uri="/WEB-INF/ajaxtags.tld" prefix="ajax" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> *************** *** 6,9 **** --- 7,14 ---- <%@ taglib uri="/WEB-INF/displaytag-12.tld" prefix="display" %> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/prototype.js"></script> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/scriptaculous.js"></script> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/ajaxtags.js"></script> + <div class="h3"> <h3> *************** *** 54,84 **** <br/><br/> <div align="center"> ! <display:table id="row" htmlId="doctab" name="requestScope.resources" export="true" ! requestURI="/action/resource?op=search"> ! <display:column titleKey="label.resource.name" property="name" sortable="true"/> ! <display:column titleKey="label.resource.machine" property="machine.name" sortable="true"/> ! <logic:present name="row"> ! <logic:equal name="row" property="category" value="EIS"> ! <display:column titleKey="label.resource.version" property="activeVersionUpdate.version.name"/> ! <display:column headerClass="empty" media="html" url="/action/resourceUpdate?op=form" ! paramId="resourceName" paramProperty="name"> ! <html:img page="/images/16x16/reload.gif" alt="Update resource version"/> ! </display:column> ! </logic:equal> ! <logic:equal name="row" property="category" value="VersionedResource"> ! <display:column titleKey="label.resource.version" property="activeVersionUpdate.version.name"/> ! <display:column headerClass="empty" media="html" url="/action/resourceUpdate?op=form" ! paramId="resourceName" paramProperty="name"> ! <html:img page="/images/16x16/reload.gif" alt="Update resource version"/> ! </display:column> ! </logic:equal> ! </logic:present> ! <display:column headerClass="empty" media="html" ! url="<%= "/action/resource?op=load&category=" + request.getParameter("category") ! + "&resourceTypeKey=" + request.getParameter("resourceTypeKey") %>" ! paramId="idStr" paramProperty="id"> ! <html:img page="/images/redo.gif" alt="Edit resource properties"/> ! </display:column> ! </display:table> </div> --- 59,91 ---- <br/><br/> <div align="center"> ! <ajax:displayTag id="adtFrame" tableClass="disptab"> ! <display:table id="row" styleClass="disptab" name="requestScope.resources" export="true" ! requestURI="/action/resource?rd=none"> ! <display:column titleKey="label.resource.name" property="name" sortable="true"/> ! <display:column titleKey="label.resource.machine" property="machine.name" sortable="true"/> ! <logic:present name="row"> ! <logic:equal name="row" property="category" value="EIS"> ! <display:column titleKey="label.resource.version" property="activeVersionUpdate.version.name"/> ! <display:column headerClass="empty" media="html" url="/action/resourceUpdate?op=form" ! paramId="resourceName" paramProperty="name"> ! <html:img page="/images/16x16/reload.gif" alt="Update resource version"/> ! </display:column> ! </logic:equal> ! <logic:equal name="row" property="category" value="VersionedResource"> ! <display:column titleKey="label.resource.version" property="activeVersionUpdate.version.name"/> ! <display:column headerClass="empty" media="html" url="/action/resourceUpdate?op=form" ! paramId="resourceName" paramProperty="name"> ! <html:img page="/images/16x16/reload.gif" alt="Update resource version"/> ! </display:column> ! </logic:equal> ! </logic:present> ! <display:column headerClass="empty" media="html" ! url="<%= "/action/resource?op=load&category=" + request.getParameter("category") ! + "&resourceTypeKey=" + request.getParameter("resourceTypeKey") %>" ! paramId="idStr" paramProperty="id"> ! <html:img page="/images/redo.gif" alt="Edit resource properties"/> ! </display:column> ! </display:table> ! </ajax:displayTag> </div> Index: resourceversions.jsp =================================================================== RCS file: /cvsroot/join/join1/src/web/jsp/environment/resourceversions.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** resourceversions.jsp 1 Mar 2007 00:04:09 -0000 1.2 --- resourceversions.jsp 3 Feb 2008 22:59:56 -0000 1.3 *************** *** 1,4 **** --- 1,5 ---- <% // $Revision$ %> + <%@ taglib uri="/WEB-INF/ajaxtags.tld" prefix="ajax" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> *************** *** 6,9 **** --- 7,14 ---- <%@ taglib uri="/WEB-INF/displaytag-12.tld" prefix="display" %> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/prototype.js"></script> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/scriptaculous.js"></script> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/ajaxtags.js"></script> + <div class="h3"> <h3> *************** *** 36,53 **** <br/><br/> <div align="center"> ! <display:table id="row" htmlId="doctab" name="requestScope.resourceVersions" export="true" ! requestURI="/action/resourceVersion?op=search"> ! <display:column titleKey="label.resourceversion.name" property="name" sortable="true"/> ! <display:column titleKey="label.resourceversion.creationdate" sortable="true"> ! <bean:write name="row" property="creationDate" formatKey="pattern.date.datetostring"/> ! </display:column> ! <display:column titleKey="label.resourceversion.description" property="description" maxLength="40"/> ! <display:column headerClass="empty" media="html" ! url="<%= "/action/resourceVersion?op=load&category=" + request.getParameter("category") ! + "&resourceTypeKey=" + request.getParameter("resourceTypeKey") %>" ! paramId="idStr" paramProperty="id"> ! <html:img page="/images/redo.gif" alt="Edit resource version properties"/> ! </display:column> ! </display:table> </div> --- 41,60 ---- <br/><br/> <div align="center"> ! <ajax:displayTag id="adtFrame" tableClass="disptab"> ! <display:table id="row" styleClass="disptab" name="requestScope.resourceVersions" export="true" ! requestURI="/action/resourceVersion?rd=none"> ! <display:column titleKey="label.resourceversion.name" property="name" sortable="true"/> ! <display:column titleKey="label.resourceversion.creationdate" sortable="true" width="110"> ! <bean:write name="row" property="creationDate" formatKey="pattern.date.datetostring"/> ! </display:column> ! <display:column titleKey="label.resourceversion.description" property="description" maxLength="40"/> ! <display:column headerClass="empty" media="html" ! url="<%= "/action/resourceVersion?op=load&category=" + request.getParameter("category") ! + "&resourceTypeKey=" + request.getParameter("resourceTypeKey") %>" ! paramId="idStr" paramProperty="id"> ! <html:img page="/images/redo.gif" alt="Edit resource version properties"/> ! </display:column> ! </display:table> ! </ajax:displayTag> </div> Index: machines.jsp =================================================================== RCS file: /cvsroot/join/join1/src/web/jsp/environment/machines.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** machines.jsp 30 Jul 2006 19:39:16 -0000 1.1 --- machines.jsp 3 Feb 2008 22:59:56 -0000 1.2 *************** *** 1,4 **** --- 1,5 ---- <% // $Revision$ %> + <%@ taglib uri="/WEB-INF/ajaxtags.tld" prefix="ajax" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> *************** *** 6,9 **** --- 7,14 ---- <%@ taglib uri="/WEB-INF/displaytag-12.tld" prefix="display" %> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/prototype.js"></script> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/scriptaculous.js"></script> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/ajaxtags.js"></script> + <div class="h3"> <h3><html:img page="/images/22x22/machine.gif" align="absmiddle"/> <bean:message bundle="gui" key="title.machine"/></h3> *************** *** 17,34 **** <h4><bean:message bundle="gui" key="title.machine.managed"/></h4> <div align="center"> ! <display:table id="row" htmlId="doctab" name="machines" export="true" ! requestURI="/action/machine" excludedParams="*"> ! <display:column titleKey="label.machine.name" property="name" sortable="true" maxLength="100"/> ! <display:column titleKey="label.machine.ipaddress" property="ipAddress" width="90" sortable="true"/> ! <display:column titleKey="label.machine.osinfo" property="osInfo" maxLength="100"/> ! <display:column headerClass="empty" media="html" ! url="/action/machine?op=details" paramId="idStr" paramProperty="id"> ! <html:img page="/images/16x16/details.gif" alt="View hosted resources"/> ! </display:column> ! <display:column headerClass="empty" media="html" ! url="/action/machine?op=load" paramId="idStr" paramProperty="id"> ! <html:img page="/images/redo.gif" alt="Edit machine properties"/> ! </display:column> ! </display:table> </div> </div> --- 22,41 ---- <h4><bean:message bundle="gui" key="title.machine.managed"/></h4> <div align="center"> ! <ajax:displayTag id="adtFrame" tableClass="disptab"> ! <display:table id="row" styleClass="disptab" name="machines" export="true" ! requestURI="/action/machine?rd=none" excludedParams="*"> ! <display:column titleKey="label.machine.name" property="name" sortable="true" maxLength="100"/> ! <display:column titleKey="label.machine.ipaddress" property="ipAddress" width="90" sortable="true"/> ! <display:column titleKey="label.machine.osinfo" property="osInfo" maxLength="100"/> ! <display:column headerClass="empty" media="html" ! url="/action/machine?op=details" paramId="idStr" paramProperty="id"> ! <html:img page="/images/16x16/details.gif" alt="View hosted resources"/> ! </display:column> ! <display:column headerClass="empty" media="html" ! url="/action/machine?op=load" paramId="idStr" paramProperty="id"> ! <html:img page="/images/redo.gif" alt="Edit machine properties"/> ! </display:column> ! </display:table> ! </ajax:displayTag> </div> </div> |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 22:58:58
|
Update of /cvsroot/join/join1/src/web/jsp/artifact In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv8821/jsp/artifact Modified Files: components.jsp deliverables.jsp Log Message: Add ajax support and nifty cubes for nice rounded corners ! Index: components.jsp =================================================================== RCS file: /cvsroot/join/join1/src/web/jsp/artifact/components.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** components.jsp 14 Jan 2007 18:10:20 -0000 1.1 --- components.jsp 3 Feb 2008 22:58:54 -0000 1.2 *************** *** 1,5 **** - <%@ page import="org.figure8.join.businessobjects.artifact.Component"%> <% // $Revision$ %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> --- 1,5 ---- <% // $Revision$ %> + <%@ taglib uri="/WEB-INF/ajaxtags.tld" prefix="ajax" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> *************** *** 7,10 **** --- 7,14 ---- <%@ taglib uri="/WEB-INF/displaytag-12.tld" prefix="display" %> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/prototype.js"></script> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/scriptaculous.js"></script> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/ajaxtags.js"></script> + <div class="h3"> <h3> *************** *** 42,65 **** <h4><bean:message bundle="gui" key="title.components.searched"/></h4> <div align="center"> ! <display:table id="row" htmlId="doctab" name="requestScope.components" export="true" ! requestURI="/action/component?op=search"> ! <display:column titleKey="label.component.key" property="key"/> ! <display:column titleKey="label.component.creationdate"> ! <bean:write name="row" property="creationDate" formatKey="pattern.date.datetostring"/> ! </display:column> ! <display:column titleKey="label.component.size"> ! <bean:define id="siz" name="row" property="size" toScope="page"/> ! <logic:lessThan name="siz" value="<%= String.valueOf(1024 * 1024) %>"> ! <%= (double)(Integer.valueOf(siz.toString()).intValue() / 1024) %> KB ! </logic:lessThan> ! <logic:greaterEqual name="siz" value="<%= String.valueOf(1024 * 1024) %>"> ! <%= (double)(Integer.valueOf(siz.toString()).intValue() / (1024 * 1024)) %> MB ! </logic:greaterEqual> ! </display:column> ! <display:column headerClass="empty" media="html" ! url="/action/component?op=details" paramId="key" paramProperty="key"> ! <html:img page="/images/16x16/details.gif" alt="View component details"/> ! </display:column> ! </display:table> </div> </div> --- 46,71 ---- <h4><bean:message bundle="gui" key="title.components.searched"/></h4> <div align="center"> ! <ajax:displayTag id="adtFrame" tableClass="disptab"> ! <display:table id="row" styleClass="doctab" name="requestScope.components" export="true" ! requestURI="/action/component?op=search&rd=none"> ! <display:column titleKey="label.component.key" property="key"/> ! <display:column titleKey="label.component.creationdate"> ! <bean:write name="row" property="creationDate" formatKey="pattern.date.datetostring"/> ! </display:column> ! <display:column titleKey="label.component.size"> ! <bean:define id="siz" name="row" property="size" toScope="page"/> ! <logic:lessThan name="siz" value="<%= String.valueOf(1024 * 1024) %>"> ! <%= (double)(Integer.valueOf(siz.toString()).intValue() / 1024) %> KB ! </logic:lessThan> ! <logic:greaterEqual name="siz" value="<%= String.valueOf(1024 * 1024) %>"> ! <%= (double)(Integer.valueOf(siz.toString()).intValue() / (1024 * 1024)) %> MB ! </logic:greaterEqual> ! </display:column> ! <display:column headerClass="empty" media="html" ! url="/action/component?op=details" paramId="key" paramProperty="key"> ! <html:img page="/images/16x16/details.gif" alt="View component details"/> ! </display:column> ! </display:table> ! </ajax:displayTag> </div> </div> Index: deliverables.jsp =================================================================== RCS file: /cvsroot/join/join1/src/web/jsp/artifact/deliverables.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** deliverables.jsp 30 Jul 2006 19:21:20 -0000 1.1 --- deliverables.jsp 3 Feb 2008 22:58:54 -0000 1.2 *************** *** 2,5 **** --- 2,6 ---- <%@ taglib uri="/WEB-INF/join.tld" prefix="join" %> + <%@ taglib uri="/WEB-INF/ajaxtags.tld" prefix="ajax" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> *************** *** 7,10 **** --- 8,15 ---- <%@ taglib uri="/WEB-INF/displaytag-12.tld" prefix="display" %> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/prototype.js"></script> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/scriptaculous.js"></script> + <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/ajaxtags.js"></script> + <div class="h3"> <h3> *************** *** 43,60 **** <h4><bean:message bundle="gui" key="title.deliverables.searched"/></h4> <div align="center"> ! <display:table id="row" htmlId="doctab" name="requestScope.deliverables" export="true" ! requestURI="/action/deliverable?op=search"> ! <display:column titleKey="label.deliverable.key" property="key"/> ! <display:column titleKey="label.deliverable.creationdate"> ! <bean:write name="row" property="creationDate" formatKey="pattern.date.datetostring"/> ! </display:column> ! <display:column titleKey="label.deliverable.supplier"> ! <join:resolveUser name="row" property="supplierId" link="true"/> ! </display:column> ! <display:column headerClass="empty" media="html" ! url="/action/deliverable?op=details" paramId="key" paramProperty="key"> <html:img page="/images/16x16/details.gif" alt="View deliverable details"/> </display:column> ! </display:table> </div> --- 48,67 ---- <h4><bean:message bundle="gui" key="title.deliverables.searched"/></h4> <div align="center"> ! <ajax:displayTag id="adtFrame" tableClass="disptab"> ! <display:table id="row" styleClass="disptab" name="requestScope.deliverables" export="true" ! requestURI="/action/deliverable?rd=none&op=search"> ! <display:column titleKey="label.deliverable.key" property="key"/> ! <display:column titleKey="label.deliverable.creationdate" width="120" sortable="true"> ! <bean:write name="row" property="creationDate" formatKey="pattern.date.datetostring"/> ! </display:column> ! <display:column titleKey="label.deliverable.supplier" sortable="true"> ! <join:resolveUser name="row" property="supplierId" link="true"/> ! </display:column> ! <display:column headerClass="empty" media="html" ! url="/action/deliverable?op=details" paramId="key" paramProperty="key"> <html:img page="/images/16x16/details.gif" alt="View deliverable details"/> </display:column> ! </display:table> ! </ajax:displayTag> </div> |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 22:57:16
|
Update of /cvsroot/join/join1/src/test/org/figure8/join/services/remoting/services In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv8416/services/remoting/services Modified Files: BeansHelperTest.java Log Message: Add feature for remote interaction with resources and their versions Index: BeansHelperTest.java =================================================================== RCS file: /cvsroot/join/join1/src/test/org/figure8/join/services/remoting/services/BeansHelperTest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BeansHelperTest.java 6 Feb 2007 21:45:48 -0000 1.3 --- BeansHelperTest.java 3 Feb 2008 22:57:11 -0000 1.4 *************** *** 1,4 **** /** ! * Copyright 2005-2006 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the --- 1,4 ---- /** ! * Copyright 2005-2008 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the *************** *** 17,20 **** --- 17,21 ---- import org.figure8.join.core.InvalidParameterException; import org.figure8.join.core.messaging.JMSConsumerBeanInfo; + import org.figure8.join.core.messaging.JMSConsumerBeanParameterInfo; import org.figure8.join.businessobjects.commons.Status; import org.figure8.join.businessobjects.commons.Release; *************** *** 27,30 **** --- 28,32 ---- import org.figure8.join.services.remoting.beans.RemoteJMSConsumerBeanInfo; import org.figure8.join.services.remoting.beans.RemoteMailingList; + import org.figure8.join.services.remoting.beans.RemoteParameter; import junit.framework.Test; *************** *** 111,116 **** } /** Test the getRemoteObject() method for JMSConsumerBeanInfos. */ ! public void testGetRemoteJMSConsumberBeanInfo(){ // Create a new JMSConsumerBeanInfo. JMSConsumerBeanInfo info = null; --- 113,143 ---- } + /** Test the getLocalObject() method for JMSConsumerBeanInfos. */ + public void testGetLocalJMSConsumerBeanInfo(){ + // Create a new RemoteConsumerBeanInfo. + RemoteJMSConsumerBeanInfo info = new RemoteJMSConsumerBeanInfo("name", "selector", + "destination", "org.figure8.join.core.messaging.EchoJMSConsumerBean", true, false); + + info.addConsumerParameterInfo(new RemoteParameter("param1", "value1")); + info.addConsumerParameterInfo(new RemoteParameter("param2", "value2")); + // Retrieve and check consumer info. + JMSConsumerBeanInfo local = null; + try {local = BeansHelper.getLocalObject(info);} + catch (InvalidParameterException e){ + fail("Should not have thrown exception when creating consumer info"); + } + assertNotNull("Get a JMSConsumerBeanInfo", local); + assertEquals("Get a correct JMSConsumerBeanInfo", "name", local.getName()); + assertEquals("Get a correct JMSConsumerBeanInfo", "selector", local.getSelector()); + assertEquals("Get a correct JMSConsumerBeanInfo", "destination", local.getDestination()); + assertEquals("Get a correct JMSConsumerBeanInfo", + "org.figure8.join.core.messaging.EchoJMSConsumerBean", local.getConsumerBeanClass()); + assertEquals("Get a correct JMSConsumerBeanInfo", true, local.isActive()); + assertEquals("Get a correct JMSConsumerBeanInfo", false, local.isThreadSafe()); + assertEquals("Get a correct JMSConsumerBeanInfo", 2, local.getConsumerParameterInfos().size()); + } + /** Test the getRemoteObject() method for JMSConsumerBeanInfos. */ ! public void testGetRemoteJMSConsumerBeanInfo(){ // Create a new JMSConsumerBeanInfo. JMSConsumerBeanInfo info = null; *************** *** 121,134 **** info.setActive(true); info.setThreadSafe(false); // Retrieve and check consumer info. RemoteJMSConsumerBeanInfo remote = BeansHelper.getRemoteObject(info); assertNotNull("Get a RemoteJMSConsumerBeanInfo", remote); ! assertEquals("Get a corresct RemoteJMSConsumerBeanInfo", "name", remote.getName()); ! assertEquals("Get a corresct RemoteJMSConsumerBeanInfo", "selector", remote.getSelector()); ! assertEquals("Get a corresct RemoteJMSConsumerBeanInfo", "destination", remote.getDestination()); ! assertEquals("Get a corresct RemoteJMSConsumerBeanInfo", "org.figure8.join.core.messaging.EchoJMSConsumerBean", remote.getConsumerBeanClass()); ! assertEquals("Get a corresct RemoteJMSConsumerBeanInfo", true, remote.isActive()); ! assertEquals("Get a corresct RemoteJMSConsumerBeanInfo", false, remote.isThreadSafe()); } } --- 148,164 ---- info.setActive(true); info.setThreadSafe(false); + info.addConsumerParameterInfo(new JMSConsumerBeanParameterInfo("param1", "value1")); + info.addConsumerParameterInfo(new JMSConsumerBeanParameterInfo("param2", "value2")); // Retrieve and check consumer info. RemoteJMSConsumerBeanInfo remote = BeansHelper.getRemoteObject(info); assertNotNull("Get a RemoteJMSConsumerBeanInfo", remote); ! assertEquals("Get a correct RemoteJMSConsumerBeanInfo", "name", remote.getName()); ! assertEquals("Get a correct RemoteJMSConsumerBeanInfo", "selector", remote.getSelector()); ! assertEquals("Get a correct RemoteJMSConsumerBeanInfo", "destination", remote.getDestination()); ! assertEquals("Get a correct RemoteJMSConsumerBeanInfo", "org.figure8.join.core.messaging.EchoJMSConsumerBean", remote.getConsumerBeanClass()); ! assertEquals("Get a correct RemoteJMSConsumerBeanInfo", true, remote.isActive()); ! assertEquals("Get a correct RemoteJMSConsumerBeanInfo", false, remote.isThreadSafe()); ! assertEquals("Get a correct RemoteJMSConsumerBeanInfo", 2, remote.getConsumerParameterInfos().size()); } } |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 22:55:59
|
Update of /cvsroot/join/join1/src/test/org/figure8/join/businessobjects/reporting/persistence In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv7671/businessobjects/reporting/persistence Modified Files: SubscriptionDaoTest.java Log Message: Fix hibernate association problem Index: SubscriptionDaoTest.java =================================================================== RCS file: /cvsroot/join/join1/src/test/org/figure8/join/businessobjects/reporting/persistence/SubscriptionDaoTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SubscriptionDaoTest.java 6 Feb 2007 21:43:49 -0000 1.1 --- SubscriptionDaoTest.java 3 Feb 2008 22:55:55 -0000 1.2 *************** *** 20,23 **** --- 20,24 ---- import org.figure8.join.businessobjects.reporting.Subscription; + import java.util.List; /** * JUnit test case for testing the SubscriptionDao implementation. *************** *** 42,45 **** --- 43,47 ---- protected SubscriptionDao dao = null; + // Override of SpringTestCase ----------------------------------------------- *************** *** 71,74 **** --- 73,93 ---- } + /** Test subscription retrieval */ + public void testSubscriptionRetrieval(){ + // Create a new event and associated mailing list. + Event event = new Event("keyR", "labelR"); + MailingList list = new MailingList("nameR", "title", "content", event); + eventDao.save(event); + listDao.save(list); + // Now create subscriptions. + Subscription sub1 = new Subscription("user1", list); + Subscription sub2 = new Subscription("user2", list); + dao.save(sub1); + dao.save(sub2); + // Retrieve subscriptions and assert. + List subs = dao.getSubscriptionsForUser("user1"); + assertEquals("User1 has one subscriptions", 1, subs.size()); + } + // Protected ---------------------------------------------------------------- |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 22:53:49
|
Update of /cvsroot/join/join1/src/resources/spring In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6894 Modified Files: remotingContext.xml Log Message: Add feature for remote interaction with resources and their versions Index: remotingContext.xml =================================================================== RCS file: /cvsroot/join/join1/src/resources/spring/remotingContext.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** remotingContext.xml 14 Jan 2007 14:40:30 -0000 1.3 --- remotingContext.xml 3 Feb 2008 22:53:45 -0000 1.4 *************** *** 25,28 **** --- 25,40 ---- </bean> + <bean id="parameterService" class="org.figure8.join.services.remoting.services.ParameterServiceImpl"> + <property name="userManager"> + <ref bean="userManager"/> + </property> + <property name="permissionManager"> + <ref bean="permissionManager"/> + </property> + <property name="parameterManager"> + <ref bean="parameterManager"/> + </property> + </bean> + <bean id="processControlService" class="org.figure8.join.services.remoting.services.ProcessControlServiceImpl"> <property name="userManager"> *************** *** 40,43 **** --- 52,67 ---- </bean> + <bean id="resourceService" class="org.figure8.join.services.remoting.services.ResourceServiceImpl"> + <property name="userManager"> + <ref bean="userManager"/> + </property> + <property name="permissionManager"> + <ref bean="permissionManager"/> + </property> + <property name="resourceManager"> + <ref bean="resourceManager"/> + </property> + </bean> + <!-- XmlRpc handler for the Join services --> <bean id="xmlRpcHandler" class="org.figure8.join.services.remoting.xmlrpc.DefaultXmlRpcHandler"> *************** *** 58,61 **** --- 82,92 ---- </bean> + <bean name="/ParameterService-hessian" class="org.springframework.remoting.caucho.HessianServiceExporter"> + <property name="service"><ref local="parameterService"/></property> + <property name="serviceInterface"> + <value>org.figure8.join.services.remoting.ParameterService</value> + </property> + </bean> + <bean name="/ProcessControlService-hessian" class="org.springframework.remoting.caucho.HessianServiceExporter"> <property name="service"><ref local="processControlService"/></property> *************** *** 65,68 **** --- 96,106 ---- </bean> + <bean name="/ResourceService-hessian" class="org.springframework.remoting.caucho.HessianServiceExporter"> + <property name="service"><ref local="resourceService"/></property> + <property name="serviceInterface"> + <value>org.figure8.join.services.remoting.ResourceService</value> + </property> + </bean> + <!-- XFire exporters for the Join services --> <bean id="artifactService-xfire" class="org.codehaus.xfire.spring.remoting.XFireExporter"> *************** *** 79,82 **** --- 117,133 ---- </bean> + <bean id="parameterService-xfire" class="org.codehaus.xfire.spring.remoting.XFireExporter"> + <property name="xfire"> + <ref bean="xfire"/> + </property> + <property name="serviceFactory"> + <ref bean="xfire.serviceFactory"/> + </property> + <property name="serviceBean"><ref local="parameterService"/></property> + <property name="serviceClass"> + <value>org.figure8.join.services.remoting.ParameterService</value> + </property> + </bean> + <bean id="processControlService-xfire" class="org.codehaus.xfire.spring.remoting.XFireExporter"> <property name="xfire"> *************** *** 92,95 **** --- 143,159 ---- </bean> + <bean id="resourceService-xfire" class="org.codehaus.xfire.spring.remoting.XFireExporter"> + <property name="xfire"> + <ref bean="xfire"/> + </property> + <property name="serviceFactory"> + <ref bean="xfire.serviceFactory"/> + </property> + <property name="serviceBean"><ref local="resourceService"/></property> + <property name="serviceClass"> + <value>org.figure8.join.services.remoting.ResourceService</value> + </property> + </bean> + <!-- Url handler mapping definition --> <bean id="handlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> *************** *** 97,103 **** --- 161,171 ---- <props> <prop key="/hessian/ArtifactService">/ArtifactService-hessian</prop> + <prop key="/hessian/ParameterService">/ParameterService-hessian</prop> <prop key="/hessian/ProcessControlService">/ProcessControlService-hessian</prop> + <prop key="/hessian/ResourceService">/ResourceService-hessian</prop> <prop key="/xfire/ArtifactService">artifactService-xfire</prop> + <prop key="/xfire/ParameterService">parameterService-xfire</prop> <prop key="/xfire/ProcessControlService">processControlService-xfire</prop> + <prop key="/xfire/ResourceService">resourceService-xfire</prop> </props> </property> |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 22:51:32
|
Update of /cvsroot/join/join1/src/main/org/figure8/join/services/security In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6120/services/security Modified Files: DeliverableTypeResolver.java EnvironmentResolver.java Log Message: Fix typos in comments Index: EnvironmentResolver.java =================================================================== RCS file: /cvsroot/join/join1/src/main/org/figure8/join/services/security/EnvironmentResolver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EnvironmentResolver.java 24 Jul 2006 16:47:22 -0000 1.1 --- EnvironmentResolver.java 3 Feb 2008 22:51:28 -0000 1.2 *************** *** 1,4 **** /** ! * Copyright 2005-2006 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the --- 1,4 ---- /** ! * Copyright 2005-2008 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the *************** *** 25,29 **** /** * This is an implementation of {@link PermissionResourceResolver} used ! * for managing {@link EnvironmentView}s has security roles resources. * @author <a href="mailto:lau...@fr...">Laurent Broudoux</a> * @version $Revision$ --- 25,29 ---- /** * This is an implementation of {@link PermissionResourceResolver} used ! * for managing {@link EnvironmentView}s as security roles resources. * @author <a href="mailto:lau...@fr...">Laurent Broudoux</a> * @version $Revision$ Index: DeliverableTypeResolver.java =================================================================== RCS file: /cvsroot/join/join1/src/main/org/figure8/join/services/security/DeliverableTypeResolver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DeliverableTypeResolver.java 24 Jul 2006 16:47:22 -0000 1.1 --- DeliverableTypeResolver.java 3 Feb 2008 22:51:28 -0000 1.2 *************** *** 1,4 **** /** ! * Copyright 2005-2006 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the --- 1,4 ---- /** ! * Copyright 2005-2008 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the *************** *** 25,29 **** /** * This is an implementation of {@link PermissionResourceResolver} used ! * for managing {@link DeliverableType}s has security roles resources. * @author <a href="mailto:lau...@fr...">Laurent Broudoux</a> * @version $Revision$ --- 25,29 ---- /** * This is an implementation of {@link PermissionResourceResolver} used ! * for managing {@link DeliverableType}s as security roles resources. * @author <a href="mailto:lau...@fr...">Laurent Broudoux</a> * @version $Revision$ |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 22:49:46
|
Update of /cvsroot/join/join1/src/main/org/figure8/join/services/remoting In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv5316/services/remoting Added Files: ResourceService.java Log Message: Add feature for remote interaction with resources and their versions --- NEW FILE: ResourceService.java --- /** * Copyright 2005-2007 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the * "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.opensource.org/licenses/gpl-license.php * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the Gnu General Public License for more details. */ package org.figure8.join.services.remoting; import org.figure8.join.core.DuplicateEntityException; import org.figure8.join.core.InvalidParameterException; import org.figure8.join.services.remoting.beans.RemoteResourceVersion; import java.rmi.RemoteException; /** * Remote service interface definition. This service allows to retrieve * and update informations onto environment resources. * @author <a href="mailto:lau...@fr...">Laurent Broudoux</a> * @version $Revision: 1.1 $ */ public interface ResourceService extends AuthenticatedService{ // Public ------------------------------------------------------------------- /** * Create a new resource version for a specified type. This operation * reqires a valid authentication done first and the permissions corresponding * to Joiner security role. * @param token Authentication token provided earlier by login() method * @param version The remote wrapper for resource version to create into Join * @throws InvalidParameterException if one of supplied parameters is invalid * @throws DuplicateEntityException if another resource version with same name already exists * @throws InvalidSessionException if user has no valid session on server-side * @throws RemoteException if an exception occurs during the remote conversation */ public abstract void createResourceVersion(String token, RemoteResourceVersion version) throws InvalidParameterException, DuplicateEntityException, InvalidSessionException, RemoteException; /** * Update an existing resource with an existing reosurce version. Resource and * version are specified using their names that should be unique within Join system. * This operations requires a valid authentication done first and the persmissions * corresponding to Joiner security role. * @param token Authentication token provided earlier by login() method * @param resourceName The unique name of the resource to update * @param versionName The unique name of the version to update resource with * @throws InvalidParameterException if one of supplied parameters is invalid * @throws InvalidSessionException if user has no valid session on server-side * @throws RemoteException if an exception occurs during the remote conversation */ public abstract void updateResource(String token, String resourceName, String versionName) throws InvalidParameterException, InvalidSessionException, RemoteException; } |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 22:48:07
|
Update of /cvsroot/join/join1/src/main/org/figure8/join/services/remoting/xmlrpc In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4570/services/remoting/xmlrpc Modified Files: DefaultXmlRpcHandler.java XmlRpcHandler.java Log Message: Add feature for remote interaction with resources and their versions Index: XmlRpcHandler.java =================================================================== RCS file: /cvsroot/join/join1/src/main/org/figure8/join/services/remoting/xmlrpc/XmlRpcHandler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** XmlRpcHandler.java 6 Feb 2007 20:14:46 -0000 1.2 --- XmlRpcHandler.java 3 Feb 2008 22:48:04 -0000 1.3 *************** *** 1,4 **** /** ! * Copyright 2005-2006 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the --- 1,4 ---- /** ! * Copyright 2005-2008 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the *************** *** 23,26 **** --- 23,29 ---- import java.util.List; /** + * This is an interface for a service handler dedicated to Xml-Rpc protocol. + * For this reason, operations signature are simplified in order to be easily bounded + * to their Xml-Rpc serialization representation. * @author <a href="mailto:lau...@fr...">Laurent Broudoux</a> * @version $Revision$ *************** *** 108,111 **** --- 111,115 ---- * @throws InvalidSessionException if user has no valid session on server-side * @throws RemoteException if an exception occurs during the remote conversation + * @return Wether this operation is successfull */ public abstract boolean bindComponent(String token, String typeKey, String versionInfo, *************** *** 149,151 **** --- 153,190 ---- public abstract boolean setDeploymentStatus(String token, String statusKey, String deploymentId) throws InvalidSessionException, NumberFormatException, RemoteException; + + + /** + * Create a new resource version for a specified resource type. This operation + * reqires a valid authentication done first and the permissions corresponding + * to Joiner security role. + * @param token Authentication token provided earlier by login() method + * @param versionName The name of the resource version to create + * @param versionDescription The description of resource version to create + * @param resourceTypeKey The key of resource type this version applies to + * @throws InvalidParameterException if parameter is missing + * @throws DuplicateEntityException if another version with same name already exists + * @throws InvalidSessionException if user has no valid session on server-side + * @throws RemoteException if an exception occurs during the remote conversation + * @return Wether this operation is successfull + */ + public abstract boolean createResourceVersion(String token, String versionName, + String versionDescription, String resourceTypeKey) + throws InvalidParameterException, DuplicateEntityException, InvalidSessionException, RemoteException; + + /** + * Update an existing resource with an existing reosurce version. Resource and + * version are specified using their names that should be unique within Join system. + * This operations requires a valid authentication done first and the persmissions + * corresponding to Joiner security role. + * @param token Authentication token provided earlier by login() method + * @param resourceName The unique name of the resource to update + * @param versionName The unique name of the version to update resource with + * @throws InvalidParameterException if one of supplied parameters is invalid + * @throws InvalidSessionException if user has no valid session on server-side + * @throws RemoteException if an exception occurs during the remote conversation + * @return Wether this operation is successfull + */ + public abstract boolean updateResource(String token, String resourceName, String versionName) + throws InvalidParameterException, InvalidSessionException, RemoteException; } Index: DefaultXmlRpcHandler.java =================================================================== RCS file: /cvsroot/join/join1/src/main/org/figure8/join/services/remoting/xmlrpc/DefaultXmlRpcHandler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DefaultXmlRpcHandler.java 6 Feb 2007 20:14:46 -0000 1.2 --- DefaultXmlRpcHandler.java 3 Feb 2008 22:48:04 -0000 1.3 *************** *** 1,4 **** /** ! * Copyright 2005-2006 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the --- 1,4 ---- /** ! * Copyright 2005-2008 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the *************** *** 18,21 **** --- 18,22 ---- import org.figure8.join.core.InvalidParameterException; import org.figure8.join.services.remoting.ArtifactService; + import org.figure8.join.services.remoting.ResourceService; import org.figure8.join.services.remoting.ProcessControlService; import org.figure8.join.services.remoting.InvalidSessionException; *************** *** 24,27 **** --- 25,29 ---- import org.figure8.join.services.remoting.beans.RemoteDeliverable; import org.figure8.join.services.remoting.beans.RemoteDeliverableType; + import org.figure8.join.services.remoting.beans.RemoteResourceVersion; import org.figure8.join.services.security.InvalidLoginException; import org.figure8.join.util.LogUtil; *************** *** 54,57 **** --- 56,61 ---- /** The ArtifactService implementation to dispatch requests to */ private ArtifactService artifactService = null; + /** The ResourceService implementation to dispatch requests to */ + private ResourceService resourceService = null; /** The ProcessControlService implementation to dispatch requests to */ private ProcessControlService controlService = null; *************** *** 71,75 **** this.artifactService = service; } ! /** @param service The ProcessControlService implemntation to use */ public void setProcessControlService(ProcessControlService service){ this.controlService = service; --- 75,83 ---- this.artifactService = service; } ! /** @param service The ResourceService implementation to use */ ! public void setResourceService(ResourceService service){ ! this.resourceService = service; ! } ! /** @param service The ProcessControlService implementation to use */ public void setProcessControlService(ProcessControlService service){ this.controlService = service; *************** *** 202,205 **** --- 210,214 ---- * @throws InvalidSessionException if user has no valid session on server-side * @throws RemoteException if an exception occurs during the remote conversation + * @return Wether this operation is successfull */ public boolean bindComponent(String token, String typeKey, String versionInfo, *************** *** 260,263 **** --- 269,314 ---- } + /** + * Create a new resource version for a specified resource type. This operation + * reqires a valid authentication done first and the permissions corresponding + * to Joiner security role. + * @param token Authentication token provided earlier by login() method + * @param versionName The name of the resource version to create + * @param versionDescription The description of resource version to create + * @param resourceTypeKey The key of resource type this version applies to + * @throws InvalidParameterException if parameter is missing + * @throws DuplicateEntityException if another version with same name already exists + * @throws InvalidSessionException if user has no valid session on server-side + * @throws RemoteException if an exception occurs during the remote conversation + * @return Wether this operation is successfull + */ + public boolean createResourceVersion(String token, String versionName, + String versionDescription, String resourceTypeKey) + throws InvalidParameterException, DuplicateEntityException, InvalidSessionException, RemoteException{ + // Build intermediate RemoteResourceVersion and delegate to service. + RemoteResourceVersion version = new RemoteResourceVersion(versionName, versionDescription, resourceTypeKey); + resourceService.createResourceVersion(token, version); + return true; + } + + /** + * Update an existing resource with an existing reosurce version. Resource and + * version are specified using their names that should be unique within Join system. + * This operations requires a valid authentication done first and the persmissions + * corresponding to Joiner security role. + * @param token Authentication token provided earlier by login() method + * @param resourceName The unique name of the resource to update + * @param versionName The unique name of the version to update resource with + * @throws InvalidParameterException if one of supplied parameters is invalid + * @throws InvalidSessionException if user has no valid session on server-side + * @throws RemoteException if an exception occurs during the remote conversation + * @return Wether this operation is successfull + */ + public boolean updateResource(String token, String resourceName, String versionName) + throws InvalidParameterException, InvalidSessionException, RemoteException{ + resourceService.updateResource(token, resourceName, versionName); + return true; + } + // Private ------------------------------------------------------------------ |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 22:46:54
|
Update of /cvsroot/join/join1/src/main/org/figure8/join/services/remoting/services In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4138/services/remoting/services Added Files: ResourceServiceImpl.java Log Message: Add feature for remote interaction with resources and their versions --- NEW FILE: ResourceServiceImpl.java --- /** * Copyright 2005-2007 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the * "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.opensource.org/licenses/gpl-license.php * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the Gnu General Public License for more details. */ package org.figure8.join.services.remoting.services; import org.figure8.join.core.DuplicateEntityException; import org.figure8.join.core.InvalidParameterException; import org.figure8.join.services.remoting.ResourceService; import org.figure8.join.services.remoting.InvalidSessionException; import org.figure8.join.services.remoting.beans.RemoteResourceVersion; import org.figure8.join.businessobjects.security.Role; import org.figure8.join.businessobjects.environment.ResourceVersion; import org.figure8.join.businessobjects.environment.VersionedResource; import org.figure8.join.businessobjects.environment.VersionedResourceType; import org.figure8.join.businessfacades.environment.ResourceManager; import org.figure8.join.view.UserView; import org.figure8.join.util.LogUtil; import org.apache.commons.logging.Log; import java.rmi.RemoteException; /** * This is the default implementation of {@link ResourceService} * @author <a href="mailto:lau...@fr...">Laurent Broudoux</a> * @version $Revision: 1.1 $ */ public class ResourceServiceImpl extends AbstractAuthenticatedService implements ResourceService{ // Static ------------------------------------------------------------------- /** Get a commons logger. */ private static final Log log = LogUtil.getLog(ResourceServiceImpl.class); // Attributes --------------------------------------------------------------- /** The Join ResourceManager to use for remote calls. */ private ResourceManager resourceManager = null; // Constructors ------------------------------------------------------------- /** Creates a new instance of ResourceServiceImpl. */ public ResourceServiceImpl(){ } // Public ------------------------------------------------------------------- /** @param resourceManager The ResourceManager implementation to use */ public void setResourceManager(ResourceManager resourceManager){ this.resourceManager = resourceManager; } /** @return The ResourceManager implementation used */ public ResourceManager getResourceManager(){ return resourceManager; } // Implementation of ResourceService ---------------------------------------- /** * Create a new resource version for a specified type. This operation * reqires a valid authentication done first and the permissions corresponding * to Joiner security role. * @param token Authentication token provided earlier by login() method * @param version The remote wrapper for resource version to crate into Join * @throws InvalidParameterException if one of supplied parameters is invalid * @throws DuplicateEntityException if a resource version with same name already exists * @throws InvalidSessionException if user has no valid session on server-side * @throws RemoteException if an exception occurs during the remote conversation */ public void createResourceVersion(String token, RemoteResourceVersion version) throws InvalidParameterException, DuplicateEntityException, InvalidSessionException, RemoteException{ // Ensure token is still valid, get required role. UserView user = getAuthenticatedUser(token); Role joinerRole = permissionManager.getRole(Role.DEFAULT_JOINER_ROLE); if (user.hasPermission(joinerRole)){ // Retrieve specified VersionedResourceType. VersionedResourceType resourceType = null; try{ resourceType = (VersionedResourceType)resourceManager.getResourceType(version.getResourceTypeKey()); } catch (ClassCastException cce){ // Log and throw exception. log.error(version.getResourceTypeKey() + " is not a supported VersionedResourceType"); throw new InvalidParameterException(version.getResourceTypeKey() + " is not a supported resource type !"); } // Check it exists. if (resourceType == null){ log.error(version.getResourceTypeKey() + " is not an existing VersionedResourceType"); throw new InvalidParameterException(version.getResourceTypeKey() + " is not an existing resource type !"); } // Now just create a new ResourceVersion with this type. ResourceVersion vers = new ResourceVersion(version.getName(), version.getDescription(), resourceType); resourceManager.saveResourceVersion(vers); } else{ // Warn and raise exception. log.warn("User '" + user.getUser().getLogin() + "' do not have required permission for creating " + version.getName()); throw new InvalidSessionException("Permission is required for creating " + version.getName()); } } /** * Update an existing resource with an existing reosurce version. Resource and * version are specified using their names that should be unique within Join system. * This operations requires a valid authentication done first and the persmissions * corresponding to Joiner security role. * @param token Authentication token provided earlier by login() method * @param resourceName The unique name of the resource to update * @param versionName The unique name of the version to update resource with * @throws InvalidParameterException if one of supplied parameters is invalid * @throws InvalidSessionException if user has no valid session on server-side * @throws RemoteException if an exception occurs during the remote conversation */ public void updateResource(String token, String resourceName, String versionName) throws InvalidParameterException, InvalidSessionException, RemoteException{ // Ensure token is still valid, get required role. UserView user = getAuthenticatedUser(token); Role joinerRole = permissionManager.getRole(Role.DEFAULT_JOINER_ROLE); if (user.hasPermission(joinerRole)){ // Retrieve specified versioned resource. VersionedResource resource = null; try{ resource = (VersionedResource)resourceManager.getResource(resourceName); } catch (ClassCastException cce){ // Log and throw exception. log.error(resourceName + " is not a supported VersionedResource"); throw new InvalidParameterException(resourceName + " is not a supported versioned resource !"); } // Check it exists. if (resource == null){ log.error(resourceName + " is not an existing VersioneResource"); throw new InvalidParameterException(resourceName + " is not an existing versioned resource !"); } // Retrieve version and check it exists. ResourceVersion version = resourceManager.getResourceVersion(versionName); if (version == null){ log.error(versionName + " is not an existing ResourceVersion"); throw new InvalidParameterException(versionName + " is not an existing resource version !"); } // Final check : resource type should match. if (!resource.getResourceType().getKey().equals(version.getResourceType().getKey())){ log.error(versionName + " has not the same ResourceType that " + resourceName); throw new InvalidParameterException(versionName + " is not a valid resource version for " + resourceName); } // Now just update resource with version. resourceManager.updateResource(resource, version); } else{ // Warn and raise exception. log.warn("User '" + user.getUser().getLogin() + "' do not have required permission for updating " + resourceName); throw new InvalidSessionException("Permission is required for updating " + resourceName); } } } |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 22:46:16
|
Update of /cvsroot/join/join1/src/main/org/figure8/join/services/remoting/services In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4086/services/remoting/services Modified Files: ArtifactServiceImpl.java BeansHelper.java CronServiceImpl.java MessagingServiceImpl.java Log Message: Fix checstyle issues Index: BeansHelper.java =================================================================== RCS file: /cvsroot/join/join1/src/main/org/figure8/join/services/remoting/services/BeansHelper.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BeansHelper.java 6 Feb 2007 20:10:51 -0000 1.3 --- BeansHelper.java 3 Feb 2008 22:46:10 -0000 1.4 *************** *** 1,4 **** /** ! * Copyright 2005-2006 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the --- 1,4 ---- /** ! * Copyright 2005-2008 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the *************** *** 15,18 **** --- 15,19 ---- package org.figure8.join.services.remoting.services; + import org.figure8.join.core.InvalidParameterException; import org.figure8.join.core.messaging.JMSConsumerBeanInfo; import org.figure8.join.core.messaging.JMSConsumerBeanParameterInfo; *************** *** 93,96 **** --- 94,118 ---- /** + * Gets a local view of a {@link RemoteJMSConsumerBeanInfo} remote object + * @param info The remote consumer bean information wrapper + * @throws InvalidParameterException if consumerBeanClass of remote bean is not correct + * (see JMSConsumerBeanInfo documentation for that) + * @return The JMSConsumerBeanInfo corresponding + */ + public static JMSConsumerBeanInfo getLocalObject(RemoteJMSConsumerBeanInfo info) throws InvalidParameterException{ + JMSConsumerBeanInfo result = new JMSConsumerBeanInfo(info.getName(), info.getSelector(), info.getDestination(), + info.getConsumerBeanClass()); + result.setActive(info.isActive()); + result.setThreadSafe(info.isThreadSafe()); + // Add consumer parameters if not empty. + for (int i=0; i<info.getConsumerParameterInfos().size(); i++){ + RemoteParameter param = (RemoteParameter)info.getConsumerParameterInfos().get(i); + JMSConsumerBeanParameterInfo lParam = new JMSConsumerBeanParameterInfo(param.getName(), param.getValue()); + result.addConsumerParameterInfo(lParam); + } + return result; + } + + /** * Gets a remote view of a {@link JMSConsumerBeanInfo} domain object * @param info The consumer bean information wrapper *************** *** 98,105 **** */ public static RemoteJMSConsumerBeanInfo getRemoteObject(JMSConsumerBeanInfo info){ ! RemoteJMSConsumerBeanInfo result = new RemoteJMSConsumerBeanInfo(info.getName(), info.getSelector(), info.getDestination(), ! info.getConsumerBeanClass(), info.isActive(), info.isThreadSafe()); // Add consumer parameters if not empty. ! for (int i=0; i< info.getConsumerParameterInfos().size(); i++){ JMSConsumerBeanParameterInfo param = (JMSConsumerBeanParameterInfo)info.getConsumerParameterInfos().get(i); RemoteParameter rParam = new RemoteParameter(param.getName(), param.getValue()); --- 120,127 ---- */ public static RemoteJMSConsumerBeanInfo getRemoteObject(JMSConsumerBeanInfo info){ ! RemoteJMSConsumerBeanInfo result = new RemoteJMSConsumerBeanInfo(info.getName(), info.getSelector(), ! info.getDestination(), info.getConsumerBeanClass(), info.isActive(), info.isThreadSafe()); // Add consumer parameters if not empty. ! for (int i=0; i<info.getConsumerParameterInfos().size(); i++){ JMSConsumerBeanParameterInfo param = (JMSConsumerBeanParameterInfo)info.getConsumerParameterInfos().get(i); RemoteParameter rParam = new RemoteParameter(param.getName(), param.getValue()); *************** *** 111,114 **** --- 133,161 ---- /** + * Gets a local view of a {@link RemoteQuartzCronInfo} remote object + * @param info The remote cron information wrapper + * @throws InvalidParameterException if jobClass of remote bean is not correct + * (see QuartzCronInfo documentation for that) + * @return The QuartzCronInfo corresponding + */ + public static QuartzCronInfo getLocalObject(RemoteQuartzCronInfo info) throws InvalidParameterException{ + QuartzCronInfo result = new QuartzCronInfo(info.getName(), info.getCronExpression(), + info.getJobType(), info.getJobClass()); + // Add cron job parameters if not empty. + for (int i=0; i<info.getJobParameters().size(); i++){ + RemoteParameter param = (RemoteParameter)info.getJobParameters().get(i); + QuartzCronParameterInfo lParam = new QuartzCronParameterInfo(param.getName(), param.getValue(), true); + result.addJobParameterInfo(lParam); + } + // Add cron user parameters if not empty. + for (int i=0; i<info.getUserParameters().size(); i++){ + RemoteParameter param = (RemoteParameter)info.getUserParameters().get(i); + QuartzCronParameterInfo lParam = new QuartzCronParameterInfo(param.getName(), param.getValue(), false); + result.addJobParameterInfo(lParam); + } + return result; + } + + /** * Gets a remote view of a {@link QuartzCronInfo} domain object * @param info The cron bean information wrapper. *************** *** 116,121 **** */ public static RemoteQuartzCronInfo getRemoteObject(QuartzCronInfo info){ ! RemoteQuartzCronInfo result = new RemoteQuartzCronInfo(info.getName(), info.getCronExpression(), info.getJobType(), ! info.getJobClass()); // Add info parameters if not empty for (int i=0; i<info.getJobParameterInfos().size(); i++){ --- 163,168 ---- */ public static RemoteQuartzCronInfo getRemoteObject(QuartzCronInfo info){ ! RemoteQuartzCronInfo result = new RemoteQuartzCronInfo(info.getName(), info.getCronExpression(), ! info.getJobType(), info.getJobClass()); // Add info parameters if not empty for (int i=0; i<info.getJobParameterInfos().size(); i++){ Index: MessagingServiceImpl.java =================================================================== RCS file: /cvsroot/join/join1/src/main/org/figure8/join/services/remoting/services/MessagingServiceImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MessagingServiceImpl.java 20 Dec 2006 22:36:19 -0000 1.2 --- MessagingServiceImpl.java 3 Feb 2008 22:46:10 -0000 1.3 *************** *** 1,4 **** /** ! * Copyright 2005-2006 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the --- 1,4 ---- /** ! * Copyright 2005-2008 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the *************** *** 20,26 **** --- 20,28 ---- import org.figure8.join.core.messaging.JMSConsumerBeanInfo; import org.figure8.join.core.messaging.JMSConsumerBeanManager; + import org.figure8.join.core.messaging.JMSConsumerBeanParameterInfo; import org.figure8.join.services.remoting.MessagingService; import org.figure8.join.services.remoting.InvalidSessionException; import org.figure8.join.services.remoting.beans.RemoteJMSConsumerBeanInfo; + import org.figure8.join.services.remoting.beans.RemoteParameter; import org.figure8.join.businessobjects.security.Role; import org.figure8.join.view.UserView; *************** *** 83,88 **** * @throws RemoteException if an exception occurs during the remote conversation */ ! public void saveConsumerBeanInfo(String token, RemoteJMSConsumerBeanInfo info) throws InvalidSessionException, InvalidParameterException, ! DuplicateEntityException, InfrastructureException, RemoteException{ log.info("Saving consumer bean info with name: " + info.getName()); // Ensure token is still valid, get required role. --- 85,90 ---- * @throws RemoteException if an exception occurs during the remote conversation */ ! public void saveConsumerBeanInfo(String token, RemoteJMSConsumerBeanInfo info) throws InvalidSessionException, ! InvalidParameterException, DuplicateEntityException, InfrastructureException, RemoteException{ log.info("Saving consumer bean info with name: " + info.getName()); // Ensure token is still valid, get required role. *************** *** 105,108 **** --- 107,119 ---- bean.setDestination(info.getDestination()); bean.setConsumerBeanClass(info.getConsumerBeanClass()); + // Clear and add parameters if provided. + bean.getConsumerParameterInfos().clear(); + if (info.getConsumerParameterInfos() != null && !info.getConsumerParameterInfos().isEmpty()){ + for (int i=0; i<info.getConsumerParameterInfos().size(); i++){ + RemoteParameter infoP = (RemoteParameter)info.getConsumerParameterInfos().get(i); + JMSConsumerBeanParameterInfo param = new JMSConsumerBeanParameterInfo(infoP.getName(), infoP.getValue()); + bean.addConsumerParameterInfo(param); + } + } // Delegate save to manager. consumerManager.saveConsumerBeanInfo(bean); *************** *** 177,181 **** * @return An array of {@link RemoteJMSConsumerBeanInfo} objects. */ ! public RemoteJMSConsumerBeanInfo[] getConsumerBeanInfos(String token) throws InvalidSessionException, RemoteException{ log.debug("Retrieving consumer bean informations."); // Ensure token is still valid, get required role. --- 188,193 ---- * @return An array of {@link RemoteJMSConsumerBeanInfo} objects. */ ! public RemoteJMSConsumerBeanInfo[] getConsumerBeanInfos(String token) throws InvalidSessionException, ! RemoteException{ log.debug("Retrieving consumer bean informations."); // Ensure token is still valid, get required role. Index: CronServiceImpl.java =================================================================== RCS file: /cvsroot/join/join1/src/main/org/figure8/join/services/remoting/services/CronServiceImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CronServiceImpl.java 25 Jul 2006 12:29:22 -0000 1.2 --- CronServiceImpl.java 3 Feb 2008 22:46:10 -0000 1.3 *************** *** 1,4 **** /** ! * Copyright 2005-2006 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the --- 1,4 ---- /** ! * Copyright 2005-2008 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the *************** *** 78,83 **** * @throws RemoteException if an exception occurs during the remote conversation */ ! public void saveCron(String token, RemoteQuartzCronInfo remoteCron) throws InvalidSessionException, InvalidParameterException, ! DuplicateEntityException, RemoteException{ // Ensure token is still valid, get required role. UserView user = getAuthenticatedUser(token); --- 78,83 ---- * @throws RemoteException if an exception occurs during the remote conversation */ ! public void saveCron(String token, RemoteQuartzCronInfo remoteCron) throws InvalidSessionException, ! InvalidParameterException, DuplicateEntityException, RemoteException{ // Ensure token is still valid, get required role. UserView user = getAuthenticatedUser(token); *************** *** 87,91 **** if (user.hasPermission(adminRole)){ QuartzCronInfo cron = manager.getQuartzCron(remoteCron.getName()); ! if (cron==null){ cron = new QuartzCronInfo(); cron.setName(remoteCron.getName()); --- 87,91 ---- if (user.hasPermission(adminRole)){ QuartzCronInfo cron = manager.getQuartzCron(remoteCron.getName()); ! if (cron == null){ cron = new QuartzCronInfo(); cron.setName(remoteCron.getName()); *************** *** 99,103 **** while (itParameters.hasNext()){ RemoteParameter remoteParameter = (RemoteParameter)itParameters.next(); ! QuartzCronParameterInfo parameter = new QuartzCronParameterInfo(remoteParameter.getName(), remoteParameter.getValue(), true); cron.addJobParameterInfo(parameter); } --- 99,104 ---- while (itParameters.hasNext()){ RemoteParameter remoteParameter = (RemoteParameter)itParameters.next(); ! QuartzCronParameterInfo parameter = new QuartzCronParameterInfo(remoteParameter.getName(), ! remoteParameter.getValue(), true); cron.addJobParameterInfo(parameter); } *************** *** 106,110 **** while (itParameters.hasNext()){ RemoteParameter remoteParameter = (RemoteParameter)itParameters.next(); ! QuartzCronParameterInfo parameter = new QuartzCronParameterInfo(remoteParameter.getName(), remoteParameter.getValue(), false); cron.addJobParameterInfo(parameter); } --- 107,112 ---- while (itParameters.hasNext()){ RemoteParameter remoteParameter = (RemoteParameter)itParameters.next(); ! QuartzCronParameterInfo parameter = new QuartzCronParameterInfo(remoteParameter.getName(), ! remoteParameter.getValue(), false); cron.addJobParameterInfo(parameter); } *************** *** 122,126 **** * @throws RemoteException if an exception occurs during the remote conversation */ ! public void removeCron(String token, RemoteQuartzCronInfo remoteCron) throws InvalidSessionException, RemoteException{ // Ensure token is still valid, get required role. UserView user = getAuthenticatedUser(token); --- 124,129 ---- * @throws RemoteException if an exception occurs during the remote conversation */ ! public void removeCron(String token, RemoteQuartzCronInfo remoteCron) throws InvalidSessionException, ! RemoteException{ // Ensure token is still valid, get required role. UserView user = getAuthenticatedUser(token); Index: ArtifactServiceImpl.java =================================================================== RCS file: /cvsroot/join/join1/src/main/org/figure8/join/services/remoting/services/ArtifactServiceImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ArtifactServiceImpl.java 14 Jan 2007 14:35:56 -0000 1.2 --- ArtifactServiceImpl.java 3 Feb 2008 22:46:10 -0000 1.3 *************** *** 1,4 **** /** ! * Copyright 2005-2006 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the --- 1,4 ---- /** ! * Copyright 2005-2008 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the *************** *** 23,27 **** import org.figure8.join.services.remoting.beans.RemoteDeliverable; import org.figure8.join.services.remoting.beans.RemoteDeliverableType; - import org.figure8.join.businessobjects.artifact.Build; import org.figure8.join.businessobjects.artifact.Assembly; import org.figure8.join.businessobjects.artifact.Component; --- 23,26 ---- *************** *** 213,217 **** else{ // Warn and raise exception. ! log.warn("User '" + user.getUser().getLogin() + "' do not have required permission for supplying " + type.getLabel()); throw new InvalidSessionException("Permission is required for supplying " + type.getLabel()); } --- 212,217 ---- else{ // Warn and raise exception. ! log.warn("User '" + user.getUser().getLogin() + "' do not have required permission for supplying " ! + type.getLabel()); throw new InvalidSessionException("Permission is required for supplying " + type.getLabel()); } *************** *** 237,241 **** ComponentType type = artifactManager.getComponentType(component.getComponentTypeKey()); if (type == null) ! throw new InvalidParameterException(component.getComponentTypeKey() + " does not represent an existing component type !"); // Create corresponding component. Component comp = new Component(component.getVersionInfo(), component.getSize(), type); --- 237,242 ---- ComponentType type = artifactManager.getComponentType(component.getComponentTypeKey()); if (type == null) ! throw new InvalidParameterException(component.getComponentTypeKey() ! + " does not represent an existing component type !"); // Create corresponding component. Component comp = new Component(component.getVersionInfo(), component.getSize(), type); |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 22:43:39
|
Update of /cvsroot/join/join1/src/main/org/figure8/join/services/remoting/beans In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv2931/services/remoting/beans Added Files: RemoteResourceVersion.java Log Message: Add feature for remote interaction with resources and their versions --- NEW FILE: RemoteResourceVersion.java --- /** * Copyright 2005-2007 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the * "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.opensource.org/licenses/gpl-license.php * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the Gnu General Public License for more details. */ package org.figure8.join.services.remoting.beans; import java.util.Date; import java.io.Serializable; /** * @author <a href="mailto:lau...@fr...">Laurent Broudoux</a> * @version $Revision: 1.1 $ */ public class RemoteResourceVersion implements Serializable{ // Attributes --------------------------------------------------------------- /** This resource version name (should be unique) */ private String name; /** This resource version description */ private String description; /** This resource version creation date */ private Date creationDate; /** The key of corresponding resource type */ private String resourceTypeKey; // Constructors ------------------------------------------------------------- /** * Creates a new instance of RemoteResourceVersion * @param name The resource version name * @param description The resource version description * @paramt resourceTypeKey The resource type this version applies to */ public RemoteResourceVersion(String name, String description, String resourceTypeKey){ this.name = name; this.description = description; this.resourceTypeKey = resourceTypeKey; } // Public ------------------------------------------------------------------- /** @return This resource version name */ public String getName(){ return name; } /** @param name This resource version name */ public void setName(String name){ this.name = name; } /** @return This resource version description */ public String getDescription(){ return description; } /** @param description This resource version description */ public void setDescription(String description){ this.description = description; } /** @return This resource version type unique key */ public String getResourceTypeKey(){ return resourceTypeKey; } } |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 22:42:03
|
Update of /cvsroot/join/join1/src/main/org/figure8/join/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv2153/core Modified Files: ContainerContextLoader.java Log Message: Fix checstyle issues Index: ContainerContextLoader.java =================================================================== RCS file: /cvsroot/join/join1/src/main/org/figure8/join/core/ContainerContextLoader.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ContainerContextLoader.java 3 Jul 2006 21:58:32 -0000 1.3 --- ContainerContextLoader.java 3 Feb 2008 22:41:58 -0000 1.4 *************** *** 1,4 **** /** ! * Copyright 2005-2006 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the --- 1,4 ---- /** ! * Copyright 2005-2008 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the *************** *** 79,92 **** * @return The newly created Join web application context */ ! protected WebApplicationContext createWebApplicationContext(ServletContext servletContext, ApplicationContext parent) throws BeansException{ // Instanciate the default implementation of app context. ConfigurableWebApplicationContext wac = (ConfigurableWebApplicationContext) BeanUtils.instantiateClass(DEFAULT_CONTEXT_CLASS); // Set its parent and servlet contexts. ! wac.setParent(parent); ! wac.setServletContext(servletContext); // Set its configuration files location. ! String configLocation = servletContext.getInitParameter(CONFIG_LOCATION_PARAM); // Check if some extra configuration files should be added. if (addingExtraConfigLocationAllowed()){ --- 79,93 ---- * @return The newly created Join web application context */ ! protected WebApplicationContext createWebApplicationContext(ServletContext servletContext, ApplicationContext parent) ! throws BeansException{ // Instanciate the default implementation of app context. ConfigurableWebApplicationContext wac = (ConfigurableWebApplicationContext) BeanUtils.instantiateClass(DEFAULT_CONTEXT_CLASS); // Set its parent and servlet contexts. ! wac.setParent(parent); ! wac.setServletContext(servletContext); // Set its configuration files location. ! String configLocation = servletContext.getInitParameter(CONFIG_LOCATION_PARAM); // Check if some extra configuration files should be added. if (addingExtraConfigLocationAllowed()){ *************** *** 96,105 **** } if (configLocation != null){ ! wac.setConfigLocations(StringUtils.tokenizeToStringArray(configLocation, ! ConfigurableWebApplicationContext.CONFIG_LOCATION_DELIMITERS)); ! } // Refresh and return. ! wac.refresh(); ! return wac; } --- 97,106 ---- } if (configLocation != null){ ! wac.setConfigLocations(StringUtils.tokenizeToStringArray(configLocation, ! ConfigurableWebApplicationContext.CONFIG_LOCATION_DELIMITERS)); ! } // Refresh and return. ! wac.refresh(); ! return wac; } |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 22:40:57
|
Update of /cvsroot/join/join1/src/main/org/figure8/join/core/persistence In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv1753/core/persistence Modified Files: HibernateObjectDao.java ObjectDao.java Log Message: Add initialieAssociation() method for feature allowing remote interaction with resources and their versions Index: HibernateObjectDao.java =================================================================== RCS file: /cvsroot/join/join1/src/main/org/figure8/join/core/persistence/HibernateObjectDao.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HibernateObjectDao.java 4 Jul 2006 19:39:14 -0000 1.2 --- HibernateObjectDao.java 3 Feb 2008 22:40:52 -0000 1.3 *************** *** 1,4 **** /** ! * Copyright 2005-2006 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the --- 1,4 ---- /** ! * Copyright 2005-2008 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the *************** *** 26,29 **** --- 26,30 ---- import net.sf.hibernate.Session; import net.sf.hibernate.LockMode; + import net.sf.hibernate.Hibernate; import net.sf.hibernate.ReplicationMode; import net.sf.hibernate.HibernateException; *************** *** 126,129 **** --- 127,162 ---- /** + * Force initialization of the given entity association from underlying datastore + * @param entityobject EntityObject whose association shoud be initialized + * @param proxy A proxy object representing entoty association (this may be a collection) + */ + public void initializeAssociation(EntityObject entityobject, Object proxy){ + try{ + // Execute proxy initialization after having reattached entity object. + getHibernateTemplate().lock(entityobject, LockMode.READ); + getHibernateTemplate().initialize(proxy); + } + catch (Exception e){ + log.error("Exception in initializeAssociation()!", e); + throw new InfrastructureException(e); + } + } + + /** + * Check if an object (EntityObject or association proxy) is initialized from datastore + * @param object The object to check initialization for + * @return true if object has been loaded from datastore, false otherwise + */ + public boolean isInitialized(Object object){ + try{ + return Hibernate.isInitialized(object); + } + catch (Exception e){ + log.error("Exception in isInitialized()!", e); + throw new InfrastructureException(e); + } + } + + /** * Persist the object state throughout the cluster. * @param obj The object to replicate Index: ObjectDao.java =================================================================== RCS file: /cvsroot/join/join1/src/main/org/figure8/join/core/persistence/ObjectDao.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ObjectDao.java 4 Jul 2006 19:39:14 -0000 1.2 --- ObjectDao.java 3 Feb 2008 22:40:52 -0000 1.3 *************** *** 1,4 **** /** ! * Copyright 2005-2006 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the --- 1,4 ---- /** ! * Copyright 2005-2008 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the *************** *** 54,57 **** --- 54,71 ---- /** + * Force initialization of the given entity association from underlying datastore + * @param entityobject EntityObject whose association shoud be initialized + * @param proxy A proxy object representing entoty association (this may be a collection) + */ + public abstract void initializeAssociation(EntityObject entityobject, Object proxy); + + /** + * Check if an object (EntityObject or association proxy) is initialized from datastore + * @param object The object to check initialization for + * @return true if object has been loaded from datastore, false otherwise + */ + public abstract boolean isInitialized(Object object); + + /** * Persist the object state throughout the cluster. * @param obj The object to replicate |
|
From: Laurent B. <lbr...@us...> - 2008-02-03 22:38:56
|
Update of /cvsroot/join/join1/src/main/org/figure8/join/control/action In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv926/control/action Modified Files: ConsumerActions.java MailingListActions.java QuartzCronActions.java Log Message: Fix checstyle issues Index: MailingListActions.java =================================================================== RCS file: /cvsroot/join/join1/src/main/org/figure8/join/control/action/MailingListActions.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MailingListActions.java 6 Feb 2007 21:32:47 -0000 1.2 --- MailingListActions.java 3 Feb 2008 22:38:52 -0000 1.3 *************** *** 1,4 **** /** ! * Copyright 2005-2006 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the --- 1,4 ---- /** ! * Copyright 2005-2008 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the *************** *** 122,126 **** * @throws Exception such as InfraStructureExceptions ... */ ! public ActionForward doExecute(String operation, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception{ --- 122,127 ---- * @throws Exception such as InfraStructureExceptions ... */ ! public ActionForward doExecute(String operation, ActionMapping mapping, ActionForm form, ! HttpServletRequest request, HttpServletResponse response) throws Exception{ *************** *** 146,150 **** } else{ - System.err.println("else"); // Add events if form is requested. if ("true".equals(request.getParameter("showForm"))) --- 147,150 ---- *************** *** 168,172 **** */ protected ActionForward loadMailingList(ActionMapping mapping, MailingListForm form, ! HttpServletRequest request, HttpServletResponse response) throws Exception{ // Retrieve what we need in form. request.setAttribute("events", reportingManager.getEvents()); --- 168,173 ---- */ protected ActionForward loadMailingList(ActionMapping mapping, MailingListForm form, ! HttpServletRequest request, HttpServletResponse response) ! throws Exception{ // Retrieve what we need in form. request.setAttribute("events", reportingManager.getEvents()); *************** *** 192,196 **** */ protected ActionForward saveMailingList(ActionMapping mapping, MailingListForm form, ! HttpServletRequest request, HttpServletResponse response) throws Exception{ // Is there a mailing list to update in session ? HttpSession session = request.getSession(); --- 193,198 ---- */ protected ActionForward saveMailingList(ActionMapping mapping, MailingListForm form, ! HttpServletRequest request, HttpServletResponse response) ! throws Exception{ // Is there a mailing list to update in session ? HttpSession session = request.getSession(); *************** *** 251,255 **** */ protected ActionForward getSubscriptions(ActionMapping mapping, MailingListForm form, ! HttpServletRequest request, HttpServletResponse response) throws Exception{ if (form.getName() != null){ --- 253,258 ---- */ protected ActionForward getSubscriptions(ActionMapping mapping, MailingListForm form, ! HttpServletRequest request, HttpServletResponse response) ! throws Exception{ if (form.getName() != null){ Index: QuartzCronActions.java =================================================================== RCS file: /cvsroot/join/join1/src/main/org/figure8/join/control/action/QuartzCronActions.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** QuartzCronActions.java 19 Feb 2007 20:51:54 -0000 1.5 --- QuartzCronActions.java 3 Feb 2008 22:38:52 -0000 1.6 *************** *** 1,4 **** /** ! * Copyright 2005-2007 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the --- 1,4 ---- /** ! * Copyright 2005-2008 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the *************** *** 207,211 **** RemoteQuartzCronInfo remoteCron = service.getQuartzCronInfo(token, form.getName()); logoutFromRemoteService(token); ! session.setAttribute(QUARTZ_CRON_KEY, remoteCron); // Copy consumer into the form properties. PropertyUtils.copyProperties(form, remoteCron); --- 207,213 ---- RemoteQuartzCronInfo remoteCron = service.getQuartzCronInfo(token, form.getName()); logoutFromRemoteService(token); ! // Create a local QuartzCron for storing in session. ! QuartzCronInfo cron = BeansHelper.getLocalObject(remoteCron); ! session.setAttribute(QUARTZ_CRON_KEY, cron); // Copy consumer into the form properties. PropertyUtils.copyProperties(form, remoteCron); *************** *** 235,239 **** } ! // Remove all the existing user parameters infos. Iterator cronParams = cron.getJobParameterInfos().iterator(); while (cronParams != null && cronParams.hasNext()){ --- 237,241 ---- } ! // Remove all the existing user parameters infos ... Iterator cronParams = cron.getJobParameterInfos().iterator(); while (cronParams != null && cronParams.hasNext()){ *************** *** 248,255 **** --- 250,259 ---- try{ if (cronManager != null){ + log.debug("Saving QuartzCronInfo '" + form.getName() + "' using local manager"); // Use local manager. cronManager.saveQuartzCronInfo(cron); } else if (service != null){ + log.debug("Saving QuartzCronInfo '" + form.getName() + "' using remote service"); // Use remote service, require login, logout. String token = loginToRemoteService(request); *************** *** 324,333 **** } - log.debug("Saving quartz cron '" + form.getName() + "' parameters using manager"); if (cronManager != null){ // Use local manager. cronManager.saveQuartzCronInfo(cron); } else if (service != null){ // Use remote service. String token = loginToRemoteService(request); --- 328,338 ---- } if (cronManager != null){ + log.debug("Saving quartz cron '" + form.getName() + "' parameters using local manager"); // Use local manager. cronManager.saveQuartzCronInfo(cron); } else if (service != null){ + log.debug("Saving quartz cron '" + form.getName() + "' parameters using remote service"); // Use remote service. String token = loginToRemoteService(request); Index: ConsumerActions.java =================================================================== RCS file: /cvsroot/join/join1/src/main/org/figure8/join/control/action/ConsumerActions.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ConsumerActions.java 6 Feb 2007 21:32:47 -0000 1.3 --- ConsumerActions.java 3 Feb 2008 22:38:52 -0000 1.4 *************** *** 1,4 **** /** ! * Copyright 2005-2006 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the --- 1,4 ---- /** ! * Copyright 2005-2008 the original author or authors. * * Licensed under the Gnu General Pubic License, Version 2.0 (the *************** *** 119,123 **** * @throws Exception such as InfraStructureExceptions ... */ ! public ActionForward doExecute(String operation, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception{ // Trace operation to execute. --- 119,124 ---- * @throws Exception such as InfraStructureExceptions ... */ ! public ActionForward doExecute(String operation, ActionMapping mapping, ActionForm form, ! HttpServletRequest request, HttpServletResponse response) throws Exception{ // Trace operation to execute. *************** *** 167,172 **** * @return A forward to the next view to render and display */ ! protected ActionForward loadConsumer(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) ! throws Exception{ if (form instanceof ConsumerForm){ --- 168,174 ---- * @return A forward to the next view to render and display */ ! protected ActionForward loadConsumer(ActionMapping mapping, ActionForm form, ! HttpServletRequest request, HttpServletResponse response) ! throws Exception{ if (form instanceof ConsumerForm){ *************** *** 188,193 **** // Use remote service (require login, logout). String token = loginToRemoteService(request); ! RemoteJMSConsumerBeanInfo consumer = service.getConsumerBeanInfo(token, cForm.getName()); logoutFromRemoteService(token); session.setAttribute(CONSUMER_KEY, consumer); // Copy consumer into the form properties. --- 190,197 ---- // Use remote service (require login, logout). String token = loginToRemoteService(request); ! RemoteJMSConsumerBeanInfo remoteConsumer = service.getConsumerBeanInfo(token, cForm.getName()); logoutFromRemoteService(token); + // Create a local consumer for storing in session. + JMSConsumerBeanInfo consumer = BeansHelper.getLocalObject(remoteConsumer); session.setAttribute(CONSUMER_KEY, consumer); // Copy consumer into the form properties. *************** *** 208,213 **** * @return A forward to the next view to render and display */ ! protected ActionForward saveConsumer(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) ! throws Exception{ if (form instanceof ConsumerForm){ --- 212,218 ---- * @return A forward to the next view to render and display */ ! protected ActionForward saveConsumer(ActionMapping mapping, ActionForm form, ! HttpServletRequest request, HttpServletResponse response) ! throws Exception{ if (form instanceof ConsumerForm){ *************** *** 276,281 **** * @return A forward to the next view to render and display */ ! protected ActionForward saveConsumerParameters(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) ! throws Exception{ if (form instanceof ConsumerForm){ --- 281,287 ---- * @return A forward to the next view to render and display */ ! protected ActionForward saveConsumerParameters(ActionMapping mapping, ActionForm form, ! HttpServletRequest request, HttpServletResponse response) ! throws Exception{ if (form instanceof ConsumerForm){ *************** *** 334,339 **** * @return A forward to the next view to render and display */ ! protected ActionForward getConsumerDetails(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) ! throws Exception{ if (form instanceof ConsumerForm){ --- 340,346 ---- * @return A forward to the next view to render and display */ ! protected ActionForward getConsumerDetails(ActionMapping mapping, ActionForm form, ! HttpServletRequest request, HttpServletResponse response) ! throws Exception{ if (form instanceof ConsumerForm){ |