Initial revision
178
PaletteFunctions.js
Executable file
|
@ -0,0 +1,178 @@
|
|||
// $Id: PaletteFunctions.js,v 1.1 2004/01/07 15:32:36 travismccauley Exp $
|
||||
// Requires: /net/sf/tapestry/html/PracticalBrowserSniffer.js
|
||||
|
||||
function palette_clear_selections(element)
|
||||
{
|
||||
var options = element.options;
|
||||
|
||||
for (var i = 0; i < options.length; i++)
|
||||
options[i].selected = false;
|
||||
}
|
||||
|
||||
function palette_select_all(element)
|
||||
{
|
||||
var options = element.options;
|
||||
|
||||
for (var i = 0; i < options.length; i++)
|
||||
options[i].selected = true;
|
||||
}
|
||||
|
||||
function palette_sort(element, sorter)
|
||||
{
|
||||
var options = element.options;
|
||||
var list = new Array();
|
||||
var index = 0;
|
||||
var isNavigator = (navigator.family == "nn4" || navigator.family == "gecko");
|
||||
|
||||
while (options.length > 0)
|
||||
{
|
||||
var option = options[0];
|
||||
|
||||
if (isNavigator)
|
||||
{
|
||||
// Can't transfer option in nn4, nn6
|
||||
|
||||
if (navigator.family == 'gecko')
|
||||
var copy = document.createElement("OPTION");
|
||||
else
|
||||
var copy = new Option(option.text, option.value);
|
||||
|
||||
copy.text = option.text;
|
||||
copy.value = option.value;
|
||||
copy.selected = options.selected;
|
||||
|
||||
list[index++] = copy;
|
||||
}
|
||||
else
|
||||
list[index++] = option;
|
||||
|
||||
|
||||
options[0] = null;
|
||||
}
|
||||
|
||||
list.sort(sorter);
|
||||
|
||||
for (var i = 0; i < list.length; i++)
|
||||
{
|
||||
options[i] = list[i];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function palette_label_sorter(a, b)
|
||||
{
|
||||
var a_text = a.text;
|
||||
var b_text = b.text;
|
||||
|
||||
if (a_text == b_text)
|
||||
return 0;
|
||||
|
||||
if (a_text < b.text)
|
||||
return -1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
function palette_sort_by_label(element)
|
||||
{
|
||||
palette_sort(element, palette_label_sorter);
|
||||
}
|
||||
|
||||
function palette_value_sorter(a, b)
|
||||
{
|
||||
var a_value = a.value;
|
||||
var b_value = b.value;
|
||||
|
||||
if (a_value == b_value)
|
||||
return 0;
|
||||
|
||||
if (a_value < b_value)
|
||||
return -1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
function palette_sort_by_value(element)
|
||||
{
|
||||
palette_sort(element, palette_value_sorter);
|
||||
}
|
||||
|
||||
function palette_transfer_selections(source, target)
|
||||
{
|
||||
var sourceOptions = source.options;
|
||||
var targetOptions = target.options;
|
||||
|
||||
var targetIndex = target.selectedIndex;
|
||||
var offset = 0;
|
||||
|
||||
palette_clear_selections(target);
|
||||
|
||||
for (var i = 0; i < sourceOptions.length; i++)
|
||||
{
|
||||
var option = sourceOptions[i];
|
||||
|
||||
if (option.selected)
|
||||
{
|
||||
|
||||
if (navigator.family == 'nn4' || navigator.family == 'gecko')
|
||||
{
|
||||
// Can't share options between selects in NN4
|
||||
|
||||
var newOption = new Option(option.text, option.value, false, true);
|
||||
|
||||
sourceOptions[i] = null;
|
||||
|
||||
// Always added to end in NN4
|
||||
|
||||
targetOptions[targetOptions.length] = newOption;
|
||||
}
|
||||
else
|
||||
{
|
||||
sourceOptions.remove(i);
|
||||
|
||||
if (targetIndex < 0)
|
||||
targetOptions.add(option);
|
||||
else
|
||||
targetOptions.add(option, targetIndex + offset++);
|
||||
}
|
||||
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function palette_swap_options(options, selectedIndex, targetIndex)
|
||||
{
|
||||
var option = options[selectedIndex];
|
||||
|
||||
// It's very hard to reorder options in NN4
|
||||
|
||||
if (navigator.family == 'nn4' || navigator.family == 'gecko')
|
||||
{
|
||||
var swap = options[targetIndex];
|
||||
|
||||
var hold = swap.text;
|
||||
swap.text = option.text;
|
||||
option.text = hold;
|
||||
|
||||
hold = swap.value;
|
||||
swap.value = option.value;
|
||||
option.value = hold;
|
||||
|
||||
hold = swap.selected;
|
||||
swap.selected = option.selected;
|
||||
option.selected = hold;
|
||||
|
||||
// defaultSelected isn't relevant to the Palette
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Sensible browsers ...
|
||||
|
||||
options.remove(selectedIndex);
|
||||
options.add(option, targetIndex);
|
||||
}
|
||||
|
160
PracticalBrowserSniffer.js
Executable file
|
@ -0,0 +1,160 @@
|
|||
// PracticalBrowserSniffer.js - Detect Browser
|
||||
// Requires JavaScript 1.1
|
||||
/*
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (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.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Initial Developer of the Original Code is Bob Clary.
|
||||
|
||||
Contributor(s): Bob Clary, Original Work, Copyright 1999-2000
|
||||
Bob Clary, Netscape Communications, Copyright 2001
|
||||
|
||||
|
||||
Note:
|
||||
|
||||
Acquired from: http://developer.netscape.com/evangelism/tools/practical-browser-sniffing/
|
||||
Last update: July 17, 2001
|
||||
|
||||
*/
|
||||
|
||||
// work around bug in xpcdom Mozilla 0.9.1
|
||||
window.saveNavigator = window.navigator;
|
||||
|
||||
// Handy functions
|
||||
function noop() {}
|
||||
function noerror() { return true; }
|
||||
|
||||
function defaultOnError(msg, url, line)
|
||||
{
|
||||
// customize this for your site
|
||||
if (top.location.href.indexOf('_files/errors/') == -1)
|
||||
top.location = '/evangelism/xbProjects/_files/errors/index.html?msg=' + escape(msg) + '&url=' + escape(url) + '&line=' + escape(line);
|
||||
}
|
||||
|
||||
// Display Error page...
|
||||
// XXX: more work to be done here
|
||||
//
|
||||
function reportError(message)
|
||||
{
|
||||
// customize this for your site
|
||||
if (top.location.href.indexOf('_files/errors/') == -1)
|
||||
top.location = '/evangelism/xbProjects/_files/errors/index.html?msg=' + escape(message);
|
||||
}
|
||||
|
||||
function pageRequires(cond, msg, redirectTo)
|
||||
{
|
||||
if (!cond)
|
||||
{
|
||||
msg = 'This page requires ' + msg;
|
||||
top.location = redirectTo + '?msg=' + escape(msg);
|
||||
}
|
||||
// return cond so can use in <A> onclick handlers to exclude browsers
|
||||
// from pages they do not support.
|
||||
return cond;
|
||||
}
|
||||
|
||||
function detectBrowser()
|
||||
{
|
||||
var oldOnError = window.onerror;
|
||||
var element = null;
|
||||
|
||||
window.onerror = defaultOnError;
|
||||
|
||||
navigator.OS = '';
|
||||
navigator.version = 0;
|
||||
navigator.org = '';
|
||||
navigator.family = '';
|
||||
|
||||
var platform;
|
||||
if (typeof(window.navigator.platform) != 'undefined')
|
||||
{
|
||||
platform = window.navigator.platform.toLowerCase();
|
||||
if (platform.indexOf('win') != -1)
|
||||
navigator.OS = 'win';
|
||||
else if (platform.indexOf('mac') != -1)
|
||||
navigator.OS = 'mac';
|
||||
else if (platform.indexOf('unix') != -1 || platform.indexOf('linux') != -1 || platform.indexOf('sun') != -1)
|
||||
navigator.OS = 'nix';
|
||||
}
|
||||
|
||||
var i = 0;
|
||||
var ua = window.navigator.userAgent.toLowerCase();
|
||||
|
||||
if (ua.indexOf('opera') != -1)
|
||||
{
|
||||
i = ua.indexOf('opera');
|
||||
navigator.family = 'opera';
|
||||
navigator.org = 'opera';
|
||||
navigator.version = parseFloat('0' + ua.substr(i+6), 10);
|
||||
}
|
||||
else if ((i = ua.indexOf('msie')) != -1)
|
||||
{
|
||||
navigator.org = 'microsoft';
|
||||
navigator.version = parseFloat('0' + ua.substr(i+5), 10);
|
||||
|
||||
if (navigator.version < 4)
|
||||
navigator.family = 'ie3';
|
||||
else
|
||||
navigator.family = 'ie4'
|
||||
}
|
||||
else if (typeof(window.controllers) != 'undefined' && typeof(window.locationbar) != 'undefined')
|
||||
{
|
||||
i = ua.lastIndexOf('/')
|
||||
navigator.version = parseFloat('0' + ua.substr(i+1), 10);
|
||||
navigator.family = 'gecko';
|
||||
|
||||
if (ua.indexOf('netscape') != -1)
|
||||
navigator.org = 'netscape';
|
||||
else if (ua.indexOf('compuserve') != -1)
|
||||
navigator.org = 'compuserve';
|
||||
else
|
||||
navigator.org = 'mozilla';
|
||||
}
|
||||
else if ((ua.indexOf('mozilla') !=-1) && (ua.indexOf('spoofer')==-1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera')==-1)&& (ua.indexOf('webtv')==-1) && (ua.indexOf('hotjava')==-1))
|
||||
{
|
||||
var is_major = parseFloat(navigator.appVersion);
|
||||
|
||||
if (is_major < 4)
|
||||
navigator.version = is_major;
|
||||
else
|
||||
{
|
||||
i = ua.lastIndexOf('/')
|
||||
navigator.version = parseFloat('0' + ua.substr(i+1), 10);
|
||||
}
|
||||
navigator.org = 'netscape';
|
||||
navigator.family = 'nn' + parseInt(navigator.appVersion);
|
||||
}
|
||||
else if ((i = ua.indexOf('aol')) != -1 )
|
||||
{
|
||||
// aol
|
||||
navigator.family = 'aol';
|
||||
navigator.org = 'aol';
|
||||
navigator.version = parseFloat('0' + ua.substr(i+4), 10);
|
||||
}
|
||||
|
||||
navigator.DOMCORE1 = (typeof(document.getElementsByTagName) != 'undefined' && typeof(document.createElement) != 'undefined');
|
||||
navigator.DOMCORE2 = (navigator.DOMCORE1 && typeof(document.getElementById) != 'undefined' && typeof(document.createElementNS) != 'undefined');
|
||||
navigator.DOMHTML = (navigator.DOMCORE1 && typeof(document.getElementById) != 'undefined');
|
||||
navigator.DOMCSS1 = ( (navigator.family == 'gecko') || (navigator.family == 'ie4') );
|
||||
|
||||
navigator.DOMCSS2 = false;
|
||||
if (navigator.DOMCORE1)
|
||||
{
|
||||
element = document.createElement('p');
|
||||
navigator.DOMCSS2 = (typeof(element.style) == 'object');
|
||||
}
|
||||
|
||||
navigator.DOMEVENTS = (typeof(document.createEvent) != 'undefined');
|
||||
|
||||
window.onerror = oldOnError;
|
||||
}
|
||||
|
||||
detectBrowser();
|
||||
|
BIN
WEB-INF/.DS_Store
vendored
Executable file
60
WEB-INF/lib/LICENSE-commons-beanutils.txt
Executable file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* $Header: /tmp/thdltools/Roster/WEB-INF/lib/LICENSE-commons-beanutils.txt,v 1.1 2004/01/07 15:32:47 travismccauley Exp $
|
||||
* $Revision: 1.1 $
|
||||
* $Date: 2004/01/07 15:32:47 $
|
||||
*
|
||||
* ====================================================================
|
||||
*
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
|
||||
* reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution, if
|
||||
* any, must include the following acknowlegement:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowlegement may appear in the software itself,
|
||||
* if and wherever such third-party acknowlegements normally appear.
|
||||
*
|
||||
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
|
||||
* Foundation" must not be used to endorse or promote products derived
|
||||
* from this software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache"
|
||||
* nor may "Apache" appear in their names without prior written
|
||||
* permission of the Apache Group.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
60
WEB-INF/lib/LICENSE-commons-collections.txt
Executable file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* $Header: /tmp/thdltools/Roster/WEB-INF/lib/LICENSE-commons-collections.txt,v 1.1 2004/01/07 15:32:47 travismccauley Exp $
|
||||
* $Revision: 1.1 $
|
||||
* $Date: 2004/01/07 15:32:47 $
|
||||
*
|
||||
* ====================================================================
|
||||
*
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 1999-2001 The Apache Software Foundation. All rights
|
||||
* reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution, if
|
||||
* any, must include the following acknowlegement:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowlegement may appear in the software itself,
|
||||
* if and wherever such third-party acknowlegements normally appear.
|
||||
*
|
||||
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
|
||||
* Foundation" must not be used to endorse or promote products derived
|
||||
* from this software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache"
|
||||
* nor may "Apache" appear in their names without prior written
|
||||
* permission of the Apache Group.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
60
WEB-INF/lib/LICENSE-commons-fileupload.txt
Executable file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* $Header: /tmp/thdltools/Roster/WEB-INF/lib/LICENSE-commons-fileupload.txt,v 1.1 2004/01/07 15:32:47 travismccauley Exp $
|
||||
* $Revision: 1.1 $
|
||||
* $Date: 2004/01/07 15:32:47 $
|
||||
*
|
||||
* ====================================================================
|
||||
*
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
|
||||
* reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution, if
|
||||
* any, must include the following acknowlegement:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowlegement may appear in the software itself,
|
||||
* if and wherever such third-party acknowlegements normally appear.
|
||||
*
|
||||
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
|
||||
* Foundation" must not be used to endorse or promote products derived
|
||||
* from this software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache"
|
||||
* nor may "Apache" appear in their names without prior written
|
||||
* permission of the Apache Group.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
53
WEB-INF/lib/LICENSE.bsf.txt
Executable file
|
@ -0,0 +1,53 @@
|
|||
The Apache Software License, Version 1.1
|
||||
|
||||
Copyright (c) 2002 The Apache Software Foundation. All rights
|
||||
reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
3. The end-user documentation included with the redistribution,
|
||||
if any, must include the following acknowledgment:
|
||||
"This product includes software developed by the
|
||||
Apache Software Foundation (http://www.apache.org/)."
|
||||
Alternately, this acknowledgment may appear in the software itself,
|
||||
if and wherever such third-party acknowledgments normally appear.
|
||||
|
||||
4. The names "BSF", "Apache", and "Apache Software Foundation" must
|
||||
not be used to endorse or promote products derived from this
|
||||
software without prior written permission. For written
|
||||
permission, please contact apache@apache.org.
|
||||
|
||||
5. Products derived from this software may not be called "Apache",
|
||||
nor may "Apache" appear in their name, without prior written
|
||||
permission of the Apache Software Foundation.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
||||
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
This software consists of voluntary contributions made by many individuals
|
||||
on behalf of the Apache Software Foundation and was originally created by
|
||||
Sanjiva Weerawarana and others at International Business Machines
|
||||
Corporation. For more information on the Apache Software Foundation,
|
||||
please see <http://www.apache.org/>.
|
||||
|
||||
|
60
WEB-INF/lib/LICENSE.commons-digester.txt
Executable file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* $Header: /tmp/thdltools/Roster/WEB-INF/lib/LICENSE.commons-digester.txt,v 1.1 2004/01/07 15:32:47 travismccauley Exp $
|
||||
* $Revision: 1.1 $
|
||||
* $Date: 2004/01/07 15:32:47 $
|
||||
*
|
||||
* ====================================================================
|
||||
*
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
|
||||
* reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution, if
|
||||
* any, must include the following acknowlegement:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowlegement may appear in the software itself,
|
||||
* if and wherever such third-party acknowlegements normally appear.
|
||||
*
|
||||
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
|
||||
* Foundation" must not be used to endorse or promote products derived
|
||||
* from this software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache"
|
||||
* nor may "Apache" appear in their names without prior written
|
||||
* permission of the Apache Group.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
60
WEB-INF/lib/LICENSE.commons-lang.txt
Executable file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* $Header: /tmp/thdltools/Roster/WEB-INF/lib/LICENSE.commons-lang.txt,v 1.1 2004/01/07 15:32:47 travismccauley Exp $
|
||||
* $Revision: 1.1 $
|
||||
* $Date: 2004/01/07 15:32:47 $
|
||||
*
|
||||
* ====================================================================
|
||||
*
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 1999-2001 The Apache Software Foundation. All rights
|
||||
* reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution, if
|
||||
* any, must include the following acknowlegement:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowlegement may appear in the software itself,
|
||||
* if and wherever such third-party acknowlegements normally appear.
|
||||
*
|
||||
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
|
||||
* Foundation" must not be used to endorse or promote products derived
|
||||
* from this software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache"
|
||||
* nor may "Apache" appear in their names without prior written
|
||||
* permission of the Apache Group.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
60
WEB-INF/lib/LICENSE.commons-logging.txt
Executable file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* $Header: /tmp/thdltools/Roster/WEB-INF/lib/LICENSE.commons-logging.txt,v 1.1 2004/01/07 15:32:47 travismccauley Exp $
|
||||
* $Revision: 1.1 $
|
||||
* $Date: 2004/01/07 15:32:47 $
|
||||
*
|
||||
* ====================================================================
|
||||
*
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 1999-2001 The Apache Software Foundation. All rights
|
||||
* reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution, if
|
||||
* any, must include the following acknowlegement:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowlegement may appear in the software itself,
|
||||
* if and wherever such third-party acknowlegements normally appear.
|
||||
*
|
||||
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
|
||||
* Foundation" must not be used to endorse or promote products derived
|
||||
* from this software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache"
|
||||
* nor may "Apache" appear in their names without prior written
|
||||
* permission of the Apache Group.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
56
WEB-INF/lib/LICENSE.jakarta-oro.txt
Executable file
|
@ -0,0 +1,56 @@
|
|||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2000-2002 The Apache Software Foundation. All rights
|
||||
* reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution,
|
||||
* if any, must include the following acknowledgment:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
|
||||
* must not be used to endorse or promote products derived from this
|
||||
* software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache"
|
||||
* or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
|
||||
* name, without prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
* Portions of this software are based upon software originally written
|
||||
* by Daniel F. Savarese. We appreciate his contributions.
|
||||
*/
|
478
WEB-INF/lib/LICENSE.javassist.txt
Executable file
|
@ -0,0 +1,478 @@
|
|||
MOZILLA PUBLIC LICENSE Version 1.1
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
1. Definitions.
|
||||
|
||||
1.0.1. "Commercial Use" means distribution or otherwise making the
|
||||
Covered Code available to a third party.
|
||||
|
||||
1.1. ''Contributor'' means each entity that creates or contributes to
|
||||
the creation of Modifications.
|
||||
|
||||
1.2. ''Contributor Version'' means the combination of the Original
|
||||
Code, prior Modifications used by a Contributor, and the Modifications
|
||||
made by that particular Contributor.
|
||||
|
||||
1.3. ''Covered Code'' means the Original Code or Modifications or the
|
||||
combination of the Original Code and Modifications, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.4. ''Electronic Distribution Mechanism'' means a mechanism generally
|
||||
accepted in the software development community for the electronic
|
||||
transfer of data.
|
||||
|
||||
1.5. ''Executable'' means Covered Code in any form other than Source
|
||||
Code.
|
||||
|
||||
1.6. ''Initial Developer'' means the individual or entity identified
|
||||
as the Initial Developer in the Source Code notice required by Exhibit
|
||||
A.
|
||||
|
||||
1.7. ''Larger Work'' means a work which combines Covered Code or
|
||||
portions thereof with code not governed by the terms of this License.
|
||||
|
||||
1.8. ''License'' means this document.
|
||||
|
||||
1.8.1. "Licensable" means having the right to grant, to the maximum
|
||||
extent possible, whether at the time of the initial grant or
|
||||
subsequently acquired, any and all of the rights conveyed herein.
|
||||
|
||||
1.9. ''Modifications'' means any addition to or deletion from the
|
||||
substance or structure of either the Original Code or any previous
|
||||
Modifications. When Covered Code is released as a series of files, a
|
||||
Modification is:
|
||||
|
||||
A. Any addition to or deletion from the contents of a file containing
|
||||
Original Code or previous Modifications.
|
||||
|
||||
B. Any new file that contains any part of the Original Code or
|
||||
previous Modifications.
|
||||
|
||||
|
||||
1.10. ''Original Code'' means Source Code of computer software code
|
||||
which is described in the Source Code notice required by Exhibit A as
|
||||
Original Code, and which, at the time of its release under this
|
||||
License is not already Covered Code governed by this License.
|
||||
|
||||
1.10.1. "Patent Claims" means any patent claim(s), now owned or
|
||||
hereafter acquired, including without limitation, method, process, and
|
||||
apparatus claims, in any patent Licensable by grantor.
|
||||
|
||||
1.11. ''Source Code'' means the preferred form of the Covered Code for
|
||||
making modifications to it, including all modules it contains, plus
|
||||
any associated interface definition files, scripts used to control
|
||||
compilation and installation of an Executable, or source code
|
||||
differential comparisons against either the Original Code or another
|
||||
well known, available Covered Code of the Contributor's choice. The
|
||||
Source Code can be in a compressed or archival form, provided the
|
||||
appropriate decompression or de-archiving software is widely available
|
||||
for no charge.
|
||||
|
||||
1.12. "You'' (or "Your") means an individual or a legal entity
|
||||
exercising rights under, and complying with all of the terms of, this
|
||||
License or a future version of this License issued under Section
|
||||
6.1. For legal entities, "You'' includes any entity which controls, is
|
||||
controlled by, or is under common control with You. For purposes of
|
||||
this definition, "control'' means (a) the power, direct or indirect,
|
||||
to cause the direction or management of such entity, whether by
|
||||
contract or otherwise, or (b) ownership of more than fifty percent
|
||||
(50%) of the outstanding shares or beneficial ownership of such
|
||||
entity.
|
||||
|
||||
2. Source Code License. 1. The Initial Developer Grant. The Initial
|
||||
Developer hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license, subject to third party intellectual property
|
||||
claims: (a) under intellectual property rights (other than patent or
|
||||
trademark) Licensable by Initial Developer to use, reproduce,
|
||||
modify, display, perform, sublicense and distribute the Original
|
||||
Code (or portions thereof) with or without Modifications, and/or as
|
||||
part of a Larger Work; and (b) under Patents Claims infringed by the
|
||||
making, using or selling of Original Code, to make, have made, use,
|
||||
practice, sell, and offer for sale, and/or otherwise dispose of the
|
||||
Original Code (or portions thereof).
|
||||
|
||||
(c) the licenses granted in this Section 2.1(a) and (b) are effective
|
||||
on the date Initial Developer first distributes Original Code under
|
||||
the terms of this License.
|
||||
|
||||
(d) Notwithstanding Section 2.1(b) above, no patent license is granted:
|
||||
1) for code that You delete from the Original Code;
|
||||
2) separate from the Original Code; or
|
||||
3) for infringements caused by: i) the modification of the Original Code
|
||||
or ii) the combination of the Original Code with other software or
|
||||
devices.
|
||||
|
||||
|
||||
2.2. Contributor Grant. Subject to third party intellectual property
|
||||
claims, each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license
|
||||
|
||||
(a) under intellectual property rights (other than patent or
|
||||
trademark) Licensable by Contributor, to use, reproduce, modify,
|
||||
display, perform, sublicense and distribute the Modifications created
|
||||
by such Contributor (or portions thereof) either on an unmodified
|
||||
basis, with other Modifications, as Covered Code and/or as part of a
|
||||
Larger Work; and
|
||||
|
||||
(b) under Patent Claims infringed by the making, using, or selling of
|
||||
Modifications made by that Contributor either alone and/or in
|
||||
combination with its Contributor Version (or portions of such
|
||||
combination), to make, use, sell, offer for sale, have made, and/or
|
||||
otherwise dispose of: 1) Modifications made by that Contributor (or
|
||||
portions thereof); and 2) the combination of Modifications made by
|
||||
that Contributor with its Contributor Version (or portions of such
|
||||
combination).
|
||||
|
||||
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective
|
||||
on the date Contributor first makes Commercial Use of the Covered
|
||||
Code.
|
||||
|
||||
(d) Notwithstanding Section 2.2(b) above, no patent license is
|
||||
granted: 1) for any code that Contributor has deleted from the
|
||||
Contributor Version; 2) separate from the Contributor Version; 3) for
|
||||
infringements caused by: i) third party modifications of Contributor
|
||||
Version or ii) the combination of Modifications made by that
|
||||
Contributor with other software (except as part of the Contributor
|
||||
Version) or other devices; or 4) under Patent Claims infringed by
|
||||
Covered Code in the absence of Modifications made by that Contributor.
|
||||
|
||||
|
||||
3. Distribution Obligations.
|
||||
|
||||
3.1. Application of License.
|
||||
|
||||
The Modifications which You create or to which You contribute are
|
||||
governed by the terms of this License, including without limitation
|
||||
Section 2.2. The Source Code version of Covered Code may be
|
||||
distributed only under the terms of this License or a future version
|
||||
of this License released under Section 6.1, and You must include a
|
||||
copy of this License with every copy of the Source Code You
|
||||
distribute. You may not offer or impose any terms on any Source Code
|
||||
version that alters or restricts the applicable version of this
|
||||
License or the recipients' rights hereunder. However, You may include
|
||||
an additional document offering the additional rights described in
|
||||
Section 3.5.
|
||||
|
||||
3.2. Availability of Source Code.
|
||||
|
||||
Any Modification which You create or to which You contribute must be
|
||||
made available in Source Code form under the terms of this License
|
||||
either on the same media as an Executable version or via an accepted
|
||||
Electronic Distribution Mechanism to anyone to whom you made an
|
||||
Executable version available; and if made available via Electronic
|
||||
Distribution Mechanism, must remain available for at least twelve (12)
|
||||
months after the date it initially became available, or at least six
|
||||
(6) months after a subsequent version of that particular Modification
|
||||
has been made available to such recipients. You are responsible for
|
||||
ensuring that the Source Code version remains available even if the
|
||||
Electronic Distribution Mechanism is maintained by a third party.
|
||||
|
||||
3.3. Description of Modifications.
|
||||
|
||||
You must cause all Covered Code to which You contribute to contain a
|
||||
file documenting the changes You made to create that Covered Code and
|
||||
the date of any change. You must include a prominent statement that
|
||||
the Modification is derived, directly or indirectly, from Original
|
||||
Code provided by the Initial Developer and including the name of the
|
||||
Initial Developer in (a) the Source Code, and (b) in any notice in an
|
||||
Executable version or related documentation in which You describe the
|
||||
origin or ownership of the Covered Code.
|
||||
|
||||
3.4. Intellectual Property Matters
|
||||
|
||||
(a) Third Party Claims.
|
||||
|
||||
If Contributor has knowledge that a license under a third party's
|
||||
intellectual property rights is required to exercise the rights
|
||||
granted by such Contributor under Sections 2.1 or 2.2, Contributor
|
||||
must include a text file with the Source Code distribution titled
|
||||
"LEGAL'' which describes the claim and the party making the claim in
|
||||
sufficient detail that a recipient will know whom to contact. If
|
||||
Contributor obtains such knowledge after the Modification is made
|
||||
available as described in Section 3.2, Contributor shall promptly
|
||||
modify the LEGAL file in all copies Contributor makes available
|
||||
thereafter and shall take other steps (such as notifying appropriate
|
||||
mailing lists or newsgroups) reasonably calculated to inform those who
|
||||
received the Covered Code that new knowledge has been obtained.
|
||||
|
||||
(b) Contributor APIs.
|
||||
|
||||
If Contributor's Modifications include an application programming
|
||||
interface and Contributor has knowledge of patent licenses which are
|
||||
reasonably necessary to implement that API, Contributor must also
|
||||
include this information in the LEGAL file.
|
||||
|
||||
|
||||
(c) Representations.
|
||||
|
||||
Contributor represents that, except as disclosed pursuant to Section
|
||||
3.4(a) above, Contributor believes that Contributor's Modifications
|
||||
are Contributor's original creation(s) and/or Contributor has
|
||||
sufficient rights to grant the rights conveyed by this License.
|
||||
|
||||
3.5. Required Notices.
|
||||
|
||||
You must duplicate the notice in Exhibit A in each file of the Source
|
||||
Code. If it is not possible to put such notice in a particular Source
|
||||
Code file due to its structure, then You must include such notice in a
|
||||
location (such as a relevant directory) where a user would be likely
|
||||
to look for such a notice. If You created one or more Modification(s)
|
||||
You may add your name as a Contributor to the notice described in
|
||||
Exhibit A. You must also duplicate this License in any documentation
|
||||
for the Source Code where You describe recipients' rights or ownership
|
||||
rights relating to Covered Code. You may choose to offer, and to
|
||||
charge a fee for, warranty, support, indemnity or liability
|
||||
obligations to one or more recipients of Covered Code. However, You
|
||||
may do so only on Your own behalf, and not on behalf of the Initial
|
||||
Developer or any Contributor. You must make it absolutely clear than
|
||||
any such warranty, support, indemnity or liability obligation is
|
||||
offered by You alone, and You hereby agree to indemnify the Initial
|
||||
Developer and every Contributor for any liability incurred by the
|
||||
Initial Developer or such Contributor as a result of warranty,
|
||||
support, indemnity or liability terms You offer.
|
||||
|
||||
3.6. Distribution of Executable Versions.
|
||||
|
||||
You may distribute Covered Code in Executable form only if the
|
||||
requirements of Section 3.1-3.5 have been met for that Covered Code,
|
||||
and if You include a notice stating that the Source Code version of
|
||||
the Covered Code is available under the terms of this License,
|
||||
including a description of how and where You have fulfilled the
|
||||
obligations of Section 3.2. The notice must be conspicuously included
|
||||
in any notice in an Executable version, related documentation or
|
||||
collateral in which You describe recipients' rights relating to the
|
||||
Covered Code. You may distribute the Executable version of Covered
|
||||
Code or ownership rights under a license of Your choice, which may
|
||||
contain terms different from this License, provided that You are in
|
||||
compliance with the terms of this License and that the license for the
|
||||
Executable version does not attempt to limit or alter the recipient's
|
||||
rights in the Source Code version from the rights set forth in this
|
||||
License. If You distribute the Executable version under a different
|
||||
license You must make it absolutely clear that any terms which differ
|
||||
from this License are offered by You alone, not by the Initial
|
||||
Developer or any Contributor. You hereby agree to indemnify the
|
||||
Initial Developer and every Contributor for any liability incurred by
|
||||
the Initial Developer or such Contributor as a result of any such
|
||||
terms You offer.
|
||||
|
||||
3.7. Larger Works.
|
||||
|
||||
You may create a Larger Work by combining Covered Code with other code
|
||||
not governed by the terms of this License and distribute the Larger
|
||||
Work as a single product. In such a case, You must make sure the
|
||||
requirements of this License are fulfilled for the Covered Code.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation.
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Code due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description
|
||||
must be included in the LEGAL file described in Section 3.4 and must
|
||||
be included with all distributions of the Source Code. Except to the
|
||||
extent prohibited by statute or regulation, such description must be
|
||||
sufficiently detailed for a recipient of ordinary skill to be able to
|
||||
understand it.
|
||||
|
||||
5. Application of this License.
|
||||
|
||||
This License applies to code to which the Initial Developer has
|
||||
attached the notice in Exhibit A and to related Covered Code.
|
||||
|
||||
6. Versions of the License.
|
||||
|
||||
6.1. New Versions.
|
||||
|
||||
Netscape Communications Corporation (''Netscape'') may publish revised
|
||||
and/or new versions of the License from time to time. Each version
|
||||
will be given a distinguishing version number.
|
||||
|
||||
6.2. Effect of New Versions.
|
||||
|
||||
Once Covered Code has been published under a particular version of the
|
||||
License, You may always continue to use it under the terms of that
|
||||
version. You may also choose to use such Covered Code under the terms
|
||||
of any subsequent version of the License published by Netscape. No one
|
||||
other than Netscape has the right to modify the terms applicable to
|
||||
Covered Code created under this License.
|
||||
|
||||
6.3. Derivative Works.
|
||||
|
||||
If You create or use a modified version of this License (which you may
|
||||
only do in order to apply it to code which is not already Covered Code
|
||||
governed by this License), You must (a) rename Your license so that
|
||||
the phrases ''Mozilla'', ''MOZILLAPL'', ''MOZPL'', ''Netscape'',
|
||||
"MPL", ''NPL'' or any confusingly similar phrase do not appear in your
|
||||
license (except to note that your license differs from this License)
|
||||
and (b) otherwise make it clear that Your version of the license
|
||||
contains terms which differ from the Mozilla Public License and
|
||||
Netscape Public License. (Filling in the name of the Initial
|
||||
Developer, Original Code or Contributor in the notice described in
|
||||
Exhibit A shall not of themselves be deemed to be modifications of
|
||||
this License.)
|
||||
|
||||
7. DISCLAIMER OF WARRANTY.
|
||||
|
||||
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS'' BASIS,
|
||||
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
|
||||
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR
|
||||
NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
|
||||
THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE
|
||||
IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER
|
||||
CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR
|
||||
CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART
|
||||
OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER
|
||||
EXCEPT UNDER THIS DISCLAIMER.
|
||||
|
||||
8. TERMINATION.
|
||||
|
||||
8.1. This License and the rights granted hereunder will terminate
|
||||
automatically if You fail to comply with terms herein and fail to cure
|
||||
such breach within 30 days of becoming aware of the breach. All
|
||||
sublicenses to the Covered Code which are properly granted shall
|
||||
survive any termination of this License. Provisions which, by their
|
||||
nature, must remain in effect beyond the termination of this License
|
||||
shall survive.
|
||||
|
||||
8.2. If You initiate litigation by asserting a patent infringement
|
||||
claim (excluding declatory judgment actions) against Initial Developer
|
||||
or a Contributor (the Initial Developer or Contributor against whom
|
||||
You file such action is referred to as "Participant") alleging that:
|
||||
|
||||
(a) such Participant's Contributor Version directly or indirectly
|
||||
infringes any patent, then any and all rights granted by such
|
||||
Participant to You under Sections 2.1 and/or 2.2 of this License
|
||||
shall, upon 60 days notice from Participant terminate prospectively,
|
||||
unless if within 60 days after receipt of notice You either: (i) agree
|
||||
in writing to pay Participant a mutually agreeable reasonable royalty
|
||||
for Your past and future use of Modifications made by such
|
||||
Participant, or (ii) withdraw Your litigation claim with respect to
|
||||
the Contributor Version against such Participant. If within 60 days
|
||||
of notice, a reasonable royalty and payment arrangement are not
|
||||
mutually agreed upon in writing by the parties or the litigation claim
|
||||
is not withdrawn, the rights granted by Participant to You under
|
||||
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
|
||||
the 60 day notice period specified above.
|
||||
|
||||
(b) any software, hardware, or device, other than such Participant's
|
||||
Contributor Version, directly or indirectly infringes any patent, then
|
||||
any rights granted to You by such Participant under Sections 2.1(b)
|
||||
and 2.2(b) are revoked effective as of the date You first made, used,
|
||||
sold, distributed, or had made, Modifications made by that
|
||||
Participant.
|
||||
|
||||
8.3. If You assert a patent infringement claim against Participant
|
||||
alleging that such Participant's Contributor Version directly or
|
||||
indirectly infringes any patent where such claim is resolved (such as
|
||||
by license or settlement) prior to the initiation of patent
|
||||
infringement litigation, then the reasonable value of the licenses
|
||||
granted by such Participant under Sections 2.1 or 2.2 shall be taken
|
||||
into account in determining the amount or value of any payment or
|
||||
license.
|
||||
|
||||
8.4. In the event of termination under Sections 8.1 or 8.2 above, all
|
||||
end user license agreements (excluding distributors and resellers)
|
||||
which have been validly granted by You or any distributor hereunder
|
||||
prior to termination shall survive termination.
|
||||
|
||||
9. LIMITATION OF LIABILITY.
|
||||
|
||||
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
|
||||
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
|
||||
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
|
||||
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
|
||||
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
|
||||
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
|
||||
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
|
||||
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
|
||||
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
|
||||
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
|
||||
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
|
||||
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
|
||||
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
|
||||
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
10. U.S. GOVERNMENT END USERS.
|
||||
|
||||
The Covered Code is a ''commercial item,'' as that term is defined in
|
||||
48 C.F.R. 2.101 (Oct. 1995), consisting of ''commercial computer
|
||||
software'' and ''commercial computer software documentation,'' as such
|
||||
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
|
||||
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
|
||||
all U.S. Government End Users acquire Covered Code with only those
|
||||
rights set forth herein.
|
||||
|
||||
11. MISCELLANEOUS.
|
||||
|
||||
This License represents the complete agreement concerning subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. This License shall be governed by
|
||||
California law provisions (except to the extent applicable law, if
|
||||
any, provides otherwise), excluding its conflict-of-law
|
||||
provisions. With respect to disputes in which at least one party is a
|
||||
citizen of, or an entity chartered or registered to do business in the
|
||||
United States of America, any litigation relating to this License
|
||||
shall be subject to the jurisdiction of the Federal Courts of the
|
||||
Northern District of California, with venue lying in Santa Clara
|
||||
County, California, with the losing party responsible for costs,
|
||||
including without limitation, court costs and reasonable attorneys'
|
||||
fees and expenses. The application of the United Nations Convention on
|
||||
Contracts for the International Sale of Goods is expressly
|
||||
excluded. Any law or regulation which provides that the language of a
|
||||
contract shall be construed against the drafter shall not apply to
|
||||
this License.
|
||||
|
||||
12. RESPONSIBILITY FOR CLAIMS.
|
||||
|
||||
As between Initial Developer and the Contributors, each party is
|
||||
responsible for claims and damages arising, directly or indirectly,
|
||||
out of its utilization of rights under this License and You agree to
|
||||
work with Initial Developer and Contributors to distribute such
|
||||
responsibility on an equitable basis. Nothing herein is intended or
|
||||
shall be deemed to constitute any admission of liability.
|
||||
|
||||
13. MULTIPLE-LICENSED CODE.
|
||||
|
||||
Initial Developer may designate portions of the Covered Code as
|
||||
.Multiple-Licensed.. .Multiple-Licensed. means that the Initial
|
||||
Developer permits you to utilize portions of the Covered Code under
|
||||
Your choice of the MPL or the alternative licenses, if any, specified
|
||||
by the Initial Developer in the file described in Exhibit A.
|
||||
|
||||
EXHIBIT A -Mozilla Public License.
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License
|
||||
Version 1.1 (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.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS"
|
||||
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
||||
the License for the specific language governing rights and limitations
|
||||
under the License.
|
||||
|
||||
The Original Code is Javassist.
|
||||
|
||||
The Initial Developer of the Original Code is Shigeru Chiba. Portions
|
||||
created by the Initial Developer are
|
||||
|
||||
Copyright (C) 1999-2003 Shigeru Chiba. All Rights Reserved.
|
||||
|
||||
Contributor(s): ______________________________________.
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms
|
||||
of the GNU Lesser General Public License Version 2.1 or later (the
|
||||
"LGPL"), in which case the provisions of the LGPL are applicable
|
||||
instead of those above. If you wish to allow use of your version of
|
||||
this file only under the terms of the LGPL, and not to allow others to
|
||||
use your version of this file under the terms of the MPL, indicate
|
||||
your decision by deleting the provisions above and replace them with
|
||||
the notice and other provisions required by the LGPL. If you do not
|
||||
delete the provisions above, a recipient may use your version of this
|
||||
file under the terms of either the MPL or the LGPL.
|
||||
|
48
WEB-INF/lib/LICENSE.log4j.txt
Executable file
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* ============================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
* ============================================================================
|
||||
*
|
||||
* Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modifica-
|
||||
* tion, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution, if any, must
|
||||
* include the following acknowledgment: "This product includes software
|
||||
* developed by the Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself, if
|
||||
* and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "log4j" and "Apache Software Foundation" must not be used to
|
||||
* endorse or promote products derived from this software without prior
|
||||
* written permission. For written permission, please contact
|
||||
* apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache", nor may
|
||||
* "Apache" appear in their name, without prior written permission of the
|
||||
* Apache Software Foundation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
|
||||
* DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* on behalf of the Apache Software Foundation. For more information on the
|
||||
* Apache Software Foundation, please see <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
103
WEB-INF/lib/LICENSE.ognl.txt
Executable file
|
@ -0,0 +1,103 @@
|
|||
|
||||
This directory contains an example ANTLR grammar for a little
|
||||
language called OGNL (pronounced OGG-null), which stands for
|
||||
Object-Graph Navigation Language. OGNL is an expression language for
|
||||
setting and getting properties of Java objects, and can be used as is
|
||||
or as a starting point for other projects.
|
||||
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* *
|
||||
* Copyright (c) 2002, Drew Davidson and Luke Blanshard *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* Redistribution and use in source and binary forms, with or without *
|
||||
* modification, are permitted provided that the following conditions are *
|
||||
* met: *
|
||||
* *
|
||||
* Redistributions of source code must retain the above copyright notice, *
|
||||
* this list of conditions and the following disclaimer. *
|
||||
* Redistributions in binary form must reproduce the above copyright *
|
||||
* notice, this list of conditions and the following disclaimer in the *
|
||||
* documentation and/or other materials provided with the distribution. *
|
||||
* Neither the name of the Drew Davidson nor the names of its contributors *
|
||||
* may be used to endorse or promote products derived from this software *
|
||||
* without specific prior written permission. *
|
||||
* *
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS *
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE *
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, *
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, *
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS *
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED *
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, *
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF *
|
||||
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
|
||||
* DAMAGE. *
|
||||
* *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
|
||||
|
||||
1. Overview
|
||||
===========
|
||||
|
||||
As a tool and a code base, OGNL can be used as is or can be
|
||||
cannibalized for its parts. Its possible uses and features include:
|
||||
|
||||
* OGNL was first conceived as a mechanism for associating parts of
|
||||
GUIs with model objects. A single expression is used both to pull
|
||||
the appropriate value from the model for display by a widget, and
|
||||
to push the newly edited value back into the model when editing is
|
||||
complete.
|
||||
|
||||
* OGNL's current syntax includes most of Java's operators and a few
|
||||
of its own. It is probably close to powerful enough to be used by
|
||||
a debugger or other system that requires run-time interpretation
|
||||
of expressions.
|
||||
|
||||
* OGNL has fully integrated support for arbitrary-precision math, as
|
||||
embodied by the classes of the java.math package, meaning that
|
||||
OGNL's arithmetic operators work on BigIntegers and BigDecimals as
|
||||
well as the primitive types. While this is of marginal use (at
|
||||
best) to OGNL as a GUI hooker-upper, it could be valuable in other
|
||||
settings.
|
||||
|
||||
|
||||
2. Building
|
||||
===========
|
||||
|
||||
OGNL was designed for JDK 1.2 (now known as Java 2). It is possible
|
||||
to modify the code to run under 1.1, though the extensive use of the
|
||||
1.2 collections API makes this a bit painful. If you have the JDK 1.1
|
||||
version of the 1.2 collections, which was made available in the summer
|
||||
of 1998 by the InfoBus group at Sun (and still available in June 1999
|
||||
at http://java.sun.com/beans/infobus), the job will be easier.
|
||||
|
||||
If you have GNU make, the GNUmakefile provided will build the OGNL
|
||||
package, run the test program, and use javadoc to produce API
|
||||
documentation; all on NT, Win98 or Unix systems. Please see that
|
||||
file for more information on what build targets are available.
|
||||
|
||||
|
||||
3. Documentation
|
||||
================
|
||||
|
||||
OGNL is documented in the accompanying file "package.html", which is
|
||||
used by javadoc as the ognl package description. The best way to view
|
||||
this is to generate javadoc (using "make doc" if you have GNU make),
|
||||
and then open the generated file "index.html" in the javadoc-created
|
||||
"doc" subdirectory, using your favorite HTML browser. The package
|
||||
description will be below the lists of interfaces and classes.
|
||||
|
||||
The accompanying test program, Test.java, can be thought of as
|
||||
"practical documentation."
|
||||
|
||||
|
||||
4. Feedback
|
||||
===========
|
||||
|
||||
If you have any observations or complaints about OGNL or its
|
||||
implementation or documentation, we would like to hear from you. You
|
||||
can reach Luke Blanshard by email at luke@quiq.com, or Drew Davidson at
|
||||
drew@ognl.org.
|
BIN
WEB-INF/lib/bsf-2.3.0.jar
Executable file
BIN
WEB-INF/lib/commons-beanutils-1.6.1.jar
Executable file
BIN
WEB-INF/lib/commons-collections-2.1.jar
Executable file
BIN
WEB-INF/lib/commons-configuration-1.0-dev.jar
Executable file
BIN
WEB-INF/lib/commons-dbcp-1.0-dev-20020806.jar
Executable file
BIN
WEB-INF/lib/commons-digester-1.5.jar
Executable file
BIN
WEB-INF/lib/commons-fileupload-1.0.jar
Executable file
BIN
WEB-INF/lib/commons-lang-1.0.jar
Executable file
BIN
WEB-INF/lib/commons-logging-1.0.2.jar
Executable file
BIN
WEB-INF/lib/commons-pool-1.0.jar
Executable file
BIN
WEB-INF/lib/jakarta-oro-2.0.6.jar
Executable file
BIN
WEB-INF/lib/javassist-2.5.1.jar
Executable file
BIN
WEB-INF/lib/jdbc-2.0.jar
Executable file
BIN
WEB-INF/lib/log4j-1.2.6.jar
Executable file
BIN
WEB-INF/lib/mysql-driver.jar
Executable file
BIN
WEB-INF/lib/ognl-2.5.1.jar
Executable file
BIN
WEB-INF/lib/stratum-1.0-b3.jar
Executable file
BIN
WEB-INF/lib/tapestry-3.0-beta-3.jar
Executable file
BIN
WEB-INF/lib/tapestry-contrib-3.0-beta-3.jar
Executable file
BIN
WEB-INF/lib/torque-3.0.jar
Executable file
BIN
WEB-INF/lib/village-2.0-dev-20021111.jar
Executable file
70
WEB-INF/web.xml
Executable file
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
|
||||
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
|
||||
<web-app>
|
||||
<display-name>Roster</display-name>
|
||||
|
||||
<servlet>
|
||||
|
||||
<servlet-name>roster-application</servlet-name>
|
||||
|
||||
<servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
|
||||
|
||||
<init-param>
|
||||
<param-name>org.apache.tapestry.application-specification</param-name>
|
||||
<param-value>/org/thdl/roster/Roster.application</param-value>
|
||||
</init-param>
|
||||
|
||||
<init-param>
|
||||
<param-name>org.apache.tapestry.disable-caching</param-name>
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
|
||||
<init-param>
|
||||
<param-name>torque-properties-path</param-name>
|
||||
<!-- this path is relative to the root of the classpath-->
|
||||
<param-value>/org/thdl/roster/roster-torque.properties</param-value>
|
||||
</init-param>
|
||||
|
||||
<init-param>
|
||||
<param-name>roster-uploads-directory</param-name>
|
||||
<!-- this is an absolute System classpath-->
|
||||
<param-value>/Users/travis/webapps/roster/uploads/</param-value>
|
||||
</init-param>
|
||||
|
||||
<load-on-startup>0</load-on-startup>
|
||||
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>test-servlet</servlet-name>
|
||||
<servlet-class>org.thdl.commons.TestServlet</servlet-class>
|
||||
<load-on-startup>0</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>roster-application</servlet-name>
|
||||
<url-pattern>/tapestry</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>test-servlet</servlet-name>
|
||||
<url-pattern>/test</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<session-config>
|
||||
<session-timeout>120</session-timeout>
|
||||
</session-config>
|
||||
|
||||
|
||||
|
||||
<!-- <taglib>
|
||||
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
|
||||
<taglib-location>/WEB-INF/tld/c.tld</taglib-location>
|
||||
</taglib> -->
|
||||
|
||||
<welcome-file-list>
|
||||
<welcome-file>roster.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
</web-app>
|
167
build.xml
Executable file
|
@ -0,0 +1,167 @@
|
|||
<project name="Roster" default="compile" basedir=".">
|
||||
|
||||
<!-- Configure the directory into which the web application is built -->
|
||||
<property name="build" value="${basedir}"/>
|
||||
|
||||
<!-- Configure the context path for this application -->
|
||||
<property name="path" value="/roster"/>
|
||||
|
||||
|
||||
<!-- Configure the custom Ant tasks for the Manager application -->
|
||||
<taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"/>
|
||||
<taskdef name="install" classname="org.apache.catalina.ant.InstallTask"/>
|
||||
<taskdef name="list" classname="org.apache.catalina.ant.ListTask"/>
|
||||
<taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/>
|
||||
<taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask"/>
|
||||
<taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask"/>
|
||||
<taskdef name="roles" classname="org.apache.catalina.ant.RolesTask"/>
|
||||
<taskdef name="start" classname="org.apache.catalina.ant.StartTask"/>
|
||||
<taskdef name="stop" classname="org.apache.catalina.ant.StopTask"/>
|
||||
<taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"/>
|
||||
|
||||
<!-- Classpath Reference -->
|
||||
<path id="roster-classpath">
|
||||
<fileset dir="/usr/local/jakarta-tomcat-4.1.18/common/lib">
|
||||
<include name="servlet.jar"/>
|
||||
</fileset>
|
||||
<fileset dir="WEB-INF/lib">
|
||||
<include name="bsf-2.3.0.jar"/>
|
||||
<include name="commons-beanutils-1.6.1.jar"/>
|
||||
<include name="commons-collections-2.1.jar"/>
|
||||
<include name="commons-digester-1.5.jar"/>
|
||||
<include name="commons-fileupload-1.0.jar"/>
|
||||
<include name="commons-lang-1.0.jar"/>
|
||||
<include name="commons-logging-1.0.2.jar"/>
|
||||
<include name="jakarta-oro-2.0.6.jar"/>
|
||||
<include name="javassist-2.5.1.jar"/>
|
||||
<include name="log4j-1.2.6.jar"/>
|
||||
<include name="ognl-2.5.1.jar"/>
|
||||
<include name="tapestry-3.0-beta-3.jar"/>
|
||||
<include name="tapestry-contrib-3.0-beta-3.jar"/>
|
||||
<include name="torque-3.0.jar"/>
|
||||
<include name="mysql-driver.jar"/>
|
||||
<include name="jdbc-2.0.jar"/>
|
||||
<include name="village-2.0-dev-20021111.jar"/>
|
||||
<include name="commons-configuration-1.0-dev.jar"/>
|
||||
<include name="stratum-1.0-b3.jar"/>
|
||||
<include name="commons-dbcp-1.0-dev-20020806.jar"/>
|
||||
<include name="commons-pool-1.0.jar"/>
|
||||
|
||||
<!-- <include name="bcel-5.0.jar"/>
|
||||
<include name="bsf-2.3.0.jar"/>
|
||||
<include name="tapestry-2.4-alpha-5.jar"/>
|
||||
<include name="tapestry-contrib-2.4-alpha-5.jar"/>
|
||||
<include name="ant-1.5.jar"/>
|
||||
<include name="commons-beanutils-1.4.1.jar"/>
|
||||
<include name="commons-collections-2.0.jar"/>
|
||||
<include name="commons-lang-1.0.jar"/>
|
||||
<include name="ejb.jar"/>
|
||||
<include name="jakarta-oro-2.0.6.jar"/>
|
||||
<include name="jcommon-0.6.4.jar"/>
|
||||
<include name="jcs-1.0-dev.jar"/>
|
||||
<include name="jfreechart-0.9.2.jar"/>
|
||||
<include name="jndi-1.2.1.jar"/>
|
||||
<include name="junit-3.8.1.jar"/>
|
||||
<include name="log4j-1.2.6.jar"/>
|
||||
<include name="ognl-2.3.0-opt.jar"/>
|
||||
<include name="tomcat-naming-1.0.jar"/>
|
||||
<include name="velocity-1.3.jar"/>
|
||||
<include name="xercesImpl-2.0.2.jar"/>
|
||||
<include name="xml-apis-2.0.2.jar"/> -->
|
||||
</fileset>
|
||||
<fileset dir="WEB-INF/classes">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<!-- Executable Targets -->
|
||||
<target name="copy" description="Copy Tapestry Files over into classpath">
|
||||
<copy todir="WEB-INF/classes/org/thdl/roster/">
|
||||
<fileset dir="src/java/org/thdl/roster/">
|
||||
<exclude name="**/*.java"/>
|
||||
<exclude name="**/*.log"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="WEB-INF/classes/org/thdl/roster/components/">
|
||||
<fileset dir="src/java/org/thdl/roster/components/">
|
||||
<exclude name="**/*.java"/>
|
||||
<exclude name="**/*.log"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="WEB-INF/classes/org/thdl/roster/pages/">
|
||||
<fileset dir="src/java/org/thdl/roster/pages/">
|
||||
<exclude name="**/*.java"/>
|
||||
<exclude name="**/*.log"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="copy" description="Compile web application">
|
||||
<!-- ... construct web application in ${build} subdirectory ... -->
|
||||
<javac srcdir="${basedir}/src/java"
|
||||
destdir="${build}/WEB-INF/classes"
|
||||
deprecation="on"
|
||||
classpathref="roster-classpath"
|
||||
debug="on"/>
|
||||
</target>
|
||||
|
||||
<target name="test" description="Test Torque Repository" depends="compile">
|
||||
<!-- <java classname="org.thdl.roster.RosterQueryAgent" classpath="${basedir}/WEB-INF/classes/" classpathref="roster-classpath"/> -->
|
||||
<java classname="org.thdl.roster.Global" classpath="${basedir}/WEB-INF/classes/" classpathref="roster-classpath"/>
|
||||
</target>
|
||||
|
||||
<target name="javadoc" description="Create Javadocs" depends="compile">
|
||||
<delete>
|
||||
<fileset dir="docs/api/" includes="**/*"/>
|
||||
</delete>
|
||||
<!-- packagenames="org.thdl.roster.*,org.thdl.roster.om.*,org.thdl.roster.tapestry.*,org.thdl.roster.tapestry.pages.*,org.thdl.roster.tapestry.components.*,org.thdl.commons.*,org.thdl.users.*" -->
|
||||
<javadoc
|
||||
packagenames="org.thdl.roster.*,org.thdl.commons,org.thdl.users"
|
||||
destdir="docs/api/"
|
||||
author="true"
|
||||
version="true"
|
||||
use="true"
|
||||
windowtitle="THDL Roster API"
|
||||
classpathref="roster-classpath">
|
||||
|
||||
<fileset dir="src/java" defaultexcludes="yes">
|
||||
<include name="org/thdl/**" />
|
||||
<exclude name="**/.DS_Store"/>
|
||||
<exclude name="**/*.application"/>
|
||||
<exclude name="**/*.page"/>
|
||||
<exclude name="**/*.jwc"/>
|
||||
<exclude name="**/*.html"/>
|
||||
<exclude name="**/*.css"/>
|
||||
<exclude name="**/*.log"/>
|
||||
<exclude name="**/*.properties"/>
|
||||
</fileset>
|
||||
|
||||
<doctitle><![CDATA[<h1>The THDL Roster Javadocs</h1>]]></doctitle>
|
||||
<bottom><![CDATA[<i>Copyright © 2003 THDL. All Rights Reserved.</i>]]></bottom>
|
||||
|
||||
<group title="THDL Roster Packages" packages="org.thdl.roster, org.thdl.roster.*, org.thdl.roster.om, org.thdl.om.*"/>
|
||||
<group title="THDL Commons Package" packages="org.thdl.commons.**"/>
|
||||
<group title="THDL Users Package" packages="org.thdl.users.**"/>
|
||||
|
||||
</javadoc>
|
||||
</target>
|
||||
|
||||
<target name="install" description="Install web application"
|
||||
depends="compile">
|
||||
<install url="${url}" username="${username}" password="${password}"
|
||||
path="${path}" war="file://${build}"/>
|
||||
</target>
|
||||
|
||||
<target name="reload" description="Reload web application"
|
||||
depends="compile">
|
||||
<reload url="${url}" username="${username}" password="${password}"
|
||||
path="${path}"/>
|
||||
</target>
|
||||
|
||||
<target name="remove" description="Remove web application">
|
||||
<remove url="${url}" username="${username}" password="${password}"
|
||||
path="${path}"/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
BIN
images/.DS_Store
vendored
Executable file
BIN
images/deselect_left.gif
Executable file
After Width: | Height: | Size: 526 B |
BIN
images/deselect_left_off.gif
Executable file
After Width: | Height: | Size: 414 B |
BIN
images/move_down.gif
Executable file
After Width: | Height: | Size: 586 B |
BIN
images/move_down_off.gif
Executable file
After Width: | Height: | Size: 449 B |
BIN
images/move_up.gif
Executable file
After Width: | Height: | Size: 527 B |
BIN
images/move_up_off.gif
Executable file
After Width: | Height: | Size: 416 B |
BIN
images/select_right.gif
Executable file
After Width: | Height: | Size: 473 B |
BIN
images/select_right_off.gif
Executable file
After Width: | Height: | Size: 373 B |
BIN
images/show-inspector.gif
Executable file
After Width: | Height: | Size: 3.8 KiB |
BIN
images/transparent.gif
Executable file
After Width: | Height: | Size: 149 B |
BIN
images/warning.gif
Executable file
After Width: | Height: | Size: 369 B |
BIN
images/workbench.gif
Executable file
After Width: | Height: | Size: 2.5 KiB |
189
roster.css
Executable file
|
@ -0,0 +1,189 @@
|
|||
/* STYLE */
|
||||
|
||||
h2 {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.highlightBox
|
||||
{
|
||||
clear: left;
|
||||
}
|
||||
|
||||
.highlightBox h2
|
||||
{
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
#status
|
||||
{
|
||||
float: right;
|
||||
text-align: right;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.viewOptions
|
||||
{
|
||||
width: 34%;
|
||||
border: solid 1px green;
|
||||
}
|
||||
|
||||
div.viewOptions select
|
||||
{
|
||||
width: 18em;
|
||||
}
|
||||
|
||||
/* .nowrap
|
||||
{
|
||||
display: inline;
|
||||
border: solid 2px blue;
|
||||
width: 60%;
|
||||
} */
|
||||
|
||||
.titleCaption
|
||||
{
|
||||
float:right;;
|
||||
border: solid 1px yellow;
|
||||
width: 45%;
|
||||
}
|
||||
|
||||
.options
|
||||
{
|
||||
float:right;;
|
||||
border: solid 1px green;
|
||||
width: 19%;
|
||||
}
|
||||
|
||||
*
|
||||
{
|
||||
font-family: 'Arial Unicode MS', 'Lucida Grande', Verdana, Helvetica, Arial, sans-serif !important;
|
||||
}
|
||||
|
||||
.warning
|
||||
{
|
||||
color: red;
|
||||
}
|
||||
|
||||
.message
|
||||
{
|
||||
color: #006666;
|
||||
}
|
||||
|
||||
.prominent
|
||||
{
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.label
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.inline-help
|
||||
{
|
||||
font-size: .9em;
|
||||
color: #006666;
|
||||
}
|
||||
p.palette
|
||||
{
|
||||
margin: 10px 10px 10px 10px;
|
||||
padding-left: 10px;
|
||||
border: 1px solid gray;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
TABLE.palette TH
|
||||
{
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
background-color: silver;
|
||||
border: 1px solid gray;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
TABLE.palette SELECT
|
||||
{
|
||||
font-weight: bold;
|
||||
background-color: silver;
|
||||
width: 200px;
|
||||
}
|
||||
TABLE.palette TD.controls
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
TABLE.palette TD.controls a:hover
|
||||
{
|
||||
background-color:white;
|
||||
}
|
||||
|
||||
img
|
||||
{
|
||||
border: 0 !important;
|
||||
}
|
||||
/* LAYOUT */
|
||||
|
||||
#columnCenter {
|
||||
margin-left: 20px;
|
||||
max-width: 1000px;
|
||||
}
|
||||
|
||||
#loginForm, #sendInfoForm, #newUserForm
|
||||
{
|
||||
margin: 10px 10px 10px 10px;
|
||||
padding: 10px 0 10px 0;
|
||||
border: 1px solid silver;
|
||||
}
|
||||
|
||||
#wizard
|
||||
{
|
||||
border-bottom: 2px solid black;
|
||||
margin: 30px 20px 0px 20px;
|
||||
padding: 0px;
|
||||
z-index: 1;
|
||||
padding-left: 10px
|
||||
}
|
||||
|
||||
#wizard li
|
||||
{
|
||||
display: inline;
|
||||
overflow: hidden;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#wizard li
|
||||
{
|
||||
background-color: #E5E5E5;
|
||||
font-weight: bold;
|
||||
border: 2px solid black;
|
||||
padding: 5px 5px 0px 5px;
|
||||
margin: 0px 3px 0px 0px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#wizard li.activeTab
|
||||
{
|
||||
background-color: white;
|
||||
border-bottom: 2px solid white;
|
||||
}
|
||||
|
||||
#wizard a:hover
|
||||
{
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
#wizard h1, #wizard h2, #wizard h3
|
||||
{
|
||||
clear: left;
|
||||
}
|
||||
|
||||
#tabbedBody
|
||||
{
|
||||
margin: 0px 20px 20px 20px;
|
||||
background-color: white;
|
||||
height: auto;
|
||||
padding: 20px;
|
||||
border: 2px solid black;
|
||||
border-top: none;
|
||||
z-index: 2;
|
||||
}
|
||||
|
14
roster.html
Executable file
|
@ -0,0 +1,14 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>
|
||||
Roster Home
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Roster in Tapestry</h1><br />
|
||||
<a href="/roster/tapestry">Go to application</a><br />
|
||||
<a href="/roster/test">Test Unicode</a><br />
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
BIN
schema/.DS_Store
vendored
Executable file
29
schema/id-table-schema.xml
Executable file
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
|
||||
<!DOCTYPE database SYSTEM
|
||||
"http://jakarta.apache.org/turbine/dtd/database.dtd">
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
<!-- -->
|
||||
<!-- I D B R O K E R S C H E M A -->
|
||||
<!-- -->
|
||||
<!-- ==================================================================== -->
|
||||
<!-- This is the XML schema use by Torque to generate the SQL for -->
|
||||
<!-- ID_TABLE table used by the id broker mechanism in Turbine. -->
|
||||
<!-- ==================================================================== -->
|
||||
<!-- @author: <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a> -->
|
||||
<!-- @version $Id: id-table-schema.xml,v 1.1 2004/01/07 15:32:36 travismccauley Exp $ -->
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<database name="Roster">
|
||||
<table name="ID_TABLE" idMethod="idbroker">
|
||||
<column name="ID_TABLE_ID" required="true" primaryKey="true" type="INTEGER"/>
|
||||
<column name="TABLE_NAME" required="true" size="255" type="VARCHAR"/>
|
||||
<column name="NEXT_ID" type="INTEGER"/>
|
||||
<column name="QUANTITY" type="INTEGER"/>
|
||||
|
||||
<unique>
|
||||
<unique-column name="TABLE_NAME"/>
|
||||
</unique>
|
||||
|
||||
</table>
|
||||
</database>
|
1
schema/roster-schema.xml
Executable file
BIN
src/.DS_Store
vendored
Executable file
BIN
src/java/.DS_Store
vendored
Executable file
BIN
src/java/org/.DS_Store
vendored
Executable file
BIN
src/java/org/thdl/.DS_Store
vendored
Executable file
BIN
src/java/org/thdl/roster/.DS_Store
vendored
Executable file
154
src/java/org/thdl/roster/EntitySelectionModel.java
Executable file
|
@ -0,0 +1,154 @@
|
|||
package org.thdl.roster;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.tapestry.ApplicationRuntimeException;
|
||||
import org.apache.tapestry.form.IPropertySelectionModel;
|
||||
|
||||
/**
|
||||
* This class is used as a property selection model to select a primary key. We
|
||||
* assume that the primary keys are integers, which makes it easy to translate
|
||||
* between the various representations.
|
||||
*
|
||||
*@author Howard Lewis Ship
|
||||
*@created March 13, 2003
|
||||
*@version $Id: EntitySelectionModel.java,v 1.5 2003/01/13 03:33:28 hlship
|
||||
* Exp $
|
||||
*/
|
||||
|
||||
public class EntitySelectionModel implements IPropertySelectionModel
|
||||
{
|
||||
|
||||
private final static int LIST_SIZE = 20;
|
||||
|
||||
private List entries = new ArrayList( LIST_SIZE );
|
||||
|
||||
|
||||
/**
|
||||
* Description of the Method
|
||||
*
|
||||
*@param key Description of the Parameter
|
||||
*@param label Description of the Parameter
|
||||
*/
|
||||
public void add( Integer key, String label )
|
||||
{
|
||||
Entry entry;
|
||||
|
||||
entry = new Entry( key, label );
|
||||
entries.add( entry );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the optionCount attribute of the EntitySelectionModel object
|
||||
*
|
||||
*@return The optionCount value
|
||||
*/
|
||||
public int getOptionCount()
|
||||
{
|
||||
return entries.size();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Description of the Method
|
||||
*
|
||||
*@param index Description of the Parameter
|
||||
*@return Description of the Return Value
|
||||
*/
|
||||
private Entry get( int index )
|
||||
{
|
||||
return (Entry) entries.get( index );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the option attribute of the EntitySelectionModel object
|
||||
*
|
||||
*@param index Description of the Parameter
|
||||
*@return The option value
|
||||
*/
|
||||
public Object getOption( int index )
|
||||
{
|
||||
return get( index ).primaryKey;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the label attribute of the EntitySelectionModel object
|
||||
*
|
||||
*@param index Description of the Parameter
|
||||
*@return The label value
|
||||
*/
|
||||
public String getLabel( int index )
|
||||
{
|
||||
return get( index ).label;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value attribute of the EntitySelectionModel object
|
||||
*
|
||||
*@param index Description of the Parameter
|
||||
*@return The value value
|
||||
*/
|
||||
public String getValue( int index )
|
||||
{
|
||||
Integer primaryKey;
|
||||
|
||||
primaryKey = get( index ).primaryKey;
|
||||
|
||||
if ( primaryKey == null )
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
return primaryKey.toString();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Description of the Method
|
||||
*
|
||||
*@param value Description of the Parameter
|
||||
*@return Description of the Return Value
|
||||
*/
|
||||
public Object translateValue( String value )
|
||||
{
|
||||
if ( value.equals( "" ) )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return new Integer( value );
|
||||
}
|
||||
catch ( NumberFormatException e )
|
||||
{
|
||||
throw new ApplicationRuntimeException( "Could not convert '" + value + "' to an Integer.", e );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static class Entry
|
||||
{
|
||||
Integer primaryKey;
|
||||
String label;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor for the Entry object
|
||||
*
|
||||
*@param primaryKey Description of the Parameter
|
||||
*@param label Description of the Parameter
|
||||
*/
|
||||
Entry( Integer primaryKey, String label )
|
||||
{
|
||||
this.primaryKey = primaryKey;
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
182
src/java/org/thdl/roster/Global.java
Executable file
|
@ -0,0 +1,182 @@
|
|||
package org.thdl.roster;
|
||||
|
||||
import java.util.*;
|
||||
import java.text.*;
|
||||
import org.apache.tapestry.*;
|
||||
import org.apache.torque.*;
|
||||
import org.apache.torque.util.*;
|
||||
import org.apache.torque.om.*;
|
||||
import org.thdl.roster.om.*;
|
||||
import org.apache.commons.configuration.Configuration;
|
||||
import org.apache.commons.configuration.BaseConfiguration;
|
||||
import org.apache.commons.configuration.PropertiesConfiguration;
|
||||
|
||||
public class Global
|
||||
{
|
||||
//attributes
|
||||
private List allPeople;
|
||||
private List allOrganizations;
|
||||
private List allProjects;
|
||||
private List representedCountries;
|
||||
private Configuration torqueConfig;
|
||||
//accessors
|
||||
public void setRepresentedCountries(List representedCountries) {
|
||||
this.representedCountries = representedCountries;
|
||||
}
|
||||
public List getRepresentedCountries() {
|
||||
if ( null == representedCountries )
|
||||
{
|
||||
setRepresentedCountries( refreshRepresentedCountries() );
|
||||
}
|
||||
return representedCountries;
|
||||
}
|
||||
public void setAllPeople(List allPeople) {
|
||||
this.allPeople = allPeople;
|
||||
}
|
||||
public void setAllOrganizations(List allOrganizations) {
|
||||
this.allOrganizations = allOrganizations;
|
||||
}
|
||||
public void setAllProjects(List allProjects) {
|
||||
this.allProjects = allProjects;
|
||||
}
|
||||
public List getAllPeople() {
|
||||
if (null == allPeople)
|
||||
{
|
||||
setAllPeople( refreshPeople() );
|
||||
}
|
||||
return allPeople;
|
||||
}
|
||||
public List getAllOrganizations() {
|
||||
if (null == allOrganizations)
|
||||
{
|
||||
setAllOrganizations( refreshOrganizations() );
|
||||
}
|
||||
return allOrganizations;
|
||||
}
|
||||
public List getAllProjects() {
|
||||
if (null == allProjects)
|
||||
{
|
||||
setAllProjects( refreshProjects() );
|
||||
}
|
||||
return allProjects;
|
||||
}
|
||||
private void setTorqueConfig(Configuration torqueConfig) {
|
||||
this.torqueConfig = torqueConfig;
|
||||
}
|
||||
public Configuration getTorqueConfig() throws ApplicationRuntimeException {
|
||||
if (null== torqueConfig)
|
||||
{
|
||||
setTorqueConfig( fileConfig() );
|
||||
}
|
||||
return torqueConfig;
|
||||
}
|
||||
//helpers
|
||||
public List refreshPeople()
|
||||
{
|
||||
try
|
||||
{
|
||||
Criteria crit = new Criteria();
|
||||
crit.add( MemberPeer.MEMBER_TYPE, MemberPeer.CLASSKEY_PERSON );
|
||||
crit.addJoin( MemberPeer.PERSON_DATA_ID, PersonDataPeer.ID );
|
||||
crit.addAscendingOrderByColumn( PersonDataPeer.LASTNAME );
|
||||
List people = MemberPeer.doSelect( crit );
|
||||
return java.util.Collections.synchronizedList( people );
|
||||
}
|
||||
catch ( TorqueException te )
|
||||
{
|
||||
throw new ApplicationRuntimeException( te );
|
||||
}
|
||||
}
|
||||
|
||||
public List refreshOrganizations()
|
||||
{
|
||||
try
|
||||
{
|
||||
Criteria crit = new Criteria();
|
||||
crit.add( MemberPeer.MEMBER_TYPE, MemberPeer.CLASSKEY_ORGANIZATION );
|
||||
crit.addJoin( MemberPeer.ORGANIZATION_DATA_ID, OrganizationDataPeer.ID );
|
||||
crit.addAscendingOrderByColumn( OrganizationDataPeer.NAME );
|
||||
List organizations = MemberPeer.doSelect( crit );
|
||||
return java.util.Collections.synchronizedList( organizations );
|
||||
}
|
||||
catch ( TorqueException te )
|
||||
{
|
||||
throw new ApplicationRuntimeException( te );
|
||||
}
|
||||
}
|
||||
|
||||
public List refreshProjects()
|
||||
{
|
||||
try
|
||||
{
|
||||
Criteria crit = new Criteria();
|
||||
crit.add( MemberPeer.MEMBER_TYPE, MemberPeer.CLASSKEY_PROJECT );
|
||||
crit.addJoin( MemberPeer.PROJECT_DATA_ID, ProjectDataPeer.ID );
|
||||
crit.addAscendingOrderByColumn( ProjectDataPeer.NAME );
|
||||
List projects = MemberPeer.doSelect( crit );
|
||||
return java.util.Collections.synchronizedList( projects );
|
||||
}
|
||||
catch ( TorqueException te )
|
||||
{
|
||||
throw new ApplicationRuntimeException( te );
|
||||
}
|
||||
}
|
||||
public List refreshRepresentedCountries()
|
||||
{
|
||||
try
|
||||
{
|
||||
String sql="SELECT DISTINCT Country.* FROM Country, Address WHERE Address.country_id = Country.id";
|
||||
List villageRecords = CountryPeer.executeQuery( sql );
|
||||
List countries = CountryPeer.populateObjects( villageRecords );
|
||||
return java.util.Collections.synchronizedList( countries );
|
||||
}
|
||||
catch ( TorqueException te )
|
||||
{
|
||||
throw new ApplicationRuntimeException( te );
|
||||
}
|
||||
}
|
||||
|
||||
private Configuration fileConfig()
|
||||
{
|
||||
try {
|
||||
java.io.InputStream stream = Torque.class.getClassLoader().getResourceAsStream("org/thdl/roster/roster-torque.properties");
|
||||
PropertiesConfiguration config = new PropertiesConfiguration();
|
||||
config.load( stream );
|
||||
return config;
|
||||
}
|
||||
catch ( Exception e )
|
||||
{
|
||||
throw new ApplicationRuntimeException( e.toString(), e );
|
||||
}
|
||||
}
|
||||
|
||||
//constructors
|
||||
public Global() throws Exception
|
||||
{
|
||||
try {
|
||||
if (! Torque.isInit() )
|
||||
{
|
||||
Torque.init( getTorqueConfig() );
|
||||
}
|
||||
}
|
||||
catch ( Exception e )
|
||||
{
|
||||
throw new ApplicationRuntimeException( e.toString(), e );
|
||||
}
|
||||
}
|
||||
|
||||
//main
|
||||
public static void main( String[] args )
|
||||
{
|
||||
try {
|
||||
Global glob = new Global();
|
||||
glob.setTorqueConfig( glob.fileConfig() );
|
||||
if (! Torque.isInit() )
|
||||
{
|
||||
Torque.init( glob.getTorqueConfig() );
|
||||
}
|
||||
}
|
||||
catch( Exception e ) { e.printStackTrace(); }
|
||||
}
|
||||
}
|
||||
|
174
src/java/org/thdl/roster/PaletteMergeTableProcessor.java
Executable file
|
@ -0,0 +1,174 @@
|
|||
package org.thdl.roster;
|
||||
|
||||
import java.util.*;
|
||||
import java.text.*;
|
||||
import org.apache.tapestry.*;
|
||||
import org.apache.torque.*;
|
||||
import org.apache.torque.util.*;
|
||||
import org.apache.torque.om.*;
|
||||
import org.thdl.roster.om.*;
|
||||
|
||||
/**
|
||||
* This is a utility class for processing input from Tapestry Palette Components.
|
||||
* Palettes are user-sortable multiple-select javascript widgets.
|
||||
* The data collected are stored in Torque OR Objects that represent rows of a basic merge table.
|
||||
* This class works in conjunction with torque objects that implement the RosterMergeData interface.
|
||||
* The merge table should also include field called "relevance" to store the user-specified sort order
|
||||
*
|
||||
*@author travis
|
||||
*@created June 17, 2003
|
||||
*/
|
||||
public class PaletteMergeTableProcessor
|
||||
{
|
||||
/**
|
||||
* This is the utility method that processes data from the Palette. The examples here all assume that merge data relationship is PersonData::PersonPersonTypes.
|
||||
*
|
||||
*@param flatDataIds This is a list of Integers which are primary keys of two-column flat data tables ( PersonType.id, PersonType.personType ) that are used in palette select boxes.
|
||||
*@param torqueObjects This is a list of Torque Objects that represent rows of the Merge Table (e.g. PersonPersonType )
|
||||
*@param memberDataId This is an Integer primary key of the single MemberData (e.g. PersonData) parent for the multiple rows of merge data.
|
||||
*@param template This is a prototype Torque merge data object passed in to make copies from. (e.g. PersonPersonType, or ProjectProjectType ).
|
||||
*@exception TorqueException Description of the Exception
|
||||
*@exception ApplicationRuntimeException Description of the Exception
|
||||
*/
|
||||
public static void processPalette( List flatDataIds, List torqueObjects, Integer memberDataId, RosterMergeData template ) throws TorqueException, ApplicationRuntimeException
|
||||
{
|
||||
//creative loop
|
||||
ListIterator flatDataIdsIterator = null;
|
||||
if ( null != flatDataIds )
|
||||
{
|
||||
flatDataIdsIterator = flatDataIds.listIterator( 0 );
|
||||
}
|
||||
|
||||
while ( null != flatDataIdsIterator && flatDataIdsIterator.hasNext() )
|
||||
{
|
||||
Integer flatDataId = (Integer) flatDataIdsIterator.next();
|
||||
RosterMergeData torqueObject = null;
|
||||
|
||||
ListIterator torqueObjectsIterator = torqueObjects.listIterator( 0 );
|
||||
while ( torqueObjectsIterator.hasNext() )
|
||||
{
|
||||
RosterMergeData mergeData = (RosterMergeData) torqueObjectsIterator.next();
|
||||
Integer flat = (Integer) mergeData.getByPosition( 2 );
|
||||
if ( flatDataId.equals( flat ) )
|
||||
{
|
||||
torqueObject = mergeData;
|
||||
}
|
||||
}
|
||||
|
||||
if ( null == torqueObject )
|
||||
{
|
||||
try
|
||||
{
|
||||
torqueObject = (RosterMergeData) template.getClass().newInstance();
|
||||
torqueObject.setByPosition( 2, flatDataId );
|
||||
torqueObject.setByPosition( 3, memberDataId );
|
||||
}
|
||||
catch ( Exception e )
|
||||
{
|
||||
throw new ApplicationRuntimeException( e.getMessage(), e );
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
Integer relevance = new Integer( flatDataIdsIterator.previousIndex() );
|
||||
torqueObject.setByPosition( 4, relevance );
|
||||
torqueObject.save();
|
||||
}
|
||||
catch ( Exception e )
|
||||
{
|
||||
throw new ApplicationRuntimeException( e.getMessage(), e );
|
||||
}
|
||||
}
|
||||
//destructive loop
|
||||
ListIterator torqueObjectsIterator = torqueObjects.listIterator( 0 );
|
||||
while ( torqueObjectsIterator.hasNext() )
|
||||
{
|
||||
RosterMergeData mergeObject = (RosterMergeData) torqueObjectsIterator.next();
|
||||
boolean match = false;
|
||||
|
||||
if ( null != flatDataIds )
|
||||
{
|
||||
flatDataIdsIterator = flatDataIds.listIterator( 0 );
|
||||
while ( flatDataIdsIterator.hasNext() )
|
||||
{
|
||||
Integer flatDataId = (Integer) flatDataIdsIterator.next();
|
||||
if ( flatDataId.equals( mergeObject.getByPosition( 2 ) ) )
|
||||
{
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( match == false )
|
||||
{
|
||||
try
|
||||
{
|
||||
mergeObject.remove();
|
||||
}
|
||||
catch ( Exception e )
|
||||
{
|
||||
throw new ApplicationRuntimeException( "destruction loop says: " + e.getMessage(), e );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
mergeObject.remove();
|
||||
}
|
||||
catch ( Exception e )
|
||||
{
|
||||
throw new ApplicationRuntimeException( "destruction loop says: " + e.getMessage(), e );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//main
|
||||
|
||||
/**
|
||||
* The main program for the PaletteMergeTableProcessor class
|
||||
*
|
||||
*@param args The command line arguments
|
||||
*/
|
||||
public static void main( String[] args )
|
||||
{
|
||||
try
|
||||
{
|
||||
/*
|
||||
* java.io.InputStream stream = Torque.class.getClassLoader().getResourceAsStream("org/thdl/roster/roster-torque.properties");
|
||||
* org.apache.commons.configuration.PropertiesConfiguration config = new org.apache.commons.configuration.PropertiesConfiguration();
|
||||
* config.load( stream );
|
||||
*/
|
||||
Torque.init( "./roster-torque.properties" );
|
||||
|
||||
Member person = MemberPeer.retrieveByPK( new Integer( 1020 ) );
|
||||
List flatDataIds = new LinkedList();
|
||||
flatDataIds.add( new Integer( 1 ) );
|
||||
flatDataIds.add( new Integer( 2 ) );
|
||||
flatDataIds.add( new Integer( 3 ) );
|
||||
List torqueObjects = person.getPersonData().getPersonPersonTypes();
|
||||
Integer memberDataId = person.getPersonData().getId();
|
||||
PersonPersonType template = new PersonPersonType();
|
||||
//PaletteMergeTableProcessor.processPalette( flatDataIds, torqueObjects, memberDataId, template );
|
||||
|
||||
System.out.println( MemberPeer.executeQuery( "select count( id ) from PersonPersonType" ) );
|
||||
|
||||
/*
|
||||
* flatDataIds = new LinkedList();
|
||||
* flatDataIds.add( new Integer( 4 ) );
|
||||
* flatDataIds.add( new Integer( 5 ) );
|
||||
* flatDataIds.add( new Integer( 6 ) );
|
||||
* torqueObjects = person.getPersonData().getPersonPersonTypes();
|
||||
* PaletteMergeTableProcessor.processPalette( flatDataIds, torqueObjects, memberDataId, template );
|
||||
* System.out.println( MemberPeer.executeQuery( "select count( id ) from PersonPersonType" ) );
|
||||
*/
|
||||
}
|
||||
catch ( Exception e )
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
66
src/java/org/thdl/roster/Roster.application
Executable file
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE application PUBLIC
|
||||
"-//Apache Software Foundation//Tapestry Specification 3.0//EN"
|
||||
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
|
||||
|
||||
<application name="Roster" engine-class="org.thdl.roster.RosterEngine">
|
||||
|
||||
<property name="org.apache.tapestry.visit-class">org.thdl.roster.Visit</property>
|
||||
<property name="org.apache.tapestry.global-class">org.thdl.roster.Global</property>
|
||||
<property name="org.apache.tapestry.disable-caching">true</property>
|
||||
<!--front pages-->
|
||||
<page name="Home" specification-path="/org/thdl/roster/pages/Home.page"/>
|
||||
<page name="Search" specification-path="/org/thdl/roster/pages/Search.page"/>
|
||||
<page name="SearchResults" specification-path="/org/thdl/roster/pages/SearchResults.page"/>
|
||||
<page name="People" specification-path="/org/thdl/roster/pages/Members.page"/>
|
||||
<page name="Projects" specification-path="/org/thdl/roster/pages/Members.page"/>
|
||||
<page name="Organizations" specification-path="/org/thdl/roster/pages/Members.page"/>
|
||||
<page name="Announcements" specification-path="/org/thdl/roster/pages/Home.page"/>
|
||||
<page name="Login" specification-path="/org/thdl/roster/pages/Login.page"/>
|
||||
<page name="Admin" specification-path="/org/thdl/roster/pages/Admin.page"/>
|
||||
<page name="Test" specification-path="/org/thdl/roster/pages/test/Test.page"/>
|
||||
<page name="Test2" specification-path="/org/thdl/roster/pages/test/Test2.page"/>
|
||||
|
||||
<!--display pages-->
|
||||
<page name="Person" specification-path="/org/thdl/roster/pages/Member.page"/>
|
||||
<page name="Project" specification-path="/org/thdl/roster/pages/Member.page"/>
|
||||
<page name="Organization" specification-path="/org/thdl/roster/pages/Member.page"/>
|
||||
|
||||
<!--forms pages-->
|
||||
<page name="Contact" specification-path="/org/thdl/roster/pages/forms/ContactInfo.page"/>
|
||||
<page name="Background" specification-path="/org/thdl/roster/pages/forms/MemberData.page"/>
|
||||
<page name="Activities" specification-path="/org/thdl/roster/pages/forms/ResearchInterests.page"/>
|
||||
<page name="Works" specification-path="/org/thdl/roster/pages/forms/Publications.page"/>
|
||||
<page name="Uploads" specification-path="/org/thdl/roster/pages/forms/Uploads.page"/>
|
||||
|
||||
<!--display components-->
|
||||
<component-type type="Border" specification-path="/org/thdl/roster/components/Border.jwc"/>
|
||||
<component-type type="PersonDisplay" specification-path="/org/thdl/roster/components/PersonDisplay.jwc"/>
|
||||
<component-type type="AddressDisplay" specification-path="/org/thdl/roster/components/AddressDisplay.jwc"/>
|
||||
<component-type type="CountryDisplay" specification-path="/org/thdl/roster/components/CountryDisplay.jwc"/>
|
||||
<component-type type="PhoneDisplay" specification-path="/org/thdl/roster/components/PhoneDisplay.jwc"/>
|
||||
<component-type type="MemberTypeDisplay" specification-path="/org/thdl/roster/components/MemberTypeDisplay.jwc"/>
|
||||
<component-type type="OrganizationDisplay" specification-path="/org/thdl/roster/components/OrganizationDisplay.jwc"/>
|
||||
<component-type type="ProjectDisplay" specification-path="/org/thdl/roster/components/ProjectDisplay.jwc"/>
|
||||
<component-type type="DisciplineDisplay" specification-path="/org/thdl/roster/components/DisciplineDisplay.jwc"/>
|
||||
<component-type type="LanguageDisplay" specification-path="/org/thdl/roster/components/LanguageDisplay.jwc"/>
|
||||
<component-type type="CulturalAreaDisplay" specification-path="/org/thdl/roster/components/CulturalAreaDisplay.jwc"/>
|
||||
<component-type type="DateFormatter" specification-path="/org/thdl/roster/components/DateFormatter.jwc"/>
|
||||
<component-type type="DocumentDisplay" specification-path="/org/thdl/roster/components/DocumentDisplay.jwc"/>
|
||||
<component-type type="Century" specification-path="/org/thdl/roster/components/Century.jwc"/>
|
||||
<component-type type="ConditionalInsert" specification-path="/org/thdl/roster/components/ConditionalInsert.jwc"/>
|
||||
<component-type type="AbbreviatedInsert" specification-path="/org/thdl/roster/components/AbbreviatedInsert.jwc"/>
|
||||
|
||||
<!--forms components-->
|
||||
<component-type type="PersonFields" specification-path="/org/thdl/roster/components/forms/PersonFields.jwc"/>
|
||||
<component-type type="OrganizationFields" specification-path="/org/thdl/roster/components/forms/OrganizationFields.jwc"/>
|
||||
<component-type type="ProjectFields" specification-path="/org/thdl/roster/components/forms/ProjectFields.jwc"/>
|
||||
<component-type type="AddressFields" specification-path="/org/thdl/roster/components/forms/AddressFields.jwc"/>
|
||||
<component-type type="PhoneFields" specification-path="/org/thdl/roster/components/forms/PhoneFields.jwc"/>
|
||||
<component-type type="CountryFields" specification-path="/org/thdl/roster/components/forms/CountryFields.jwc"/>
|
||||
<component-type type="WizardTabs" specification-path="/org/thdl/roster/components/forms/WizardTabs.jwc"/>
|
||||
|
||||
<!--libraries-->
|
||||
<library id="contrib" specification-path="/org/apache/tapestry/contrib/Contrib.library"/>
|
||||
|
||||
</application>
|
10
src/java/org/thdl/roster/RosterConstants.java
Executable file
|
@ -0,0 +1,10 @@
|
|||
package org.thdl.roster;
|
||||
|
||||
public class RosterConstants
|
||||
{
|
||||
protected final static String DRIVER = "com.mysql.jdbc.Driver";
|
||||
protected final static String USER = "moojoo";
|
||||
protected final static String PASSWORD = "googoo";
|
||||
protected final static String URL = "jdbc:mysql://localhost/Roster";
|
||||
}
|
||||
|
43
src/java/org/thdl/roster/RosterEngine.java
Executable file
|
@ -0,0 +1,43 @@
|
|||
package org.thdl.roster;
|
||||
|
||||
import org.apache.tapestry.engine.BaseEngine;
|
||||
import org.apache.tapestry.request.RequestContext;
|
||||
import org.apache.tapestry.form.IPropertySelectionModel;
|
||||
import org.apache.torque.*;
|
||||
import org.apache.torque.util.Criteria;
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import javax.servlet.ServletException;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import org.apache.tapestry.IRequestCycle;
|
||||
import org.apache.tapestry.ApplicationRuntimeException;
|
||||
import org.apache.tapestry.form.EnumPropertySelectionModel;
|
||||
import org.apache.tapestry.form.IPropertySelectionModel;
|
||||
import org.apache.tapestry.form.StringPropertySelectionModel;
|
||||
import org.apache.tapestry.html.BasePage;
|
||||
import org.apache.tapestry.contrib.palette.SortMode;
|
||||
import org.thdl.roster.Visit;
|
||||
import org.thdl.roster.om.*;
|
||||
|
||||
public class RosterEngine extends BaseEngine
|
||||
{
|
||||
private static final String[] PAGE_NAMES = { "Home", "Search", "People", "Organizations", "Projects", "Login" };
|
||||
private static final String[] PERSON_WIZARD_PAGES= { "Contact", "Background", "Activities", "Works", "Uploads" };
|
||||
|
||||
public String[] getPageNames()
|
||||
{
|
||||
return PAGE_NAMES;
|
||||
}
|
||||
public String[] getPersonWizardPages()
|
||||
{
|
||||
return PERSON_WIZARD_PAGES;
|
||||
}
|
||||
public boolean service(RequestContext context) throws ServletException, IOException
|
||||
{
|
||||
context.getRequest().setCharacterEncoding("UTF-8");
|
||||
|
||||
return super.service(context);
|
||||
}
|
||||
|
||||
}
|
243
src/java/org/thdl/roster/RosterQuery.java
Executable file
|
@ -0,0 +1,243 @@
|
|||
package org.thdl.roster;
|
||||
|
||||
import java.util.*;
|
||||
import org.thdl.roster.om.*;
|
||||
import org.apache.torque.*;
|
||||
import org.apache.torque.util.*;
|
||||
|
||||
public class RosterQuery implements java.io.Serializable
|
||||
{
|
||||
//attributes
|
||||
//private RosterQueryAgent queryAgent;
|
||||
private HashMap memberTypes;
|
||||
/*private String memberType; */
|
||||
|
||||
private String name;
|
||||
private String organizationalBase;
|
||||
private String anywhere;
|
||||
private List representedCountries; //stores a reference to Global.representedCountries
|
||||
private HashMap countries;
|
||||
private Country country;
|
||||
private String sql;
|
||||
private Integer selectedDiscipline;
|
||||
private Integer selectedLanguage;
|
||||
private Integer selectedCulturalArea;
|
||||
private Integer selectedPersonType;
|
||||
private Integer selectedProjectType;
|
||||
private Integer selectedOrganizationType;
|
||||
|
||||
//accessors
|
||||
|
||||
public void setSelectedPersonType(Integer selectedPersonType) {
|
||||
this.selectedPersonType = selectedPersonType;
|
||||
}
|
||||
|
||||
public void setSelectedProjectType(Integer selectedProjectType) {
|
||||
this.selectedProjectType = selectedProjectType;
|
||||
}
|
||||
|
||||
public void setSelectedOrganizationType(Integer selectedOrganizationType) {
|
||||
this.selectedOrganizationType = selectedOrganizationType;
|
||||
}
|
||||
|
||||
public Integer getSelectedPersonType() {
|
||||
return selectedPersonType;
|
||||
}
|
||||
|
||||
public Integer getSelectedProjectType() {
|
||||
return selectedProjectType;
|
||||
}
|
||||
|
||||
public Integer getSelectedOrganizationType() {
|
||||
return selectedOrganizationType;
|
||||
}
|
||||
|
||||
public void setPeople(Boolean people) {
|
||||
getMemberTypes().put( MemberPeer.CLASSKEY_PERSON, people );
|
||||
}
|
||||
|
||||
public void setProjects(Boolean projects) {
|
||||
getMemberTypes().put( MemberPeer.CLASSKEY_PROJECT, projects );
|
||||
}
|
||||
|
||||
public void setOrganizations(Boolean organizations) {
|
||||
getMemberTypes().put( MemberPeer.CLASSKEY_ORGANIZATION, organizations );
|
||||
}
|
||||
|
||||
public Boolean getPeople() {
|
||||
return (Boolean)getMemberTypes().get( MemberPeer.CLASSKEY_PERSON );
|
||||
}
|
||||
|
||||
public Boolean getProjects() {
|
||||
return (Boolean)getMemberTypes().get( MemberPeer.CLASSKEY_PROJECT );
|
||||
}
|
||||
|
||||
public Boolean getOrganizations() {
|
||||
return (Boolean)getMemberTypes().get( MemberPeer.CLASSKEY_ORGANIZATION );
|
||||
}
|
||||
public void setOrganizationalBase(String organizationalBase) {
|
||||
this.organizationalBase = organizationalBase;
|
||||
}
|
||||
|
||||
public String getOrganizationalBase() {
|
||||
return organizationalBase;
|
||||
}
|
||||
|
||||
public void setAnywhere(String anywhere) {
|
||||
this.anywhere = anywhere;
|
||||
}
|
||||
|
||||
public String getAnywhere() {
|
||||
return anywhere;
|
||||
}
|
||||
|
||||
public void setSelectedCulturalArea(Integer selectedCulturalArea) {
|
||||
this.selectedCulturalArea = selectedCulturalArea;
|
||||
}
|
||||
|
||||
public Integer getSelectedCulturalArea() {
|
||||
return selectedCulturalArea;
|
||||
}
|
||||
|
||||
public void setSelectedLanguage(Integer selectedLanguage) {
|
||||
this.selectedLanguage = selectedLanguage;
|
||||
}
|
||||
|
||||
public Integer getSelectedLanguage() {
|
||||
return selectedLanguage;
|
||||
}
|
||||
|
||||
public void setSelectedDiscipline(Integer selectedDiscipline) {
|
||||
this.selectedDiscipline = selectedDiscipline;
|
||||
}
|
||||
|
||||
public Integer getSelectedDiscipline() {
|
||||
return selectedDiscipline;
|
||||
}
|
||||
|
||||
public void setRepresentedCountries(List representedCountries) {
|
||||
this.representedCountries = representedCountries;
|
||||
}
|
||||
|
||||
public List getRepresentedCountries() {
|
||||
return representedCountries;
|
||||
}
|
||||
|
||||
public void setSelectedCountry( Boolean selectedCountry ) {
|
||||
getCountries().put( getCountry(), selectedCountry );
|
||||
}
|
||||
|
||||
public Boolean getSelectedCountry() {
|
||||
Country key = getCountry();
|
||||
Boolean selected = (Boolean)getCountries().get( key );
|
||||
return selected;
|
||||
}
|
||||
|
||||
public void setCountries(HashMap countries) {
|
||||
this.countries = countries;
|
||||
}
|
||||
|
||||
public HashMap getCountries() {
|
||||
if ( null == countries )
|
||||
{
|
||||
refreshCountries();
|
||||
}
|
||||
return countries;
|
||||
}
|
||||
|
||||
/* public void setSelectedMemberType(Boolean selectedMemberType) {
|
||||
getMemberTypes().put( getMemberType(), selectedMemberType );
|
||||
}
|
||||
|
||||
public Boolean getSelectedMemberType() {
|
||||
String key = getMemberType();
|
||||
Boolean selected = (Boolean)getMemberTypes().get( key );
|
||||
return selected;
|
||||
}
|
||||
*/
|
||||
public void setMemberTypes(HashMap memberTypes) {
|
||||
this.memberTypes = memberTypes;
|
||||
}
|
||||
|
||||
public HashMap getMemberTypes() {
|
||||
return memberTypes;
|
||||
}
|
||||
|
||||
/* public void setMemberType(String memberType) {
|
||||
this.memberType = memberType;
|
||||
}
|
||||
public String getMemberType() {
|
||||
return memberType;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setCountry(Country country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Country getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
public void setSql(String sql) {
|
||||
this.sql = sql;
|
||||
}
|
||||
|
||||
public String getSql() {
|
||||
return sql;
|
||||
}
|
||||
//helpers
|
||||
public void clear()
|
||||
{
|
||||
setCountries( null );
|
||||
setName( null );
|
||||
setOrganizationalBase( null );
|
||||
setAnywhere( null );
|
||||
setSql( null );
|
||||
setSelectedDiscipline( null );
|
||||
setSelectedLanguage( null );
|
||||
setSelectedCulturalArea( null );
|
||||
setSelectedPersonType( null );
|
||||
setSelectedProjectType( null );
|
||||
setSelectedOrganizationType( null );
|
||||
}
|
||||
public void refreshCountries()
|
||||
{
|
||||
setCountries( new HashMap() );
|
||||
Iterator countries = getRepresentedCountries().iterator();
|
||||
while (countries.hasNext())
|
||||
{
|
||||
getCountries().put( countries.next(), Boolean.TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
// constructors
|
||||
public RosterQuery()
|
||||
{
|
||||
setCountries( new HashMap() );
|
||||
setMemberTypes( new HashMap() );
|
||||
/* getMemberTypes().put( MemberPeer.CLASSKEY_PERSON, Boolean.TRUE );
|
||||
getMemberTypes().put( MemberPeer.CLASSKEY_PROJECT, Boolean.TRUE );
|
||||
getMemberTypes().put( MemberPeer.CLASSKEY_ORGANIZATION, Boolean.TRUE ); */
|
||||
setPeople( Boolean.TRUE );
|
||||
setProjects( Boolean.TRUE );
|
||||
setOrganizations( Boolean.TRUE );
|
||||
}
|
||||
public RosterQuery( List representedCountries )
|
||||
{
|
||||
this();
|
||||
setRepresentedCountries( representedCountries );
|
||||
refreshCountries();
|
||||
//setQueryAgent( new RosterQueryAgent() );
|
||||
}
|
||||
|
||||
}
|
301
src/java/org/thdl/roster/RosterQueryAgent.java
Executable file
|
@ -0,0 +1,301 @@
|
|||
package org.thdl.roster;
|
||||
|
||||
import java.util.*;
|
||||
import org.apache.commons.configuration.*;
|
||||
|
||||
import org.apache.tapestry.*;
|
||||
import org.apache.tapestry.form.*;
|
||||
import org.apache.torque.*;
|
||||
import org.apache.torque.util.*;
|
||||
import org.thdl.roster.*;
|
||||
import org.thdl.roster.om.*;
|
||||
|
||||
public class RosterQueryAgent
|
||||
{
|
||||
public String esc( String rawText ) throws TorqueException
|
||||
{
|
||||
return SqlExpression.quoteAndEscapeText( rawText, Torque.getDB( Torque.getDefaultDB() ) );
|
||||
}
|
||||
|
||||
// Custom Query helpers
|
||||
|
||||
public String buildQuery( RosterQuery query) throws TorqueException
|
||||
{
|
||||
StringBuffer sql = new StringBuffer() ;
|
||||
sql.append( " \n\nSELECT DISTINCT Member.* FROM Member " );
|
||||
sql.append( " \nLEFT JOIN PersonData ON Member.person_data_id = PersonData.id " );
|
||||
sql.append( " \nLEFT JOIN ProjectData ON Member.project_data_id = ProjectData.id " );
|
||||
sql.append( " \nLEFT JOIN OrganizationData ON Member.organization_data_id = OrganizationData.id " );
|
||||
sql.append( " \nLEFT JOIN ContactInfo ON Member.contact_info_id = ContactInfo.id " );
|
||||
sql.append( " \nLEFT JOIN Address ON ContactInfo.address_id = Address.id " );
|
||||
sql.append( " \nLEFT JOIN Publication ON Member.publication_id = Publication.id " );
|
||||
sql.append( " \nLEFT JOIN ResearchInterest ON Member.research_interest_id = ResearchInterest.id " );
|
||||
sql.append( " \nLEFT JOIN ResearchInterestDiscipline ON ResearchInterest.id = ResearchInterestDiscipline.research_interest_id " );
|
||||
sql.append( " \nLEFT JOIN ResearchInterestCulturalArea ON ResearchInterest.id = ResearchInterestCulturalArea.research_interest_id " );
|
||||
sql.append( " \nLEFT JOIN ResearchInterestLanguage ON ResearchInterest.id = ResearchInterestLanguage.research_interest_id " );
|
||||
sql.append( " \nLEFT JOIN PersonPersonType ON PersonData.id = PersonPersonType.person_data_id " );
|
||||
sql.append( " \nLEFT JOIN ProjectProjectType ON ProjectData.id = ProjectProjectType.project_data_id " );
|
||||
sql.append( " \nLEFT JOIN OrganizationOrganizationType ON OrganizationData.id = OrganizationOrganizationType.organization_data_id " );
|
||||
sql.append( " \nWHERE Member.deleted = 'false' " );
|
||||
appendNames( sql, query );
|
||||
appendOrganizationalBase( sql, query );
|
||||
appendAnywhere( sql, query );
|
||||
appendMemberTypes( sql, query );
|
||||
appendCountries( sql, query );
|
||||
appendDiscipline( sql, query );
|
||||
appendLanguage( sql, query );
|
||||
appendCulturalArea( sql, query );
|
||||
sql.append( " \nORDER BY OrganizationData.name, ProjectData.name, PersonData.lastname" );
|
||||
return sql.toString();
|
||||
}
|
||||
|
||||
public List executeQuery( String sql ) throws TorqueException
|
||||
{
|
||||
List villageRecords = MemberPeer.executeQuery( sql );
|
||||
List members = MemberPeer.populateObjects( villageRecords );
|
||||
return members;
|
||||
}
|
||||
|
||||
public void appendCulturalArea( StringBuffer sql, RosterQuery query )
|
||||
{
|
||||
if ( null != query.getSelectedCulturalArea() )
|
||||
{
|
||||
sql.append( " \nAND ResearchInterestCulturalArea.cultural_area_id = " );
|
||||
sql.append( query.getSelectedCulturalArea() );
|
||||
}
|
||||
}
|
||||
|
||||
public void appendLanguage( StringBuffer sql, RosterQuery query )
|
||||
{
|
||||
if ( null != query.getSelectedLanguage() )
|
||||
{
|
||||
sql.append( " \nAND ResearchInterestLanguage.language_id = " );
|
||||
sql.append( query.getSelectedLanguage() );
|
||||
}
|
||||
}
|
||||
|
||||
public void appendDiscipline( StringBuffer sql, RosterQuery query )
|
||||
{
|
||||
if ( null != query.getSelectedDiscipline() )
|
||||
{
|
||||
sql.append( " \nAND ResearchInterestDiscipline.discipline_id = " );
|
||||
sql.append( query.getSelectedDiscipline() );
|
||||
}
|
||||
}
|
||||
|
||||
public void appendCountries( StringBuffer sql, RosterQuery query ) throws TorqueException
|
||||
{
|
||||
Iterator countries = query.getCountries().keySet().iterator();
|
||||
while ( countries.hasNext() )
|
||||
{
|
||||
Country key = (Country)countries.next();
|
||||
Boolean value = (Boolean) query.getCountries().get( key );
|
||||
if ( value.equals( Boolean.FALSE ) )
|
||||
{
|
||||
sql.append( " \nAND " );
|
||||
sql.append( AddressPeer.COUNTRY_ID );
|
||||
sql.append( " <> " );
|
||||
sql.append( key.getId() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void appendNames( StringBuffer sql, RosterQuery query ) throws TorqueException
|
||||
{
|
||||
if ( null != query.getName() && ! query.getName().equals( "" ) )
|
||||
{
|
||||
String name = "%" + query.getName() + "%";
|
||||
name = esc( name );
|
||||
sql.append( " \nAND " );
|
||||
sql.append( " ( " );
|
||||
sql.append( " ( " );
|
||||
sql.append( " PersonData.firstname LIKE " );
|
||||
sql.append( name );
|
||||
sql.append( " \nOR" );
|
||||
sql.append( " PersonData.lastname LIKE " );
|
||||
sql.append( name );
|
||||
sql.append( " ) " );
|
||||
sql.append( " \nOR" );
|
||||
sql.append( " ProjectData.name LIKE " );
|
||||
sql.append( name );
|
||||
sql.append( " \nOR" );
|
||||
sql.append( " OrganizationData.name LIKE " );
|
||||
sql.append( name );
|
||||
sql.append( " )" );
|
||||
}
|
||||
}
|
||||
|
||||
public void appendOrganizationalBase( StringBuffer sql, RosterQuery query ) throws TorqueException
|
||||
{
|
||||
if ( null != query.getOrganizationalBase() && ! query.getOrganizationalBase().equals( "" ) )
|
||||
{
|
||||
String orgBase = "%" + query.getOrganizationalBase() + "%";
|
||||
orgBase = esc( orgBase );
|
||||
sql.append( " \nAND " );
|
||||
sql.append( " ( " );
|
||||
sql.append( " PersonData.parent_organization LIKE " );
|
||||
sql.append( orgBase );
|
||||
sql.append( " \nOR" );
|
||||
sql.append( " ProjectData.parent_organization LIKE " );
|
||||
sql.append( orgBase );
|
||||
sql.append( " \nOR" );
|
||||
sql.append( " OrganizationData.parent_organization LIKE " );
|
||||
sql.append( orgBase );
|
||||
sql.append( " )" );
|
||||
}
|
||||
}
|
||||
|
||||
public void appendAnywhere( StringBuffer sql, RosterQuery query ) throws TorqueException
|
||||
{
|
||||
if ( null != query.getAnywhere() && ! query.getAnywhere().equals( "" ) )
|
||||
{
|
||||
String param = "%" + query.getAnywhere() + "%";
|
||||
param = esc( param );
|
||||
sql.append( " \nAND " );
|
||||
sql.append( " ( " );
|
||||
sql.append( " PersonData.firstname LIKE " + param);
|
||||
sql.append( " \nOR PersonData.middlename LIKE " + param );
|
||||
sql.append( " \nOR PersonData.lastname LIKE " + param );
|
||||
sql.append( " \nOR PersonData.bio LIKE " + param );
|
||||
sql.append( " \nOR PersonData.history LIKE " + param );
|
||||
sql.append( " \nOR PersonData.parent_organization LIKE " + param );
|
||||
sql.append( " \nOR PersonData.school LIKE " + param );
|
||||
sql.append( " \nOR PersonData.department LIKE " + param );
|
||||
sql.append( " \nOR PersonData.program LIKE " + param );
|
||||
sql.append( " \nOR PersonData.advisor LIKE " + param );
|
||||
sql.append( " \nOR PersonData.other_backgrounds LIKE " + param );
|
||||
sql.append( " \nOR PersonData.organization LIKE " + param );
|
||||
sql.append( " \nOR PersonData.division LIKE " + param );
|
||||
sql.append( " \nOR PersonData.title LIKE " + param );
|
||||
sql.append( " \nOR PersonData.job_description LIKE " + param );
|
||||
|
||||
sql.append( " \nOR ProjectData.name LIKE " + param );
|
||||
sql.append( " \nOR ProjectData.parent_organization LIKE " + param );
|
||||
sql.append( " \nOR ProjectData.divisions LIKE " + param );
|
||||
sql.append( " \nOR ProjectData.people LIKE " + param );
|
||||
sql.append( " \nOR ProjectData.description LIKE " + param );
|
||||
sql.append( " \nOR ProjectData.history LIKE " + param );
|
||||
sql.append( " \nOR ProjectData.resources LIKE " + param );
|
||||
sql.append( " \nOR ProjectData.education_programs LIKE " + param );
|
||||
|
||||
sql.append( " \nOR OrganizationData.name LIKE " + param );
|
||||
sql.append( " \nOR OrganizationData.parent_organization LIKE " + param );
|
||||
sql.append( " \nOR OrganizationData.divisions LIKE " + param );
|
||||
sql.append( " \nOR OrganizationData.people LIKE " + param );
|
||||
sql.append( " \nOR OrganizationData.description LIKE " + param );
|
||||
sql.append( " \nOR OrganizationData.history LIKE " + param );
|
||||
sql.append( " \nOR OrganizationData.resources LIKE " + param );
|
||||
sql.append( " \nOR OrganizationData.education_programs LIKE " + param );
|
||||
|
||||
sql.append( " \nOR Publication.formal_publications LIKE " + param );
|
||||
sql.append( " \nOR Publication.works_in_progress LIKE " + param );
|
||||
sql.append( " \nOR Publication.projects LIKE " + param );
|
||||
|
||||
sql.append( " \nOR ResearchInterest.interests LIKE " + param );
|
||||
sql.append( " \nOR ResearchInterest.activities LIKE " + param );
|
||||
sql.append( " \nOR ResearchInterest.collaboration_interests LIKE " + param );
|
||||
|
||||
sql.append( " ) " );
|
||||
}
|
||||
}
|
||||
|
||||
public void appendMemberTypes( StringBuffer sql, RosterQuery query ) throws TorqueException
|
||||
{
|
||||
Iterator memTypes = query.getMemberTypes().keySet().iterator();
|
||||
LinkedList sqlParts = new LinkedList();
|
||||
StringBuffer sqlPartsConcat = new StringBuffer();
|
||||
while ( memTypes.hasNext() )
|
||||
{
|
||||
String key = (String)memTypes.next();
|
||||
Boolean value = (Boolean) query.getMemberTypes().get( key );
|
||||
if ( value.equals( Boolean.TRUE ) )
|
||||
{
|
||||
StringBuffer tempSql = new StringBuffer();
|
||||
tempSql.append( MemberPeer.MEMBER_TYPE );
|
||||
tempSql.append( " LIKE " );
|
||||
tempSql.append( esc( key ) );
|
||||
if ( key.equals( MemberPeer.CLASSKEY_PERSON ) && null != query.getSelectedPersonType() )
|
||||
{
|
||||
tempSql.append( " AND " );
|
||||
tempSql.append( PersonPersonTypePeer.PERSON_TYPE_ID );
|
||||
tempSql.append( " = " );
|
||||
tempSql.append( query.getSelectedPersonType() );
|
||||
}
|
||||
else if ( key.equals( MemberPeer.CLASSKEY_PROJECT ) && null != query.getSelectedProjectType() )
|
||||
{
|
||||
tempSql.append( " AND " );
|
||||
tempSql.append( ProjectProjectTypePeer.PROJECT_TYPE_ID );
|
||||
tempSql.append( " = " );
|
||||
tempSql.append( query.getSelectedProjectType() );
|
||||
}
|
||||
else if ( key.equals( MemberPeer.CLASSKEY_ORGANIZATION ) && null != query.getSelectedOrganizationType() )
|
||||
{
|
||||
tempSql.append( " AND " );
|
||||
tempSql.append( OrganizationOrganizationTypePeer.ORGANIZATION_TYPE_ID );
|
||||
tempSql.append( " = " );
|
||||
tempSql.append( query.getSelectedOrganizationType() );
|
||||
}
|
||||
sqlParts.add( tempSql.toString() );
|
||||
}
|
||||
}
|
||||
|
||||
ListIterator iterator = sqlParts.listIterator();
|
||||
int index = 0;
|
||||
String pieceOfSql;
|
||||
while ( iterator.hasNext() )
|
||||
{
|
||||
Object object = iterator.next();
|
||||
pieceOfSql = (String) object;
|
||||
if ( index > 0 )
|
||||
{
|
||||
sqlPartsConcat.append( " \nOR " );
|
||||
}
|
||||
else
|
||||
{
|
||||
sqlPartsConcat.append( "\n" );
|
||||
}
|
||||
sqlPartsConcat.append( " ( " );
|
||||
sqlPartsConcat.append( pieceOfSql );
|
||||
sqlPartsConcat.append( " ) " );
|
||||
index++;
|
||||
}
|
||||
sql.append( " \nAND ( " );
|
||||
sql.append( sqlPartsConcat.toString() );
|
||||
sql.append( " \n) " );
|
||||
}
|
||||
|
||||
public RosterQueryAgent() throws Exception
|
||||
{
|
||||
java.io.InputStream stream = Torque.class.getClassLoader().getResourceAsStream("org/thdl/roster/roster-torque.properties");
|
||||
PropertiesConfiguration config = new PropertiesConfiguration();
|
||||
config.load( stream );
|
||||
if ( ! Torque.isInit() )
|
||||
{
|
||||
Torque.init( config );
|
||||
}
|
||||
}
|
||||
public RosterQueryAgent( Configuration config ) throws Exception
|
||||
{
|
||||
if ( ! Torque.isInit() )
|
||||
{
|
||||
Torque.init( config );
|
||||
}
|
||||
}
|
||||
//main
|
||||
public static void main(String[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
RosterQuery query = new RosterQuery();
|
||||
RosterQueryAgent agent = new RosterQueryAgent();
|
||||
String sql = agent.buildQuery( query );
|
||||
System.out.println( sql );
|
||||
System.out.println( agent.executeQuery( sql ) );
|
||||
}
|
||||
catch (Exception te )
|
||||
{
|
||||
te.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
38
src/java/org/thdl/roster/RosterTest.java
Executable file
|
@ -0,0 +1,38 @@
|
|||
package org.thdl.roster;
|
||||
|
||||
import java.util.*;
|
||||
import org.thdl.roster.om.*;
|
||||
import org.apache.torque.*;
|
||||
import org.apache.torque.util.*;
|
||||
import java.text.*;
|
||||
public class RosterTest
|
||||
{
|
||||
public void doStuff()
|
||||
{
|
||||
try
|
||||
{
|
||||
String sql = "SELECT DISTINCT Member.* FROM Member, PersonData, ProjectData, OrganizationData, ContactInfo, Address, ResearchInterest, ResearchInterestDiscipline, ResearchInterestCulturalArea, ResearchInterestLanguage WHERE Member.deleted = 'false' AND ( ( Member.person_data_id = PersonData.id AND ( PersonData.firstname LIKE '%travis%' OR PersonData.lastname LIKE '%travis%' ) ) OR ( Member.project_data_id = ProjectData.id AND ProjectData.name LIKE '%travis%' ) OR ( Member.organization_data_id = OrganizationData.id AND OrganizationData.name LIKE '%travis%' ) ) AND Member.research_interest_id = ResearchInterest.id AND ResearchInterest.id = ResearchInterestDiscipline.research_interest_id AND ResearchInterestDiscipline.discipline_id = 5 AND Member.research_interest_id = ResearchInterest.id AND ResearchInterest.id = ResearchInterestLanguage.research_interest_id AND ResearchInterestLanguage.language_id = 2 AND Member.research_interest_id = ResearchInterest.id AND ResearchInterest.id = ResearchInterestCulturalArea.research_interest_id AND ResearchInterestCulturalArea.cultural_area_id = 1";
|
||||
List villageRecords = MemberPeer.executeQuery( sql.toString() );
|
||||
System.out.println ( villageRecords );
|
||||
List members = MemberPeer.populateObjects( villageRecords );
|
||||
System.out.println ( members );
|
||||
}
|
||||
catch (TorqueException te) {
|
||||
te.printStackTrace( );
|
||||
}
|
||||
}
|
||||
public static void main( String[] srgs )
|
||||
{
|
||||
try {
|
||||
if ( ! Torque.isInit() )
|
||||
{
|
||||
Torque.init( "./roster-torque.properties" );
|
||||
}
|
||||
RosterTest rt = new RosterTest();
|
||||
rt.doStuff();
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
26
src/java/org/thdl/roster/TokenMaker.java
Executable file
|
@ -0,0 +1,26 @@
|
|||
package org.thdl.roster;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
public class TokenMaker
|
||||
{
|
||||
public static String make() throws java.security.NoSuchAlgorithmException
|
||||
{
|
||||
long systime = System.currentTimeMillis();
|
||||
byte[] time = new Long(systime).toString().getBytes();
|
||||
|
||||
MessageDigest md5 = MessageDigest.getInstance("MD5");
|
||||
md5.update(time);
|
||||
return toHex( md5.digest() );
|
||||
//System.err.println("Unable to calculate MD5 Digests.\nCould not create unique token");
|
||||
}
|
||||
public static String toHex(byte[] digest)
|
||||
{
|
||||
StringBuffer buf = new StringBuffer();
|
||||
for (int i = 0; i < digest.length; i++)
|
||||
buf.append( Integer.toHexString( (int)digest[i] & 0x00ff ) ); //param=BITWISE operation
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
75
src/java/org/thdl/roster/Visit.java
Executable file
|
@ -0,0 +1,75 @@
|
|||
package org.thdl.roster;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.thdl.roster.om.*;
|
||||
import org.thdl.users.*;
|
||||
import org.apache.torque.Torque;
|
||||
import org.apache.torque.TorqueException;
|
||||
|
||||
public class Visit implements Serializable
|
||||
{
|
||||
//attributes
|
||||
private ThdlUser thdlUser;
|
||||
private boolean authenticated = false;
|
||||
private RosterMember member;
|
||||
private String test;
|
||||
private String token;
|
||||
//accessors
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
public void setTest(String test) {
|
||||
this.test = test;
|
||||
}
|
||||
public String getTest() {
|
||||
return test;
|
||||
}
|
||||
public void setMember(RosterMember member) {
|
||||
this.member = member;
|
||||
}
|
||||
public RosterMember getMember() {
|
||||
return member;
|
||||
}
|
||||
public void setThdlUser(ThdlUser thdlUser) {
|
||||
this.thdlUser = thdlUser;
|
||||
}
|
||||
|
||||
public ThdlUser getThdlUser() {
|
||||
return thdlUser;
|
||||
}
|
||||
public void setAuthenticated(boolean authenticated) {
|
||||
this.authenticated = authenticated;
|
||||
}
|
||||
public boolean isAuthenticated() {
|
||||
return authenticated;
|
||||
}
|
||||
|
||||
//helpers
|
||||
public String getSnapshot() throws TorqueException
|
||||
{
|
||||
StringBuffer snapshot = new StringBuffer();
|
||||
snapshot.append( getThdlUser() + " name: '" + getThdlUser().getFirstname() +"'");
|
||||
snapshot.append( "<br />" );
|
||||
snapshot.append( getMember() );
|
||||
snapshot.append( "<br />" );
|
||||
snapshot.append( isAuthenticated() );
|
||||
snapshot.append( "<br />" );
|
||||
Person p = (Person) getMember();
|
||||
if (null != p)
|
||||
{
|
||||
snapshot.append( p.getPersonData().getPersonTypeIdList() );
|
||||
snapshot.append( "<br />" );
|
||||
}
|
||||
|
||||
return snapshot.toString();
|
||||
}
|
||||
//constructors
|
||||
public Visit()
|
||||
{
|
||||
setThdlUser( new ThdlUser() );
|
||||
setAuthenticated( false );
|
||||
}
|
||||
}
|
BIN
src/java/org/thdl/roster/components/.DS_Store
vendored
Executable file
4
src/java/org/thdl/roster/components/AbbreviatedInsert.html
Executable file
|
@ -0,0 +1,4 @@
|
|||
<span jwcid="abbreviatedValue"/>
|
||||
<span jwcid="ifAbbreviated">
|
||||
<span jwcid="body"/>
|
||||
</span>
|
50
src/java/org/thdl/roster/components/AbbreviatedInsert.java
Executable file
|
@ -0,0 +1,50 @@
|
|||
package org.thdl.roster.components;
|
||||
|
||||
public class AbbreviatedInsert extends org.apache.tapestry.BaseComponent
|
||||
{
|
||||
//attributes
|
||||
private String value;
|
||||
private Integer characterCount;
|
||||
private boolean abbreviated;
|
||||
//accessors
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setCharacterCount(Integer characterCount) {
|
||||
this.characterCount = characterCount;
|
||||
}
|
||||
|
||||
public Integer getCharacterCount() {
|
||||
return characterCount;
|
||||
}
|
||||
|
||||
public void setAbbreviated(boolean abbreviated) {
|
||||
this.abbreviated = abbreviated;
|
||||
}
|
||||
|
||||
public boolean getAbbreviated() {
|
||||
return abbreviated;
|
||||
}
|
||||
|
||||
public String getAbbreviatedValue()
|
||||
{
|
||||
String value = getValue();
|
||||
int count = getCharacterCount().intValue();
|
||||
if ( null != value && value.length() > count )
|
||||
{
|
||||
value = value.substring( 0, count ) + "....";
|
||||
setAbbreviated( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
setAbbreviated( false );
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
21
src/java/org/thdl/roster/components/AbbreviatedInsert.jwc
Executable file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE component-specification PUBLIC
|
||||
"-//Apache Software Foundation//Tapestry Specification 3.0//EN"
|
||||
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
|
||||
|
||||
<component-specification class="org.thdl.roster.components.AbbreviatedInsert" allow-informal-parameters="no">
|
||||
|
||||
<parameter name="characterCount" direction="in" type="java.lang.Integer" required="yes"/>
|
||||
<parameter name="value" direction="in" type="java.lang.String" required="yes"/>
|
||||
|
||||
<component id="abbreviatedValue" type="InsertText">
|
||||
<binding name="value" expression="abbreviatedValue"/>
|
||||
</component>
|
||||
|
||||
<component id="ifAbbreviated" type="Conditional">
|
||||
<binding name="condition" expression="abbreviated"/>
|
||||
</component>
|
||||
|
||||
<component id="body" type="RenderBody"/>
|
||||
|
||||
</component-specification>
|
17
src/java/org/thdl/roster/components/AddressDisplay.html
Executable file
|
@ -0,0 +1,17 @@
|
|||
<html>
|
||||
<body>
|
||||
<form action="">
|
||||
<span jwcid="$content$">
|
||||
|
||||
<span jwcid="street"/>
|
||||
<span jwcid="city"/>
|
||||
<span jwcid="region"/>
|
||||
<span jwcid="zip"/>
|
||||
|
||||
<span class="label">Country: </span>
|
||||
<span jwcid="@Insert" value="ognl:addressBean.country.country"/>
|
||||
|
||||
</span>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
23
src/java/org/thdl/roster/components/AddressDisplay.java
Executable file
|
@ -0,0 +1,23 @@
|
|||
package org.thdl.roster.components;
|
||||
|
||||
import org.apache.tapestry.BaseComponent;
|
||||
import org.apache.tapestry.IPage;
|
||||
import org.apache.tapestry.IRequestCycle;
|
||||
import org.apache.tapestry.IComponent;
|
||||
import org.thdl.roster.Visit;
|
||||
import org.thdl.roster.om.Address;
|
||||
|
||||
public class AddressDisplay extends BaseComponent
|
||||
{
|
||||
//attributes
|
||||
private Address addressBean;
|
||||
//accessors
|
||||
public void setAddressBean(Address addressBean) {
|
||||
this.addressBean = addressBean;
|
||||
}
|
||||
public Address getAddressBean() throws org.apache.torque.TorqueException
|
||||
{
|
||||
return addressBean;
|
||||
}
|
||||
//synthetic attribute accessors
|
||||
}
|
34
src/java/org/thdl/roster/components/AddressDisplay.jwc
Executable file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE component-specification PUBLIC
|
||||
"-//Apache Software Foundation//Tapestry Specification 3.0//EN"
|
||||
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
|
||||
|
||||
<component-specification class="org.thdl.roster.components.AddressDisplay" allow-informal-parameters="no">
|
||||
|
||||
<parameter name="addressBean" direction="in" type="org.thdl.roster.om.Address" required="yes"/>
|
||||
|
||||
<component id="street" type="ConditionalInsert">
|
||||
<static-binding name="label">Street</static-binding>
|
||||
<binding name="paragraph" expression="@java.lang.Boolean@FALSE"/>
|
||||
<binding name="value" expression="addressBean.address"/>
|
||||
</component>
|
||||
|
||||
<component id="city" type="ConditionalInsert">
|
||||
<static-binding name="label">City</static-binding>
|
||||
<binding name="paragraph" expression="@java.lang.Boolean@FALSE"/>
|
||||
<binding name="value" expression="addressBean.city"/>
|
||||
</component>
|
||||
|
||||
<component id="region" type="ConditionalInsert">
|
||||
<static-binding name="label">Region</static-binding>
|
||||
<binding name="paragraph" expression="@java.lang.Boolean@FALSE"/>
|
||||
<binding name="value" expression="addressBean.region"/>
|
||||
</component>
|
||||
|
||||
<component id="zip" type="ConditionalInsert">
|
||||
<static-binding name="label">Postal Code</static-binding>
|
||||
<binding name="paragraph" expression="@java.lang.Boolean@FALSE"/>
|
||||
<binding name="value" expression="addressBean.zip"/>
|
||||
</component>
|
||||
|
||||
</component-specification>
|
73
src/java/org/thdl/roster/components/Border.html
Executable file
|
@ -0,0 +1,73 @@
|
|||
<!-- <html jwcid="shell" title="THDL Community Roster" stylesheet="roster.css" DTD="-//W3C//DTD XHTML 1.0 Transitional//EN"> -->
|
||||
<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>THDL Community Roster</title>
|
||||
<link rel="stylesheet" type="text/css" href="http://iris.lib.virginia.edu/tibet/style/thdl-styles.css"/>
|
||||
<style type="text/css">
|
||||
@import url( /roster/roster.css );
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body jwcid="body">
|
||||
|
||||
<div id="banner">
|
||||
<a id="logo" href="http://iris.lib.virginia.edu/tibet/index.html"><img id="test" alt="THDL Logo" src="http://iris.lib.virginia.edu/tibet/images/logo.png"/></a>
|
||||
<h1>The Community Roster</h1>
|
||||
|
||||
<div id="menubar">
|
||||
<script type='text/javascript'>function Go() { return }</script>
|
||||
<script type='text/javascript' src='http://iris.lib.virginia.edu/tibet/scripts/new/thdl_menu_config.js'></script>
|
||||
<script type='text/javascript' src='http://iris.lib.virginia.edu/tibet/scripts/new/menu_new.js'></script>
|
||||
<script type='text/javascript' src='http://iris.lib.virginia.edu/tibet/scripts/new/menu9_com.js'></script>
|
||||
<noscript><p>Your browser does not support javascript.</p></noscript>
|
||||
<div id='MenuPos' >Menu Loading... </div>
|
||||
</div><!--END menubar-->
|
||||
</div><!--END banner-->
|
||||
|
||||
<div id="sub_banner">
|
||||
<div id="search">
|
||||
<form method="get" action="http://www.google.com/u/thdl">
|
||||
<p>
|
||||
<input type="text" name="q" id="q" size="15" maxlength="255" value="" />
|
||||
<input type="submit" name="sa" id="sa" value="Search"/>
|
||||
<input type="hidden" name="hq" id="hq" value="inurl:iris.lib.virginia.edu"/>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="breadcrumbs">
|
||||
<a href="http://iris.lib.virginia.edu/tibet/index.html">THDL</a> :
|
||||
<a href="http://iris.lib.virginia.edu/tibet/community/index.html">Community</a> :
|
||||
Roster
|
||||
</div>
|
||||
</div><!--END menubar-->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="columnCenter">
|
||||
<h1><span jwcid="insertPageTitle"/></h1>
|
||||
<span jwcid="ifMessage"><p class="message"><span jwcid="message">Insert Message Here</span></p></span>
|
||||
<span jwcid="ifWarning"><p class="warning"><span jwcid="warning">Insert Warning Here</span></p></span>
|
||||
<span jwcid="renderBody"/>
|
||||
</div>
|
||||
|
||||
<div id="columnRight">
|
||||
<div class="highlightBox">
|
||||
<h2>Options</h2>
|
||||
<p>
|
||||
<span jwcid="topLevelPages">
|
||||
<a jwcid="link"><span jwcid="insertName"/></a><br/>
|
||||
</span>
|
||||
<a jwcid="logoutLink">Logout</a><br />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!--END Main-->
|
||||
|
||||
<!-- <span jwcid="showInspector"/> -->
|
||||
</body>
|
||||
</html>
|
24
src/java/org/thdl/roster/components/Border.java
Executable file
|
@ -0,0 +1,24 @@
|
|||
package org.thdl.roster.components;
|
||||
|
||||
import org.apache.tapestry.BaseComponent;
|
||||
import org.apache.tapestry.IPage;
|
||||
import org.apache.tapestry.IRequestCycle;
|
||||
import org.apache.tapestry.IComponent;
|
||||
import org.thdl.roster.Visit;
|
||||
|
||||
public class Border extends BaseComponent
|
||||
{
|
||||
//attributes
|
||||
private String pageName;
|
||||
//accessors
|
||||
public void setPageName(String value) {
|
||||
pageName = value;
|
||||
}
|
||||
public String getPageName() {
|
||||
return pageName;
|
||||
}
|
||||
//synthetic attribute accessors
|
||||
public boolean getDisablePageLink() {
|
||||
return pageName.equals( getPage().getPageName() );
|
||||
}
|
||||
}
|
74
src/java/org/thdl/roster/components/Border.jwc
Executable file
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE component-specification PUBLIC
|
||||
"-//Apache Software Foundation//Tapestry Specification 3.0//EN"
|
||||
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
|
||||
|
||||
<component-specification class="org.thdl.roster.components.Border" allow-informal-parameters="no">
|
||||
|
||||
<parameter name="title" type="java.lang.String" required="yes"/>
|
||||
<parameter name="pages" type="java.lang.String[]" required="yes"/>
|
||||
|
||||
<context-asset name="stylesheet" path="/roster.css"/>
|
||||
|
||||
<component id="shell" type="Shell">
|
||||
<binding name="title" expression="page.engine.specification.name"/>
|
||||
<binding name="stylesheet" expression="assets.stylesheet"/>
|
||||
</component>
|
||||
|
||||
<component id="body" type="Body"/>
|
||||
|
||||
<component id="insertPageTitle" type="Insert">
|
||||
<inherited-binding name="value" parameter-name="title"/>
|
||||
</component>
|
||||
|
||||
<component id="ifMessage" type="Conditional">
|
||||
<binding name="condition" expression="page.message != null"/>
|
||||
</component>
|
||||
|
||||
<component id="message" type="InsertText">
|
||||
<binding name="value" expression="page.message"/>
|
||||
<!-- <binding name="raw" expression="@java.lang.Boolean@TRUE"/> -->
|
||||
</component>
|
||||
|
||||
<component id="ifWarning" type="Conditional">
|
||||
<binding name="condition" expression="page.warning != null"/>
|
||||
</component>
|
||||
|
||||
<component id="warning" type="InsertText">
|
||||
<binding name="value" expression="page.warning"/>
|
||||
<!-- <binding name="raw" expression="@java.lang.Boolean@TRUE"/> -->
|
||||
</component>
|
||||
|
||||
<component id="topLevelPages" type="Foreach">
|
||||
<inherited-binding name="source" parameter-name="pages"/>
|
||||
<binding name="value" expression="pageName"/>
|
||||
</component>
|
||||
|
||||
<component id="tab" type="Any">
|
||||
<static-binding name="element">li</static-binding>
|
||||
<binding name="class" expression="classAttribute"/>
|
||||
</component>
|
||||
|
||||
<component id="link" type="PageLink">
|
||||
<binding name="page" expression="pageName"/>
|
||||
<binding name="disabled" expression="disablePageLink"/>
|
||||
</component>
|
||||
|
||||
<component id="insertName" type="Insert">
|
||||
<binding name="value" expression="pageName"/>
|
||||
</component>
|
||||
|
||||
<component id="ifLoggedIn" type="Conditional">
|
||||
<binding name="condition" expression="page.loggedIn"/>
|
||||
</component>
|
||||
|
||||
<component id="logoutLink" type="DirectLink">
|
||||
<binding name="listener" expression="page.listeners.logout"/>
|
||||
<binding name="stateful" expression="@java.lang.Boolean@FALSE"/>
|
||||
</component>
|
||||
|
||||
<component id="renderBody" type="RenderBody"/>
|
||||
|
||||
<!-- <component id="showInspector" type="ShowInspector"/> -->
|
||||
|
||||
</component-specification>
|
2
src/java/org/thdl/roster/components/Century.html
Executable file
|
@ -0,0 +1,2 @@
|
|||
<span jwcid="century"/>
|
||||
|
43
src/java/org/thdl/roster/components/Century.java
Executable file
|
@ -0,0 +1,43 @@
|
|||
package org.thdl.roster.components;
|
||||
|
||||
import org.apache.tapestry.*;
|
||||
import java.util.*;
|
||||
|
||||
public class Century extends BaseComponent
|
||||
{
|
||||
//attributes
|
||||
private HashMap centuries;
|
||||
private Integer century;
|
||||
//accessors
|
||||
public void setCentury(Integer century) {
|
||||
this.century = century;
|
||||
}
|
||||
public Integer getCentury() {
|
||||
return century;
|
||||
}
|
||||
private void setCenturies(HashMap centuries) {
|
||||
this.centuries = centuries;
|
||||
}
|
||||
private HashMap getCenturies() {
|
||||
return centuries;
|
||||
}
|
||||
//synthetic attribute accessors
|
||||
public String getCenturyText()
|
||||
{
|
||||
String cent = (String)getCenturies().get( getCentury() );
|
||||
return cent;
|
||||
}
|
||||
//helper
|
||||
//constructors
|
||||
public Century()
|
||||
{
|
||||
HashMap map = new HashMap();
|
||||
String centuries[] = {"twenty-first", "twentieth", "nineteenth", "eighteenth", "seventeenth", "sixteenth", "fifteenth", "fourteenth", "thirteenth", "twelfth", "eleventh", "tenth", "ninth", "eighth", "seventh", "pre-seventh"};
|
||||
int centIntegers[] = {21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 0};
|
||||
for ( int i = 0; i < centuries.length; i++ )
|
||||
{
|
||||
map.put( new Integer( centIntegers[i] ), centuries[i] );
|
||||
}
|
||||
setCenturies( map );
|
||||
}
|
||||
}
|
14
src/java/org/thdl/roster/components/Century.jwc
Executable file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE component-specification PUBLIC
|
||||
"-//Apache Software Foundation//Tapestry Specification 3.0//EN"
|
||||
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
|
||||
|
||||
<component-specification class="org.thdl.roster.components.Century" allow-informal-parameters="no">
|
||||
|
||||
<parameter name="century" direction="in" type="java.lang.Integer" required="yes"/>
|
||||
|
||||
<component id="century" type="Insert">
|
||||
<binding name="value" expression="centuryText"/>
|
||||
</component>
|
||||
|
||||
</component-specification>
|
7
src/java/org/thdl/roster/components/ConditionalInsert.html
Executable file
|
@ -0,0 +1,7 @@
|
|||
<span jwcid="ifDisplayWorthy">
|
||||
<span class="label"><span jwcid="label"/>: </span>
|
||||
<span jwcid="ifParagraph"><br/></span>
|
||||
<span jwcid="value"/>
|
||||
<br/>
|
||||
</span>
|
||||
|
19
src/java/org/thdl/roster/components/ConditionalInsert.java
Executable file
|
@ -0,0 +1,19 @@
|
|||
package org.thdl.roster.components;
|
||||
|
||||
public class ConditionalInsert extends org.apache.tapestry.BaseComponent
|
||||
{
|
||||
//attributes
|
||||
private String value;
|
||||
//accessors
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
public boolean isDisplayWorthy()
|
||||
{
|
||||
return ( getValue() != null && ! java.util.regex.Pattern.matches( "\\s*", getValue() ) );
|
||||
}
|
||||
}
|
||||
|
28
src/java/org/thdl/roster/components/ConditionalInsert.jwc
Executable file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE component-specification PUBLIC
|
||||
"-//Apache Software Foundation//Tapestry Specification 3.0//EN"
|
||||
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
|
||||
|
||||
<component-specification class="org.thdl.roster.components.ConditionalInsert" allow-informal-parameters="no">
|
||||
|
||||
<parameter name="label" type="java.lang.String" required="yes"/>
|
||||
<parameter name="paragraph" type="java.lang.Boolean" required="yes"/>
|
||||
<parameter name="value" direction="in" type="java.lang.String" required="yes"/>
|
||||
|
||||
<component id="ifDisplayWorthy" type="Conditional">
|
||||
<binding name="condition" expression="displayWorthy"/>
|
||||
</component>
|
||||
|
||||
<component id="label" type="Insert">
|
||||
<inherited-binding name="value" parameter-name="label"/>
|
||||
</component>
|
||||
|
||||
<component id="ifParagraph" type="Conditional">
|
||||
<inherited-binding name="condition" parameter-name="paragraph"/>
|
||||
</component>
|
||||
|
||||
<component id="value" type="InsertText">
|
||||
<inherited-binding name="value" parameter-name="value"/>
|
||||
</component>
|
||||
|
||||
</component-specification>
|
11
src/java/org/thdl/roster/components/CountryDisplay.html
Executable file
|
@ -0,0 +1,11 @@
|
|||
<html>
|
||||
<body>
|
||||
<form action="">
|
||||
<span jwcid="$content$">
|
||||
|
||||
Country: <span jwcid="country"/>
|
||||
|
||||
</span>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
19
src/java/org/thdl/roster/components/CountryDisplay.java
Executable file
|
@ -0,0 +1,19 @@
|
|||
package org.thdl.roster.components;
|
||||
|
||||
import org.apache.tapestry.*;
|
||||
import org.thdl.roster.om.Country;
|
||||
|
||||
public class CountryDisplay extends BaseComponent
|
||||
{
|
||||
//attributes
|
||||
private Country countryBean;
|
||||
//accessors
|
||||
public void setCountryBean(Country countryBean) {
|
||||
this.countryBean = countryBean;
|
||||
}
|
||||
public Country getCountryBean() {
|
||||
return countryBean;
|
||||
}
|
||||
//synthetic attribute accessors
|
||||
//helper
|
||||
}
|
14
src/java/org/thdl/roster/components/CountryDisplay.jwc
Executable file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE component-specification PUBLIC
|
||||
"-//Apache Software Foundation//Tapestry Specification 3.0//EN"
|
||||
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
|
||||
|
||||
<component-specification class="org.thdl.roster.components.CountryDisplay" allow-informal-parameters="no">
|
||||
|
||||
<parameter name="countryBean" direction="in" type="org.thdl.roster.om.Country" required="no"/>
|
||||
|
||||
<component id="country" type="Insert">
|
||||
<binding name="value" expression="countryBean.country"/>
|
||||
</component>
|
||||
|
||||
</component-specification>
|
1
src/java/org/thdl/roster/components/CulturalAreaDisplay.html
Executable file
|
@ -0,0 +1 @@
|
|||
<span jwcid="culturalAreas"><span jwcid="@Conditional" condition="ognl:index > 0">, </span><span jwcid="culturalArea"/></span>
|
80
src/java/org/thdl/roster/components/CulturalAreaDisplay.java
Executable file
|
@ -0,0 +1,80 @@
|
|||
package org.thdl.roster.components;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import org.apache.tapestry.html.BasePage;
|
||||
import org.apache.tapestry.*;
|
||||
import org.apache.torque.util.Criteria;
|
||||
import org.apache.torque.*;
|
||||
|
||||
import org.thdl.roster.om.*;
|
||||
import org.thdl.roster.*;
|
||||
|
||||
public class CulturalAreaDisplay extends BaseComponent
|
||||
{
|
||||
//attributes
|
||||
private ResearchInterest researchInterest;
|
||||
private String CulturalArea;
|
||||
private int index;
|
||||
//accessors
|
||||
public void setResearchInterest(ResearchInterest researchInterest) {
|
||||
this.researchInterest = researchInterest;
|
||||
}
|
||||
public ResearchInterest getResearchInterest() {
|
||||
return researchInterest;
|
||||
}
|
||||
public void setCulturalArea(String CulturalArea) {
|
||||
this.CulturalArea = CulturalArea;
|
||||
}
|
||||
public String getCulturalArea() {
|
||||
return CulturalArea;
|
||||
}
|
||||
public void setIndex(int index) {
|
||||
this.index = index;
|
||||
}
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
//synthetic properties
|
||||
public List getCulturalAreaList()
|
||||
{
|
||||
LinkedList culturalAreaStrings = new LinkedList();
|
||||
try
|
||||
{
|
||||
Criteria crit = new Criteria();
|
||||
crit.add( ResearchInterestCulturalAreaPeer.RESEARCH_INTEREST_ID, getResearchInterest().getId() );
|
||||
crit.addAscendingOrderByColumn( ResearchInterestCulturalAreaPeer.RELEVANCE );
|
||||
List ridList = ResearchInterestCulturalAreaPeer.doSelect( crit );
|
||||
ListIterator looper = ridList.listIterator();
|
||||
while( looper.hasNext() )
|
||||
{
|
||||
ResearchInterestCulturalArea rid = (ResearchInterestCulturalArea) looper.next();
|
||||
String culturalArea = rid.getCulturalArea().getCulturalArea();
|
||||
culturalAreaStrings.add( culturalArea );
|
||||
}
|
||||
}
|
||||
catch ( TorqueException te )
|
||||
{
|
||||
throw new ApplicationRuntimeException( te );
|
||||
}
|
||||
return culturalAreaStrings;
|
||||
}
|
||||
//constructors
|
||||
public CulturalAreaDisplay()
|
||||
{
|
||||
super();
|
||||
try
|
||||
{
|
||||
if ( ! Torque.isInit() )
|
||||
{
|
||||
Global global = (Global) getPage().getGlobal();
|
||||
Torque.init( global.getTorqueConfig() );
|
||||
}
|
||||
}
|
||||
catch ( TorqueException te )
|
||||
{
|
||||
throw new ApplicationRuntimeException( te );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
20
src/java/org/thdl/roster/components/CulturalAreaDisplay.jwc
Executable file
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE component-specification PUBLIC
|
||||
"-//Apache Software Foundation//Tapestry Specification 3.0//EN"
|
||||
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
|
||||
|
||||
<component-specification class="org.thdl.roster.components.CulturalAreaDisplay">
|
||||
|
||||
<parameter name="researchInterestBean" property-name="researchInterest" direction="in" type="org.thdl.roster.om.ResearchInterest" required="yes"/>
|
||||
|
||||
<component id="culturalAreas" type="Foreach">
|
||||
<binding name="source" expression="culturalAreaList"/>
|
||||
<binding name="value" expression="culturalArea"/>
|
||||
<binding name="index" expression="index"/>
|
||||
</component>
|
||||
|
||||
<component id="culturalArea" type="Insert">
|
||||
<binding name="value" expression="culturalArea"/>
|
||||
</component>
|
||||
|
||||
</component-specification>
|
2
src/java/org/thdl/roster/components/DateFormatter.html
Executable file
|
@ -0,0 +1,2 @@
|
|||
<span jwcid="date"/>
|
||||
|
26
src/java/org/thdl/roster/components/DateFormatter.java
Executable file
|
@ -0,0 +1,26 @@
|
|||
package org.thdl.roster.components;
|
||||
|
||||
import org.apache.tapestry.*;
|
||||
import java.text.*;
|
||||
import java.util.*;
|
||||
|
||||
public class DateFormatter extends BaseComponent
|
||||
{
|
||||
//attributes
|
||||
private Date date;
|
||||
//accessors
|
||||
public void setDate(Date date) {
|
||||
this.date = date;
|
||||
}
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
//helpers
|
||||
public String getFormattedDate()
|
||||
{
|
||||
String date = null;
|
||||
if (null != getDate() )
|
||||
date = DateFormat.getDateInstance().format( getDate() );
|
||||
return date;
|
||||
}
|
||||
}
|
14
src/java/org/thdl/roster/components/DateFormatter.jwc
Executable file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE component-specification PUBLIC
|
||||
"-//Apache Software Foundation//Tapestry Specification 3.0//EN"
|
||||
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
|
||||
|
||||
<component-specification class="org.thdl.roster.components.DateFormatter" allow-informal-parameters="no">
|
||||
|
||||
<parameter name="date" direction="in" type="java.util.Date" required="no"/>
|
||||
|
||||
<component id="date" type="Insert">
|
||||
<binding name="value" expression="formattedDate"/>
|
||||
</component>
|
||||
|
||||
</component-specification>
|
1
src/java/org/thdl/roster/components/DisciplineDisplay.html
Executable file
|
@ -0,0 +1 @@
|
|||
<span jwcid="disciplines"><span jwcid="@Conditional" condition="ognl:index > 0">, </span><span jwcid="discipline"/></span>
|
80
src/java/org/thdl/roster/components/DisciplineDisplay.java
Executable file
|
@ -0,0 +1,80 @@
|
|||
package org.thdl.roster.components;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import org.apache.tapestry.html.BasePage;
|
||||
import org.apache.tapestry.*;
|
||||
import org.apache.torque.util.Criteria;
|
||||
import org.apache.torque.*;
|
||||
|
||||
import org.thdl.roster.om.*;
|
||||
import org.thdl.roster.*;
|
||||
|
||||
public class DisciplineDisplay extends BaseComponent
|
||||
{
|
||||
//attributes
|
||||
private ResearchInterest researchInterest;
|
||||
private String Discipline;
|
||||
private int index;
|
||||
//accessors
|
||||
public void setResearchInterest(ResearchInterest researchInterest) {
|
||||
this.researchInterest = researchInterest;
|
||||
}
|
||||
public ResearchInterest getResearchInterest() {
|
||||
return researchInterest;
|
||||
}
|
||||
public void setDiscipline(String Discipline) {
|
||||
this.Discipline = Discipline;
|
||||
}
|
||||
public String getDiscipline() {
|
||||
return Discipline;
|
||||
}
|
||||
public void setIndex(int index) {
|
||||
this.index = index;
|
||||
}
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
//synthetic properties
|
||||
public List getDisciplineList()
|
||||
{
|
||||
LinkedList disciplineStrings = new LinkedList();
|
||||
try
|
||||
{
|
||||
Criteria crit = new Criteria();
|
||||
crit.add( ResearchInterestDisciplinePeer.RESEARCH_INTEREST_ID, getResearchInterest().getId() );
|
||||
crit.addAscendingOrderByColumn( ResearchInterestDisciplinePeer.RELEVANCE );
|
||||
List ridList = ResearchInterestDisciplinePeer.doSelect( crit );
|
||||
ListIterator looper = ridList.listIterator();
|
||||
while( looper.hasNext() )
|
||||
{
|
||||
ResearchInterestDiscipline rid = (ResearchInterestDiscipline) looper.next();
|
||||
String discipline = rid.getDiscipline().getDiscipline();
|
||||
disciplineStrings.add( discipline );
|
||||
}
|
||||
}
|
||||
catch ( TorqueException te )
|
||||
{
|
||||
throw new ApplicationRuntimeException( te );
|
||||
}
|
||||
return disciplineStrings;
|
||||
}
|
||||
//constructors
|
||||
public DisciplineDisplay()
|
||||
{
|
||||
super();
|
||||
try
|
||||
{
|
||||
if ( ! Torque.isInit() )
|
||||
{
|
||||
Global global = (Global) getPage().getGlobal();
|
||||
Torque.init( global.getTorqueConfig() );
|
||||
}
|
||||
}
|
||||
catch ( TorqueException te )
|
||||
{
|
||||
throw new ApplicationRuntimeException( te );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
24
src/java/org/thdl/roster/components/DisciplineDisplay.jwc
Executable file
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE component-specification PUBLIC
|
||||
"-//Apache Software Foundation//Tapestry Specification 3.0//EN"
|
||||
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
|
||||
|
||||
<component-specification class="org.thdl.roster.components.DisciplineDisplay">
|
||||
|
||||
<parameter name="researchInterestBean" property-name="researchInterest" direction="in" type="org.thdl.roster.om.ResearchInterest" required="yes"/>
|
||||
|
||||
<component id="disciplines" type="Foreach">
|
||||
<binding name="source" expression="disciplineList"/>
|
||||
<binding name="value" expression="discipline"/>
|
||||
<binding name="index" expression="index"/>
|
||||
</component>
|
||||
|
||||
<!-- <component id="comma" type="Conditional">
|
||||
<binding name="condition" expression="disciplineLoop.index > 0"/>
|
||||
</component> -->
|
||||
|
||||
<component id="discipline" type="Insert">
|
||||
<binding name="value" expression="discipline"/>
|
||||
</component>
|
||||
|
||||
</component-specification>
|
12
src/java/org/thdl/roster/components/DocumentDisplay.html
Executable file
|
@ -0,0 +1,12 @@
|
|||
<!-- <script type="text/javascript">
|
||||
function clickAlert() {
|
||||
alert('To Download: right-click (mac command-click) and use \'Save Target/Link as\'.');
|
||||
return false;
|
||||
}
|
||||
</script> -->
|
||||
|
||||
<ul>
|
||||
<span jwcid="documents">
|
||||
<span jwcid="documentLink"><span jwcid="@Insert" value="ognl:document.filename"/></span>
|
||||
</span>
|
||||
</ul>
|