Index: lams_central/.classpath =================================================================== diff -u -r4e9c106365f259cdfb68454e7be1c832bf5d47a0 -r9bef1de27d0d527d75191115a535bc2c4311ade9 --- lams_central/.classpath (.../.classpath) (revision 4e9c106365f259cdfb68454e7be1c832bf5d47a0) +++ lams_central/.classpath (.../.classpath) (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -1,8 +1,8 @@ - + - + Index: lams_central/conf/jar/META-INF/MANIFEST.MF =================================================================== diff -u --- lams_central/conf/jar/META-INF/MANIFEST.MF (revision 0) +++ lams_central/conf/jar/META-INF/MANIFEST.MF (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,3 @@ +Implementation-Title: LAMS - Central +Implementation-Version: 1.1 +Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org) Index: lams_central/conf/war/META-INF/MANIFEST.MF =================================================================== diff -u --- lams_central/conf/war/META-INF/MANIFEST.MF (revision 0) +++ lams_central/conf/war/META-INF/MANIFEST.MF (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,2 @@ +Class-Path: ./lams.jar + Index: lams_central/conf/xdoclet/servlet-mappings.xml =================================================================== diff -u --- lams_central/conf/xdoclet/servlet-mappings.xml (revision 0) +++ lams_central/conf/xdoclet/servlet-mappings.xml (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,30 @@ + + + + action + *.do + + + + Connector + /editor/filemanager/browser/default/connectors/jsp/connector + \ No newline at end of file Index: lams_central/conf/xdoclet/servlets.xml =================================================================== diff -u --- lams_central/conf/xdoclet/servlets.xml (revision 0) +++ lams_central/conf/xdoclet/servlets.xml (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,62 @@ + + + + context + org.springframework.web.context.ContextLoaderServlet + 1 + + + + action + org.apache.struts.action.ActionServlet + + config + /WEB-INF/struts/struts-config.xml + + + debug + 999 + + + detail + 2 + + + validate + true + + 1 + + + + Connector + com.fredck.FCKeditor.connector.ConnectorServlet + + baseDir + /UserFiles/ + + + debug + false + + 1 + \ No newline at end of file Index: lams_central/conf/xdoclet/taglibs.xml =================================================================== diff -u --- lams_central/conf/xdoclet/taglibs.xml (revision 0) +++ lams_central/conf/xdoclet/taglibs.xml (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,77 @@ + + + + + + tags-bean + /WEB-INF/struts/tlds/struts-bean.tld + + + + tags-html + /WEB-INF/struts/tlds/struts-html.tld + + + + tags-logic + /WEB-INF/struts/tlds/struts-logic.tld + + + + tags-tiles + /WEB-INF/struts/tlds/struts-tiles.tld + + + + tags-bean-el + /WEB-INF/struts/tlds/struts-bean-el.tld + + + + tags-html-el + /WEB-INF/struts/tlds/struts-html-el.tld + + + + tags-logic-el + /WEB-INF/struts/tlds/struts-logic-el.tld + + + + tags-tiles-el + /WEB-INF/struts/tlds/struts-tiles-el.tld + + + + tags-c + /WEB-INF/struts/tlds/c.tld + + + + + + http://java.sun.com/jstl/fmt + /WEB-INF/JSTL/tlds/fmt.tld + + + + http://java.sun.com/jstl/fmt-rt + /WEB-INF/JSTL/tlds/fmt-rt.tld + + + + http://java.sun.com/jstl/core + /WEB-INF/JSTL/tlds/c.tld + + + + http://java.sun.com/jstl/core-rt + /WEB-INF/JSTL/tlds/c-rt.tld + + + + + + fck-editor + /WEB-INF/fckeditor/tlds/FCKeditor.tld + Index: lams_central/conf/xdoclet/web-settings.xml =================================================================== diff -u --- lams_central/conf/xdoclet/web-settings.xml (revision 0) +++ lams_central/conf/xdoclet/web-settings.xml (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,35 @@ + + + contextConfigLocation + + classpath:/org/lamsfoundation/lams/applicationContext.xml + classpath:/org/lamsfoundation/lams/authoring/authoringApplicationContext.xml + classpath:/org/lamsfoundation/lams/contentrepository/applicationContext.xml + classpath:/org/lamsfoundation/lams/authoring/authoringApplicationContext.xml + classpath:/org/lamsfoundation/lams/workspace/workspaceApplicationContext.xml + + + + + org.springframework.web.context.ContextLoaderListener + + \ No newline at end of file Index: lams_central/src/flash/common.swf =================================================================== diff -u Binary files differ Index: lams_central/src/flash/lams_authoring.fla =================================================================== diff -u Binary files differ Index: lams_central/src/flash/main.as =================================================================== diff -u --- lams_central/src/flash/main.as (revision 0) +++ lams_central/src/flash/main.as (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,15 @@ +import org.lamsfoundation.lams.authoring.Application + +//Set stage alignment to top left and prent scaling +Stage.align = "TL"; +Stage.scaleMode = "noScale"; + + +//Start the application, passing in the top level clip, i.e. _root +var app:Application = Application.getInstance(); +app.main(this); + +//Make app listener for stage resize events +Stage.addListener(app); + + Index: lams_central/src/flash/org/lamsfoundation/lams/authoring/Activity.as =================================================================== diff -u --- lams_central/src/flash/org/lamsfoundation/lams/authoring/Activity.as (revision 0) +++ lams_central/src/flash/org/lamsfoundation/lams/authoring/Activity.as (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,461 @@ +import org.lamsfoundation.lams.authoring.*; +/* +* +* @author DC +* @version 0.1 +* @comments Activity Data storage class. USed as a base class for extending to be Tool, Gate and Complex +*/ +class org.lamsfoundation.lams.authoring.Activity { + + + /** + * static final variables indicating the the category of activities + ******************************************************************* + public static final int CATEGORY_SYSTEM = 1; + public static final int CATEGORY_COLLABORATION = 2; + public static final int CATEGORY_ASSESSMENT = 3; + public static final int CATEGORY_CONTENT = 4; + public static final int CATEGORY_SPLIT = 5; + /******************************************************************/ + + /** + * static final variables indicating the grouping_support of activities + ******************************************************************* + public static final int GROUPING_SUPPORT_NONE = 1; + public static final int GROUPING_SUPPORT_OPTIONAL = 2; + public static final int GROUPING_SUPPORT_REQUIRED = 3; + /******************************************************************/ + /* + //--------------------------------------------------------------------- + // Class Level Constants + //--------------------------------------------------------------------- + /** + * static final variables indicating the type of activities + * available for a LearningDesign + * */ + /******************************************************************/ + public static var TOOL_ACTIVITY_TYPE:Number = 1; + public static var GROUPING_ACTIVITY_TYPE:Number = 2; + public static var SYNCH_GATE_ACTIVITY_TYPE:Number = 3; + public static var SCHEDULE_GATE_ACTIVITY_TYPE:Number = 4; + public static var PERMISSION_GATE_ACTIVITY_TYPE:Number = 5; + public static var PARALLEL_ACTIVITY_TYPE:Number = 6; + public static var OPTIONS_ACTIVITY_TYPE:Number = 7; + public static var SEQUENCE_ACTIVITY_TYPE:Number = 8; + /******************************************************************/ + + /** + * static final variables indicating the the category of activities + *******************************************************************/ + public static var CATEGORY_SYSTEM:Number = 1; + public static var CATEGORY_COLLABORATION:Number = 2; + public static var CATEGORY_ASSESSMENT:Number = 3; + public static var CATEGORY_CONTENT:Number = 4; + public static var CATEGORY_SPLIT:Number = 5; + /******************************************************************/ + + //Activity Properties: + // * indicates required field for constructor + //--------------------------------------------------------------------- + // Instance variables + //--------------------------------------------------------------------- + + private var _objectType:String; + private var _activityTypeID:Number; + + + private var _activityID:Number; + private var _activityCategoryID:Number; + + private var _activityUIID:Number; + + private var _learningLibraryID:Number; + private var _learningDesignID:Number; + private var _libraryActivityID:Number; + + private var _parentActivityID:Number; + + + private var _parentUIID:Number; + + + private var _orderID:Number; + + private var _groupingID:Number; + private var _groupingUIID:Number; + + + private var _title:String; + private var _description:String; + private var _helpText:String; //* + private var _xCoord:Number; + private var _yCoord:Number; + private var _libraryActivityUIImage:String; //* + private var _applyGrouping:Boolean; + + + private var _runOffline:Boolean; + private var _offlineInstructions:String; + private var _defineLater:Boolean; + private var _createDateTime:Date; + + private var _groupingSupportType:Number; + + + + //Constructor + /** + * Creates an activity with the minimum of fields. + * + * @param learningActivityTypeId + * @param learningLibraryId + * @param toolId + * @param toolContentId + * @param helpText + * @param libraryActivityUIImage + */ + function Activity(activityUIID:Number, activityTypeID:Number, activityCategoryID:Number, learningLibraryID:Number,libraryActivityUIImage:String){ + //assign the values: + _objectType = "Activity"; //should be "Activity" + _activityUIID = activityUIID; + _activityTypeID = activityTypeID; + _activityCategoryID = activityCategoryID; + _learningLibraryID = learningLibraryID; + _libraryActivityUIImage = libraryActivityUIImage; + + + + } + + //helper methods + + /** + * Validates the activity is ok to be used. basically that al required fields have a value; + */ + public function validate(activity:Activity):Boolean{ + var isValid:Boolean; + + + return isValid; + + } + + public function isGateActivity():Boolean{ + if (_activityTypeID == SYNCH_GATE_ACTIVITY_TYPE){ + return true; + }else if(_activityTypeID == SCHEDULE_GATE_ACTIVITY_TYPE){ + return true + }else if (_activityTypeID == PERMISSION_GATE_ACTIVITY_TYPE){ + return true; + }else{ + return false; + } + } + + + //getters and setters: + public function set objectType(a:String):Void{ + _objectType = a; + } + public function get objectType():String{ + return _objectType; + } + + /** + * + * @usage + * @param newactivityTypeID + * @return + */ + public function set activityTypeID (newactivityTypeID:Number):Void { + _activityTypeID = newactivityTypeID; + } + /** + * + * @usage + * @return + */ + public function get activityTypeID ():Number { + return _activityTypeID; + } + + public function set activityID(a:Number):Void{ + _activityID = a; + } + public function get activityID():Number{ + return _activityID; + } + +/** + * + * @usage + * @param newactivityCategoryID + * @return + */ + public function set activityCategoryID (newactivityCategoryID:Number):Void { + _activityCategoryID = newactivityCategoryID; + } + /** + * + * @usage + * @return + */ + public function get activityCategoryID ():Number { + return _activityCategoryID; + } + + /** + * + * @usage + * @param newactivityUIID + * @return + */ + public function set activityUIID (newactivityUIID:Number):Void { + _activityUIID = newactivityUIID; + } + /** + * + * @usage + * @return + */ + public function get activityUIID ():Number { + return _activityUIID; + } + + public function set learningLibraryID(a:Number):Void{ + _learningLibraryID = a; + } + public function get learningLibraryID():Number{ + return _learningLibraryID; + } + + public function set learningDesignID(a:Number):Void{ + _learningDesignID = a; + } + public function get learningDesignID():Number{ + return _learningDesignID; + } + + /** + * + * @usage + * @param newlibraryActivityID + * @return + */ + public function set libraryActivityID (newlibraryActivityID:Number):Void { + _libraryActivityID = newlibraryActivityID; + } + /** + * + * @usage + * @return + */ + public function get libraryActivityID ():Number { + return _libraryActivityID; + } + +/** + * + * @usage + * @param newparentActivityID + * @return + */ + public function set parentActivityID (newparentActivityID:Number):Void { + _parentActivityID = newparentActivityID; + } + /** + * + * @usage + * @return + */ + public function get parentActivityID ():Number { + return _parentActivityID; + } + +/** + * + * @usage + * @param newparentUIID + * @return + */ + public function set parentUIID (newparentUIID:Number):Void { + _parentUIID = newparentUIID; + } + /** + * + * @usage + * @return + */ + public function get parentUIID ():Number { + return _parentUIID; + } + + /** + * + * @usage + * @param neworderID + * @return + */ + public function set orderID (neworderID:Number):Void { + _orderID = neworderID; + } + /** + * + * @usage + * @return + */ + public function get orderID ():Number { + return _orderID; + } + + + public function set title(a:String):Void{ + _title = a; + } + public function get title():String{ + return _title; + } + + public function set description(a:String):Void{ + _description = a; + } + public function get description():String{ + return _description; + } + + public function set helpText(a:String):Void{ + _helpText = a; + } + public function get helpText():String{ + return _helpText; + } + + public function set xCoord(a:Number):Void{ + _xCoord = a; + } + public function get xCoord():Number{ + return _xCoord; + } + + public function set yCoord(a:Number):Void{ + _yCoord = a; + } + public function get yCoord():Number{ + return _yCoord; + } + + public function set libraryActivityUIImage(a:String):Void{ + _libraryActivityUIImage = a; + } + public function get libraryActivityUIImage():String{ + return _libraryActivityUIImage; + } + + public function set runOffline(a:Boolean):Void{ + _runOffline = a; + } + public function get runOffline():Boolean{ + return _runOffline; + } + + public function set offlineInstructions(a:String):Void{ + _offlineInstructions = a; + } + public function get offlineInstructions():String{ + return _offlineInstructions; + } + + public function set defineLater(a:Boolean):Void{ + _defineLater = a; + } + public function get defineLater():Boolean{ + return _defineLater; + } + + public function set createDateTime(a:Date):Void{ + _createDateTime = a; + } + public function get createDateTime():Date{ + return _createDateTime; + } + + /** + * + * @usage + * @param newgroupingID + * @return + */ + public function set groupingID (newgroupingID:Number):Void { + _groupingID = newgroupingID; + } + /** + * + * @usage + * @return + */ + public function get groupingID ():Number { + return _groupingID; + } + + + /** + * + * @usage + * @param newgroupingUIID + * @return + */ + public function set groupingUIID (newgroupingUIID:Number):Void { + _groupingUIID = newgroupingUIID; + } + /** + * + * @usage + * @return + */ + public function get groupingUIID ():Number { + return _groupingUIID; + } + + /** + * + * @usage + * @param newapplyGrouping + * @return + */ + public function set applyGrouping (newapplyGrouping:Boolean):Void { + _applyGrouping = newapplyGrouping; + } + /** + * + * @usage + * @return + */ + public function get applyGrouping ():Boolean { + return _applyGrouping; + } + + /** + * + * @usage + * @param newgroupingSupportType + * @return + */ + public function set groupingSupportType (newgroupingSupportType:Number):Void { + _groupingSupportType = newgroupingSupportType; + } + /** + * + * @usage + * @return + */ + public function get groupingSupportType ():Number { + return _groupingSupportType; + } + + + + + + + +} \ No newline at end of file Index: lams_central/src/flash/org/lamsfoundation/lams/authoring/Application.as =================================================================== diff -u --- lams_central/src/flash/org/lamsfoundation/lams/authoring/Application.as (revision 0) +++ lams_central/src/flash/org/lamsfoundation/lams/authoring/Application.as (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,471 @@ +import org.lamsfoundation.lams.authoring.* //Design Data model n stuffimport org.lamsfoundation.lams.authoring.* //Design Data model n stuff +import org.lamsfoundation.lams.authoring.tk.* //Toolkit +import org.lamsfoundation.lams.authoring.tb.* //Toolbar +import org.lamsfoundation.lams.authoring.cv.* //Canvas +import org.lamsfoundation.lams.common.ws.* //Workspace +import org.lamsfoundation.lams.common.comms.* //communications +import org.lamsfoundation.lams.common.util.* //Utils +import org.lamsfoundation.lams.common.dict.* //Dictionary +import org.lamsfoundation.lams.common.ui.* //User interface +import org.lamsfoundation.lams.common.style.* //Themes/Styles +import org.lamsfoundation.lams.common.* +import mx.managers.* +import mx.utils.* + + +/** +* Application - LAMS Application +* @author DI +*/ +class org.lamsfoundation.lams.authoring.Application { + + //public constants + public static var C_HOURGLASS = "c_hourglass"; + public static var C_TRANSITION = "c_pen"; + public static var C_OPTIONAL = "c_optionalBoxPen"; + public static var C_DEFAULT = "default"; + + private static var TOOLBAR_X:Number = 10; + private static var TOOLBAR_Y:Number = 17; + + private static var TOOLKIT_X:Number = 0; + private static var TOOLKIT_Y:Number = 74; + + private static var CANVAS_X:Number = 180; + private static var CANVAS_Y:Number = 74; + private static var CANVAS_W:Number = 1000; + private static var CANVAS_H:Number = 200; + + private static var WORKSPACE_X:Number = 200; + private static var WORKSPACE_Y:Number = 200; + private static var WORKSPACE_W:Number = 300; + private static var WORKSPACE_H:Number = 200; + + private static var APP_ROOT_DEPTH:Number = 10; //depth of the application root + private static var DIALOGUE_DEPTH:Number = 20; //depth of the cursors + private static var TOOLTIP_DEPTH:Number = 30; //depth of the cursors + private static var CURSOR_DEPTH:Number = 40; //depth of the cursors + private static var MENU_DEPTH:Number = 25; //depth of the menu + + private static var UI_LOAD_CHECK_INTERVAL:Number = 50; + + private static var QUESTION_MARK_KEY:Number = 191; + + private var _ddm:DesignDataModel; + private var _toolbar:Toolbar; + private var _toolkit:Toolkit; + private var _canvas:Canvas; + private var _workspace:Workspace; + private var _comms:Communication; + private var _themeManager:ThemeManager; + private var _dictionary:Dictionary; + private var _config:Config; + private var _debugDialog:MovieClip; //Reference to the debug dialog + + + private var _appRoot_mc:MovieClip; //Application root clip + private var _dialogueContainer_mc:MovieClip; //Dialog container + private var _tooltipContainer_mc:MovieClip; //Tooltip container + private var _cursorContainer_mc:MovieClip; //Cursor container + private var _menu_mc:MovieClip; //Menu bar clip + private var _container_mc:MovieClip; //Main container + + //Data flags + private var _dictionaryLoaded:Boolean; //Dictionary loaded flag + private var _dictionaryEventDispatched:Boolean //Event status flag + private var _themeLoaded:Boolean; //Theme loaded flag + private var _themeEventDispatched:Boolean //Dictionary loaded flag + private var _UILoadCheckIntervalID:Number; //Interval ID for periodic check on UILoad status + private var _UILoaded:Boolean; //UI Loading status + + //UI Elements + private var _toolbarLoaded:Boolean; //These are flags set to true when respective element is 'loaded' + private var _canvasLoaded:Boolean; + private var _toolkitLoaded:Boolean; + private var _menuLoaded:Boolean; + + //Application instance is stored as a static in the application class + private static var _instance:Application = null; + + /** + * Application - Constructor + */ + private function Application(){ + _themeLoaded = false; + _themeEventDispatched = false; + _dictionaryLoaded = false; + _dictionaryEventDispatched = false; + _toolkitLoaded = false; + _canvasLoaded = false; + _menuLoaded = false; + _toolbarLoaded = false; + } + + /** + * Retrieves an instance of the Application singleton + */ + public static function getInstance():Application{ + if(Application._instance == null){ + Application._instance = new Application(); + } + return Application._instance; + } + + /** + * Main entry point to the application + */ + public function main(container_mc:MovieClip){ + _container_mc = container_mc; + _UILoaded = false; + + //Comms object - do this before any objects are created that require it for server communication + _comms = new Communication(); + + //Get the instance of config class + _config = Config.getInstance(); + + //Assign the config load event to + _config.addEventListener('load',Delegate.create(this,configLoaded)); + + //Set up Key handler + //TODO take out after testing and uncomment same key handler in ready(); + Key.addListener(this); + } + + /** + * Called when the config class has loaded + */ + private function configLoaded(){ + //Now that the config class is ready setup the UI and data, call to setupData() first in + //case UI element constructors use objects instantiated with setupData() + setupData(); + setupUI(); + //Start off polling check for UI load status + checkUILoaded(); + } + + /** + * Loads and sets up event listeners for Theme, Dictionary etc. + */ + private function setupData() { + //Get the language, create+load dictionary and setup load handler. + var language:String = String(_config.getItem('language')); + _dictionary = Dictionary.getInstance(); + _dictionary.addEventListener('load',Delegate.create(this,onDictionaryLoad)); + _dictionary.load(language); + + //Design Data Model. + _ddm = new DesignDataModel(); + + //Set reference to StyleManager and load Themes and setup load handler. + var theme:String = String(_config.getItem('theme')); + _themeManager = ThemeManager.getInstance(); + _themeManager.addEventListener('load',Delegate.create(this,onThemeLoad)); + _themeManager.loadTheme(theme); + } + + /** + * Called when Dictionary loaded + * @param evt:Object the event object + */ + private function onDictionaryLoad(evt:Object){ + if(evt.type=='load'){ + _dictionaryLoaded = true; + Debugger.log('Dictionary loaded :',Debugger.CRITICAL,'onDictionaryLoad','Application'); + } else { + Debugger.log('event type not recognised :'+evt.type,Debugger.CRITICAL,'onDictionaryLoad','Application'); + } + } + + /** + * Called when the current selected theme has been loaded + * @param evt:Object the event object + */ + private function onThemeLoad(evt:Object) { + if(evt.type=='load'){ + _themeLoaded = true; + Debugger.log('!Theme loaded :',Debugger.CRITICAL,'onThemeLoad','Application'); + } else { + Debugger.log('event type not recognised :'+evt.type,Debugger.CRITICAL,'onThemeLoad','Application'); + } + } + + /** + * Runs periodically and dispatches events as they are ready + */ + private function checkUILoaded() { + //If it's the first time through then set up the interval to keep polling this method + if(!_UILoadCheckIntervalID) { + _UILoadCheckIntervalID = setInterval(Proxy.create(this,checkUILoaded),UI_LOAD_CHECK_INTERVAL); + } else { + //If all events dispatched clear interval and call start() + if(_dictionaryEventDispatched && _themeEventDispatched){ + Debugger.log('Clearing Interval and calling start :',Debugger.CRITICAL,'checkUILoaded','Application'); + clearInterval(_UILoadCheckIntervalID); + start(); + }else { + //If UI loaded check which events can be broadcast + if(_UILoaded){ + Debugger.log('ALL UI LOADED',Debugger.GEN,'checkUILoaded','Application'); + + //If dictionary is loaded and event hasn't been dispatched - dispatch it + if(_dictionaryLoaded && !_dictionaryEventDispatched){ + _dictionaryEventDispatched = true; + _dictionary.broadcastInit(); + } + //If theme is loaded and theme event hasn't been dispatched - dispatch it + if(_themeLoaded && !_themeEventDispatched){ + _themeEventDispatched = true; + _themeManager.broadcastThemeChanged(); + } + } + } + } + } + + /** + * This is called by each UI element as it loads to notify Application that it's loaded + * When all UIElements are loaded the Application can set UILoaded flag true allowing events to be dispatched + * and methods called on the UI Elements + * + * @param UIElementID:String - Identifier for the Element that was loaded + */ + public function UIElementLoaded(evt:Object) { + Debugger.log('UIElementLoaded: ' + evt.target.className,Debugger.GEN,'UIElementLoaded','Application'); + if(evt.type=='load'){ + //Which item has loaded + switch (evt.target.className) { + case 'Toolkit' : + _toolkitLoaded = true; + break; + case 'Canvas' : + _canvasLoaded = true; + break; + case 'LFMenuBar' : + _menuLoaded = true; + break; + case 'Toolbar' : + _toolbarLoaded = true; + break; + default: + } + + //If all of them are loaded set UILoad accordingly + if(_toolkitLoaded && _canvasLoaded && _menuLoaded && _toolbarLoaded){ + _UILoaded=true; + } + + } + } + + /** + * Create all UI Elements + */ + private function setupUI(){ + //Make the base context menu hide built in items so we don't have zoom in etc + var root_cm:ContextMenu = new ContextMenu(); + root_cm.hideBuiltInItems(); + _root.menu = root_cm; + + //Create the application root + _appRoot_mc = _container_mc.createEmptyMovieClip('appRoot_mc',APP_ROOT_DEPTH); + //Create screen elements + _dialogueContainer_mc = _container_mc.createEmptyMovieClip('_dialogueContainer_mc',DIALOGUE_DEPTH); + _tooltipContainer_mc = _container_mc.createEmptyMovieClip('_tooltipContainer_mc',TOOLTIP_DEPTH); + _cursorContainer_mc = _container_mc.createEmptyMovieClip('_cursorContainer_mc',CURSOR_DEPTH); + + //add the cursors: + Cursor.addCursor(C_HOURGLASS); + Cursor.addCursor(C_OPTIONAL); + Cursor.addCursor(C_TRANSITION); + + //MENU + _menu_mc = _container_mc.attachMovie('LFMenuBar','_menu_mc',MENU_DEPTH, {_x:0,_y:0}); + _menu_mc.addEventListener('load',Proxy.create(this,UIElementLoaded)); + + //TOOLBAR + var depth:Number = _appRoot_mc.getNextHighestDepth(); + _toolbar = new Toolbar(_appRoot_mc,TOOLBAR_X,TOOLBAR_Y); + _toolbar.addEventListener('load',Proxy.create(this,UIElementLoaded)); + + //CANVAS + _canvas = new Canvas(_appRoot_mc,depth++,CANVAS_X,CANVAS_Y,CANVAS_W,CANVAS_H); + _canvas.addEventListener('load',Proxy.create(this,UIElementLoaded)); + + //WORKSPACE + _workspace = new Workspace(); + //_workspace.addEventListener('load',Proxy.create(this,UIElementLoaded)); + + //TOOLKIT + _toolkit = new Toolkit(_appRoot_mc,depth++,TOOLKIT_X,TOOLKIT_Y); + _toolkit.addEventListener('load',Proxy.create(this,UIElementLoaded)); + } + + /** + * Runs when application setup has completed. At this point the init screen can be removed and the user can + * work with the application + */ + private function start(){ + //Fire off a resize to set up sizes + onResize(); + //TODO Remove loading screen + } + + /** + * Opens the preferences dialog + */ + public function showPrefsDialog() { + PopUpManager.createPopUp(Application.root, LFWindow, true,{title:Dictionary.getValue("prefs_dlg_title"),closeButton:true,scrollContentPath:'preferencesDialog'}); + } + + /** + * Receives events from the Stage resizing + */ + public function onResize(){ + //Debugger.log('onResize',Debugger.GEN,'main','org.lamsfoundation.lams.Application'); + + //Get the stage width and height and call onResize for stage based objects + var w:Number = Stage.width; + var h:Number = Stage.height; + + //Menu - only need to worry about width + _menu_mc.setSize(w,_menu_mc._height); + + //Canvas + _canvas.setSize(w-_toolkit.width,h-CANVAS_Y); + _toolkit.setSize(_toolkit.width,h-TOOLKIT_Y); + + //Toolbar + //_toolbar.setSize(w,_toolbar.height); + } + + /** + * Handles KEY presses for Application + */ + private function onKeyDown(){ + + //the debug window: + if (Key.isDown(Key.CONTROL) && Key.isDown(Key.ALT) && Key.isDown(QUESTION_MARK_KEY)) { + if (!_debugDialog.content){ + _debugDialog = PopUpManager.createPopUp(Application.root, LFWindow, false,{title:'Debug',closeButton:true,scrollContentPath:'debugDialog'}); + }else { + _debugDialog.deletePopUp(); + } + } + } + + /** + * returns the the Design Data Model + */ + public function getDesignDataModel():DesignDataModel{ + return _ddm; + } + + /** + * returns the the toolkit instance + */ + public function getToolkit():Toolkit{ + return _toolkit; + } + + /** + * returns the the toolbar instance + */ + public function getToolbar():Toolbar{ + return _toolbar; + } + + /** + * returns the the canvas instance + */ + public function getCanvas():Canvas{ + return _canvas; + } + + /** + * returns the the workspace instance + */ + public function getWorkspace():Workspace{ + return _workspace; + } + + /** + * returns the the Comms instance + */ + public function getComms():Communication{ + return _comms; + } + + /** + * returns the the Dictionary instance + */ + public function getDictionary():Dictionary{ + return _dictionary; + } + + /** + * Returns the Application root, use as _root would be used + * + * @usage Import authoring package and then use as root e.g. + * + * import org.lamsfoundation.lams.authoring; + * Application.root.attachMovie('myLinkageId','myInstanceName',depth); + */ + static function get root():MovieClip { + //Return root if valid otherwise raise a big system error as app. will not work without it + if(_instance._appRoot_mc != undefined) { + return _instance._appRoot_mc; + } else { + //TODO DI 11/05/05 Raise error if _appRoot hasn't been created + + } + } + + /** + * Returns the Dialogue conatiner mc + * + * @usage Import authoring package and then use + * + */ + static function get dialogue():MovieClip { + //Return root if valid otherwise raise a big system error as app. will not work without it + if(_instance._dialogueContainer_mc != undefined) { + return _instance._dialogueContainer_mc; + } else { + //TODO DI 11/05/05 Raise error if mc hasn't been created + + } + } + + /** + * Returns the tooltip conatiner mc + * + * @usage Import authoring package and then use + * + */ + static function get tooltip():MovieClip { + //Return root if valid otherwise raise a big system error as app. will not work without it + if(_instance._tooltipContainer_mc != undefined) { + return _instance._tooltipContainer_mc; + } else { + //TODO DI 11/05/05 Raise error if mc hasn't been created + + } + } + + /** + * Returns the Cursor conatiner mc + * + * @usage Import authoring package and then use + * + */ + static function get cursor():MovieClip { + //Return root if valid otherwise raise a big system error as app. will not work without it + if(_instance._cursorContainer_mc != undefined) { + return _instance._cursorContainer_mc; + } else { + //TODO DI 11/05/05 Raise error if mc hasn't been created + + } + } +} \ No newline at end of file Index: lams_central/src/flash/org/lamsfoundation/lams/authoring/ComplexActivity.as =================================================================== diff -u --- lams_central/src/flash/org/lamsfoundation/lams/authoring/ComplexActivity.as (revision 0) +++ lams_central/src/flash/org/lamsfoundation/lams/authoring/ComplexActivity.as (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,84 @@ +import org.lamsfoundation.lams.authoring.*; +/* +* +* @author DC +* @version 0.1 +* @comments Tool Activity Data storage class. +* @see Activity +*/ +class ComplexActivity extends Activity{ + + private var _maxOptions:Number; + private var _minOptions:Number; + private var _optionsInstructions:String; + + + + function ComplexActivity(activityUIID:Number, activityTypeID:Number, activityCategoryID:Number, learningLibraryID:Number,libraryActivityUIImage:String){ + super(activityUIID, activityTypeID, activityCategoryID, learningLibraryID,libraryActivityUIImage); + } + + /** + * + * @usage + * @param newmaxOptions + * @return + */ + public function set maxOptions (newmaxOptions:Number):Void { + _maxOptions = newmaxOptions; + } + /** + * + * @usage + * @return + */ + public function get maxOptions ():Number { + return _maxOptions; + } + + + /** + * + * @usage + * @param newminOptions + * @return + */ + public function set minOptions (newminOptions:Number):Void { + _minOptions = newminOptions; + } + /** + * + * @usage + * @return + */ + public function get minOptions ():Number { + return _minOptions; + } + + + /** + * + * @usage + * @param newoptionsInstructions + * @return + */ + public function set optionsInstructions (newoptionsInstructions:String):Void { + _optionsInstructions = newoptionsInstructions; + } + /** + * + * @usage + * @return + */ + public function get optionsInstructions ():String { + return _optionsInstructions; + } + + + + + + + +} + Index: lams_central/src/flash/org/lamsfoundation/lams/authoring/DesignDataModel.as =================================================================== diff -u --- lams_central/src/flash/org/lamsfoundation/lams/authoring/DesignDataModel.as (revision 0) +++ lams_central/src/flash/org/lamsfoundation/lams/authoring/DesignDataModel.as (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,334 @@ +import org.lamsfoundation.lams.authoring.*; +import org.lamsfoundation.lams.common.util.*; +/* +* +* @author DC +* @version 0.1 +* @comments DesignDataModel stores a complete learning design +*/ + +class org.lamsfoundation.lams.authoring.DesignDataModel { + + + //State / internal properties + private var _currentMaxID:Number; + + + //LearningDesign Properties: + + private var _objectType:String; + private var _learningDesignID:Number; + private var _uiID:Number; + private var _title:String; + private var _description:String; + private var _helpText:String; + private var _version:Number; + + private var _userID:Number; + private var _workspaceFolderID:Number; + private var _createDateTime:Date; + private var _readOnlyFlag:Boolean; + private var _validDesignFlag:Boolean; + + private var _maxID:Number; + private var _firstID:Number; + + private var _activities:Hashtable; + private var _transitions:Hashtable; + private var _groupings:Hashtable; + + + + + //Constructor + function DesignDataModel(){ + //initialise the hashtables + _activities = new Hashtable("_activities"); + _transitions = new Hashtable("_transitions"); + + + } + + /** + * Validates the design data model + * @usage + * @return + */ + public function validate():Boolean{ + var success:Boolean= false; + Debugger.log("******* FUNCTION NOT IMPLEMENTED",Debugger.CRITICAL,'validate','DesignDataModel'); + return success; + } + + //Helper methods. + + /** + * Adds a template activity to the model. + * + */ + public function addActivity(activity:Activity):Boolean{ + var success = false; + //create an Activity from the template actvity. + Debugger.log('activity:'+activity.title,4,'addActivity','DesignDataModel'); + + + //validate the activity ?? + + //validate if we can do it? + + //generate a new ID + + //add to DDM + + ObjectUtils.printObject(activity); + _activities.put(activity.activityUIID, activity); + + + //TODO: Better validation of the addition + success = true; + + + return success; + } + + public function addTransition(transition:Transition):Boolean{ + + Debugger.log('Transition from:'+transition.fromUIID+', to:'+transition.toUIID,4,'addActivity','DesignDataModel'); + _transitions.put(transition.uiID,transition); + + //TODO some validation would be nice + return true; + } + + + /** + * Clears the current design in the DDM. + * @returns success + */ + public function clearDesign():Boolean{ + var success:Boolean = false; + + //TODO:Validate if design is saved if not notify user + success = true; + _objectType = null; + _learningDesignID = null; + _title = null; + _description = null; + _helpText = null; + _version = null; + + _userID = null; + _workspaceFolderID = null; + _createDateTime = null; + _readOnlyFlag = null; + _validDesignFlag = null; + + _maxID = null; + _firstID = null; + + _activities = new Hashtable("_activities"); + _transitions = new Hashtable("_transitions"); + + success = true; + + Debugger.log('Cleared design:'+success,Debugger.GEN,'clearDesign','DesignDataModel'); + return success; + } + + /** + * Sets a new design for the DDM. + * @usage .setDesign(design:Object) + * @param design + * @return success + */ + public function setDesign(design:Object):Boolean{ + var success:Boolean = false; + //TODO:Validate if design is saved if not notify user + success = true; + //_global.breakpoint(); + Debugger.log('Printing the design revieced:...',Debugger.GEN,'setDesign','DesignDataModel'); + ObjectUtils.printObject(design); + _objectType = design.objectType; + _learningDesignID = design.learning_design_id; + _title = design.title; + _description = design.description; + _helpText = design.help_text; + _version = design.version; + + _userID = design.user_id; + _workspaceFolderID = design.workspace_folder_id; + _createDateTime = design.create_date_time; + _readOnlyFlag = design.read_only_flag; + _validDesignFlag = design.valid_design_flag; + + _maxID = design.max_id; + _firstID = design.first_id; + + //set the activities in the hash table + for(var i=0; i= 2){ + //TODO: show an error + Debugger.log('Too many activities in the Transition',Debugger.CRITICAL,'addActivityToTransition','CanvasModel'); + return false; + } + Debugger.log('Adding Activity.UIID:'+ca.activity.activityUIID,Debugger.GEN,'addActivityToTransition','CanvasModel'); + _transitionActivities.push(ca); + + if(_transitionActivities.length == 2){ + //check we have 2 valid acts to create the transition. + if(_transitionActivities[0].activity.activityUIID == _transitionActivities[1].activity.activityUIID){ + return new LFError("You cannot create a Transition between the same Activities","addActivityToTransition",this); + } + if(!_activitiesDisplayed.containsKey(_transitionActivities[0].activity.activityUIID)){ + return new LFError("First activity of the Transition is missing, UIID:"+ca[0].activity.activityUIID,"addActivityToTransition",this); + } + if(!_activitiesDisplayed.containsKey(_transitionActivities[1].activity.activityUIID)){ + return new LFError("Second activity of the Transition is missing, UIID:"+ca[1].activity.activityUIID,"addActivityToTransition",this); + } + + + + //lets make the transition + var t:Transition = createTransition(_transitionActivities); + resetTransitionTool(); + //add it to the DDM + var success:Object = _ddm.addTransition(t); + //flag the model as dirty and trigger a refresh + setDirty(); + + + } + + + + + return true; + } + + /** + * Resets the transition tool to its starting state, e.g. if one chas been created or the user released the mouse over an unsuitable clip + * @usage + */ + public function resetTransitionTool():Void{ + //clear the transitions array + _transitionActivities = new Array(); + } + + private function createTransition(transitionActs:Array):Transition{ + var fromAct:Activity = transitionActs[0].activity; + var toAct:Activity = transitionActs[1].activity; + + var t:Transition = new Transition(_ddm.newUIID(),fromAct.activityUIID,toAct.activityUIID,_ddm.learningDesignID); + + return t; + } + + + + + + + private function compareActivities(ddm_activity:Activity,cm_activity:Activity):Object{ + var r:Object = new Object(); + + //if they are the same (ref should point to same act) then nothing to do. + //if the ddm does not have an act displayed then we need to remove it from the cm + //if the ddm has an act that cm does not ref, then we need to add it. + + if(ddm_activity === cm_activity){ + return r = "SAME"; + } + + //check for a new act in the dmm + if(cm_activity == null){ + return r = "NEW"; + } + + //check if act has been removed from canvas + if(ddm_activity == null){ + return r = "DELETE"; + } + + + } + + private function compareTransitions(ddm_transition:Transition, cm_transition:Transition):Object{ + var r:Object = new Object(); + if(ddm_transition === cm_transition){ + return r = "SAME"; + } + + //check for a new act in the dmm + if(cm_transition == null){ + return r = "NEW"; + } + + //check if act has been removed from canvas + if(ddm_transition == null){ + return r = "DELETE"; + } + + + } + + private function refreshDesign(){ + //porobbably need to get a bit more granular + Debugger.log('Running',Debugger.GEN,'refreshDesign','CanvasModel'); + //go through the design and see what has changed, compare DDM to canvasModel + //_global.breakpoint(); + var ddmActivity_keys:Array = _ddm.activities.keys(); + var cmActivity_keys:Array = _activitiesDisplayed.keys(); + var longest = Math.max(ddmActivity_keys.length, cmActivity_keys.length); + + //loop through and do comparison + for(var i=0;i 0 && spHeight>0) { + toolkitLibraries_sp.setSize(spWidth,spHeight); + } + //toolkitLibraries_sp.setSize(s.w-_scrollPanelWidthDiff,s.h-(libraryActivityDesc_txa._y+libraryActivityDesc_txa.height)); + //Debugger.log('SetSize, x,y:'+s.w + ',' + s.h,Debugger.GEN,'setSize','ToolkitView'); + } + + /** + * Set the toolkit position + */ + private function setPosition(o:Observable):Void{ + //Cast observable instance into model and get position and set it on clip + var m = ToolkitModel(o); + var p:Object = m.getPosition(); + this._x = p.x; + this._y = p.y; + } + + /** + * Updates learning library activities. Creates a templateActivity mc / class for each one. + * NOTE: Each library element contains an array of templateActivities. + * templateActivities array will always have one element, may become more in future. + * + * @param o The model object that is broadcasting an update. + */ + private function updateLibraries(o:Observable){ + //Debugger.log('Running',4,'updateLibraries','ToolkitView'); + + var yPos:Number = 0; + + //set SP the content path: + toolkitLibraries_sp.contentPath = "empty_mc"; + + var tkv = ToolkitView(this); + var tkm = ToolkitModel(o); + var myLibs = tkm.getToolkitLibraries(); + + + //loop through the libraries + var keys = myLibs.keys(); + for(var i=0; i

"+c.getTemplateActivityData().description+"

"; + + //set up the drag + initDrag(c); + + } + + + private function initDrag(selectedTA):Void{ + //TODO: change myRoot to in application + //dragIcon_mc = _root.createChildAtDepth('dummy_mc',DepthManager.kTop); + + //dragIcon_mc.loadMovie('http://dolly.uklams.net/lams/lams_central/icons/icon_chat.swf'); + + //dragIcon_mc = _root.createObjectAtDepth("dummy_mc",DepthManager.kCursor); + + dragIcon_mc = Application.cursor.createEmptyMovieClip("dragIcon_mc",Application.cursor.getNextHighestDepth()); + + //dragIcon_mc = _root.createObjectAtDepth("dummy_mc",DepthManager.kCursor); + //dragIcon_mc = Application.root.createObjectAtDepth("dummy_mc",DepthManager.kCursor); + + Debugger.log('dragIcon_mc:'+dragIcon_mc,4,'initDrag','TemplateActivity'); + //TODO: Here we need to load the right icon. + //var icon_url = selectedTA.getTemplateActivityData().library_activity_ui_image + dragIcon_mcl.loadClip("http://dolly.uklams.net/lams/lams_central/icons/icon_chat.swf",dragIcon_mc); + //dragIcon_mc = _global.myRoot.duplicateMovieClip('dragIcon_mc',DepthManager.kTopmost); + + + } + /* + function onMouseUp(){ + //Debugger.log('hiya',4,'onMouseUp','TemplateActivity'); + Mouse.removeListener(this); + //check if we are selected + + + //TODO:hitTest against the canvas + + } + */ + + private function setUpDrag(aDragIcon_mc):Void{ + Debugger.log('aDragIcon_mc:'+aDragIcon_mc,4,'setUpDrag','TemplateActivity'); + Debugger.log('this:'+this,4,'setUpDrag','TemplateActivity'); + dragIcon_mc = aDragIcon_mc; + _dragging = true; + + Application.cursor.onMouseMove = Proxy.create(this,this['dragIcon']); + Application.cursor.onMouseUp = Proxy.create(this,this['dropIcon']); + /* + Application.cursor.onMouseMove = function(){ + dragIcon_mc._visible = true; + dragIcon_mc.startDrag(true); + + Mouse.addListener(this); + } + */ + + /* + Application.cursor.onMouseUp = function(){ + Debugger.log('this:'+this,4,'dragIcon_mc.onRelease','TemplateActivity'); + broadcastToolkitDrop(); + } + */ + + } + + private function dragIcon():Void{ + //Debugger.log('_dragging:'+_dragging,4,'dragIcon','TemplateActivity'); + if(_dragging){ + dragIcon_mc._visible = true; + dragIcon_mc._x = Application.cursor._xmouse; + dragIcon_mc._y = Application.cursor._ymouse; + } + + } + + private function dropIcon():Void{ + _dragging = false; + delete Application.cursor.onMouseMove; + delete Application.cursor.onMouseUp; + + ToolkitController(getController()).iconDrop(dragIcon_mc); + + + + } + + public function get className():String{ + return _className; + } + + /** + * Gets the ToolkitModel + * + * @returns model + */ + public function getModel():ToolkitModel{ + return ToolkitModel(model); + } + + /** + * Returns the default controller for this view (ToolkitController). + * Overrides AbstractView.defaultController() + */ + public function defaultController (model:Observable):Controller { + return new ToolkitController(model); + } +} Index: lams_central/src/flash/sampleLearningDesign.xml =================================================================== diff -u --- lams_central/src/flash/sampleLearningDesign.xml (revision 0) +++ lams_central/src/flash/sampleLearningDesign.xml (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1 @@ +
requestLearningDesignWDDX3.06.0LearningDesign1.01.02004-12-23T0:0:0+10:0Help Text1.01.01.018.010.02005-2-7T0:0:0+10:01.010.05.019.0QNA to MessageBoard4.0QNA to MessageBoard12.06.02005-2-7T0:0:0+10:01.06.02.016.0OptionsActivity to Notebook12.0OptionsActivity to Notebook23.03.02005-2-7T0:0:0+10:01.03.07.021.0GroupingActivity to Chat23.0GroupingActivity to Chat19.011.02005-2-7T0:0:0+10:01.011.014.014.0MessageBoard to SequenceActivity5.0MessageBoard to SequenceActivity16.07.02005-2-7T0:0:0+10:01.07.03.017.0Notebook to MultipleChoice2.0Notebook to MultipleChoice15.02.02005-2-7T0:0:0+10:01.02.023.023.0Notebook to GroupingActivity1.0Notebook to GroupingActivity14.012.02005-2-7T0:0:0+10:01.012.08.022.0SequenceActivity to Shared Resources14.0SequenceActivity to Shared Resources21.04.02005-2-7T0:0:0+10:01.04.024.024.0Chat to QNA7.0Chat to QNA17.08.02005-2-7T0:0:0+10:01.08.013.013.0MultipleChoice to ParallelActivity3.0MultipleChoice to ParallelActivity22.013.02005-2-7T0:0:0+10:01.013.025.025.0Shared Resources to QNA8.0Shared Resources to QNA20.01.02005-2-7T0:0:0+10:01.01.01.015.0Survey to NoteBook6.0Survey to NoteBook24.05.02005-2-7T0:0:0+10:01.05.012.012.0QNA to OptionsActivity24.0QNA to OptionsActivity13.09.02005-2-7T0:0:0+10:01.09.04.018.0ParallelActivity to QNA13.0ParallelActivity to QNATest Learning Design title1.02005-1-1T0:0:0+10:0Help Text for Activity15.010.01.0Notebook Activity Offline Instructions 1.0Activity12.020.0Notebook Activity Description1.01.0imageNotebook Activity Title1.0Activity13.010.02005-1-1T0:0:0+10:01.0Help Text for Activity1.013.02005-1-1T0:0:0+10:0Help Text for Activity18.010.01.0Tool Activity Offline Instructions 4.0Activity15.020.0Question and Answer Activity0.013.04.0imageQuestion and Answer4.0100.01.013.0100.02005-1-1T0:0:0+10:0Help Text for Activity19.010.01.0Tool Activity Offline Instructions 5.0Activity16.020.0Message Board Activity1.013.05.0imageMessage Board5.020.0Parallel Activity TitleParallel Activity Descriptionimage13.0Parallel Activity Offline Instructions 7.099.01.099.02005-1-1T0:0:0+10:0Help Text for Chat Activity21.010.01.0Tool Activity Offline Instructions 7.0Activity18.020.07.0Chat Activity Description0.07.0ChatImageChat Title7.099.099.02.02.01.02005-1-1T0:0:0+10:0Help Text for RandomGroupingActivity23.010.01.010.0Activity20.0Random Grouping Activity DescriptionRandomGroupingActivityImageRandomGroupingActivity Title23.0Activity14.010.02005-1-1T0:0:0+10:01.0Help Text for Activity1.014.02005-1-1T0:0:0+10:0Help Text for Activity22.010.01.0Tool Activity Offline Instructions 8.0Activity19.020.0Shared Resources Activity0.014.08.0imageShared Resources8.01.014.02005-1-1T0:0:0+10:0Help Text for QNA Activity25.010.01.0QNA Activity Offline Instructions 4.0Activity21.020.04.0QNA Activity Description1.014.04.0QNAImageQNA Activity Title25.020.0Sequence Activity TitleSequence Activity Descriptionimage14.0Sequence Activity Offline Instructions 9.099.01.099.02005-1-1T0:0:0+10:0Help Text for QNA Activity24.010.01.0QNA Activity Offline Instructions 4.0Activity20.020.04.0QNA Activity Description4.0QNAImageQNA Activity Title24.01.02005-1-1T0:0:0+10:0Help Text for Activity20.010.01.0Tool Activity Offline Instructions 6.0Activity17.020.0Survey Activity0.06.0imageSurvey Title6.08.02005-1-1T0:0:0+10:0Help Text for Activity12.010.01.0Offline Instructions Activity20.05.0Optional Activity Description1.012.02005-1-1T0:0:0+10:0Help Text for Activity16.010.01.0NoticeBoard Activity Offline Instructions 2.0Activity13.020.0NoticeBoard Activity0.012.02.0imageNoticeBoard Activity2.01.012.02005-1-1T0:0:0+10:0Help Text for Activity17.010.01.0Tool Activity Offline Instructions 3.0Activity14.020.0Multiple Choice Activity 1.012.03.0imageMultiple Choice3.0image3.0Optional Activity Title12.0Test Learning Design1.01.0 \ No newline at end of file Index: lams_central/src/java/org/lamsfoundation/lams/authoring/ObjectExtractor.java =================================================================== diff -u --- lams_central/src/java/org/lamsfoundation/lams/authoring/ObjectExtractor.java (revision 0) +++ lams_central/src/java/org/lamsfoundation/lams/authoring/ObjectExtractor.java (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,339 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +package org.lamsfoundation.lams.authoring; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Hashtable; +import java.util.Iterator; + +import org.lamsfoundation.lams.learningdesign.Activity; +import org.lamsfoundation.lams.learningdesign.ChosenGrouping; +import org.lamsfoundation.lams.learningdesign.GateActivity; +import org.lamsfoundation.lams.learningdesign.Group; +import org.lamsfoundation.lams.learningdesign.Grouping; +import org.lamsfoundation.lams.learningdesign.GroupingActivity; +import org.lamsfoundation.lams.learningdesign.LearningDesign; +import org.lamsfoundation.lams.learningdesign.LearningLibrary; +import org.lamsfoundation.lams.learningdesign.License; +import org.lamsfoundation.lams.learningdesign.OptionsActivity; +import org.lamsfoundation.lams.learningdesign.ParallelActivity; +import org.lamsfoundation.lams.learningdesign.PermissionGateActivity; +import org.lamsfoundation.lams.learningdesign.RandomGrouping; +import org.lamsfoundation.lams.learningdesign.ScheduleGateActivity; +import org.lamsfoundation.lams.learningdesign.SequenceActivity; +import org.lamsfoundation.lams.learningdesign.SynchGateActivity; +import org.lamsfoundation.lams.learningdesign.ToolActivity; +import org.lamsfoundation.lams.learningdesign.Transition; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.ActivityDAO; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.GroupDAO; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.GroupingDAO; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.LearningDesignDAO; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.LearningLibraryDAO; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.LicenseDAO; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.TransitionDAO; +import org.lamsfoundation.lams.learningdesign.dto.AuthoringActivityDTO; +import org.lamsfoundation.lams.learningdesign.dto.GroupingDTO; +import org.lamsfoundation.lams.learningdesign.dto.LearningDesignDTO; +import org.lamsfoundation.lams.learningdesign.dto.TransitionDTO; +import org.lamsfoundation.lams.lesson.LessonClass; +import org.lamsfoundation.lams.tool.Tool; +import org.lamsfoundation.lams.tool.dao.hibernate.ToolDAO; +import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.WorkspaceFolder; +import org.lamsfoundation.lams.usermanagement.dao.hibernate.UserDAO; +import org.lamsfoundation.lams.usermanagement.dao.hibernate.WorkspaceFolderDAO; +import org.lamsfoundation.lams.util.wddx.WDDXTAGS; + +/** + * @author Manpreet Minhas + * + * This is a utitlity class for extracting the + * information from the WDDX packet sent by the FLASH. + */ +public class ObjectExtractor { + + protected UserDAO userDAO = null; + protected LearningDesignDAO learningDesignDAO = null; + protected ActivityDAO activityDAO =null; + protected TransitionDAO transitionDAO =null; + protected WorkspaceFolderDAO workspaceFolderDAO = null; + protected LearningLibraryDAO learningLibraryDAO = null; + protected LicenseDAO licenseDAO = null; + protected GroupingDAO groupingDAO = null; + protected ToolDAO toolDAO = null; + protected GroupDAO groupDAO = null; + + public ObjectExtractor(UserDAO userDAO, + LearningDesignDAO learningDesignDAO, ActivityDAO activityDAO, + WorkspaceFolderDAO workspaceFolderDAO, + LearningLibraryDAO learningLibraryDAO, LicenseDAO licenseDAO, + GroupingDAO groupingDAO, ToolDAO toolDAO, + GroupDAO groupDAO,TransitionDAO transitionDAO) { + this.userDAO = userDAO; + this.learningDesignDAO = learningDesignDAO; + this.activityDAO = activityDAO; + this.workspaceFolderDAO = workspaceFolderDAO; + this.learningLibraryDAO = learningLibraryDAO; + this.licenseDAO = licenseDAO; + this.groupingDAO = groupingDAO; + this.toolDAO = toolDAO; + this.groupDAO = groupDAO; + this.transitionDAO = transitionDAO; + } + public LearningDesign extractLearningDesignObject(LearningDesignDTO learningDesignDTO)throws Exception{ + LearningDesign learningDesign = LearningDesignDTO.extractLearningDesign(learningDesignDTO); + + if(learningDesignDTO.getUserID()!=null && + !learningDesignDTO.getUserID().equals(WDDXTAGS.NUMERIC_NULL_VALUE_INTEGER)){ + User user = userDAO.getUserById(learningDesignDTO.getUserID()); + if(user!=null) + learningDesign.setUser(user); + } + if(!learningDesignDTO.getLicenseID().equals(WDDXTAGS.NUMERIC_NULL_VALUE_LONG)){ + License license = licenseDAO.getLicenseByID(learningDesignDTO.getLicenseID()); + if(license!=null) + learningDesign.setLicense(license); + } + if(!learningDesignDTO.getWorkspaceFolderID().equals(WDDXTAGS.NUMERIC_NULL_VALUE_INTEGER)){ + WorkspaceFolder workspaceFolder = workspaceFolderDAO.getWorkspaceFolderByID(learningDesignDTO.getWorkspaceFolderID()); + if(workspaceFolder!=null) + learningDesign.setWorkspaceFolder(workspaceFolder); + } + if(!learningDesignDTO.getParentLearningDesignID().equals(WDDXTAGS.NUMERIC_NULL_VALUE_LONG)){ + LearningDesign parent = learningDesignDAO.getLearningDesignById(learningDesignDTO.getParentLearningDesignID()); + if(parent!=null) + learningDesign.setParentLearningDesign(parent); + } + learningDesignDAO.insert(learningDesign); + parseActivities(learningDesignDTO,learningDesign); + parseTransitions(learningDesignDTO,learningDesign); + calculateFirstActivity(learningDesignDTO.getFirstActivityUIID(),learningDesign); + return learningDesign; + } + private void parseActivities(LearningDesignDTO learningDesignDTO, LearningDesign learningDesign){ + HashSet set = new HashSet(); + if(learningDesignDTO.getActivities()!=null){ + ArrayList table = learningDesignDTO.getActivities(); + Iterator iterator = table.iterator(); + while(iterator.hasNext()){ + Hashtable activityDetails = (Hashtable)iterator.next(); + AuthoringActivityDTO authoringActivityDTO = new AuthoringActivityDTO(activityDetails); + Activity activity = extractActivityObject(authoringActivityDTO,learningDesign); + activityDAO.insert(activity); + set.add(activity); + } + } + learningDesign.setActivities(set); + learningDesignDAO.update(learningDesign); + } + private void parseTransitions(LearningDesignDTO learningDesignDTO, LearningDesign learningDesign){ + HashSet set = new HashSet(); + if(learningDesignDTO.getTransitions()!=null){ + ArrayList table = learningDesignDTO.getTransitions(); + Iterator iterator= table.iterator(); + while(iterator.hasNext()){ + Hashtable transitionDetails = (Hashtable)iterator.next(); + TransitionDTO transitionDTO = new TransitionDTO(transitionDetails); + Transition transition = extractTransitionObject(transitionDTO,learningDesign); + transitionDAO.insert(transition); + set.add(transition); + } + } + learningDesign.setTransitions(set); + learningDesignDAO.update(learningDesign); + } + /**TODO This function has to be tested with real data*/ + public void calculateFirstActivity(Integer firstID, LearningDesign design)throws Exception{ + Activity flashFirstActivity = activityDAO.getActivityByUIID(firstID,design); + design.setFirstActivity(flashFirstActivity); + learningDesignDAO.update(design); + } + public Activity extractActivityObject(AuthoringActivityDTO authoringActivityDTO, LearningDesign design){ + Object activityObject = Activity.getActivityInstance(authoringActivityDTO.getActivityTypeID().intValue()); + processActivityType(activityObject,authoringActivityDTO); + Activity activity =(Activity)activityObject; + activity.setActivityUIID(authoringActivityDTO.getActivityUIID()); + activity.setDescription(authoringActivityDTO.getDescription()); + activity.setTitle(authoringActivityDTO.getTitle()); + activity.setHelpText(authoringActivityDTO.getHelpText()); + activity.setXcoord(authoringActivityDTO.getXcoord()); + activity.setYcoord(authoringActivityDTO.getYcoord()); + + if(authoringActivityDTO.getParentUIID()!=null && + !authoringActivityDTO.getParentUIID().equals(WDDXTAGS.NUMERIC_NULL_VALUE_INTEGER)){ + Activity parentActivity = activityDAO.getActivityByUIID(authoringActivityDTO.getParentUIID(),design); + if(parentActivity!=null) + activity.setParentActivity(parentActivity); + activity.setParentUIID(authoringActivityDTO.getParentUIID()); + } + + activity.setActivityTypeId(authoringActivityDTO.getActivityTypeID()); + + if(authoringActivityDTO.getGroupingID()!=null && + !authoringActivityDTO.getGroupingID().equals(WDDXTAGS.NUMERIC_NULL_VALUE_LONG)){ + Grouping grouping = groupingDAO.getGroupingById(authoringActivityDTO.getGroupingID()); + if(grouping!=null) + activity.setGrouping(grouping); + activity.setGroupingUIID(authoringActivityDTO.getGroupingUIID()); + } + + activity.setOrderId(authoringActivityDTO.getOrderID()); + activity.setDefineLater(authoringActivityDTO.getDefineLater()); + activity.setLearningDesign(design); + + if(authoringActivityDTO.getLearningLibraryID()!=null && + !authoringActivityDTO.getLearningLibraryID().equals(WDDXTAGS.NUMERIC_NULL_VALUE_LONG)){ + LearningLibrary library = learningLibraryDAO.getLearningLibraryById(authoringActivityDTO.getLearningLibraryID()); + if(library!=null) + activity.setLearningLibrary(library); + } + + activity.setCreateDateTime(authoringActivityDTO.getCreateDateTime()); + activity.setRunOffline(authoringActivityDTO.getRunOffline()); + activity.setActivityCategoryID(authoringActivityDTO.getActivityCategoryID()); + activity.setLibraryActivityUiImage(authoringActivityDTO.getLibraryActivityUiImage()); + + if(authoringActivityDTO.getLibraryActivityID()!=null && + !authoringActivityDTO.getLibraryActivityID().equals(WDDXTAGS.NUMERIC_NULL_VALUE_LONG)){ + Activity libraryActivity = activityDAO.getActivityByActivityId(authoringActivityDTO.getLibraryActivityID()); + if(libraryActivity!=null) + activity.setLibraryActivity(libraryActivity); + } + + activity.setApplyGrouping(authoringActivityDTO.getApplyGrouping()); + activity.setGroupingSupportType(authoringActivityDTO.getGroupingSupportType()); + return activity; + } + private void processActivityType(Object activity, AuthoringActivityDTO authoringActivityDTO){ + if(activity instanceof GroupingActivity) + buildGroupingActivity((GroupingActivity)activity,authoringActivityDTO); + else if(activity instanceof ToolActivity) + buildToolActivity((ToolActivity)activity,authoringActivityDTO); + else if(activity instanceof GateActivity) + buildGateActivity(activity,authoringActivityDTO); + else + buildComplexActivity(activity,authoringActivityDTO); + } + private void buildComplexActivity(Object activity,AuthoringActivityDTO authoringActivityDTO){ + if(activity instanceof OptionsActivity) + buildOptionsActivity((OptionsActivity)activity,authoringActivityDTO); + else if (activity instanceof ParallelActivity) + buildParallelActivity((ParallelActivity)activity,authoringActivityDTO); + else + buildSequenceActivity((SequenceActivity)activity,authoringActivityDTO); + + } + private void buildGroupingActivity(GroupingActivity groupingActivity,AuthoringActivityDTO authoringActivityDTO){ + Integer groupingType = authoringActivityDTO.getGroupingType(); + Grouping grouping = extractGroupingObject(authoringActivityDTO.getGroupingDTO()); + groupingActivity.setCreateGrouping(grouping); + groupingActivity.setCreateGroupingUIID(grouping.getGroupingUIID()); + } + private void buildOptionsActivity(OptionsActivity optionsActivity,AuthoringActivityDTO authoringActivityDTO){ + optionsActivity.setMaxNumberOfOptions(authoringActivityDTO.getMaxOptions()); + optionsActivity.setMinNumberOfOptions(authoringActivityDTO.getMinOptions()); + optionsActivity.setOptionsInstructions(authoringActivityDTO.getOptionsInstructions()); + } + private void buildParallelActivity(ParallelActivity activity,AuthoringActivityDTO authoringActivityDTO){ + } + private void buildSequenceActivity(SequenceActivity activity,AuthoringActivityDTO authoringActivityDTO){ + + } + private void buildToolActivity(ToolActivity toolActivity,AuthoringActivityDTO authoringActivityDTO){ + toolActivity.setToolContentId(authoringActivityDTO.getToolContentID()); + Tool tool =toolDAO.getToolByID(authoringActivityDTO.getToolID()); + toolActivity.setTool(tool); + } + private void buildGateActivity(Object activity,AuthoringActivityDTO authoringActivityDTO){ + if(activity instanceof SynchGateActivity) + buildSynchGateActivity((SynchGateActivity)activity,authoringActivityDTO); + else if (activity instanceof PermissionGateActivity) + buildPermissionGateActivity((PermissionGateActivity)activity,authoringActivityDTO); + else + buildScheduleGateActivity((ScheduleGateActivity)activity,authoringActivityDTO); + GateActivity gateActivity = (GateActivity)activity ; + gateActivity.setGateActivityLevelId(authoringActivityDTO.getGateActivityLevelID()); + gateActivity.setGateOpen(authoringActivityDTO.getGateOpen()); + + } + private void buildSynchGateActivity(SynchGateActivity activity,AuthoringActivityDTO authoringActivityDTO){ + } + private void buildPermissionGateActivity(PermissionGateActivity activity,AuthoringActivityDTO authoringActivityDTO){ + } + private static void buildScheduleGateActivity(ScheduleGateActivity activity,AuthoringActivityDTO authoringActivityDTO){ + activity.setGateStartDateTime(authoringActivityDTO.getGateStartDateTime()); + activity.setGateEndDateTime(authoringActivityDTO.getGateEndDateTime()); + activity.setGateStartTimeOffset(authoringActivityDTO.getGateStartTimeOffset()); + activity.setGateEndTimeOffset(authoringActivityDTO.getGateEndTimeOffset()); + } + public Grouping extractGroupingObject(GroupingDTO groupingDTO){ + Object object = Grouping.getGroupingInstance(groupingDTO.getGroupingType()); + + if(object instanceof RandomGrouping) + createRandomGrouping((RandomGrouping)object,groupingDTO); + else if(object instanceof ChosenGrouping) + createChosenGrouping((ChosenGrouping)object,groupingDTO); + else + createLessonClass((LessonClass)object, groupingDTO); + + Grouping grouping = (Grouping)object; + grouping.setGroupingUIID(groupingDTO.getGroupingUIID()); + grouping.setMaxNumberOfGroups(groupingDTO.getMaxNumberOfGroups()); + groupingDAO.insert(grouping); + return grouping; + } + private void createRandomGrouping(RandomGrouping randomGrouping,GroupingDTO groupingDTO){ + randomGrouping.setLearnersPerGroup(groupingDTO.getLearnersPerGroup()); + randomGrouping.setNumberOfGroups(groupingDTO.getNumberOfGroups()); + } + private void createChosenGrouping(ChosenGrouping chosenGrouping,GroupingDTO groupingDTO){ + + } + private void createLessonClass(LessonClass lessonClass, GroupingDTO groupingDTO){ + Group group = groupDAO.getGroupById(groupingDTO.getStaffGroupID()); + if(group!=null) + lessonClass.setStaffGroup(group); + } + private Transition extractTransitionObject(TransitionDTO transitionDTO,LearningDesign learningDesign){ + Transition transition = new Transition(); + transition.setTransitionUIID(transitionDTO.getTransitionUIID()); + if(transitionDTO.getToUIID()!=null){ + Activity toActivity = activityDAO.getActivityByUIID(transitionDTO.getToUIID(),learningDesign); + transition.setToActivity(toActivity); + transition.setToUIID(transitionDTO.getToUIID()); + } + if(transitionDTO.getFromUIID()!=null){ + Activity fromActivity = activityDAO.getActivityByUIID(transitionDTO.getFromUIID(),learningDesign); + transition.setFromActivity(fromActivity); + transition.setFromUIID(transitionDTO.getFromUIID()); + } + transition.setDescription(transitionDTO.getDescription()); + transition.setTitle(transitionDTO.getTitle()); + transition.setCreateDateTime(transitionDTO.getCreateDateTime()); + transition.setLearningDesign(learningDesign); + return transition; + } +} + + Index: lams_central/src/java/org/lamsfoundation/lams/authoring/authoringApplicationContext.xml =================================================================== diff -u --- lams_central/src/java/org/lamsfoundation/lams/authoring/authoringApplicationContext.xml (revision 0) +++ lams_central/src/java/org/lamsfoundation/lams/authoring/authoringApplicationContext.xml (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + + + + Index: lams_central/src/java/org/lamsfoundation/lams/authoring/service/AuthoringService.java =================================================================== diff -u --- lams_central/src/java/org/lamsfoundation/lams/authoring/service/AuthoringService.java (revision 0) +++ lams_central/src/java/org/lamsfoundation/lams/authoring/service/AuthoringService.java (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,624 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +package org.lamsfoundation.lams.authoring.service; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.authoring.ObjectExtractor; +import org.lamsfoundation.lams.learningdesign.Activity; +import org.lamsfoundation.lams.learningdesign.ActivityOrderComparator; +import org.lamsfoundation.lams.learningdesign.ChosenGrouping; +import org.lamsfoundation.lams.learningdesign.ComplexActivity; +import org.lamsfoundation.lams.learningdesign.GateActivity; +import org.lamsfoundation.lams.learningdesign.Grouping; +import org.lamsfoundation.lams.learningdesign.GroupingActivity; +import org.lamsfoundation.lams.learningdesign.LearningDesign; +import org.lamsfoundation.lams.learningdesign.LearningLibrary; +import org.lamsfoundation.lams.learningdesign.OptionsActivity; +import org.lamsfoundation.lams.learningdesign.ParallelActivity; +import org.lamsfoundation.lams.learningdesign.PermissionGateActivity; +import org.lamsfoundation.lams.learningdesign.RandomGrouping; +import org.lamsfoundation.lams.learningdesign.ScheduleGateActivity; +import org.lamsfoundation.lams.learningdesign.SequenceActivity; +import org.lamsfoundation.lams.learningdesign.SynchGateActivity; +import org.lamsfoundation.lams.learningdesign.ToolActivity; +import org.lamsfoundation.lams.learningdesign.Transition; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.ActivityDAO; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.GroupDAO; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.GroupingDAO; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.LearningDesignDAO; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.LearningLibraryDAO; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.LicenseDAO; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.TransitionDAO; +import org.lamsfoundation.lams.learningdesign.dto.DesignDetailDTO; +import org.lamsfoundation.lams.learningdesign.dto.LearningDesignDTO; +import org.lamsfoundation.lams.learningdesign.exception.LearningDesignException; +import org.lamsfoundation.lams.themes.CSSThemeVisualElement; +import org.lamsfoundation.lams.themes.dao.ICSSThemeDAO; +import org.lamsfoundation.lams.themes.dto.CSSThemeBriefDTO; +import org.lamsfoundation.lams.themes.dto.CSSThemeDTO; +import org.lamsfoundation.lams.tool.dao.hibernate.ToolDAO; +import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.WorkspaceFolder; +import org.lamsfoundation.lams.usermanagement.dao.hibernate.UserDAO; +import org.lamsfoundation.lams.usermanagement.dao.hibernate.WorkspaceFolderDAO; +import org.lamsfoundation.lams.usermanagement.exception.UserException; +import org.lamsfoundation.lams.usermanagement.exception.WorkspaceFolderException; +import org.lamsfoundation.lams.util.wddx.FlashMessage; +import org.lamsfoundation.lams.util.wddx.WDDXProcessor; + + +/** + * @author Manpreet Minhas + */ +public class AuthoringService implements IAuthoringService { + + protected Logger log = Logger.getLogger(AuthoringService.class); + + /** Required DAO's */ + protected LearningDesignDAO learningDesignDAO; + protected LearningLibraryDAO learningLibraryDAO; + protected ActivityDAO activityDAO; + protected UserDAO userDAO; + protected WorkspaceFolderDAO workspaceFolderDAO; + protected TransitionDAO transitionDAO; + protected ToolDAO toolDAO; + protected LicenseDAO licenseDAO; + protected GroupingDAO groupingDAO; + protected GroupDAO groupDAO; + protected ICSSThemeDAO themeDAO; + + public AuthoringService(){ + + } + + /********************************************** + * Setter Methods + * *******************************************/ + + /** + * @param groupDAO The groupDAO to set. + */ + public void setGroupDAO(GroupDAO groupDAO) { + this.groupDAO = groupDAO; + } + public void setGroupingDAO(GroupingDAO groupingDAO) { + this.groupingDAO = groupingDAO; + } + /** for sending acknowledgment/error messages back to flash */ + private FlashMessage flashMessage; + + /** + * @param transitionDAO The transitionDAO to set + */ + public void setTransitionDAO(TransitionDAO transitionDAO) { + this.transitionDAO = transitionDAO; + } + /** + * @param learningDesignDAO The learningDesignDAO to set. + */ + public void setLearningDesignDAO(LearningDesignDAO learningDesignDAO) { + this.learningDesignDAO = learningDesignDAO; + } + /** + * @param learningLibraryDAO The learningLibraryDAO to set. + */ + public void setLearningLibraryDAO(LearningLibraryDAO learningLibraryDAO) { + this.learningLibraryDAO = learningLibraryDAO; + } + /** + * @param userDAO The userDAO to set. + */ + public void setUserDAO(UserDAO userDAO) { + this.userDAO = userDAO; + } + /** + * @param activityDAO The activityDAO to set. + */ + public void setActivityDAO(ActivityDAO activityDAO) { + this.activityDAO = activityDAO; + } + /** + * @param workspaceFolderDAO The workspaceFolderDAO to set. + */ + public void setWorkspaceFolderDAO(WorkspaceFolderDAO workspaceFolderDAO) { + this.workspaceFolderDAO = workspaceFolderDAO; + } + /** + * @param toolDAO The toolDAO to set + */ + public void setToolDAO(ToolDAO toolDAO) { + this.toolDAO = toolDAO; + } + /** + * @param licenseDAO The licenseDAO to set + */ + public void setLicenseDAO(LicenseDAO licenseDAO) { + this.licenseDAO = licenseDAO; + } + + /** + * @return Returns the themeDAO. + */ + public ICSSThemeDAO getThemeDAO() { + return themeDAO; + } + /** + * @param themeDAO The ICSSThemeDAO to set. + */ + public void setThemeDAO(ICSSThemeDAO themeDAO) { + this.themeDAO = themeDAO; + } + /** + * @see org.lamsfoundation.lams.authoring.service.IAuthoringService#getLearningDesign(java.lang.Long) + */ + public LearningDesign getLearningDesign(Long learningDesignID){ + return learningDesignDAO.getLearningDesignById(learningDesignID); + } + + /** + * @see org.lamsfoundation.lams.authoring.service.IAuthoringService#saveLearningDesign(org.lamsfoundation.lams.learningdesign.LearningDesign) + */ + public void saveLearningDesign(LearningDesign learningDesign){ + learningDesignDAO.insert(learningDesign); + } + /** + * @see org.lamsfoundation.lams.authoring.service.IAuthoringService#getAllLearningDesigns() + */ + public List getAllLearningDesigns(){ + return learningDesignDAO.getAllLearningDesigns(); + } + + /** + * @see org.lamsfoundation.lams.authoring.service.IAuthoringService#updateLearningDesign(org.lamsfoundation.lams.learningdesign.LearningDesign) + */ + public void updateLearningDesign(LearningDesign learningDesign) { + learningDesignDAO.update(learningDesign); + } + + /** + * @see org.lamsfoundation.lams.authoring.service.IAuthoringService#getAllLearningLibraries() + */ + public List getAllLearningLibraries(){ + return learningLibraryDAO.getAllLearningLibraries(); + } + + /********************************************** + * Utility/Service Methods + * *******************************************/ + + /** + * @see org.lamsfoundation.lams.authoring.service.IAuthoringService#getLearningDesignDetails(java.lang.Long) + */ + public String getLearningDesignDetails(Long learningDesignID)throws IOException{ + String wddxPacket = null; + LearningDesign design = learningDesignDAO.getLearningDesignById(learningDesignID); + if(design==null) + flashMessage = FlashMessage.getNoSuchLearningDesignExists("getLearningDesignDetails",learningDesignID); + else{ + LearningDesignDTO learningDesignDTO = design.getLearningDesignDTO(); + flashMessage = new FlashMessage("getLearningDesignDetails",learningDesignDTO); + } + return flashMessage.serializeMessage(); + } + /** + * Checks whether the WDDX packet contains any invalid + * "". It returns true if there exists any such null + */ + private boolean containsNulls(String packet) + { + if (packet.indexOf("") != -1) + return true; + else + return false; + } + public String copyLearningDesign(Long originalDesignID,Integer copyType, + Integer userID, Integer workspaceFolderID)throws UserException, LearningDesignException, + WorkspaceFolderException, IOException{ + + LearningDesign originalDesign = learningDesignDAO.getLearningDesignById(originalDesignID); + if(originalDesign==null) + throw new LearningDesignException("No Learning Design with learning_design_id of:" + originalDesignID +" exists"); + + User user = userDAO.getUserById(userID); + if(user==null) + throw new UserException("No such User with a user_id of:" + userID + " exists"); + + WorkspaceFolder workspaceFolder = workspaceFolderDAO.getWorkspaceFolderByID(workspaceFolderID); + if(workspaceFolder==null) + throw new WorkspaceFolderException("No such WorkspaceFolder with workspace_folder_id of:" + workspaceFolderID + " exists"); + + LearningDesign designCopy = copyLearningDesign(originalDesign,copyType,user,workspaceFolder); + flashMessage = new FlashMessage("copyLearningDesign", designCopy.getLearningDesignId()); + return flashMessage.serializeMessage(); + } + + /** + * @see org.lamsfoundation.lams.authoring.service.IAuthoringService#copyLearningDesign(org.lamsfoundation.lams.learningdesign.LearningDesign, java.lang.Integer, org.lamsfoundation.lams.usermanagement.User) + */ + public LearningDesign copyLearningDesign(LearningDesign originalLearningDesign,Integer copyType,User user){ + WorkspaceFolder runSequencesFolder = workspaceFolderDAO.getRunSequencesFolderForUser(user.getUserId()); + return copyLearningDesign(originalLearningDesign,copyType,user, runSequencesFolder); + } + + /** + * @see org.lamsfoundation.lams.authoring.service.IAuthoringService#copyLearningDesign(org.lamsfoundation.lams.learningdesign.LearningDesign, java.lang.Integer, org.lamsfoundation.lams.usermanagement.User, org.lamsfoundation.lams.usermanagement.WorkspaceFolder) + */ + public LearningDesign copyLearningDesign(LearningDesign originalLearningDesign,Integer copyType,User user, WorkspaceFolder workspaceFolder) + { + LearningDesign newLearningDesign = LearningDesign.createLearningDesignCopy(originalLearningDesign,copyType); + newLearningDesign.setUser(user); + newLearningDesign.setWorkspaceFolder(workspaceFolder); + learningDesignDAO.insert(newLearningDesign); + updateDesignActivities(originalLearningDesign,newLearningDesign); + calculateFirstActivity(originalLearningDesign,newLearningDesign); + updateDesignTransitions(originalLearningDesign,newLearningDesign); + return newLearningDesign; + } + /** + * Calculates the First activity of the LearningDesign. + *

+ * The activity_ui_id is unique per LearningDesign. So when a LearningDesign is deep-copied + * all the activities in the newDesign would have the same activity_ui_id as the oldDesign. + * This mean that the firstActivity of the newDesign would have the same activity_ui_id + * as the oldDesign.So in order to determine the firstActivity of the newDesign we look for an + * activity which has an activity_ui_id same as that of the oldDesign and + * learning_design_id as the newDesign + *

+ * + * @param oldDesign The LearningDesign to be copied + * @param newDesign The copy of the originalLearningDesign + */ + private void calculateFirstActivity(LearningDesign oldDesign,LearningDesign newDesign){ + Integer oldUIID = oldDesign.getFirstActivity().getActivityUIID(); + Activity firstActivity = activityDAO.getActivityByUIID(oldUIID,newDesign); + newDesign.setFirstActivity(firstActivity); + Integer learning_design_ui_id = new Integer(newDesign.getLearningDesignId().intValue()); + newDesign.setLearningDesignUIID(learning_design_ui_id); + } + + /** + * Updates the Activity information in the newLearningDesign based + * on the originalLearningDesign + * + * @param originalLearningDesign The LearningDesign to be copied + * @param newLearningDesign The copy of the originalLearningDesign + */ + private void updateDesignActivities(LearningDesign originalLearningDesign, LearningDesign newLearningDesign){ + HashSet newActivities = new HashSet(); + TreeSet oldParentActivities = new TreeSet(new ActivityOrderComparator()); + oldParentActivities.addAll(originalLearningDesign.getParentActivities()); + Iterator iterator = oldParentActivities.iterator(); + while(iterator.hasNext()){ + Object parentActivity = iterator.next(); + Activity newParentActivity = getActivityCopy(parentActivity); + newParentActivity.setLearningDesign(newLearningDesign); + activityDAO.insert(newParentActivity); + newActivities.add(newParentActivity); + + TreeSet oldChildActivities = new TreeSet(new ActivityOrderComparator()); + oldChildActivities.addAll(getChildActivities((Activity)parentActivity)); + Iterator childIterator = oldChildActivities.iterator(); + + while(childIterator.hasNext()){ + Activity childActivity = (Activity)childIterator.next(); + Activity newChildActivity = getActivityCopy(childActivity); + newChildActivity.setParentActivity(newParentActivity); + newChildActivity.setParentUIID(newParentActivity.getActivityUIID()); + newChildActivity.setLearningDesign(newLearningDesign); + activityDAO.insert(newChildActivity); + newActivities.add(newChildActivity); + } + } + newLearningDesign.setActivities(newActivities); + } + + /** + * Updates the Transition information in the newLearningDesign based + * on the originalLearningDesign + * + * @param originalLearningDesign The LearningDesign to be copied + * @param newLearningDesign The copy of the originalLearningDesign + */ + public void updateDesignTransitions(LearningDesign originalLearningDesign, LearningDesign newLearningDesign){ + HashSet newTransitions = new HashSet(); + Set oldTransitions = originalLearningDesign.getTransitions(); + Iterator iterator = oldTransitions.iterator(); + while(iterator.hasNext()){ + Transition transition = (Transition)iterator.next(); + Transition newTransition = Transition.createCopy(transition); + Activity toActivity = null; + Activity fromActivity=null; + if(newTransition.getToUIID()!=null) + toActivity = activityDAO.getActivityByUIID(newTransition.getToUIID(),newLearningDesign); + if(newTransition.getFromUIID()!=null) + fromActivity = activityDAO.getActivityByUIID(newTransition.getFromUIID(),newLearningDesign); + newTransition.setToActivity(toActivity); + newTransition.setFromActivity(fromActivity); + newTransition.setLearningDesign(newLearningDesign); + transitionDAO.insert(newTransition); + newTransitions.add(newTransition); + } + newLearningDesign.setTransitions(newTransitions); + } + /** + * Determines the type of activity and returns a deep-copy of the same + * + * @param activity The object to be deep-copied + * @return Activity The new deep-copied Activity object + */ + private Activity getActivityCopy(Object activity){ + if(activity instanceof GroupingActivity){ + GroupingActivity newGroupingActivity = GroupingActivity.createCopy((GroupingActivity)activity); + createGroupingForGroupingActivity(newGroupingActivity,(GroupingActivity)activity); + return newGroupingActivity; + } + else if(activity instanceof ComplexActivity) + return createComplexActivityCopy(activity); + else if(activity instanceof GateActivity) + return createGateActivityCopy(activity); + else + return ToolActivity.createCopy((ToolActivity)activity); + } + /** + * This function creates a new Grouping for the new GroupingActivity + * based on the grouping type of the old GroupingActivity from + * which it has been deep-copied. + * + * @param groupingActivity The new GroupingActivity + * @param oldActivity The old GroupingActivity + */ + private void createGroupingForGroupingActivity(GroupingActivity groupingActivity, GroupingActivity oldActivity){ + Grouping grouping = oldActivity.getCreateGrouping(); + + if(grouping.getGroupingTypeId()==Grouping.CHOSEN_GROUPING_TYPE){ + ChosenGrouping chosenGrouping = ChosenGrouping.createCopy((ChosenGrouping)grouping); + groupingDAO.insert(chosenGrouping); + groupingActivity.setCreateGrouping(chosenGrouping); + } + else{ + RandomGrouping randomGrouping = RandomGrouping.createCopy((RandomGrouping)grouping); + groupingDAO.insert(randomGrouping); + groupingActivity.setCreateGrouping(randomGrouping); + } + } + /** + * This function creates a deep copy of ComplexActivity object + * + * @param activity The object to be deep copied + * @return Activity The deep-copied object + */ + private Activity createComplexActivityCopy(Object activity){ + if(activity instanceof OptionsActivity) + return OptionsActivity.createCopy((OptionsActivity)activity); + else if (activity instanceof ParallelActivity) + return ParallelActivity.createCopy((ParallelActivity)activity); + else + return SequenceActivity.createCopy((SequenceActivity)activity); + + } + /** + * This function creates a deep copy of the GateActivity object + * + * @param activity The object to be deep copied + * @return Activity The deep-copied object + */ + private Activity createGateActivityCopy(Object activity){ + if(activity instanceof ScheduleGateActivity) + return ScheduleGateActivity.createCopy((ScheduleGateActivity)activity); + else if (activity instanceof PermissionGateActivity) + return PermissionGateActivity.createCopy((PermissionGateActivity)activity); + else + return SynchGateActivity.createCopy((SynchGateActivity)activity); + } + /** + * Returns a set of child activities for the given parent activitity + * + * @param parentActivity The parent activity + * @return HashSet Set of the activities that belong to the parentActivity + */ + private HashSet getChildActivities(Activity parentActivity){ + HashSet childActivities = new HashSet(); + List list = activityDAO.getActivitiesByParentActivityId(parentActivity.getActivityId()); + if(list!=null) + childActivities.addAll(list); + return childActivities; + } + /** + * This method saves a new Learning Design to the database. + * It received a WDDX packet from flash, deserializes it + * and then finally persists it to the database. + * + * @param wddxPacket The WDDX packet received from Flash + * @return String The acknowledgement in WDDX format that the design has been + * successfully saved. + * @throws Exception + */ + public String storeLearningDesignDetails(String wddxPacket) throws Exception{ + LearningDesignDTO learningDesignDTO = null; + + if(containsNulls(wddxPacket)){ + flashMessage = new FlashMessage("storeLearningDesignDetails", + "WDDXPacket contains null", + FlashMessage.ERROR); + return flashMessage.serializeMessage(); + } + Hashtable table = (Hashtable)WDDXProcessor.deserialize(wddxPacket); + ObjectExtractor extractor = new ObjectExtractor(userDAO,learningDesignDAO, + activityDAO,workspaceFolderDAO, + learningLibraryDAO,licenseDAO, + groupingDAO,toolDAO,groupDAO,transitionDAO); + learningDesignDTO = new LearningDesignDTO(table); + if(learningDesignDTO!=null){ + LearningDesign design = extractor.extractLearningDesignObject(learningDesignDTO); + learningDesignDAO.insert(design); + flashMessage = new FlashMessage("storeLearningDesignDetails",design.getLearningDesignId()); + } + else + flashMessage = new FlashMessage("storeLearningDesignDetails", + "Invalid Object in WDDX packet", + FlashMessage.ERROR); + + return flashMessage.serializeMessage(); + } + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.authoring.service.IAuthoringService#getAllLearningDesignDetails() + */ + public String getAllLearningDesignDetails()throws IOException{ + Iterator iterator= getAllLearningDesigns().iterator(); + ArrayList arrayList = createDesignDetailsPacket(iterator); + flashMessage = new FlashMessage("getAllLearningDesignDetails",arrayList); + return flashMessage.serializeMessage(); + } + /** + * This is a utility method used by the method + * getAllLearningDesignDetails to pack the + * required information in a data transfer object. + * + * @param iterator + * @return Hashtable The required information in a Hashtable + */ + private ArrayList createDesignDetailsPacket(Iterator iterator){ + ArrayList arrayList = new ArrayList(); + while(iterator.hasNext()){ + LearningDesign learningDesign = (LearningDesign)iterator.next(); + DesignDetailDTO designDetailDTO = learningDesign.getDesignDetailDTO(); + arrayList.add(designDetailDTO); + } + return arrayList; + } + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.authoring.service.IAuthoringService#getLearningDesignsForUser(java.lang.Long) + */ + public String getLearningDesignsForUser(Long userID) throws IOException{ + List list = learningDesignDAO.getLearningDesignByUserId(userID); + ArrayList arrayList = createDesignDetailsPacket(list.iterator()); + flashMessage = new FlashMessage("getLearningDesignsForUser",arrayList); + return flashMessage.serializeMessage(); + } + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.authoring.service.IAuthoringService#getAllLearningLibraryDetails() + */ + public String getAllLearningLibraryDetails()throws IOException{ + Iterator iterator= getAllLearningLibraries().iterator(); + ArrayList libraries = new ArrayList(); + while(iterator.hasNext()){ + LearningLibrary learningLibrary = (LearningLibrary)iterator.next(); + libraries.add(learningLibrary.getLearningLibraryDTO()); + } + flashMessage = new FlashMessage("getAllLearningLibraryDetails",libraries); + return flashMessage.serializeMessage(); + } + + + /** + * Store a theme created on a client. + * @param wddxPacket The WDDX packet received from Flash + * @return String The acknowledgement in WDDX format that the theme has been + * successfully saved. + * @throws Exception + */ + public String storeTheme(String wddxPacket) throws Exception{ + + if(containsNulls(wddxPacket)){ + flashMessage = new FlashMessage("storeTheme", + "WDDXPacket contains null", + FlashMessage.ERROR); + return flashMessage.serializeMessage(); + } + Hashtable table = (Hashtable)WDDXProcessor.deserialize(wddxPacket); + + CSSThemeDTO themeDTO = new CSSThemeDTO(table); + if ( log.isDebugEnabled() ) { + log.debug("Converted Theme packet. Packet was \n"+wddxPacket+ + "\nDTO is\n"+themeDTO); + } + + CSSThemeVisualElement dbTheme = null; + CSSThemeVisualElement storedTheme = null; + if ( themeDTO.getId() != null ) { + // Flash has supplied an id, get the record from the database for update + dbTheme = themeDAO.getThemeById(themeDTO.getId()); + } + + if ( dbTheme == null ) { + storedTheme = themeDTO.createCSSThemeVisualElement(); + } else { + storedTheme = themeDTO.updateCSSTheme(dbTheme); + } + + themeDAO.saveOrUpdateTheme(storedTheme); + flashMessage = new FlashMessage("storeTheme",storedTheme.getId()); + return flashMessage.serializeMessage(); + } + + /** + * Returns a string representing the requested theme in WDDX format + * + * @param learningDesignID The learning_design_id of the design whose WDDX packet is requested + * @return String The requested LearningDesign in WDDX format + * @throws Exception + */ + public String getTheme(Long themeId)throws IOException { + CSSThemeVisualElement theme = themeDAO.getThemeById(themeId); + if(theme==null) + flashMessage = FlashMessage.getNoSuchTheme("wddxPacket",themeId); + else{ + CSSThemeDTO dto = new CSSThemeDTO(theme); + flashMessage = new FlashMessage("getTheme",dto); + } + return flashMessage.serializeMessage(); + } + + + /** + * This method returns a list of all available themes in + * WDDX format. We need to work out if this should be restricted + * by user. + * + * @return String The required information in WDDX format + * @throws IOException + */ + public String getThemes() throws IOException { + List themes = themeDAO.getAllThemes(); + ArrayList themeList = new ArrayList(); + Iterator iterator = themes.iterator(); + while(iterator.hasNext()){ + CSSThemeBriefDTO dto = new CSSThemeBriefDTO((CSSThemeVisualElement)iterator.next()); + themeList.add(dto); + } + flashMessage = new FlashMessage("getThemes",themeList); + return flashMessage.serializeMessage(); + } +} \ No newline at end of file Index: lams_central/src/java/org/lamsfoundation/lams/authoring/service/IAuthoringService.java =================================================================== diff -u --- lams_central/src/java/org/lamsfoundation/lams/authoring/service/IAuthoringService.java (revision 0) +++ lams_central/src/java/org/lamsfoundation/lams/authoring/service/IAuthoringService.java (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,182 @@ +/*************************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * ************************************************************************ + */ +package org.lamsfoundation.lams.authoring.service; + +import java.io.IOException; +import java.util.List; +import org.lamsfoundation.lams.learningdesign.LearningDesign; +import org.lamsfoundation.lams.learningdesign.exception.LearningDesignException; +import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.WorkspaceFolder; +import org.lamsfoundation.lams.usermanagement.exception.UserException; +import org.lamsfoundation.lams.usermanagement.exception.WorkspaceFolderException; + +/** + * @author Manpreet Minhas + */ +public interface IAuthoringService { + + + /** + * Returns a populated LearningDesign object corresponding to the given learningDesignID + * + * @param learningDesignID The learning_design_id of the design which has to be fetched + * @return LearningDesign The populated LearningDesign object corresponding to the given learningDesignID + */ + public LearningDesign getLearningDesign(Long learningDesignID); + + + /** + * Create a copy of learning design as per the requested learning design + * and saves it in the default workspacefolder. + * + * @param originalLearningDesign The source learning design id. + * @param copyType purpose of copying the design. Can have one of the follwing values + *
    + *
  • LearningDesign.COPY_TYPE_NONE (for authoring enviornment)
  • + *
  • LearningDesign.COPY_TYPE_LESSON (for monitoring enviornment while creating a Lesson)
  • + *
  • LearningDesign.COPY_TYPE_PREVIEW (for previewing purposes)
  • + *
+ * @param user The user who has sent this request(author/teacher) + * @return LearningDesign The new copy of learning design. + */ + public LearningDesign copyLearningDesign(LearningDesign originalLearningDesign,Integer copyType,User user); + public LearningDesign copyLearningDesign(LearningDesign originalLearningDesign,Integer copyType,User user, WorkspaceFolder workspaceFolder); + /** + * Create a copy of learning design as per the requested learning design + * and saves it in the given workspacefoler + * + * @param originalLearningDesingID the source learning design id. + * @param copyType purpose of copying the design. Can have one of the follwing values + *
    + *
  • LearningDesign.COPY_TYPE_NONE (for authoring enviornment)
  • + *
  • LearningDesign.COPY_TYPE_LESSON (for monitoring enviornment while creating a Lesson)
  • + *
  • LearningDesign.COPY_TYPE_PREVIEW (for previewing purposes)
  • + *
+ * @param userID The user_id of the user who has sent this request(author/teacher) + * @param workspaceFolderID The workspacefolder where this copy of the design would be saved + * @return String Acknowledgment message for FLASH in WDDX format + */ + public String copyLearningDesign(Long originalLearningDesignID,Integer copyType, + Integer userID, Integer workspaceFolder)throws UserException, LearningDesignException, + WorkspaceFolderException, IOException; + /** + * @return List Returns the list of all the available LearningDesign's + * */ + public List getAllLearningDesigns(); + /** + * Saves the LearningDesign to the database + * @param learningDesign The LearningDesign to be saved + * */ + public void saveLearningDesign(LearningDesign learningDesign); + /** + * Updates and existing LearningDesign in the database + * @param learningDesign The learningDesign to be updated + **/ + public void updateLearningDesign(LearningDesign learningDesign); + + /** + * @return List Returns a list of all available Learning Libraries + */ + public List getAllLearningLibraries(); + + /** + * Returns a string representing the requested LearningDesign in WDDX format + * + * @param learningDesignID The learning_design_id of the design whose WDDX packet is requested + * @return String The requested LearningDesign in WDDX format + * @throws Exception + */ + public String getLearningDesignDetails(Long learningDesignID)throws IOException; + + /** + * This method saves the information which comes in WDDX format + * into the database. It returns An acknowledgemnet message + * telling FLASH the status of the operation, i.e. whether the + * design has been successfully saved or not. If Yes it returns + * the learning_design_id of the design just saved. This information + * is sent back in a format understood by FLASH, WDDX. + * + * @param wddxPacket The WDDX packet to be stored in the database + * @return String The acknowledgemnet message + * @throws Exception + */ + public String storeLearningDesignDetails(String wddxPacket)throws Exception; + + /** + * This method returns a list of all available Learning Designs + * in WDDX format. + * + * @return String The required list in WDDX format + * @throws IOException + */ + public String getAllLearningDesignDetails()throws IOException; + + /** + * Returns a list of LearningDesign's + * in WDDX format, belonging to the given user + * + * @param user The user_id of the User for whom the designs are to be fetched + * @return The requested list of LearningDesign's in WDDX format + * @throws IOException + */ + public String getLearningDesignsForUser(Long userID) throws IOException; + + /** + * This method returns a list of all available system libraries in + * WDDX format. + * + * @return String The required information in WDDX format + * @throws IOException + */ + public String getAllLearningLibraryDetails()throws IOException; + + /** + * Store a theme created on a client. + * @param wddxPacket The WDDX packet received from Flash + * @return String The acknowledgement in WDDX format that the theme has been + * successfully saved. + * @throws Exception + */ + public String storeTheme(String wddxPacket) throws Exception; + + /** + * Returns a string representing the requested theme in WDDX format + * + * @param learningDesignID The learning_design_id of the design whose WDDX packet is requested + * @return String The requested LearningDesign in WDDX format + * @throws Exception + */ + public String getTheme(Long themeId)throws IOException; + + + /** + * This method returns a list of all available themes in + * WDDX format. We need to work out if this should be restricted + * by user. + * + * @return String The required information in WDDX format + * @throws IOException + */ + public String getThemes() throws IOException; +} Index: lams_central/src/java/org/lamsfoundation/lams/authoring/web/AuthoringAction.java =================================================================== diff -u --- lams_central/src/java/org/lamsfoundation/lams/authoring/web/AuthoringAction.java (revision 0) +++ lams_central/src/java/org/lamsfoundation/lams/authoring/web/AuthoringAction.java (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,214 @@ +/*************************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * ************************************************************************ + */ +package org.lamsfoundation.lams.authoring.web; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.actions.DispatchAction; +import org.lamsfoundation.lams.authoring.service.IAuthoringService; +import org.lamsfoundation.lams.learningdesign.exception.LearningDesignException; +import org.lamsfoundation.lams.usermanagement.exception.UserException; +import org.lamsfoundation.lams.usermanagement.exception.WorkspaceFolderException; +import org.lamsfoundation.lams.util.WebUtil; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +/** + * @author Manpreet Minhas + * + * @struts.action name = "AuthoringAction" + * path = "/author" + * parameter = "method" + * validate = "false" + * @struts.action-forward name = "success" path = "/index.jsp" + * + */ +public class AuthoringAction extends DispatchAction{ + + /** If you want the output given as a jsp, set the request parameter "jspoutput" to + * some value other than an empty string (e.g. 1, true, 0, false, blah). + * If you want it returned as a stream (ie for Flash), do not define this parameter + */ + public static String USE_JSP_OUTPUT = "jspoutput"; + + /** Complete Theme to be stored in the db */ + public static final String THEME_PARAMETER = "theme"; + /** Id of theme to be retrieved from the db */ + public static final String THEME_ID_PARAMETER = "themeid"; + + public IAuthoringService getAuthoringService(){ + WebApplicationContext webContext = WebApplicationContextUtils.getRequiredWebApplicationContext(this.getServlet().getServletContext()); + return (IAuthoringService) webContext.getBean("authoringService"); + } + + /** Output the supplied WDDX packet. If the request parameter USE_JSP_OUTPUT + * is set, then it sets the session attribute "parameterName" to the wddx packet string. + * If USE_JSP_OUTPUT is not set, then the packet is written out to the + * request's PrintWriter. + * + * @param mapping action mapping (for the forward to the success jsp) + * @param request needed to check the USE_JSP_OUTPUT parameter + * @param response to write out the wddx packet if not using the jsp + * @param wddxPacket wddxPacket or message to be sent/displayed + * @param parameterName session attribute to set if USE_JSP_OUTPUT is set + * @throws IOException + */ + private ActionForward outputPacket(ActionMapping mapping, HttpServletRequest request, HttpServletResponse response, + String wddxPacket, String parameterName) throws IOException { + String useJSP = WebUtil.readStrParam(request, USE_JSP_OUTPUT, true); + if ( useJSP != null && useJSP.length() >= 0 ) { + request.getSession().setAttribute(parameterName,wddxPacket); + return mapping.findForward("success"); + } else { + PrintWriter writer = response.getWriter(); + writer.println(wddxPacket); + return null; + } + } + + public ActionForward getLearningDesignDetails(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, IOException{ + Long learningDesignID = new Long(WebUtil.readLongParam(request,"learningDesignID")); + IAuthoringService authoringService = getAuthoringService(); + String wddxPacket = authoringService.getLearningDesignDetails(learningDesignID); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + + public ActionForward copyLearningDesign(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, IOException, + UserException, WorkspaceFolderException, + LearningDesignException{ + + Long originalDesignID = new Long(WebUtil.readLongParam(request,"originalDesignID")); + Integer workspaceFolderID = new Integer(WebUtil.readIntParam(request,"workspaceFolderID")); + Integer userID = new Integer(WebUtil.readIntParam(request,"userID")); + Integer copyType = new Integer(WebUtil.readIntParam(request,"copyType")); + IAuthoringService authoringService = getAuthoringService(); + String message = authoringService.copyLearningDesign(originalDesignID,copyType,userID,workspaceFolderID); + return outputPacket(mapping, request, response, message, "message"); + } + public ActionForward getLearningDesignsForUser(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, IOException{ + Long userID = new Long(WebUtil.readLongParam(request,"userID")); + IAuthoringService authoringService = getAuthoringService(); + String wddxPacket = authoringService.getLearningDesignsForUser(userID); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + public ActionForward getAllLearningDesignDetails(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, IOException{ + IAuthoringService authoringService = getAuthoringService(); + String wddxPacket = authoringService.getAllLearningDesignDetails(); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + public ActionForward storeLearningDesignDetails(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, Exception{ + String designDetails = WebUtil.readStrParam(request,"designDetails"); + IAuthoringService authoringService = getAuthoringService(); + String message = authoringService.storeLearningDesignDetails(designDetails); + request.getSession().setAttribute("message",message); + return outputPacket(mapping, request, response, message, "message"); + } + public ActionForward getAllLearningLibraryDetails(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, IOException{ + IAuthoringService authoringService = getAuthoringService(); + String wddxPacket = authoringService.getAllLearningLibraryDetails(); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + + /** + * Store a theme created on a client. + * @return String The acknowledgement in WDDX format that the theme has been + * successfully saved. + * @throws Exception + */ + public ActionForward storeTheme(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, Exception{ + + String theme = WebUtil.readStrParam(request,THEME_PARAMETER); + IAuthoringService authoringService = getAuthoringService(); + String message = authoringService.storeTheme(theme); + request.getSession().setAttribute("message",message); + return outputPacket(mapping, request, response, message, "message"); + } + + /** + * Returns a string representing the requested theme in WDDX format + * + * @param learningDesignID The learning_design_id of the design whose WDDX packet is requested + * @return String The requested LearningDesign in WDDX format + * @throws Exception + */ + public ActionForward getTheme(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, Exception{ + + Long themeId = new Long(WebUtil.readLongParam(request,THEME_ID_PARAMETER)); + IAuthoringService authoringService = getAuthoringService(); + String message = authoringService.getTheme(themeId); + request.getSession().setAttribute("message",message); + return outputPacket(mapping, request, response, message, "message"); + } + + + /** + * This method returns a list of all available themes in + * WDDX format. We need to work out if this should be restricted + * by user. + * + * @return String The required information in WDDX format + * @throws IOException + */ + public ActionForward getThemes(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, Exception{ + + IAuthoringService authoringService = getAuthoringService(); + String message = authoringService.getThemes(); + request.getSession().setAttribute("message",message); + return outputPacket(mapping, request, response, message, "message"); + } +} Index: lams_central/src/java/org/lamsfoundation/lams/workspace/dto/UpdateContentDTO.java =================================================================== diff -u --- lams_central/src/java/org/lamsfoundation/lams/workspace/dto/UpdateContentDTO.java (revision 0) +++ lams_central/src/java/org/lamsfoundation/lams/workspace/dto/UpdateContentDTO.java (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,59 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +package org.lamsfoundation.lams.workspace.dto; + +/** + * @author Manpreet Minhas + */ +public class UpdateContentDTO { + + Long uuid; + Long version; + Long folderContentID; + + public UpdateContentDTO(Long uuid, Long version, Long folderContentID) { + super(); + this.uuid = uuid; + this.version = version; + this.folderContentID = folderContentID; + } + + /** + * @return Returns the folderContentID. + */ + public Long getFolderContentID() { + return folderContentID; + } + /** + * @return Returns the uuID. + */ + public Long getUuid() { + return uuid; + } + /** + * @return Returns the versionID. + */ + public Long getVersion() { + return version; + } +} Index: lams_central/src/java/org/lamsfoundation/lams/workspace/service/IWorkspaceManagementService.java =================================================================== diff -u --- lams_central/src/java/org/lamsfoundation/lams/workspace/service/IWorkspaceManagementService.java (revision 0) +++ lams_central/src/java/org/lamsfoundation/lams/workspace/service/IWorkspaceManagementService.java (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,354 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +package org.lamsfoundation.lams.workspace.service; + +import java.io.IOException; +import java.util.Date; + +import org.lamsfoundation.lams.usermanagement.WorkspaceFolder; +import org.lamsfoundation.lams.usermanagement.exception.UserException; +import org.lamsfoundation.lams.usermanagement.exception.WorkspaceFolderException; + +/** + * @author Manpreet Minhas + */ +public interface IWorkspaceManagementService { + + public static final String REPOSITORY_USERNAME ="workspaceManager"; + public static final String REPOSITORY_PASSWORD ="flashClient"; + public static final String REPOSITORY_WORKSPACE="FlashClientsWorkspace"; + + /** + * This method returns the contents of the folder with given + * workspaceFolderID depending upon the mode. + * Before it does so, it checks whether the given User + * is authorized to perform this action. + * + * The mode can be either of the following + *
    + *
  • AUTHORING In which case all the Learning Designs in the given + * folder are returned OR
  • + *
  • MONITORING In which case only those Learning Designs that are + * valid are returned
  • + *
+ * + * + *

Note: It only returns the top level contents. To navigate to + * the contents of the sub-folders of the given WorkspaceFolder + * we have to call this method again with there workspaceFolderID

+ * + *

For Example:

+ *

For a folder with given tree structure + *

+	 *                       A	 						
+	 * 					     |
+	 * 				--------------------
+	 * 				|        |          |
+	 * 			   A1		A2         A3
+	 * 				|
+	 * 			---------
+	 * 			|		|
+	 * 		   AA1	   AA2
+	 * 
+ * This function will only retun A1, A2 and A3 and to get the contents if A1 we have to again call this + * method with workspaceFolderID of A1. + * + * @param userID The user_id of the User who has requested the contents + * @param workspaceFolderID The workspace_folder_id of the WorkspaceFolder + * whose contents are requested + * @param mode It can be either 1(AUTHORING) or 2(MONITORING) + * @return String The required information in WDDX format + * @throws Exception + */ + public String getFolderContents(Integer userID, Integer workspaceFolderID, Integer mode)throws Exception; + + /** + * This method creates a new folder under the given parentFolder + * inside the user's default workspace. + * + * @param parentFolderID The parent_folder_id of the WorkspaceFolder + * under which the new folder has to be created + * @param name The name of the new folder + * @param userID The user_id of the User who owns this folder + * @return WorkspaceFolder The WorkspaceFolder freshly created + * @throws UserException + * @throws WorkspaceFolderException + */ + public WorkspaceFolder createFolder(Integer parentFolderID, String name, Integer userID) throws UserException,WorkspaceFolderException; + + /** + * This method creates a new folder under the given parentFolder + * inside the user's default workspace. + * + * @param parentFolderID The parent_folder_id under which the new folder + * has to be created + * @param name The name of the new folder + * @param userID The user_id of the user for whom the folder is being created + * @return String The folder_id and name of the newly created folder in WDDX format + * @throws IOException + */ + public String createFolderForFlash(Integer parentFolderID, String name, Integer userID)throws IOException; + + + /** + * This method deletes the WorkspaceFolder with given + * workspaceFolderID. But before it does so it checks whether the + * User is authorized to perform this action
+ * + *

Note:

To be able to a delete a WorkspaceFolder + * successfully you have to keep the following things in mind + *

    + *
  • The folder to be deleted should be empty.
  • + *
  • It should not be the root folder of any Organisation + * or User + *
  • + *

+ * + * @param workspaceFolderID The WorkspaceFolder to be deleted + * @param userID The User who has requested this operation + * @return String The acknowledgement/error message in WDDX format for FLASH + * @throws IOException + */ + public String deleteFolder(Integer workspaceFolderID, Integer userID)throws IOException; + + /** + * This method deletes a LearningDesign with given learningDesignID + * provied the User is authorized to do so. + *

Note:

+ *

    + *
  • The LearningDesign should not be readOnly, + * indicating that a Lesson has already been started + *
  • + *
  • The given LearningDesign should not be acting as a + * parent to any other existing LearningDesign's
  • + *

+ * @param learningDesignID The learning_design_id of the + * LearningDesign to be deleted. + * @param userID The user_id of the User who has + * requested this opeartion + * @return String The acknowledgement/error message in WDDX format for FLASH + * @throws IOException + */ + public String deleteLearningDesign(Long learningDesignID, Integer userID)throws IOException; + + /** + * This method copies one folder inside another folder. To be able to + * successfully perform this action following conditions must be met in the + * order they are listed. + *

    + *
  • The target WorkspaceFolder must exists
  • + *
  • The User with the given userID + * must have OWNER or MEMBERSHIP rights for that WorkspaceFolder + * to be authorized to do so.
  • + *

      + * + *

      Note: By default the copied folder has the same name as that of the + * one being copied. But in case the target WorkspaceFolder already has + * a folder with the same name, an additional "C" is appended to the name of the folder + * thus created.

      + * + * @param folderID The WorkspaceFolder to be copied. + * @param newFolderID The parent WorkspaceFolder under + * which it has to be copied + * @param userID The User who has requested this opeartion + * @return String The acknowledgement/error message to be sent to FLASH + * @throws IOException + */ + public String copyFolder(Integer folderID,Integer newFolderID,Integer userID)throws IOException; + + + /** + * This method moves the given WorkspaceFolder with currentFolderID + * under the WorkspaceFolder with targetFolderID.But before it does so it checks + * whether the User is authorized to do so. + * + *

      + * Note: This method doesn't actually copies the content from one place to another. + * All it does is change the parent_workspace_folder_id of the currentFolder + * to that of the targetFolder

      + * + * @param currentFolderID The WorkspaceFolder to be moved + * @param targetFolderID The WorkspaceFolder under which it has to be moved + * @param userID The User who has requested this opeartion + * @return String The acknowledgement/error message to be sent to FLASH + * @throws IOException + */ + public String moveFolder(Integer currentFolderID,Integer targetFolderID,Integer userID)throws IOException; + + /** + * This method is called every time a new content is inserted into the + * given workspaceFolder. The content to be inserted can be either of + * type FILE or PACKAGE, which is indicated by contentTypeID. + * A value of 1 indicates a FILE and a value of 2 indicates PACKAGE. + * + * After updating the database with the corresponding entry of the new content + * this method then updates the Repository as well. + * + * @param contentTypeID The type of content being added.(FILE/PACKAGE) + * @param name The name of the file + * @param description The description of the file + * @param createDateTime The date and time this content was created + * @param lastModifiedDate The date and time this content was last modified + * @param workspaceFolderID The container(workspaceFolder)which + * holds this content + * @param mimeType The MIME type of the file + * @param path The physical location of the file from where it has to be read + * @return String The acknowledgement/error message in WDDX format for the + * FLASH client. + * @throws Exception + */ + public String createWorkspaceFolderContent(Integer contentTypeID,String name, + String description,Date createDateTime, + Date lastModifiedDate,Integer workspaceFolderID, + String mimeType, String path)throws Exception; + + /** + * This method updates an existing file(workspaceFolderContet) + * with new contents in the Reositiory. + * + * @param folderContentID The folder_content_id of the file + * to be updated + * @param path The physical location of the file from where it has to be read + * @return String The acknowledgement/error message in WDDX format for FLASH + * @throws Exception + */ + public String updateWorkspaceFolderContent(Long folderContentID,String path)throws Exception; + + /** + * This method deletes all versions of the given content (FILE/PACKAGE) + * fom the repository. + * + * @param folderContentID The content to be deleted + * @return String Acknowledgement/error message in WDDX format for FLASH + * @throws Exception + */ + public String deleteWorkspaceFolderContent(Long folderContentID)throws Exception; + + /** + * This method is called when the user knows which version of the + * worksapceFolderContent he wants to delete. + * + * The content to be deleted can be one of the following + *
        + *
      1. The only version available in the repository, + * In which case both the records from the repository + * and the database should be deleted.
      2. + *
      3. The latest version in the repository, in which case + * the database should be updated with the next available + * latest version.
      4. + *
      5. One of the available versions in the repository, in which + * case the corresponding version is deleted from the repository + * and database is not effected
      6. + *
      + * @param uuid The uuid of the workspaceFolderContent + * @param versionToBeDeleted The versionID of the workspaceFolderContent + * @param folderContentID The folder_content_id of the content to be deleted + * @return String Acknowledgement/error message in WDDX format for FLASH + * @throws Exception + */ + public String deleteContentWithVersion(Long uuid, Long versionToBeDeleted,Long folderContentID)throws Exception; + + /** + * This method returns a list of workspace folders for which + * the user has "write" access. A user can write/save his content + * in a folder in one of the following cases + *
        + *
      1. He is the OWNER of the given workspace folder
      2. + *
      3. He is a MEMBER of the organisation to which the + * folder belongs and he has one or all of the follwing + * roles (SYSADMIN. ADMIN, AUTHOR, STAFF, TEACHER)
      4. + *
      + * + * The information returned is categorized under 3 main heads + *
        + *
      • PRIVATE The folder which belongs to the given User
      • + *
      • RUN_SEQUENCES The folder in which user stores his lessons
      • + *
      • ORGANISATIONS List of folders(root folder only) which belong + * to organisations of which user is a member.
      • + *
      + * + * @param userID The user_id of the user for whom the + * folders have to fetched + * @return String The required information in WDDX format + * @throws IOException + */ + public String getAccessibleWorkspaceFolders(Integer userID)throws IOException; + + /** + * This method moves a Learning Design from one workspace + * folder to another.But before it does that it checks whether + * the given User is authorized to do so. + * + * Nothing is physically moved from one folder to another. + * It just changes the workspace_folder_id for the + * given learningdesign in the lams_learning_design_table + * if the User is authorized to do so. + * + * @param learningDesignID The learning_design_id of the + * design to be moved + * @param targetWorkspaceFolderID The workspaceFolder under + * which it has to be moved. + * @param userID The User who is requesting this operation + * @return String Acknowledgement/error message in WDDX format for FLASH + * @throws IOException + */ + public String moveLearningDesign(Long learningDesignID,Integer targetWorkspaceFolderID,Integer userID) throws IOException; + + /** + * This method renames the workspaceFolder with the + * given workspaceFodlerID to newName. + * But before it does that it checks if the user is authorized to + * do so. + * + * @param workspaceFolderID The workspaceFolder to be renamed + * @param newName The newName to be assigned + * @param userID The User who requested this operation + * @return String Acknowledgement/error message in WDDX format for FLASH + * @throws IOException + */ + public String renameWorkspaceFolder(Integer workspaceFolderID,String newName,Integer userID)throws IOException; + + /** + * This method renames the Learning design with given learningDesignID + * to the new title. But before it does that it checks if the user + * is authorized to do so. + * + * @param learningDesignID The learning_design_id of the + * design to be renamed + * @param title The new title + * @param userID The User who requested this operation + * @return String Acknowledgement/error message in WDDX format for FLASH + * @throws IOException + */ + public String renameLearningDesign(Long learningDesignID, String title,Integer userID)throws IOException; + + /** + * This method returns the workspace for the given User + * + * @param userID The userID of the + * @return String The required information in WDDX format + * @throws IOException + */ + public String getWorkspace(Integer userID) throws IOException; + +} Index: lams_central/src/java/org/lamsfoundation/lams/workspace/service/WorkspaceManagementService.java =================================================================== diff -u --- lams_central/src/java/org/lamsfoundation/lams/workspace/service/WorkspaceManagementService.java (revision 0) +++ lams_central/src/java/org/lamsfoundation/lams/workspace/service/WorkspaceManagementService.java (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,975 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +package org.lamsfoundation.lams.workspace.service; + +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Date; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.SortedSet; +import java.util.Vector; + +import org.lamsfoundation.lams.authoring.service.IAuthoringService; +import org.lamsfoundation.lams.contentrepository.AccessDeniedException; +import org.lamsfoundation.lams.contentrepository.FileException; +import org.lamsfoundation.lams.contentrepository.ICredentials; +import org.lamsfoundation.lams.contentrepository.ITicket; +import org.lamsfoundation.lams.contentrepository.IVersionedNode; +import org.lamsfoundation.lams.contentrepository.InvalidParameterException; +import org.lamsfoundation.lams.contentrepository.ItemNotFoundException; +import org.lamsfoundation.lams.contentrepository.LoginException; +import org.lamsfoundation.lams.contentrepository.NodeKey; +import org.lamsfoundation.lams.contentrepository.WorkspaceNotFoundException; +import org.lamsfoundation.lams.contentrepository.service.IRepositoryService; +import org.lamsfoundation.lams.contentrepository.service.RepositoryProxy; +import org.lamsfoundation.lams.contentrepository.service.SimpleCredentials; +import org.lamsfoundation.lams.learningdesign.LearningDesign; +import org.lamsfoundation.lams.learningdesign.dao.ILearningDesignDAO; +import org.lamsfoundation.lams.usermanagement.Role; +import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.UserOrganisation; +import org.lamsfoundation.lams.usermanagement.UserOrganisationRole; +import org.lamsfoundation.lams.usermanagement.Workspace; +import org.lamsfoundation.lams.usermanagement.WorkspaceFolder; +import org.lamsfoundation.lams.usermanagement.dao.IOrganisationDAO; +import org.lamsfoundation.lams.usermanagement.dao.IUserDAO; +import org.lamsfoundation.lams.usermanagement.dao.IUserOrganisationDAO; +import org.lamsfoundation.lams.usermanagement.dao.IWorkspaceDAO; +import org.lamsfoundation.lams.usermanagement.dao.IWorkspaceFolderDAO; +import org.lamsfoundation.lams.usermanagement.dto.UserAccessFoldersDTO; +import org.lamsfoundation.lams.usermanagement.exception.UserException; +import org.lamsfoundation.lams.usermanagement.exception.WorkspaceFolderException; +import org.lamsfoundation.lams.util.wddx.FlashMessage; +import org.lamsfoundation.lams.util.wddx.WDDXTAGS; +import org.lamsfoundation.lams.workspace.WorkspaceFolderContent; +import org.lamsfoundation.lams.workspace.dao.IWorkspaceFolderContentDAO; +import org.lamsfoundation.lams.workspace.dto.FolderContentDTO; +import org.lamsfoundation.lams.workspace.dto.UpdateContentDTO; + +/** + * @author Manpreet Minhas + */ +public class WorkspaceManagementService implements IWorkspaceManagementService{ + + private FlashMessage flashMessage; + + public static final Integer AUTHORING = new Integer(1); + public static final Integer MONITORING = new Integer(2); + + protected IUserDAO userDAO; + protected ILearningDesignDAO learningDesignDAO; + protected IWorkspaceFolderDAO workspaceFolderDAO; + protected IWorkspaceDAO workspaceDAO; + protected IOrganisationDAO organisationDAO; + protected IUserOrganisationDAO userOrganisationDAO; + + protected IWorkspaceFolderContentDAO workspaceFolderContentDAO; + + protected IAuthoringService authoringService; + protected IRepositoryService repositoryService; + + /** + * @param workspaceFolderContentDAO The workspaceFolderContentDAO to set. + */ + public void setWorkspaceFolderContentDAO( + IWorkspaceFolderContentDAO workspaceFolderContentDAO) { + this.workspaceFolderContentDAO = workspaceFolderContentDAO; + } + /** + * @param authoringService The authoringService to set. + */ + public void setAuthoringService(IAuthoringService authoringService) { + this.authoringService = authoringService; + } + /** + * @param organisationDAO The organisationDAO to set. + */ + public void setOrganisationDAO(IOrganisationDAO organisationDAO) { + this.organisationDAO = organisationDAO; + } + /** + * @param workspaceDAO The workspaceDAO to set. + */ + public void setWorkspaceDAO(IWorkspaceDAO workspaceDAO) { + this.workspaceDAO = workspaceDAO; + } + /** + * @param workspaceFolderDAO The workspaceFolderDAO to set. + */ + public void setWorkspaceFolderDAO(IWorkspaceFolderDAO workspaceFolderDAO) { + this.workspaceFolderDAO = workspaceFolderDAO; + } + /** + * @param learningDesignDAO The learningDesignDAO to set. + */ + public void setLearningDesignDAO(ILearningDesignDAO learningDesignDAO) { + this.learningDesignDAO = learningDesignDAO; + } + /** + * @param userDAO The userDAO to set. + */ + public void setUserDAO(IUserDAO userDAO) { + this.userDAO = userDAO; + } + + /** + * @param userOrganisationDAO The userOrganisationDAO to set. + */ + public void setUserOrganisationDAO(IUserOrganisationDAO userOrganisationDAO) { + this.userOrganisationDAO = userOrganisationDAO; + } + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService#deleteFolder(java.lang.Integer, java.lang.Integer) + */ + public String deleteFolder(Integer folderID, Integer userID)throws IOException{ + WorkspaceFolder workspaceFolder = workspaceFolderDAO.getWorkspaceFolderByID(folderID); + User user = userDAO.getUserById(userID); + if(user!=null){ + if(!getPermissions(workspaceFolder,user).equals(WorkspaceFolder.OWNER_ACCESS)){ + flashMessage = FlashMessage.getUserNotAuthorized("deleteFolder",userID); + }else{ + if(workspaceFolder!=null){ + if(isRootFolder(workspaceFolder)) + flashMessage = new FlashMessage("deleteFolder", + "Cannot delete this folder as it is the Root folder.", + FlashMessage.ERROR); + else{ + if(!workspaceFolder.isEmpty()) + flashMessage = new FlashMessage("deleteFolder", + "Cannot delete folder with folder_id of: " + folderID + + " as it is not empty. Please delete its contents first.", + FlashMessage.ERROR); + else{ + workspaceFolderDAO.delete(workspaceFolder); + flashMessage = new FlashMessage("deleteFolder","Folder deleted:" + folderID); + } + } + }else + flashMessage = FlashMessage.getNoSuchWorkspaceFolderExsists("deleteFolder",folderID); + } + }else + flashMessage = FlashMessage.getNoSuchUserExists("deleteFolder",userID); + + return flashMessage.serializeMessage(); + } + /** + * This method checks if the given workspaceFolder is the + * root folder of any Organisation or User + * + * @param workspaceFolder The workspaceFolder to be checked + * @return boolean The boolean value indicating whether it is a + * root folder or not. + */ + private boolean isRootFolder(WorkspaceFolder workspaceFolder){ + try{ + Workspace workspace = workspaceDAO.getWorkspaceByRootFolderID(workspaceFolder.getWorkspaceFolderId()); + if(workspace!=null) + return true; + else + return false; + }catch(Exception e){ + return false; + } + } + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService#getFolderContents(java.lang.Integer, java.lang.Integer, java.lang.Integer) + */ + public String getFolderContents(Integer userID, Integer workspaceFolderID, Integer mode)throws Exception{ + User user = userDAO.getUserById(userID); + WorkspaceFolder workspaceFolder = null; + Integer permissions = null; + if(user!=null){ + workspaceFolder = workspaceFolderDAO.getWorkspaceFolderByID(workspaceFolderID); + if(workspaceFolder!=null){ + permissions = getPermissions(workspaceFolder,user); + if(permissions!=WorkspaceFolder.NO_ACCESS){ + Vector contentDTO = new Vector(); + getFolderContent(workspaceFolder,permissions,mode,contentDTO); + if(workspaceFolder.hasSubFolders()) + getSubFolderDetails(workspaceFolder,permissions,contentDTO); + Vector repositoryContent = getContentsFromRepository(new Long(workspaceFolderID.intValue()),permissions); + if(repositoryContent!=null) + contentDTO.addAll(repositoryContent); + flashMessage = new FlashMessage("getFolderContents",createFolderContentPacket(workspaceFolder,contentDTO)); + } + else + flashMessage = new FlashMessage("getFolderContents", + "Access Denied for user with user_id:" + userID, + FlashMessage.ERROR); + } + else + flashMessage = new FlashMessage("getFolderContents", + "No such workspaceFolder with workspace_folder_id of:" + workspaceFolderID + " exists", + FlashMessage.ERROR); + }else + flashMessage = FlashMessage.getNoSuchUserExists("getFolderContents",userID); + return flashMessage.serializeMessage(); + + } + private void getFolderContent(WorkspaceFolder workspaceFolder, Integer permissions, Integer mode,Vector contentDTO){ + + Integer parentFolderId = workspaceFolder.getParentWorkspaceFolder()!=null? + workspaceFolder.getParentWorkspaceFolder().getWorkspaceFolderId(): + WDDXTAGS.NUMERIC_NULL_VALUE_INTEGER; + List designs = null; + + if(mode==AUTHORING) + designs = learningDesignDAO.getAllLearningDesignsInFolder(workspaceFolder.getWorkspaceFolderId()); + else + designs = learningDesignDAO.getAllValidLearningDesignsInFolder(workspaceFolder.getWorkspaceFolderId()); + + getFolderContentDTO(designs,permissions,contentDTO); + } + private void getSubFolderDetails(WorkspaceFolder workspaceFolder,Integer permissions, Vector subFolderContent){ + Iterator iterator = workspaceFolder.getChildWorkspaceFolders().iterator(); + while(iterator.hasNext()){ + WorkspaceFolder subFolder = (WorkspaceFolder)iterator.next(); + subFolderContent.add(new FolderContentDTO(subFolder,permissions)); + } + } + /** + * This method returns the permissions specific to the given + * workspaceFolder for the given user. + * + * @param workspaceFolder The workspaceFolder for which we need the permissions + * @param user The user for whom these permissions are set. + * @return Integer The permissions + */ + public Integer getPermissions(WorkspaceFolder workspaceFolder, User user){ + Integer permission = null; + WorkspaceFolder userRootFolder = user.getWorkspace().getRootFolder(); + + if(isUserOwner(workspaceFolder,user)) + permission = WorkspaceFolder.OWNER_ACCESS; + else if (isSubFolder(workspaceFolder,userRootFolder)) + { + if(isRunSequencesFolder(workspaceFolder,user)) + permission = WorkspaceFolder.READ_ACCESS; + else + permission = WorkspaceFolder.OWNER_ACCESS; + } + else if (isParentOrganisationFolder(workspaceFolder,user)) + permission = WorkspaceFolder.MEMBERSHIP_ACCESS; + else if(user.hasMemberAccess(workspaceFolder)) + permission = WorkspaceFolder.MEMBERSHIP_ACCESS; + else + permission = WorkspaceFolder.NO_ACCESS; + + return permission; + } + /** This method checks if the given workspaceFolder is a subFolder of the + * given rootFolder*/ + private boolean isSubFolder(WorkspaceFolder workspaceFolder,WorkspaceFolder rootFolder){ + List subFolders = workspaceFolderDAO.getWorkspaceFolderByParentFolder(rootFolder.getWorkspaceFolderId()); + Iterator iterator = subFolders.iterator(); + while(iterator.hasNext()){ + WorkspaceFolder subFolder = (WorkspaceFolder)iterator.next(); + if(subFolder.getWorkspaceFolderId()==workspaceFolder.getWorkspaceFolderId()) + return true; + } + return false; + + } + /** + * Assuming that there is ONLY ONE runSequences folder per user, + * which is created at the time the User is created, this method + * checks if the given workspaceFolder is the runSequences folder + * for the given user. + * + * @param workspaceFolder + * @param user + * @return + */ + public boolean isRunSequencesFolder(WorkspaceFolder workspaceFolder, User user){ + WorkspaceFolder runSequencesFolder = workspaceFolderDAO.getRunSequencesFolderForUser(user.getUserId()); + if(workspaceFolder.getWorkspaceFolderId()==runSequencesFolder.getWorkspaceFolderId()) + return true; + else + return false; + } + /** + * This method checks if the given workspaceFolder is the + * workspaceFolder of the parentOrganisation of which the user is a member. + * + * @param workspaceFolder + * @param user + * @return + */ + public boolean isParentOrganisationFolder(WorkspaceFolder workspaceFolder, User user){ + WorkspaceFolder parentOrganisationFolder = user.getBaseOrganisation().getWorkspace().getRootFolder(); + if(parentOrganisationFolder.getWorkspaceFolderId()==workspaceFolder.getWorkspaceFolderId()) + return true; + else + return false; + } + private Vector getFolderContentDTO(List designs, Integer permissions,Vector folderContent){ + Iterator iterator = designs.iterator(); + while(iterator.hasNext()){ + LearningDesign design = (LearningDesign)iterator.next(); + folderContent.add(new FolderContentDTO(design,permissions)); + } + return folderContent; + + } + private Hashtable createFolderContentPacket(WorkspaceFolder workspaceFolder, Vector contents){ + Hashtable packet = new Hashtable(); + packet.put("parentWorkspaceFolderID", workspaceFolder.getParentWorkspaceFolder().getWorkspaceFolderId()); + packet.put("workspaceFolderID", workspaceFolder.getWorkspaceFolderId()); + packet.put("contents", contents); + return packet; + } + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService#copyFolder(java.lang.Integer, java.lang.Integer, java.lang.Integer) + */ + public String copyFolder(Integer folderID,Integer newFolderID,Integer userID)throws IOException{ + try{ + if(isUserAuthorized(newFolderID,userID)){ + WorkspaceFolder workspaceFolder = workspaceFolderDAO.getWorkspaceFolderByID(folderID); + if(workspaceFolder!=null){ + WorkspaceFolder newFolder = createFolder(newFolderID,workspaceFolder.getName(),userID); + copyRootContent(workspaceFolder,newFolder,userID); + if(workspaceFolder.hasSubFolders()) + createSubFolders(workspaceFolder, newFolder,userID); + flashMessage = new FlashMessage("copyFolder",createCopyFolderPacket(newFolder)); + }else + throw new WorkspaceFolderException(); + }else + flashMessage = FlashMessage.getUserNotAuthorized("copyFolder", userID); + }catch(UserException ue){ + flashMessage = FlashMessage.getNoSuchUserExists("copyFolder",userID); + }catch(WorkspaceFolderException we){ + flashMessage = FlashMessage.getNoSuchWorkspaceFolderExsists("copyFolder",folderID); + } + return flashMessage.serializeMessage(); + } + /** + * This method checks whether the user is authorized to create + * a new folder under the given WorkspaceFolder. + * + * @param folderID The workspace_folder_id of the WorkspaceFolder + * under which the User wants to create/copy folder + * @param userID The User being checked + * @return boolean A boolean value indicating whether or not the User is authorized + * @throws UserException + * @throws WorkspaceFolderException + */ + private boolean isUserAuthorized(Integer folderID, Integer userID)throws UserException, WorkspaceFolderException{ + boolean authorized = false; + User user = userDAO.getUserById(userID); + if(user!=null){ + WorkspaceFolder targetParent = workspaceFolderDAO.getWorkspaceFolderByID(folderID); + if(targetParent!=null){ + Integer permissions = getPermissions(targetParent,user); + if(!permissions.equals(WorkspaceFolder.NO_ACCESS)&& + !permissions.equals(WorkspaceFolder.READ_ACCESS)) + authorized = true; + }else + throw new WorkspaceFolderException(); + }else + throw new UserException(); + + return authorized; + } + private Hashtable createCopyFolderPacket(WorkspaceFolder workspaceFolder){ + Hashtable packet = new Hashtable(); + packet.put("workspaceFolderID", workspaceFolder.getWorkspaceFolderId()); + packet.put("workspaceID",workspaceFolder.getWorkspaceID()); + return packet; + } + public boolean isUserOwner(WorkspaceFolder workspaceFolder, User user){ + List folders = workspaceFolderDAO.getWorkspaceFolderByUser(user.getUserId()); + if(folders!=null && folders.size()!=0){ + Iterator iterator =folders.iterator(); + while(iterator.hasNext()){ + WorkspaceFolder folder = (WorkspaceFolder)iterator.next(); + if(folder.getWorkspaceFolderId()==workspaceFolder.getWorkspaceFolderId()) + return true; + } + } + return false; + } + public void copyRootContent(WorkspaceFolder workspaceFolder,WorkspaceFolder targetWorkspaceFolder, Integer userID)throws UserException{ + User user = userDAO.getUserById(userID); + if(user==null) + throw new UserException("No such user with a userID of " + userID + "exists"); + + List designs = learningDesignDAO.getAllLearningDesignsInFolder(workspaceFolder.getWorkspaceFolderId()); + if(designs!=null && designs.size()!=0){ + Iterator iterator = designs.iterator(); + while(iterator.hasNext()){ + LearningDesign design = (LearningDesign)iterator.next(); + authoringService.copyLearningDesign(design, + new Integer(LearningDesign.COPY_TYPE_NONE), + user,targetWorkspaceFolder); + } + } + } + public WorkspaceFolder createFolder(Integer parentFolderID, String name, Integer userID) throws UserException,WorkspaceFolderException{ + WorkspaceFolder parentFolder = workspaceFolderDAO.getWorkspaceFolderByID(parentFolderID); + User user =null; + Workspace workspace =null; + + if(parentFolder!=null){ + + boolean nameExists = true; + while(nameExists){ + nameExists = ifNameExists(parentFolder,name); + if(nameExists) + name =name + "C"; + else + break; + } + + user = userDAO.getUserById(userID); + if(user!=null){ + workspace = user.getWorkspace(); + WorkspaceFolder workspaceFolder = new WorkspaceFolder(name, + workspace.getWorkspaceId(), + parentFolder, + userID, + new Date(), + new Date(), + WorkspaceFolder.NORMAL); + workspaceFolderDAO.insert(workspaceFolder); + return workspaceFolder; + }else + throw new UserException("No such user with userID of " + userID + "exists"); + + }else + throw new WorkspaceFolderException("No such workspaceFolder with a workspace_folder_id of " + parentFolderID +" exists"); + } + /** + * TODO For now assuming that the folder to be created would be of type NORMAL. + * But the type has to be passed in the near future indicating what kind of + * folder should be created (NORMAL/RUN SEQUENCES) + * @see org.lamsfoundation.lams.authoring.service.IAuthoringService#createFolder(java.lang.Integer, java.lang.String, java.lang.Integer) + */ + public String createFolderForFlash(Integer parentFolderID, String name, Integer userID)throws IOException{ + try{ + WorkspaceFolder newFolder = createFolder(parentFolderID,name,userID); + Hashtable table = new Hashtable(); + table.put("folderID",newFolder.getWorkspaceFolderId()); + table.put("name",newFolder.getName()); + flashMessage = new FlashMessage("createFolderForFlash",table); + + }catch(WorkspaceFolderException we){ + flashMessage = FlashMessage.getNoSuchWorkspaceFolderExsists("createFolderForFlash",parentFolderID); + }catch(UserException ue){ + flashMessage = FlashMessage.getNoSuchUserExists("createFolderForFlash",userID); + } + return flashMessage.serializeMessage(); + } + private boolean ifNameExists(WorkspaceFolder targetFolder,String folderName){ + List folders = workspaceFolderDAO.getWorkspaceFolderByParentFolder(targetFolder.getWorkspaceFolderId()); + if(folders!=null && folders.size()!=0){ + Iterator iterator = folders.iterator(); + while(iterator.hasNext()){ + WorkspaceFolder folder = (WorkspaceFolder)iterator.next(); + if(folder.getName().equalsIgnoreCase(folderName)) + return true; + } + } + return false; + } + public void createSubFolders(WorkspaceFolder workspaceFolder, WorkspaceFolder newFolder, Integer userID) throws UserException, WorkspaceFolderException{ + Iterator subFoldersIterator = workspaceFolder.getChildWorkspaceFolders().iterator(); + while(subFoldersIterator.hasNext()){ + WorkspaceFolder subFolder = (WorkspaceFolder)subFoldersIterator.next(); + WorkspaceFolder newSubFolder = createFolder(newFolder.getWorkspaceFolderId(),subFolder.getName(),userID); + copyRootContent(subFolder,newSubFolder,userID); + if(subFolder.hasSubFolders()) + createSubFolders(subFolder,newSubFolder,userID); + } + } + /** + * TODO Deleting a LearningDesign would mean deleting all its corresponding + * activities, transitions and the content related to such activities. + * Deletion of content has to be yet taken care of. Since Tools manage there + * own content.Just need to cross-check this once tools are functional + * (non-Javadoc) + * @see org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService#deleteLearningDesign(java.lang.Long) + */ + public String deleteLearningDesign(Long learningDesignID, Integer userID)throws IOException{ + User user = userDAO.getUserById(userID); + if(user!=null){ + LearningDesign learningDesign = learningDesignDAO.getLearningDesignById(learningDesignID); + if(learningDesign!=null){ + if(learningDesign.getUser().getUserId().equals(user.getUserId())){ + if(learningDesign.getReadOnly().booleanValue()){ + flashMessage = new FlashMessage("deleteLearningDesign", + "Cannot delete design with learning_design_id of:" + learningDesignID + + " as it is READ ONLY.", + FlashMessage.ERROR); + }else{ + List list = learningDesignDAO.getLearningDesignsByParent(learningDesignID); + if(list==null || list.size()==0){ + learningDesignDAO.delete(learningDesign); + flashMessage = new FlashMessage("deleteLearningDesign","Learning Design deleted: "+ learningDesignID); + } + else + flashMessage = new FlashMessage("deleteLearningDesign", + "Cannot delete design with learning_design_id of:" + learningDesignID + + " as it is a PARENT.", + FlashMessage.ERROR); + } + }else + flashMessage = FlashMessage.getUserNotAuthorized("deleteLearningDesign",userID); + }else + flashMessage = FlashMessage.getNoSuchLearningDesignExists("deleteLearningDesign",learningDesignID); + }else + flashMessage = FlashMessage.getNoSuchUserExists("deleteLearningDesign",userID); + + return flashMessage.serializeMessage(); + } + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService#moveFolder(java.lang.Integer, java.lang.Integer, java.lang.Integer) + */ + public String moveFolder(Integer currentFolderID,Integer targetFolderID,Integer userID)throws IOException{ + try{ + if(isUserAuthorized(targetFolderID,userID)){ + WorkspaceFolder currentFolder = workspaceFolderDAO.getWorkspaceFolderByID(currentFolderID); + if(currentFolder!=null){ + WorkspaceFolder targetFolder = workspaceFolderDAO.getWorkspaceFolderByID(targetFolderID); + currentFolder.setParentWorkspaceFolder(targetFolder); + workspaceFolderDAO.update(currentFolder); + flashMessage = new FlashMessage("moveFolder",currentFolderID); + }else + throw new WorkspaceFolderException(); + }else + flashMessage = FlashMessage.getUserNotAuthorized("moveFolder", userID); + }catch(UserException ue){ + flashMessage = FlashMessage.getNoSuchUserExists("moveFolder", userID); + }catch(WorkspaceFolderException we){ + flashMessage = FlashMessage.getNoSuchWorkspaceFolderExsists("moveFolder",targetFolderID); + } + return flashMessage.serializeMessage(); + } + /** + * This method verifies the credentials of the Workspace Manager + * and gives him the Ticket to login and access the Content Repository. + * A valid ticket is needed in order to access the content from the repository. + * This method would be called evertime the user(Workspace Manager) receives + * a request to get the contents of the Folder or to add/update a file into + * the WorkspaceFodler (Repository). + * + * @return ITicket The ticket for repostory access + */ + private ITicket getRepositoryLoginTicket(){ + repositoryService = RepositoryProxy.getLocalRepositoryService(); + ICredentials credentials = new SimpleCredentials(IWorkspaceManagementService.REPOSITORY_USERNAME, + IWorkspaceManagementService.REPOSITORY_PASSWORD.toCharArray()); + try{ + ITicket ticket = repositoryService.login(credentials,IWorkspaceManagementService.REPOSITORY_WORKSPACE); + return ticket; + }catch(AccessDeniedException ae){ + ae.printStackTrace(); + return null; + }catch(WorkspaceNotFoundException we){ + we.printStackTrace(); + return null; + }catch (LoginException e) { + e.printStackTrace(); + return null; + } + } + + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService#createWorkspaceFolderContent(java.lang.Integer, java.lang.String, java.lang.String, java.util.Date, java.util.Date, java.lang.Integer, java.lang.String, java.lang.String) + */ + public String createWorkspaceFolderContent(Integer contentTypeID,String name, + String description,Date createDateTime, + Date lastModifiedDate,Integer workspaceFolderID, + String mimeType, String path)throws Exception{ + // TODO add some validation so that a non-unique name doesn't result in an index violation + // bit hard for the user to understand. + WorkspaceFolder workspaceFolder = workspaceFolderDAO.getWorkspaceFolderByID(workspaceFolderID); + if(workspaceFolder!=null){ + WorkspaceFolderContent workspaceFolderContent = new WorkspaceFolderContent(contentTypeID,name,description,createDateTime,lastModifiedDate,mimeType,workspaceFolder); + workspaceFolderContentDAO.insert(workspaceFolderContent); + try{ + InputStream stream = new FileInputStream(path); + NodeKey nodeKey = addFileToRepository(stream,name,mimeType); + workspaceFolderContent.setUuid(nodeKey.getUuid()); + workspaceFolderContent.setVersionID(nodeKey.getVersion()); + workspaceFolderContentDAO.update(workspaceFolderContent); + + UpdateContentDTO contentDTO = new UpdateContentDTO(nodeKey.getUuid(), nodeKey.getVersion(), + new Long(workspaceFolder.getWorkspaceFolderId().longValue())); + flashMessage = new FlashMessage("createWorkspaceFolderContent",contentDTO); + + }catch(AccessDeniedException ae){ + flashMessage = new FlashMessage("createWorkspaceFolderContent", + "Exception occured while creating workspaceFolderContent: "+ ae.getMessage(), + FlashMessage.CRITICAL_ERROR); + }catch(FileException fe){ + flashMessage = new FlashMessage("createWorkspaceFolderContent", + "Exception occured while creating workspaceFolderContent: "+ fe.getMessage(), + FlashMessage.CRITICAL_ERROR); + + }catch(InvalidParameterException ip){ + flashMessage = new FlashMessage("createWorkspaceFolderContent", + "Exception occured while creating workspaceFolderContent: "+ ip.getMessage(), + FlashMessage.CRITICAL_ERROR); + } + }else + flashMessage = FlashMessage.getNoSuchWorkspaceFolderExsists("createWorkspaceFolderContent",workspaceFolderID); + return flashMessage.serializeMessage(); + } + + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService#updateWorkspaceFolderContent(java.lang.Long, java.io.InputStream) + */ + public String updateWorkspaceFolderContent(Long folderContentID,String path)throws Exception{ + InputStream stream = new FileInputStream(path); + WorkspaceFolderContent workspaceFolderContent = workspaceFolderContentDAO.getWorkspaceFolderContentByID(folderContentID); + if(workspaceFolderContent!=null){ + NodeKey nodeKey = updateFileInRepository(workspaceFolderContent,stream); + UpdateContentDTO contentDTO = new UpdateContentDTO(nodeKey.getUuid(), nodeKey.getVersion(),folderContentID); + flashMessage = new FlashMessage("updateWorkspaceFolderContent",contentDTO); + }else + flashMessage = FlashMessage.getNoSuchWorkspaceFolderContentExsists("updateWorkspaceFolderContent",folderContentID); + return flashMessage.serializeMessage(); + } + + /** + * This method is called everytime a new content has to be + * added to the repository. In order to do so first of all + * a valid ticket is obtained from the Repository hence + * authenticating the user(WorkspaceManager) and then + * the corresponding file is added to the repository. + * + * @param stream The InputStream representing the data to be added + * @param fileName The name of the file being added + * @param mimeType The MIME type of the file (eg. TXT, DOC, GIF etc) + * @return NodeKey Represents the two part key - UUID and Version. + * @throws AccessDeniedException + * @throws FileException + * @throws InvalidParameterException + */ + private NodeKey addFileToRepository(InputStream stream, String fileName, String mimeType)throws AccessDeniedException, + FileException,InvalidParameterException{ + ITicket ticket = getRepositoryLoginTicket(); + NodeKey nodeKey = repositoryService.addFileItem(ticket,stream,fileName,mimeType,null); + return nodeKey; + } + /** + * This method is called everytime some content has to be + * updated into the repository. In order to do so first of all + * a valid ticket is obtained from the Repository hence + * authenticating the user(WorkspaceManager) and then + * the corresponding file is updated to the repository. + * + * @param workspaceFolderContent The content to be updated + * @param stream stream The InputStream representing the data to be updated + * @return NodeKey Represents the two part key - UUID and Version. + * @throws Exception + */ + private NodeKey updateFileInRepository(WorkspaceFolderContent workspaceFolderContent, + InputStream stream)throws Exception{ + ITicket ticket = getRepositoryLoginTicket(); + NodeKey nodeKey = repositoryService.updateFileItem(ticket,workspaceFolderContent.getUuid(), + workspaceFolderContent.getName(), + stream,workspaceFolderContent.getMimeType(),null); + workspaceFolderContent.setUuid(nodeKey.getUuid()); + workspaceFolderContent.setVersionID(nodeKey.getVersion()); + workspaceFolderContentDAO.update(workspaceFolderContent); + return nodeKey; + } + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService#deleteContentWithVersion(java.lang.Long, java.lang.Long, java.lang.Long) + */ + public String deleteContentWithVersion(Long uuid, Long versionToBeDeleted,Long folderContentID)throws Exception{ + WorkspaceFolderContent workspaceFolderContent = workspaceFolderContentDAO.getWorkspaceFolderContentByID(folderContentID); + Long databaseVersion = workspaceFolderContent.getVersionID(); + + ITicket ticket = getRepositoryLoginTicket(); + String files[]=null; + try{ + files = repositoryService.deleteVersion(ticket,uuid,versionToBeDeleted); + }catch(ItemNotFoundException ie){ + flashMessage = new FlashMessage("deleteContentWithVersion", + "No such content with versionID of " + versionToBeDeleted + " found in repository", + FlashMessage.ERROR); + return flashMessage.serializeMessage(); + } + + /* + * ItemNotFoundException exception will be thrown if the version deleted + * above was the only version available in the repository. If that is the + * case the corresponding record from the database should also be deleted + * + * If ItemNotFoundException is not thrown that means there are some other + * versions of the content that are available, and it returns the latest + * version. + * + * If databaseVersion is same as versionToBeDeleted we update the database with + * the next available latest version , IF NOT no changes are made to the + * database. + */ + + try{ + IVersionedNode latestAvailableNode = repositoryService.getFileItem(ticket,uuid,null); + Long latestAvailableVersion = latestAvailableNode.getVersion(); + if(databaseVersion.equals(versionToBeDeleted)){ + workspaceFolderContent.setVersionID(latestAvailableVersion); + workspaceFolderContentDAO.update(workspaceFolderContent); + } + flashMessage = new FlashMessage("deleteContentWithVersion","Content Successfully deleted"); + }catch(ItemNotFoundException ie){ + workspaceFolderContentDAO.delete(workspaceFolderContent); + flashMessage = new FlashMessage("deleteContentWithVersion","Content Successfully deleted"); + } + + return flashMessage.serializeMessage(); + } + + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService#deleteWorkspaceFolderContent(java.lang.Long, boolean) + */ + public String deleteWorkspaceFolderContent(Long folderContentID)throws Exception{ + WorkspaceFolderContent workspaceFolderContent = workspaceFolderContentDAO.getWorkspaceFolderContentByID(folderContentID); + if(workspaceFolderContent!=null){ + Long uuid = workspaceFolderContent.getUuid(); + Long versionID = workspaceFolderContent.getVersionID(); + ITicket ticket = getRepositoryLoginTicket(); + String files[] = repositoryService.deleteNode(ticket,uuid); + workspaceFolderContentDAO.delete(workspaceFolderContent); + flashMessage = new FlashMessage("deleteWorkspaceFolderContent","Content deleted"); + }else + flashMessage = FlashMessage.getNoSuchWorkspaceFolderContentExsists("deleteWorkspaceFolderContent",folderContentID); + + return flashMessage.serializeMessage(); + + } + /** + * TODO + * This method returns the contents of the given folder from the + * repository. As of now I am assuming that a folder contains only + * FILES and not PACKAGES. This method would be modified in the near + * future to return a list of PACKAGES contained as well. + * + * For every file contained within the given WorkspaceFolder + * this method also returns a list of all its availabe versions. + * + * @param workspaceFolderID The WorkspaceFolder whose contents have been + * requested from the Repositor + * @param permissions The permissions on this WorkspaceFolder and hence all its contents + * @return Vector A collection of required information. + * @throws Exception + */ + private Vector getContentsFromRepository(Long workspaceFolderID, Integer permissions)throws Exception{ + List content = workspaceFolderContentDAO.getContentByWorkspaceFolder(workspaceFolderID); + if(content.size()==0) + return null; + else{ + ITicket ticket = getRepositoryLoginTicket(); + Vector repositoryContent = new Vector(); + Iterator contentIterator = content.iterator(); + while(contentIterator.hasNext()){ + WorkspaceFolderContent workspaceFolderContent = (WorkspaceFolderContent)contentIterator.next(); + SortedSet set = repositoryService.getVersionHistory(ticket,workspaceFolderContent.getUuid()); + repositoryContent.add(new FolderContentDTO(permissions, workspaceFolderContent, set)); + } + return repositoryContent; + } + } + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService#getAccessibleWorkspaceFolders(java.lang.Integer) + */ + public String getAccessibleWorkspaceFolders(Integer userID) throws IOException { + User user = userDAO.getUserById(userID); + Hashtable table = new Hashtable(); + Vector workspaces = new Vector(); + + if (user != null) { + //add the user's own folder to the list + table.put("PRIVATE", new UserAccessFoldersDTO(user.getWorkspace().getRootFolder())); + table.put("RUN_SEQUENCES", new UserAccessFoldersDTO(workspaceFolderDAO.getRunSequencesFolderForUser(user.getUserId()))); + + // Get a list of organisations of which the given user is a member + List userMemberships = userOrganisationDAO.getUserOrganisationsByUser(user); + if (userMemberships != null) { + Iterator memberships = userMemberships.iterator(); + while (memberships.hasNext()) { + UserOrganisation member = (UserOrganisation) memberships.next(); + // Get a list of roles that the user has in this organisation + Set roles = member.getUserOrganisationRoles(); + + /*Check if the user has write access, which is available + * only if the user has an AUTHOR, TEACHER or STAFF role. If + * he has acess add that folder to the list. + */ + if (hasWriteAccess(roles)) { + workspaces.add(new UserAccessFoldersDTO(member.getOrganisation().getWorkspace().getRootFolder())); + } + } + table.put("ORGANISATIONS", workspaces); + flashMessage = new FlashMessage("getAccessibleWorkspaceFolders", table); + }else + flashMessage = new FlashMessage("getAccessibleWorkspaceFolders", + "User with user_id of: " + userID + + " is not a member of any organisation", + FlashMessage.ERROR); + } else + flashMessage = FlashMessage.getNoSuchUserExists("getAccessibleWorkspaceFolders", userID); + + return flashMessage.serializeMessage(); + } + /** + * This a utility method that checks whether user has write access. He can + * save his contents to a folder only if he is an AUTHOR,TEACHER or STAFF + * + * @param roles + * Set of roles that the user has + * @return boolean + * A boolean value indicating whether the user has "write" + * access or not. + */ + private boolean hasWriteAccess(Set roles) { + boolean access = false; + Iterator roleIterator = roles.iterator(); + while (roleIterator.hasNext()) { + UserOrganisationRole userOrganisationRole = (UserOrganisationRole) roleIterator.next(); + Role role = userOrganisationRole.getRole(); + if (role.isAuthor() || role.isStaff() || role.isTeacher()) + access = true; + } + return access; + } + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService#moveLearningDesign(java.lang.Long, java.lang.Integer, java.lang.Integer) + */ + public String moveLearningDesign(Long learningDesignID, + Integer targetWorkspaceFolderID, + Integer userID) throws IOException { + try{ + if(isUserAuthorized(targetWorkspaceFolderID,userID)){ + LearningDesign learningDesign = learningDesignDAO.getLearningDesignById(learningDesignID); + if (learningDesign != null) { + WorkspaceFolder workspaceFolder = workspaceFolderDAO.getWorkspaceFolderByID(targetWorkspaceFolderID); + if(workspaceFolder != null){ + learningDesign.setWorkspaceFolder(workspaceFolder); + learningDesignDAO.update(learningDesign); + //flashMessage = new FlashMessage("moveLearningDesign","New WorkspaceFolderID is " + targetWorkspaceFolderID); + flashMessage = new FlashMessage("moveLearningDesign", targetWorkspaceFolderID); + }else + flashMessage = FlashMessage.getNoSuchWorkspaceFolderExsists("moveLearningDesign",targetWorkspaceFolderID); + }else + flashMessage = FlashMessage.getNoSuchLearningDesignExists("moveLearningDesign", learningDesignID); + }else + flashMessage = FlashMessage.getUserNotAuthorized("moveLearningDesign",userID); + }catch(UserException ue){ + flashMessage = FlashMessage.getNoSuchUserExists("moveLearningDesign", userID); + }catch(WorkspaceFolderException we){ + flashMessage = FlashMessage.getNoSuchWorkspaceFolderExsists("moveLearningDesign",targetWorkspaceFolderID); + } + return flashMessage.serializeMessage(); + } + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService#renameWorkspaceFolder(java.lang.Long, java.lang.String, java.lang.Integer) + */ + public String renameWorkspaceFolder(Integer workspaceFolderID,String newName,Integer userID)throws IOException{ + try{ + WorkspaceFolder folder = workspaceFolderDAO.getWorkspaceFolderByID(workspaceFolderID); + if(folder!=null){ + WorkspaceFolder parent = folder.getParentWorkspaceFolder(); + if(parent!=null){ + if(isUserAuthorized(workspaceFolderID,userID)){ + if(!ifNameExists(parent,newName)){ + folder.setName(newName); + workspaceFolderDAO.update(folder); + flashMessage = new FlashMessage("renameWorkspaceFolder",newName); + }else + flashMessage = new FlashMessage("renameWorkspaceFolder", + "A folder with given name '" + newName + "' already exists.", + FlashMessage.ERROR); + }else + flashMessage = FlashMessage.getUserNotAuthorized("renameWorkspaceFolder",userID); + }else + flashMessage = new FlashMessage("renameWorkspaceFolder", + "Cannot rename the ROOT folder", + FlashMessage.ERROR); + }else + flashMessage = FlashMessage.getNoSuchWorkspaceFolderExsists("renameWorkspaceFolder",workspaceFolderID); + }catch(UserException ue){ + flashMessage = FlashMessage.getNoSuchUserExists("renameWorkspaceFolder", userID); + }catch(WorkspaceFolderException we){ + flashMessage = FlashMessage.getNoSuchWorkspaceFolderExsists("renameWorkspaceFolder",workspaceFolderID); + } + return flashMessage.serializeMessage(); + } + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService#renameLearningDesign(java.lang.Long, java.lang.String, java.lang.Integer) + */ + public String renameLearningDesign(Long learningDesignID, String title,Integer userID)throws IOException { + LearningDesign design = learningDesignDAO.getLearningDesignById(learningDesignID); + Integer folderID = null; + try{ + if(design!=null){ + folderID = design.getWorkspaceFolder().getWorkspaceFolderId(); + if(isUserAuthorized(folderID,userID)){ + design.setTitle(title); + learningDesignDAO.update(design); + flashMessage = new FlashMessage("renameLearningDesign",title); + }else + flashMessage = FlashMessage.getUserNotAuthorized("renameLearningDesign",userID); + }else + flashMessage = FlashMessage.getNoSuchLearningDesignExists("renameLearningDesign",learningDesignID); + }catch(UserException ue){ + flashMessage = FlashMessage.getNoSuchUserExists("renameWorkspaceFolder", userID); + }catch(WorkspaceFolderException we){ + flashMessage = FlashMessage.getNoSuchWorkspaceFolderExsists("renameWorkspaceFolder",folderID); + } + return flashMessage.serializeMessage(); + } + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService#getWorkspace(java.lang.Integer) + */ + public String getWorkspace(Integer userID) throws IOException { + User user = userDAO.getUserById(userID); + if (user != null) { + Workspace workspace = user.getWorkspace(); + flashMessage = new FlashMessage("getWorkspace", workspace.getWorkspaceDTO()); + } else + flashMessage = FlashMessage.getNoSuchUserExists("getWorkspace",userID); + return flashMessage.serializeMessage(); + } + +} Index: lams_central/src/java/org/lamsfoundation/lams/workspace/web/WorkspaceAction.java =================================================================== diff -u --- lams_central/src/java/org/lamsfoundation/lams/workspace/web/WorkspaceAction.java (revision 0) +++ lams_central/src/java/org/lamsfoundation/lams/workspace/web/WorkspaceAction.java (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,439 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +package org.lamsfoundation.lams.workspace.web; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Date; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.actions.DispatchAction; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +/** + * @author Manpreet Minhas + * @struts.action + * path = "/workspace" + * parameter = "method" + * validate = "false" + * @struts.action-forward name = "success" path = "/index.jsp" + */ +public class WorkspaceAction extends DispatchAction { + + /** If you want the output given as a jsp, set the request parameter "jspoutput" to + * some value other than an empty string (e.g. 1, true, 0, false, blah). + * If you want it returned as a stream (ie for Flash), do not define this parameter + */ + public static String USE_JSP_OUTPUT = "jspoutput"; + + /** + * @return + */ + public IWorkspaceManagementService getWorkspaceManagementService(){ + WebApplicationContext webContext = WebApplicationContextUtils.getRequiredWebApplicationContext(this.getServlet().getServletContext()); + return (IWorkspaceManagementService) webContext.getBean("workspaceManagementService"); + } + + /** Output the supplied WDDX packet. If the request parameter USE_JSP_OUTPUT + * is set, then it sets the session attribute "parameterName" to the wddx packet string. + * If USE_JSP_OUTPUT is not set, then the packet is written out to the + * request's PrintWriter. + * + * @param mapping action mapping (for the forward to the success jsp) + * @param request needed to check the USE_JSP_OUTPUT parameter + * @param response to write out the wddx packet if not using the jsp + * @param wddxPacket wddxPacket or message to be sent/displayed + * @param parameterName session attribute to set if USE_JSP_OUTPUT is set + * @throws IOException + */ + private ActionForward outputPacket(ActionMapping mapping, HttpServletRequest request, HttpServletResponse response, + String wddxPacket, String parameterName) throws IOException { + String useJSP = WebUtil.readStrParam(request, USE_JSP_OUTPUT, true); + if ( useJSP != null && useJSP.length() >= 0 ) { + request.getSession().setAttribute(parameterName,wddxPacket); + return mapping.findForward("success"); + } else { + PrintWriter writer = response.getWriter(); + writer.println(wddxPacket); + return null; + } + } + /** + * For details please refer to + * org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + * @throws ServletException + * @throws IOException + */ + public ActionForward createFolderForFlash(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException,IOException{ + Integer parentFolderID = new Integer(WebUtil.readIntParam(request,"parentFolderID")); + String folderName = (String)WebUtil.readStrParam(request,"name"); + Integer userID = new Integer(WebUtil.readIntParam(request,"userID")); + IWorkspaceManagementService workspaceManagementService = getWorkspaceManagementService(); + String wddxPacket = workspaceManagementService.createFolderForFlash(parentFolderID,folderName,userID); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + + /** + * For details please refer to + * org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService + * + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + * @throws ServletException + * @throws Exception + */ + public ActionForward getFolderContents(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException,Exception{ + Integer folderID = new Integer(WebUtil.readIntParam(request,"folderID")); + Integer mode = new Integer(WebUtil.readIntParam(request,"mode")); + Integer userID = new Integer(WebUtil.readIntParam(request,"userID")); + IWorkspaceManagementService workspaceManagementService = getWorkspaceManagementService(); + String wddxPacket = workspaceManagementService.getFolderContents(userID,folderID,mode); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + + /** + * For details please refer to + * org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService + * + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + * @throws ServletException + * @throws IOException + */ + public ActionForward deleteFolder(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, IOException{ + Integer folderID = new Integer(WebUtil.readIntParam(request,"folderID")); + Integer userID = new Integer(WebUtil.readIntParam(request,"userID")); + IWorkspaceManagementService workspaceManagementService = getWorkspaceManagementService(); + String wddxPacket = workspaceManagementService.deleteFolder(folderID,userID); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + + /** + * For details please refer to + * org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService + * + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + * @throws ServletException + * @throws IOException + */ + public ActionForward deleteLearningDesign(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, IOException{ + Long learningDesignID = new Long(WebUtil.readIntParam(request,"learningDesignID")); + Integer userID = new Integer(WebUtil.readIntParam(request,"userID")); + IWorkspaceManagementService workspaceManagementService = getWorkspaceManagementService(); + String wddxPacket = workspaceManagementService.deleteLearningDesign(learningDesignID,userID); + return outputPacket(mapping, request, response, wddxPacket, "details"); + + } + + /** + * For details please refer to + * org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService + * + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + * @throws ServletException + * @throws IOException + */ + public ActionForward copyFolder(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, IOException{ + Integer folderID = new Integer(WebUtil.readIntParam(request,"folderID")); + Integer targetFolderID = new Integer(WebUtil.readIntParam(request,"targetFolderID")); + Integer userID = new Integer(WebUtil.readIntParam(request,"userID")); + IWorkspaceManagementService workspaceManagementService = getWorkspaceManagementService(); + String wddxPacket = workspaceManagementService.copyFolder(folderID,targetFolderID,userID); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + + /** + * For details please refer to + * org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService + * + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + * @throws ServletException + * @throws IOException + */ + public ActionForward moveFolder(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, IOException{ + Integer currentFolderID = new Integer(WebUtil.readIntParam(request,"currentFolderID")); + Integer targetFolderID = new Integer(WebUtil.readIntParam(request,"targetFolderID")); + Integer userID = new Integer(WebUtil.readIntParam(request,"userID")); + IWorkspaceManagementService workspaceManagementService = getWorkspaceManagementService(); + String wddxPacket = workspaceManagementService.moveFolder(currentFolderID,targetFolderID,userID); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + + /** + * For details please refer to + * org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService + * + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + * @throws ServletException + * @throws Exception + */ + public ActionForward createWorkspaceFolderContent(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, Exception{ + Integer contentTypeID = new Integer(WebUtil.readIntParam(request,"contentType")); + String name = WebUtil.readStrParam(request,"name"); + String description = WebUtil.readStrParam(request,"description"); + Date createDateTime = new Date(WebUtil.readStrParam(request,"createDateTime")); + Date lastModifiedDate = new Date(WebUtil.readStrParam(request,"lastModifiedDateTime")); + Integer workspaceFolderID = new Integer(WebUtil.readIntParam(request,"workspaceFolderID")); + String mimeType = WebUtil.readStrParam(request,"mimeType"); + String path = WebUtil.readStrParam(request,"path"); + + IWorkspaceManagementService workspaceManagementService = getWorkspaceManagementService(); + String wddxPacket = workspaceManagementService.createWorkspaceFolderContent(contentTypeID,name,description, + createDateTime,lastModifiedDate,workspaceFolderID, + mimeType,path); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + /** + * For details please refer to + * org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService + * + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + * @throws ServletException + * @throws Exception + */ + public ActionForward updateWorkspaceFolderContent(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, Exception{ + Long folderContentID = new Long(WebUtil.readLongParam(request,"folderContentID")); + String path = WebUtil.readStrParam(request,"path"); + IWorkspaceManagementService workspaceManagementService = getWorkspaceManagementService(); + String wddxPacket = workspaceManagementService.updateWorkspaceFolderContent(folderContentID,path); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + /** + * For details please refer to + * org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService + * + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + * @throws ServletException + * @throws Exception + */ + public ActionForward deleteWorkspaceFolderContent(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws ServletException, Exception{ + Long folderContentID = new Long(WebUtil.readLongParam(request,"folderContentID")); + IWorkspaceManagementService workspaceManagementService = getWorkspaceManagementService(); + String wddxPacket = workspaceManagementService.deleteWorkspaceFolderContent(folderContentID); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + /** + * For details please refer to + * org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService + * + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + * @throws IOException + */ + public ActionForward getAccessibleWorkspaceFolders(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws IOException{ + Integer userID = new Integer(WebUtil.readIntParam(request,"userID")); + IWorkspaceManagementService workspaceManagementService = getWorkspaceManagementService(); + String wddxPacket = workspaceManagementService.getAccessibleWorkspaceFolders(userID); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + /** + * For details please refer to + * org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService + * + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + * @throws IOException + */ + public ActionForward moveLearningDesign(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws IOException{ + Integer userID = new Integer(WebUtil.readIntParam(request,"userID")); + Integer targetFolderID = new Integer(WebUtil.readIntParam(request,"targetFolderID")); + Long learningDesignID = new Long(WebUtil.readIntParam(request,"learningDesignID")); + IWorkspaceManagementService workspaceManagementService = getWorkspaceManagementService(); + String wddxPacket = workspaceManagementService.moveLearningDesign(learningDesignID,targetFolderID,userID); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + /** + * For details please refer to + * org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService + * + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + * @throws IOException + */ + public ActionForward renameWorkspaceFolder(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws IOException{ + Integer userID = new Integer(WebUtil.readIntParam(request,"userID")); + Integer folderID = new Integer(WebUtil.readIntParam(request,"folderID")); + String name = WebUtil.readStrParam(request,"name"); + IWorkspaceManagementService workspaceManagementService = getWorkspaceManagementService(); + String wddxPacket = workspaceManagementService.renameWorkspaceFolder(folderID,name,userID); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + + /** + * For details please refer to + * org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService + * + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + * @throws IOException + */ + public ActionForward renameLearningDesign(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws IOException{ + Integer userID = new Integer(WebUtil.readIntParam(request,"userID")); + Long learningDesignID = new Long(WebUtil.readIntParam(request,"learningDesignID")); + String title = WebUtil.readStrParam(request,"title"); + IWorkspaceManagementService workspaceManagementService = getWorkspaceManagementService(); + String wddxPacket = workspaceManagementService.renameLearningDesign(learningDesignID,title,userID); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + + /** + * For details please refer to + * org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService + * + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + * @throws IOException + */ + public ActionForward getWorkspace(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws IOException{ + Integer userID = new Integer(WebUtil.readIntParam(request,"userID")); + IWorkspaceManagementService workspaceManagementService = getWorkspaceManagementService(); + String wddxPacket = workspaceManagementService.getWorkspace(userID); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + + /** + * For details please refer to + * org.lamsfoundation.lams.workspace.service.IWorkspaceManagementService + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws IOException + */ + public ActionForward deleteContentWithVersion(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response)throws Exception{ + Long uuID = new Long(WebUtil.readIntParam(request,"uuID")); + Long versionID= new Long(WebUtil.readIntParam(request,"versionID")); + Long folderContentID = new Long(WebUtil.readIntParam(request,"folderContentID")); + IWorkspaceManagementService workspaceManagementService = getWorkspaceManagementService(); + String wddxPacket = workspaceManagementService.deleteContentWithVersion(uuID,versionID,folderContentID); + return outputPacket(mapping, request, response, wddxPacket, "details"); + } + +} + Index: lams_central/src/java/org/lamsfoundation/lams/workspace/workspaceApplicationContext.xml =================================================================== diff -u --- lams_central/src/java/org/lamsfoundation/lams/workspace/workspaceApplicationContext.xml (revision 0) +++ lams_central/src/java/org/lamsfoundation/lams/workspace/workspaceApplicationContext.xml (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + true + + + + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + + + + \ No newline at end of file Index: lams_central/src/web/template/index.html =================================================================== diff -u --- lams_central/src/web/template/index.html (revision 0) +++ lams_central/src/web/template/index.html (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,14 @@ + + + + +Welcome to LAMS + + + + + +Dummy lams central page, like index.jsp or login.jsp + + Index: lams_central/test/java/org/lamsfoundation/lams/authoring/service/TestAuthoringService.java =================================================================== diff -u --- lams_central/test/java/org/lamsfoundation/lams/authoring/service/TestAuthoringService.java (revision 0) +++ lams_central/test/java/org/lamsfoundation/lams/authoring/service/TestAuthoringService.java (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,400 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +package org.lamsfoundation.lams.authoring.service; + + + +import java.io.IOException; + +import org.lamsfoundation.lams.test.AbstractLamsTestCase; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.LearningDesignDAO; +import org.lamsfoundation.lams.learningdesign.exception.LearningDesignException; +import org.lamsfoundation.lams.usermanagement.dao.hibernate.UserDAO; +import org.lamsfoundation.lams.usermanagement.dao.hibernate.WorkspaceFolderDAO; +import org.lamsfoundation.lams.usermanagement.exception.UserException; +import org.lamsfoundation.lams.usermanagement.exception.WorkspaceFolderException; + +/** + * @author Manpreet Minhas + */ +public class TestAuthoringService extends AbstractLamsTestCase { + + private IAuthoringService authService; + private LearningDesignDAO learningDesignDAO; + private UserDAO userDAO; + private WorkspaceFolderDAO workspaceFolderDAO; + + private static final Long TEST_THEME_ID = new Long(1); + public TestAuthoringService(String name) { + super(name); + } + + + protected void setUp()throws Exception{ + super.setUp(); + authService =(IAuthoringService)context.getBean("authoringService"); + learningDesignDAO = (LearningDesignDAO)context.getBean("learningDesignDAO"); + userDAO = (UserDAO)context.getBean("userDAO"); + workspaceFolderDAO =(WorkspaceFolderDAO)context.getBean("workspaceFolderDAO"); + } + protected String getHibernateSessionFactoryName() { + return "coreSessionFactory"; + } + protected String[] getContextConfigLocation() { + return new String[] {"org/lamsfoundation/lams/localApplicationContext.xml", + "org/lamsfoundation/lams/authoring/authoringApplicationContext.xml"}; + } + public void testCopyLearningdesign()throws UserException, WorkspaceFolderException, LearningDesignException, IOException{ + String wddxPacket = authService.copyLearningDesign(new Long(1), + new Integer(1), + new Integer(1), + new Integer(1)); + System.out.println(wddxPacket); + } + // TODO Check that this packet structure is still what is coming from Flash, and change test case to actually check the values are updated. + public void testGetLearningDesignDetails()throws Exception{ + String str = authService.getLearningDesignDetails(new Long(1)); + System.out.println("Design Details:" + str); + + } + public void testGetAllLearningDesignDetails() throws Exception{ + String str = authService.getAllLearningDesignDetails(); + System.out.println("Learning Design Deatils: " + str); + } + public void testGetAllLearningLibraryDetails()throws Exception{ + String packet = authService.getAllLearningLibraryDetails(); + System.out.println("Library Details: "+ packet); + } + public void testStoreLearningDesignDetails() throws Exception{ + String str = authService.storeLearningDesignDetails(LEARNING_DESIGN_PART_A+"-111111"+LEARNING_DESIGN_PART_B); + assertTrue("storeLearningDesignDetails returned WDDX packet", str!=null && str.startsWith(" NO_THEME_RESPONSE.length()); + + } + + public void testGetTheme() throws Exception{ + String str = authService.getTheme(TEST_THEME_ID); + System.out.println(str); + assertTrue("Finds ruby theme", str.indexOf("ruby") != -1); + } + + + /* ******* WDDX Packets **************************************/ + private static final String LEARNING_DESIGN_PART_A = + "
      " + +"6" + +"1.0" + +"" + +"4" + +"" + +"1" + +"-111111" + +"2" + +"-111111" + +"Submit Files to Noticeboard" + +""; + + private static final String LEARNING_DESIGN_PART_B = + "" + +"1" + +"-111111" + +"Submit files to Noticeboard" + +"2005-2-7T1:0:23" + +"2" + +"-111111" + +"3" + +"-111111" + +"Noticeboard to Notebook" + +"1" + +"2" + +"-111111" + +"Noticeboard to notebook" + +"2005-2-7T1:0:23" + +"Test Learning Design title" + +"" + +"-111111" + +"1" + +"string__value" + +"-111111" + +"1970-1-1T11:0:23" + +"string__value" + +"-111111" + +"string__value" + +"-111111" + +"1" + +"-111111" + +"1970-1-1T11:0:23" + +"Help Text" + +"1" + +"-111111" + +"-111111" + +"Test Learning Design" + +"1970-1-1T11:0:23" + +"2004-12-23T1:0:23" + +"1" + +"" + +"20" + +"10" + +"10" + +"-111111" + +"Submit Files" + +"" + +"-111111" + +"-111111" + +"0" + +"string__value" + +"Online Instructions" + +"Submit Files" + +"-111111" + +"-111111" + +"image" + +"10" + +"10" + +"-111111" + +"Help Text for Activity" + +"-111111" + +"-111111" + +"1" + +"-111111" + +"-111111" + +"1970-1-1T11:0:23" + +"" + +"-111111" + +"1970-1-1T11:0:23" + +"-111111" + +"Submit Files" + +"" + +"-111111" + +"-111111" + +"2005-1-1T1:0:23" + +"" + +"1" + +"1" + +"-111111" + +"1" + +"20" + +"10" + +"2" + +"-111111" + +"Notebook" + +"" + +"-111111" + +"-111111" + +"0" + +"string__value" + +"Online Instructions" + +"string__value" + +"-111111" + +"-111111" + +"notebookimage" + +"2" + +"2" + +"-111111" + +"Help Text for Noticeboard" + +"-111111" + +"-111111" + +"1" + +"-111111" + +"-111111" + +"1970-1-1T11:0:23" + +"" + +"-111111" + +"1970-1-1T11:0:23" + +"-111111" + +"Notice Board" + +"" + +"-111111" + +"-111111" + +"2005-1-1T1:0:23" + +"" + +"2" + +"1" + +"-111111" + +"1" + +"20" + +"10" + +"1" + +"-111111" + +"Notebook Activity Title" + +"" + +"-111111" + +"-111111" + +"0" + +"string__value" + +"Online Instructions" + +"Offline Instructions " + +"-111111" + +"-111111" + +"image" + +"1" + +"1" + +"-111111" + +"Help Text for Activity" + +"-111111" + +"-111111" + +"1" + +"-111111" + +"-111111" + +"1970-1-1T11:0:23" + +"" + +"-111111" + +"1970-1-1T11:0:23" + +"-111111" + +"Notebook Activity Description" + +"" + +"-111111" + +"-111111" + +"2005-1-1T1:0:23" + +"" + +"3" + +"1" + +"-111111" + +"1"; + private static final String TEST_NEW_THEME_WDDX = + "
      "+ + ""+ + ""+ + ""+ + "outset"+ + "16711680"+ + "16711680"+ + "16711680"+ + ""+ + ""+ + "_sans"+ + "10"+ + "12452097"+ + "block"+ + ""+ + ""+ + ""+ + ""+ + "AuthoringTestTheme"+ + "theme used for TestAuthoringService"+ + ""+ + ""+ + ""+ + "button"+ + ""+ + ""+ + "outset"+ + "16711680"+ + "16711680"+ + "16711680"+ + ""+ + ""+ + "7174353"+ + "block"+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""; + + private static final String TEST_NEW_THEME_WDDX2_PART1 = + "
      "+ + ""+ + ""+ + ""+ + "outset2"+ + "16711681"+ + "16711681"+ + "16711681"+ + ""+ + ""+ + "_sans"+ + "11"+ + "12452098"+ + "block2"+ + ""+ + ""+ + ""+ + ""+ + ""; + + private static final String TEST_NEW_THEME_WDDX2_PART2 = + ""+ + "AuthoringTestTheme2"+ + "theme used for TestAuthoringService2"+ + ""+ + ""+ + ""+ + "button"+ + ""+ + ""+ + "outset2"+ + "16711681"+ + "16711681"+ + "16711681"+ + ""+ + ""+ + "7174354"+ + "block2"+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""; + + private static final String NO_THEME_RESPONSE = + "
      " + +"getThemes" + +"3.0" + +""; +} Index: lams_central/test/java/org/lamsfoundation/lams/authoring/web/TestAuthoringAction.java =================================================================== diff -u --- lams_central/test/java/org/lamsfoundation/lams/authoring/web/TestAuthoringAction.java (revision 0) +++ lams_central/test/java/org/lamsfoundation/lams/authoring/web/TestAuthoringAction.java (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,58 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +package org.lamsfoundation.lams.authoring.web; + +import org.springframework.web.context.ContextLoader; +import org.springframework.web.context.support.XmlWebApplicationContext; + +import servletunit.struts.MockStrutsTestCase; + +/** + * @author Manpreet Minhas + */ +public class TestAuthoringAction extends MockStrutsTestCase { + + public TestAuthoringAction(String name){ + super(name); + } + public void setUp() throws Exception{ + super.setUp(); + ContextLoader ctxLoader = new ContextLoader(); + context.setInitParameter(ContextLoader.CONTEXT_CLASS_PARAM, + XmlWebApplicationContext.class.getName()); + + context.setInitParameter(ContextLoader.CONFIG_LOCATION_PARAM, + "/org/lamsfoundation/lams/localApplicationContext.xml,/org/lamsfoundation/lams/authoring/authoringApplicationContext.xml"); + ctxLoader.initWebApplicationContext(context); + } + public void testGetLearningDesign(){ + setConfigFile("/WEB-INF/struts/struts-config.xml"); + setRequestPathInfo("/author"); + addRequestParameter("method","getLearningDesignDetails"); + addRequestParameter("learningDesignID","1"); + addRequestParameter("jspoutput","true"); + actionPerform(); + verifyForward("success"); + verifyNoActionErrors(); + } +} Index: lams_central/test/java/org/lamsfoundation/lams/workspace/dao/TestWorkspaceFolderContentDAO.java =================================================================== diff -u --- lams_central/test/java/org/lamsfoundation/lams/workspace/dao/TestWorkspaceFolderContentDAO.java (revision 0) +++ lams_central/test/java/org/lamsfoundation/lams/workspace/dao/TestWorkspaceFolderContentDAO.java (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,102 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +package org.lamsfoundation.lams.workspace.dao; + +import java.io.FileInputStream; +import java.util.Date; +import java.util.List; + +import org.lamsfoundation.lams.contentrepository.ICredentials; +import org.lamsfoundation.lams.contentrepository.ITicket; +import org.lamsfoundation.lams.contentrepository.NodeKey; +import org.lamsfoundation.lams.contentrepository.SimpleCredentials; +import org.lamsfoundation.lams.usermanagement.WorkspaceFolder; +import org.lamsfoundation.lams.workspace.WorkspaceFolderContent; +import org.lamsfoundation.lams.workspace.service.BaseWorkspaceTest; + +/** + * @author Manpreet Minhas + */ +public class TestWorkspaceFolderContentDAO extends BaseWorkspaceTest { + + protected WorkspaceFolder workspaceFolder; + + protected String workspaceUser = "workspaceManager"; + protected String password = "flashClient"; + protected String workspaceName = "FlashClientsWorkspace"; + + protected ICredentials credentials; + protected ITicket ticket; + + public TestWorkspaceFolderContentDAO(String name){ + super(name); + } + + public void testInsertWorkspaceFolderContent(){ + workspaceFolder = workspaceFolderDAO.getWorkspaceFolderByID(new Integer(4)); + WorkspaceFolderContent workspaceFolderContent = new WorkspaceFolderContent( + WorkspaceFolderContent.CONTENT_TYPE_FILE, + testFileString, "Test Description", + new Date(), new Date(), + "TXT",workspaceFolder); + workspaceFolderContentDAO.insert(workspaceFolderContent); + assertNotNull(workspaceFolderContent.getFolderContentID()); + } + public void testGetContentByWorkspaceFolder(){ + List list = workspaceFolderContentDAO.getContentByWorkspaceFolder(new Long(3)); + assertEquals(list.size(),4); + } + public void testGetContentByTypeFromWorkspaceFolder(){ + List list = workspaceFolderContentDAO.getContentByTypeFromWorkspaceFolder(new Long(3),"TXT"); + assertEquals(list.size(),2); + } + public void testAddFlashClientWorkspaceCredentials()throws Exception{ + credentials = new SimpleCredentials(workspaceUser,password.toCharArray()); + //repositoryService.createCredentials(credentials); + //repositoryService.addWorkspace(credentials,workspaceName); + ticket = repositoryService.login(credentials,workspaceName); + assertNotNull("Add workspace succeeded - can login to workspace. Ticket is "+ticket, ticket); + testAddFile(ticket); + } + private void testAddFile(ITicket ticket)throws Exception{ + WorkspaceFolderContent workspaceFolderContent = workspaceFolderContentDAO.getWorkspaceFolderContentByID(new Long(7)); + FileInputStream input = new FileInputStream(testFileString); + NodeKey nodeKey = repositoryService.addFileItem(ticket,input,workspaceFolderContent.getName(),workspaceFolderContent.getMimeType(),null); + workspaceFolderContent.setUuid(nodeKey.getUuid()); + workspaceFolderContent.setVersionID(nodeKey.getVersion()); + workspaceFolderContentDAO.update(workspaceFolderContent); + assertNotNull(workspaceFolderContent.getUuid()); + } + public void testUpdateFile() throws Exception{ + WorkspaceFolderContent workspaceFolderContent = workspaceFolderContentDAO.getWorkspaceFolderContentByID(new Long(7)); + FileInputStream input = new FileInputStream(testFileString); + credentials = new SimpleCredentials(workspaceUser,password.toCharArray()); + ticket = repositoryService.login(credentials,workspaceName); + NodeKey nodeKey = repositoryService.updateFileItem(ticket,workspaceFolderContent.getUuid(),workspaceFolderContent.getName(), + input,workspaceFolderContent.getMimeType(),null); + workspaceFolderContent.setVersionID(nodeKey.getVersion()); + workspaceFolderContent.setUuid(nodeKey.getUuid()); + workspaceFolderContentDAO.update(workspaceFolderContent); + System.out.println(nodeKey.getVersion() + ": " + workspaceFolderContent.getVersionID()); + } +} Index: lams_central/test/java/org/lamsfoundation/lams/workspace/service/BaseWorkspaceTest.java =================================================================== diff -u --- lams_central/test/java/org/lamsfoundation/lams/workspace/service/BaseWorkspaceTest.java (revision 0) +++ lams_central/test/java/org/lamsfoundation/lams/workspace/service/BaseWorkspaceTest.java (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,98 @@ +package org.lamsfoundation.lams.workspace.service; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; + +import org.lamsfoundation.lams.contentrepository.service.IRepositoryService; +import org.lamsfoundation.lams.contentrepository.service.RepositoryProxy; +import org.lamsfoundation.lams.learningdesign.dao.ILearningDesignDAO; +import org.lamsfoundation.lams.test.AbstractLamsTestCase; +import org.lamsfoundation.lams.usermanagement.dao.IWorkspaceFolderDAO; +import org.lamsfoundation.lams.workspace.dao.IWorkspaceFolderContentDAO; + +/** + * Base class for all workspace tests. + * + * @author Fiona Malikoff + */ +public class BaseWorkspaceTest extends AbstractLamsTestCase { + + // Used to set up the test file. + private static final String testFileContents = System.getProperty( "This is a testfile." ); + protected String testFileString = null; + + protected WorkspaceManagementService workspaceManagementService; + protected IWorkspaceFolderDAO workspaceFolderDAO; + protected IWorkspaceFolderContentDAO workspaceFolderContentDAO; + protected ILearningDesignDAO learningDesignDAO; + protected IRepositoryService repositoryService; + + public BaseWorkspaceTest(String name){ + super(name); + } + public void setUp() throws Exception { + super.setUp(); + workspaceManagementService =(WorkspaceManagementService)context.getBean("workspaceManagementService"); + workspaceFolderDAO = (IWorkspaceFolderDAO)context.getBean("workspaceFolderDAO"); + workspaceFolderContentDAO =(IWorkspaceFolderContentDAO)context.getBean("workspaceFolderContentDAO"); + learningDesignDAO =(ILearningDesignDAO)context.getBean("learningDesignDAO"); + repositoryService = RepositoryProxy.getLocalRepositoryService(); + testFileString = getTestFileLocation(); + } + + + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.AbstractLamsTestCase#getContextConfigLocation() + */ + protected String[] getContextConfigLocation() { + return new String[] {"org/lamsfoundation/lams/contentrepository/applicationContext.xml", + "org/lamsfoundation/lams/localApplicationContext.xml", + "org/lamsfoundation/lams/authoring/authoringApplicationContext.xml", + "org/lamsfoundation/lams/workspace/workspaceApplicationContext.xml"}; + } + + protected String getHibernateSessionFactoryName() { + return "coreSessionFactory"; + } + + + /* Get the location of the test file. If it doesn't exist, create it */ + private String getTestFileLocation() throws FileNotFoundException { + + if ( testFileString == null ) { + String tempSysDirName = System.getProperty( "java.io.tmpdir" ); + testFileString = tempSysDirName + File.separator + "test.txt"; + } + + // synchronize in case the test cases are running in parallel. + // don't want to try to create the file more than once. + // synchronization untested - attempted to synchronise across + // all instances of this class. + synchronized (this.getClass()) { + + File testFile = new File(testFileString); + if ( ! testFile.exists() ) { + FileWriter writer=null; + try { + writer = new FileWriter(testFile); + writer.write(testFileContents); + } catch (IOException e) { + fail("Unable to write out test file "+e.getMessage()); + e.printStackTrace(); + } finally { + try { + writer.close(); + } catch (IOException e1) { + } + } + } + + } + + return testFileString; + } + +} Index: lams_central/test/java/org/lamsfoundation/lams/workspace/service/TestWorkspaceManagement.java =================================================================== diff -u --- lams_central/test/java/org/lamsfoundation/lams/workspace/service/TestWorkspaceManagement.java (revision 0) +++ lams_central/test/java/org/lamsfoundation/lams/workspace/service/TestWorkspaceManagement.java (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,306 @@ +package org.lamsfoundation.lams.workspace.service; + +import java.io.IOException; +import java.util.Date; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.lamsfoundation.lams.contentrepository.NodeKey; +import org.lamsfoundation.lams.learningdesign.LearningDesign; +import org.lamsfoundation.lams.usermanagement.WorkspaceFolder; +import org.lamsfoundation.lams.workspace.WorkspaceFolderContent; +import org.springframework.orm.hibernate.HibernateObjectRetrievalFailureException; + +/** + * @author Manpreet Minhas + */ +public class TestWorkspaceManagement extends BaseWorkspaceTest { + + private static final Integer MACQ_UNI_WORKSPACE_FOLDER = new Integer(2); + private static final Integer MELCOE_WORKSPACE_FOLDER = new Integer(3); + private static final Integer LAMS_WORKSPACE_FOLDER = new Integer(4); + private static final Integer MANPREETS_WORKSPACE_FOLDER = new Integer(6); + private static final Integer TO_DELETE_WORKSPACE_FOLDER = new Integer(7); + private static final Long LONG_DELETE_WORKSPACE_FOLDER = new Long(7); + private static final Integer DOCUMENTS_WORKSPACE_FOLDER = new Integer(8); + private static final Long LONG_DOCUMENTS_WORKSPACE_FOLDER = new Long(8); + private static final Integer PICTURES_WORKSPACE_FOLDER = new Integer(9); + + private static final Integer MANPREETS_WORKSPACE = new Integer(6); + private static final Integer USER_ID = new Integer(4); + private static final Long LD_ID = new Long(2); + + public TestWorkspaceManagement(String name){ + super(name); + } + + public void testGetAccessibleWorkspaceFolders()throws IOException{ + String packet = workspaceManagementService.getAccessibleWorkspaceFolders(USER_ID); + System.out.println("User Accessible folders: " + packet); + } + public void testGetFolderContents()throws Exception{ + String packet = workspaceManagementService.getFolderContents(USER_ID,LAMS_WORKSPACE_FOLDER,WorkspaceManagementService.AUTHORING); + System.out.println("FolderContents:" + packet); + } + + // TODO why does copyfolder seem to take so long + public void testCopyFolder() throws IOException{ + String packet = workspaceManagementService.copyFolder(MACQ_UNI_WORKSPACE_FOLDER,DOCUMENTS_WORKSPACE_FOLDER,USER_ID); + + Map ids = extractIdMapFromWDDXPacket(packet); + assertTrue("Two ids returned as expected", ids != null && ids.size()==2); + Double folderId = (Double) ids.get("workspaceFolderID"); + Double workspaceId = (Double) ids.get("workspaceID"); + assertEquals("workspace id in packet as expected",workspaceId.longValue(),MANPREETS_WORKSPACE.longValue()); + + WorkspaceFolder folder = workspaceFolderDAO.getWorkspaceFolderByID(new Integer(folderId.intValue())); + assertNotNull(folder); + assertEquals(folder.getParentWorkspaceFolder().getWorkspaceFolderId(),DOCUMENTS_WORKSPACE_FOLDER); + assertEquals(folder.getWorkspaceID(), MANPREETS_WORKSPACE); + } + public void testDeleteFolder() throws Exception{ + // create a folder so we can delete it. + String folderName = "testDeleteFolder"; + String packet = workspaceManagementService.createFolderForFlash(MANPREETS_WORKSPACE_FOLDER,folderName,USER_ID); + Map ids = extractIdMapFromWDDXPacket(packet); + assertNotNull(ids); + Double id = (Double) ids.get("folderID"); + String packetFolderName = (String) ids.get("name"); + assertTrue("Folder name starts with "+folderName+". May have an added 'C'", + packetFolderName.startsWith(folderName)); + + // okay - got the right folder. now delete it. + Integer folderId = new Integer(id.intValue()); + String message = workspaceManagementService.deleteFolder(folderId, USER_ID); + try{ + workspaceFolderDAO.getWorkspaceFolderByID(folderId); + fail("Exception should be raised because this object has already been deleted"); + }catch(HibernateObjectRetrievalFailureException he){ + assertTrue(true); + } + } + public void testMoveFolder()throws Exception{ + WorkspaceFolder originalWorkspaceFolder = workspaceFolderDAO.getWorkspaceFolderByID(MANPREETS_WORKSPACE_FOLDER); + assertNotNull(originalWorkspaceFolder); + + // Work out a workspace folder we can move it to. By not hardcoding the destination folder, this + // test will be valid no matter how many times it is run, as the copied design will just + // move from workspace to workspace folder + int newWorkspaceFolderId = originalWorkspaceFolder.getParentWorkspaceFolder().getWorkspaceFolderId().intValue() + 1; + if ( newWorkspaceFolderId > PICTURES_WORKSPACE_FOLDER.intValue() ) { + // max folder that we know about - cycle back to first folder. + newWorkspaceFolderId = MACQ_UNI_WORKSPACE_FOLDER.intValue(); + } + + String message = workspaceManagementService.moveFolder(MANPREETS_WORKSPACE_FOLDER,new Integer(newWorkspaceFolderId), USER_ID); + WorkspaceFolder workspaceFolder = workspaceFolderDAO.getWorkspaceFolderByID(MANPREETS_WORKSPACE_FOLDER); + assertEquals(workspaceFolder.getParentWorkspaceFolder().getWorkspaceFolderId().intValue(), newWorkspaceFolderId); + } + public void testCreateWorkspaceFolderContent()throws Exception{ + // name must be unique or it will throw a key error. + String name = "testCreateWorkspaceFolderContent"+System.currentTimeMillis(); + String message = workspaceManagementService.createWorkspaceFolderContent(WorkspaceFolderContent.CONTENT_TYPE_FILE, + name,"Manpreet's Description", + new Date(),new Date(), + MELCOE_WORKSPACE_FOLDER, + "TXT",testFileString); + System.out.println(message); + + NodeKey nk = extractNodeKeyFromWDDXPacket(message); + assertNotNull("New content is uuid is populated", nk.getUuid()); + assertTrue("New content is version 1", nk.getVersion() != null && nk.getVersion().longValue() == 1); + } + /**This method just creates different versions of the given file. Checks the version in both + * the wddx packet and the database object. */ + public void testUpdateWorkspaceFolderContent() throws Exception{ + // create some content to play with. name must be unique or it will throw a key error. + String name = "testUpdateWorkspaceFolderContent"+System.currentTimeMillis(); + String message = workspaceManagementService.createWorkspaceFolderContent( + WorkspaceFolderContent.CONTENT_TYPE_FILE, + name,"This content is to be updated.", + new Date(),new Date(), + DOCUMENTS_WORKSPACE_FOLDER, + "TXT",testFileString); + + System.out.print(message); + + // return value is the usual uuid, version + folderContentId + // the following code does the same thing twice, but its the easy way to get the uuid and version + NodeKey nk = extractNodeKeyFromWDDXPacket(message); + Map map = extractIdMapFromWDDXPacket(message); + Double mapFolderContentId = (Double) map.get("folderContentID"); + + assertNotNull("New content is uuid is populated", nk.getUuid()); + assertTrue("New content is version 1", nk.getVersion() != null && nk.getVersion().longValue() == 1); + assertTrue("New content is in document folder", mapFolderContentId != null && mapFolderContentId.intValue() == DOCUMENTS_WORKSPACE_FOLDER.intValue()); + WorkspaceFolderContent content = getMatchingContent(nk, LONG_DOCUMENTS_WORKSPACE_FOLDER); + assertNotNull("Matching content found", content); + Long folderContentId = content.getFolderContentID(); + + // update the content 4 times. + workspaceManagementService.updateWorkspaceFolderContent(folderContentId,testFileString); + workspaceManagementService.updateWorkspaceFolderContent(folderContentId,testFileString); + workspaceManagementService.updateWorkspaceFolderContent(folderContentId,testFileString); + message = workspaceManagementService.updateWorkspaceFolderContent(folderContentId,testFileString); + System.out.print(message); + + // check the updated content is now version 5. + WorkspaceFolderContent content2 = workspaceFolderContentDAO.getWorkspaceFolderContentByID(folderContentId); + + nk = extractNodeKeyFromWDDXPacket(message); + assertTrue("ids returned", nk != null); + assertEquals("content is version 5", nk.getVersion().longValue(), 5); + assertEquals("packet uuid matches content value", content2.getUuid(), nk.getUuid()); + assertEquals("packet version matches content value", content2.getVersionID(), nk.getVersion()); + + // delete a version and make sure previous version is picked up. + String message2 = workspaceManagementService.deleteContentWithVersion(nk.getUuid(),nk.getVersion(),folderContentId); + nk = extractNodeKeyFromWDDXPacket(message); + assertEquals("packet has deleted version 5", nk.getVersion().longValue(), 5); + + WorkspaceFolderContent content3 = workspaceFolderContentDAO.getWorkspaceFolderContentByID(folderContentId); + assertEquals(content3.getVersionID().longValue(),4); + assertEquals("packet uuid matches content value", content3.getUuid(), nk.getUuid()); + assertEquals("content value has current max version", content3.getVersionID().longValue(), 4); + + } + + public void testDeleteWorkspaceFolderContent() throws Exception{ + // create one to start with, so we can delete it. name must be unique or it will throw a key error. + String name = "testDeleteWorkspaceFolderContent"+System.currentTimeMillis(); + String message = workspaceManagementService.createWorkspaceFolderContent( + WorkspaceFolderContent.CONTENT_TYPE_FILE, + name,"This content is to be deleted.", + new Date(),new Date(), + DOCUMENTS_WORKSPACE_FOLDER, + "TXT",testFileString); + + NodeKey nk = extractNodeKeyFromWDDXPacket(message); + assertNotNull("New content is uuid is populated", nk.getUuid()); + assertTrue("New content is version 1", nk.getVersion() != null && nk.getVersion().longValue() == 1); + + WorkspaceFolderContent content = getMatchingContent(nk, LONG_DOCUMENTS_WORKSPACE_FOLDER); + assertNotNull("Matching content found", content); + assertEquals(content.getVersionID(),nk.getVersion()); + System.out.print(message); + + // okay, we found the content, so now we can delete it. + Long folderContentId = content.getFolderContentID(); + String deleteMessage = workspaceManagementService.deleteWorkspaceFolderContent(folderContentId); + try{ + workspaceFolderContentDAO.getWorkspaceFolderContentByID(folderContentId); + fail("Exception should be raised because this object has already been deleted"); + }catch(HibernateObjectRetrievalFailureException he) { + assertTrue(true); + } + + assertNull("Deleted content can't be found via getContentByWorkspaceFolder()", getMatchingContent(nk, LONG_DOCUMENTS_WORKSPACE_FOLDER)); + } + + /** + * @param nk + * @param content + * @return + */ + private WorkspaceFolderContent getMatchingContent(NodeKey nk, Long folderId) { + List contentList = workspaceFolderContentDAO.getContentByWorkspaceFolder(folderId); + Iterator iter = contentList.iterator(); + while (iter.hasNext()) { + WorkspaceFolderContent element = (WorkspaceFolderContent) iter.next(); + if ( element.getUuid().equals(nk.getUuid())) { + return element; + } + } + return null; + } +/* + public void testMoveRenameLearningdesign()throws IOException{ + + LearningDesign originalDesign = learningDesignDAO.getLearningDesignById(LD_ID); + assertNotNull(originalDesign); + assertNotNull(originalDesign.getWorkspaceFolder()); + // expect workspace folder id to be 2! + + // Work out a workspace folder we can move it to. By not hardcoding the destination folder, this + // test will be valid no matter how many times it is run, as the copied design will just + // move from workspace to workspace folder. Also generate a new name. + int newWorkspaceFolderId = originalDesign.getWorkspaceFolder().getWorkspaceFolderId().intValue() + 1; + if ( newWorkspaceFolderId > PICTURES_WORKSPACE_FOLDER.intValue() ) { + // max folder that we know about - cycle back to first folder. + newWorkspaceFolderId = MACQ_UNI_WORKSPACE_FOLDER.intValue(); + } + String newTitle = originalDesign.getTitle()+"X"; + + // okay, now move to our candidate directory and check the move went okay + String packet = workspaceManagementService.moveLearningDesign(LD_ID, new Integer(newWorkspaceFolderId),USER_ID); + Long newFolderId = extractIdFromWDDXPacket(packet); + + LearningDesign movedDesign = learningDesignDAO.getLearningDesignById(LD_ID); + assertNotNull("learning design can be retrieved", movedDesign); + assertEquals(movedDesign.getWorkspaceFolder().getWorkspaceFolderId().intValue(), newWorkspaceFolderId); + + workspaceManagementService.renameLearningDesign(LD_ID,newTitle,USER_ID); + LearningDesign renamedDesign = learningDesignDAO.getLearningDesignById(LD_ID); + assertNotNull("learning design can be retrieved (2)", renamedDesign); + assertEquals(renamedDesign.getTitle(), newTitle); + } + + public void testRenameWorkspaceFolder() throws IOException{ + // generate a new name for the folder... this will work even if the test is run + // multiple times (until the field runs out of space), unlike just giving it a + // known name, which is an invalid test after the first run. + WorkspaceFolder folder = workspaceFolderDAO.getWorkspaceFolderByID(PICTURES_WORKSPACE_FOLDER); + String newName = folder.getName() + "test"; + + String packet = workspaceManagementService.renameWorkspaceFolder(PICTURES_WORKSPACE_FOLDER,newName, USER_ID); + folder = workspaceFolderDAO.getWorkspaceFolderByID(PICTURES_WORKSPACE_FOLDER); + assertEquals(folder.getName(),newName); + } + + public void testGetWorkspace()throws IOException{ + String packet = workspaceManagementService.getWorkspace(USER_ID); + //System.out.println("User workspace details: " + packet); + } + public void testCreateFolder()throws IOException{ + // create the new folder + String folderName = "testCreateFolder"; + String packet = workspaceManagementService.createFolderForFlash(MANPREETS_WORKSPACE_FOLDER,folderName,USER_ID); + + // check that the output packet has an id and the expected name + Map ids = extractIdMapFromWDDXPacket(packet); + assertNotNull(ids); + Double id = (Double) ids.get("folderID"); + String packetFolderName = (String) ids.get("name"); + assertTrue("Folder name starts with "+folderName+". May have an added 'C'", + packetFolderName.startsWith(folderName)); + + // check we can find the created folder. + WorkspaceFolder folder = workspaceFolderDAO.getWorkspaceFolderByID(new Integer(id.intValue())); + assertNotNull(folder); + assertEquals(packetFolderName, folder.getName()); + + } + */ + /** + * Given a WDDX packet in our normal format, return the NodeKey object in the + * messageValue parameter. This is needed for createWorkspaceFolderContent, + * updateWorkspaceFolderContent + * + * @param wddxPacket + * @return NodeKey + */ + public NodeKey extractNodeKeyFromWDDXPacket(String wddxPacket) { + + Map map = extractIdMapFromWDDXPacket(wddxPacket); + // It may be a nodekey but it comes out as a map... + Double uuid = (Double) map.get("uuid"); + assertNotNull(uuid); + Double version = (Double) map.get("version"); + assertNotNull(version); + + return new NodeKey(new Long(uuid.longValue()), new Long(version.longValue())); + } + + +} Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/jstl/c-rt.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/jstl/c.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/jstl/fmt-rt.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/jstl/fmt.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/jstl/sql-rt.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/jstl/sql.tld'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_central/web/WEB-INF/jstl/tlds/c-rt.tld =================================================================== diff -u --- lams_central/web/WEB-INF/jstl/tlds/c-rt.tld (revision 0) +++ lams_central/web/WEB-INF/jstl/tlds/c-rt.tld (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,393 @@ + + + + 1.0 + 1.2 + c_rt + http://java.sun.com/jstl/core_rt + JSTL core RT + JSTL 1.0 core library + + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + Provides core validation features for JSTL tags. + + + + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + Catches any Throwable that occurs in its body and optionally + exposes it. + + + var + false + false + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + if + org.apache.taglibs.standard.tag.rt.core.IfTag + JSP + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + + test + true + true + boolean + + + var + false + false + + + scope + false + false + + + + + import + org.apache.taglibs.standard.tag.rt.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + + url + true + true + + + var + false + false + + + scope + false + false + + + varReader + false + false + + + context + false + true + + + charEncoding + false + true + + + + + forEach + org.apache.taglibs.standard.tag.rt.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + + items + false + true + java.lang.Object + + + begin + false + true + int + + + end + false + true + int + + + step + false + true + int + + + var + false + false + + + varStatus + false + false + + + + + forTokens + org.apache.taglibs.standard.tag.rt.core.ForTokensTag + JSP + + Iterates over tokens, separated by the supplied delimeters + + + items + true + true + java.lang.String + + + delims + true + true + java.lang.String + + + begin + false + true + int + + + end + false + true + int + + + step + false + true + int + + + var + false + false + + + varStatus + false + false + + + + + out + org.apache.taglibs.standard.tag.rt.core.OutTag + JSP + + Like <%= ... >, but for expressions. + + + value + true + true + + + default + false + true + + + escapeXml + false + true + + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.rt.core.ParamTag + JSP + + Adds a parameter to a containing 'import' tag's URL. + + + name + true + true + + + value + false + true + + + + + redirect + org.apache.taglibs.standard.tag.rt.core.RedirectTag + JSP + + Redirects to a new URL. + + + var + false + false + + + scope + false + false + + + url + false + true + + + context + false + true + + + + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + Removes a scoped variable (from a particular scope, if specified). + + + var + true + false + + + scope + false + false + + + + + set + org.apache.taglibs.standard.tag.rt.core.SetTag + JSP + + Sets the result of an expression evaluation in a 'scope' + + + var + false + false + + + value + false + true + + + target + false + true + + + property + false + true + + + scope + false + false + + + + + url + org.apache.taglibs.standard.tag.rt.core.UrlTag + JSP + + Creates a URL with optional query parameters. + + + var + false + false + + + scope + false + false + + + value + false + true + + + context + false + true + + + + + when + org.apache.taglibs.standard.tag.rt.core.WhenTag + JSP + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + + test + true + true + boolean + + + + Index: lams_central/web/WEB-INF/jstl/tlds/c.tld =================================================================== diff -u --- lams_central/web/WEB-INF/jstl/tlds/c.tld (revision 0) +++ lams_central/web/WEB-INF/jstl/tlds/c.tld (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,416 @@ + + + + 1.0 + 1.2 + c + http://java.sun.com/jstl/core + JSTL core + JSTL 1.0 core library + + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + expressionAttributes + + out:value + out:default + out:escapeXml + if:test + import:url + import:context + import:charEncoding + forEach:items + forEach:begin + forEach:end + forEach:step + forTokens:items + forTokens:begin + forTokens:end + forTokens:step + param:encode + param:name + param:value + redirect:context + redirect:url + set:property + set:target + set:value + url:context + url:value + when:test + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + Catches any Throwable that occurs in its body and optionally + exposes it. + + + var + false + false + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + out + org.apache.taglibs.standard.tag.el.core.OutTag + JSP + + Like <%= ... >, but for expressions. + + + value + true + false + + + default + false + false + + + escapeXml + false + false + + + + + if + org.apache.taglibs.standard.tag.el.core.IfTag + JSP + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + + test + true + false + + + var + false + false + + + scope + false + false + + + + + import + org.apache.taglibs.standard.tag.el.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + + url + true + false + + + var + false + false + + + scope + false + false + + + varReader + false + false + + + context + false + false + + + charEncoding + false + false + + + + + forEach + org.apache.taglibs.standard.tag.el.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + + items + false + false + + + begin + false + false + + + end + false + false + + + step + false + false + + + var + false + false + + + varStatus + false + false + + + + + forTokens + org.apache.taglibs.standard.tag.el.core.ForTokensTag + JSP + + Iterates over tokens, separated by the supplied delimeters + + + items + true + false + + + delims + true + false + + + begin + false + false + + + end + false + false + + + step + false + false + + + var + false + false + + + varStatus + false + false + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.el.core.ParamTag + JSP + + Adds a parameter to a containing 'import' tag's URL. + + + name + true + false + + + value + false + false + + + + + redirect + org.apache.taglibs.standard.tag.el.core.RedirectTag + JSP + + Redirects to a new URL. + + + var + false + false + + + scope + false + false + + + url + true + false + + + context + false + false + + + + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + Removes a scoped variable (from a particular scope, if specified). + + + var + true + false + + + scope + false + false + + + + + set + org.apache.taglibs.standard.tag.el.core.SetTag + JSP + + Sets the result of an expression evaluation in a 'scope' + + + var + false + false + + + value + false + false + + + target + false + false + + + property + false + false + + + scope + false + false + + + + + url + org.apache.taglibs.standard.tag.el.core.UrlTag + JSP + + Prints or exposes a URL with optional query parameters + (via the c:param tag). + + + var + false + false + + + scope + false + false + + + value + true + false + + + context + false + false + + + + + when + org.apache.taglibs.standard.tag.el.core.WhenTag + JSP + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + + test + true + false + + + + Index: lams_central/web/WEB-INF/jstl/tlds/fmt-rt.tld =================================================================== diff -u --- lams_central/web/WEB-INF/jstl/tlds/fmt-rt.tld (revision 0) +++ lams_central/web/WEB-INF/jstl/tlds/fmt-rt.tld (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,403 @@ + + + + 1.0 + 1.2 + fmt_rt + http://java.sun.com/jstl/fmt_rt + JSTL fmt RT + JSTL 1.0 i18n-capable formatting library + + + + org.apache.taglibs.standard.tlv.JstlFmtTLV + + + Provides core validation features for JSTL tags. + + + + + requestEncoding + org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag + empty + + Sets the request character encoding + + + value + false + true + + + + + setLocale + org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag + empty + + Stores the given locale in the locale configuration variable + + + value + true + true + + + variant + false + true + + + scope + false + false + + + + + timeZone + org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag + JSP + + Specifies the time zone for any time formatting or parsing actions + nested in its body + + + value + true + true + + + + + setTimeZone + org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag + empty + + Stores the given time zone in the time zone configuration variable + + + value + true + true + + + var + false + false + + + scope + false + false + + + + + bundle + org.apache.taglibs.standard.tag.rt.fmt.BundleTag + JSP + + Loads a resource bundle to be used by its tag body + + + basename + true + true + + + prefix + false + true + + + + + setBundle + org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag + empty + + Loads a resource bundle and stores it in the named scoped variable or + the bundle configuration variable + + + basename + true + true + + + var + false + false + + + scope + false + false + + + + + message + org.apache.taglibs.standard.tag.rt.fmt.MessageTag + JSP + + Maps key to localized message and performs parametric replacement + + + key + false + true + + + bundle + false + true + + + var + false + false + + + scope + false + false + + + + + param + org.apache.taglibs.standard.tag.rt.fmt.ParamTag + JSP + + Supplies an argument for parametric replacement to a containing + <message> tag + + + value + false + true + + + + + formatNumber + org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag + JSP + + Formats a numeric value as a number, currency, or percentage + + + value + false + true + + + type + false + true + + + pattern + false + true + + + currencyCode + false + true + + + currencySymbol + false + true + + + groupingUsed + false + true + + + maxIntegerDigits + false + true + + + minIntegerDigits + false + true + + + maxFractionDigits + false + true + + + minFractionDigits + false + true + + + var + false + false + + + scope + false + false + + + + + parseNumber + org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag + JSP + + Parses the string representation of a number, currency, or percentage + + + value + false + true + + + type + false + true + + + pattern + false + true + + + parseLocale + false + true + + + integerOnly + false + true + + + var + false + false + + + scope + false + false + + + + + formatDate + org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag + empty + + Formats a date and/or time using the supplied styles and pattern + + + value + true + true + + + type + false + true + + + dateStyle + false + true + + + timeStyle + false + true + + + pattern + false + true + + + timeZone + false + true + + + var + false + false + + + scope + false + false + + + + + parseDate + org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag + JSP + + Parses the string representation of a date and/or time + + + value + false + true + + + type + false + true + + + dateStyle + false + true + + + timeStyle + false + true + + + pattern + false + true + + + timeZone + false + true + + + parseLocale + false + true + + + var + false + false + + + scope + false + false + + + + Index: lams_central/web/WEB-INF/jstl/tlds/fmt.tld =================================================================== diff -u --- lams_central/web/WEB-INF/jstl/tlds/fmt.tld (revision 0) +++ lams_central/web/WEB-INF/jstl/tlds/fmt.tld (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,442 @@ + + + + 1.0 + 1.2 + fmt + http://java.sun.com/jstl/fmt + JSTL fmt + JSTL 1.0 i18n-capable formatting library + + + + org.apache.taglibs.standard.tlv.JstlFmtTLV + + + expressionAttributes + + requestEncoding:value + setLocale:value + setLocale:variant + timeZone:value + setTimeZone:value + bundle:basename + bundle:prefix + setBundle:basename + message:key + message:bundle + param:value + formatNumber:value + formatNumber:pattern + formatNumber:currencyCode + formatNumber:currencySymbol + formatNumber:groupingUsed + formatNumber:maxIntegerDigits + formatNumber:minIntegerDigits + formatNumber:maxFractionDigits + formatNumber:minFractionDigits + parseNumber:value + parseNumber:pattern + parseNumber:parseLocale + parseNumber:integerOnly + formatDate:value + formatDate:pattern + formatDate:timeZone + parseDate:value + parseDate:pattern + parseDate:timeZone + parseDate:parseLocale + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + requestEncoding + org.apache.taglibs.standard.tag.el.fmt.RequestEncodingTag + empty + + Sets the request character encoding + + + value + false + false + + + + + setLocale + org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag + empty + + Stores the given locale in the locale configuration variable + + + value + true + false + + + variant + false + false + + + scope + false + false + + + + + timeZone + org.apache.taglibs.standard.tag.el.fmt.TimeZoneTag + JSP + + Specifies the time zone for any time formatting or parsing actions + nested in its body + + + value + true + false + + + + + setTimeZone + org.apache.taglibs.standard.tag.el.fmt.SetTimeZoneTag + empty + + Stores the given time zone in the time zone configuration variable + + + value + true + false + + + var + false + false + + + scope + false + false + + + + + bundle + org.apache.taglibs.standard.tag.el.fmt.BundleTag + JSP + + Loads a resource bundle to be used by its tag body + + + basename + true + false + + + prefix + false + false + + + + + setBundle + org.apache.taglibs.standard.tag.el.fmt.SetBundleTag + empty + + Loads a resource bundle and stores it in the named scoped variable or + the bundle configuration variable + + + basename + true + false + + + var + false + false + + + scope + false + false + + + + + message + org.apache.taglibs.standard.tag.el.fmt.MessageTag + JSP + + Maps key to localized message and performs parametric replacement + + + key + false + false + + + bundle + false + false + + + var + false + false + + + scope + false + false + + + + + param + org.apache.taglibs.standard.tag.el.fmt.ParamTag + JSP + + Supplies an argument for parametric replacement to a containing + <message> tag + + + value + false + false + + + + + formatNumber + org.apache.taglibs.standard.tag.el.fmt.FormatNumberTag + JSP + + Formats a numeric value as a number, currency, or percentage + + + value + false + false + + + type + false + false + + + pattern + false + false + + + currencyCode + false + false + + + currencySymbol + false + false + + + groupingUsed + false + false + + + maxIntegerDigits + false + false + + + minIntegerDigits + false + false + + + maxFractionDigits + false + false + + + minFractionDigits + false + false + + + var + false + false + + + scope + false + false + + + + + parseNumber + org.apache.taglibs.standard.tag.el.fmt.ParseNumberTag + JSP + + Parses the string representation of a number, currency, or percentage + + + value + false + false + + + type + false + false + + + pattern + false + false + + + parseLocale + false + false + + + integerOnly + false + false + + + var + false + false + + + scope + false + false + + + + + formatDate + org.apache.taglibs.standard.tag.el.fmt.FormatDateTag + empty + + Formats a date and/or time using the supplied styles and pattern + + + value + true + false + + + type + false + false + + + dateStyle + false + false + + + timeStyle + false + false + + + pattern + false + false + + + timeZone + false + false + + + var + false + false + + + scope + false + false + + + + + parseDate + org.apache.taglibs.standard.tag.el.fmt.ParseDateTag + JSP + + Parses the string representation of a date and/or time + + + value + false + false + + + type + false + false + + + dateStyle + false + false + + + timeStyle + false + false + + + pattern + false + false + + + timeZone + false + false + + + parseLocale + false + false + + + var + false + false + + + scope + false + false + + + + Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/jstl/x-rt.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/jstl/x.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/struts/struts-bean-el.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/struts/struts-bean.tld'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_central/web/WEB-INF/struts/struts-config.xml =================================================================== diff -u -r193ad7a6ec5ee05c612dc9a7230c5d281296f643 -r9bef1de27d0d527d75191115a535bc2c4311ade9 --- lams_central/web/WEB-INF/struts/struts-config.xml (.../struts-config.xml) (revision 193ad7a6ec5ee05c612dc9a7230c5d281296f643) +++ lams_central/web/WEB-INF/struts/struts-config.xml (.../struts-config.xml) (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -1,190 +1,74 @@ - + - - + + - - - - - - + + - - - + + - - - - - + + - - - - - + + - - + + + + + + + + - - - - - - - - - - - - + + - - - - - - - - - - - - - - + - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/struts/struts-config_1_0.dtd'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/struts/struts-config_1_1.dtd'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/struts/struts-config_1_2.dtd'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/struts/struts-html-el.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/struts/struts-html.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/struts/struts-logic-el.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/struts/struts-logic.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/struts/struts-nested.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/struts/struts-tiles-el.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/struts/struts-tiles.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/struts/tiles-config_1_1.dtd'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_central/web/WEB-INF/struts/tlds/c.tld =================================================================== diff -u --- lams_central/web/WEB-INF/struts/tlds/c.tld (revision 0) +++ lams_central/web/WEB-INF/struts/tlds/c.tld (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,416 @@ + + + + 1.0 + 1.2 + c + http://java.sun.com/jstl/core + JSTL core + JSTL 1.0 core library + + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + expressionAttributes + + out:value + out:default + out:escapeXml + if:test + import:url + import:context + import:charEncoding + forEach:items + forEach:begin + forEach:end + forEach:step + forTokens:items + forTokens:begin + forTokens:end + forTokens:step + param:encode + param:name + param:value + redirect:context + redirect:url + set:property + set:target + set:value + url:context + url:value + when:test + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + Catches any Throwable that occurs in its body and optionally + exposes it. + + + var + false + false + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + out + org.apache.taglibs.standard.tag.el.core.OutTag + JSP + + Like <%= ... >, but for expressions. + + + value + true + false + + + default + false + false + + + escapeXml + false + false + + + + + if + org.apache.taglibs.standard.tag.el.core.IfTag + JSP + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + + test + true + false + + + var + false + false + + + scope + false + false + + + + + import + org.apache.taglibs.standard.tag.el.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + + url + true + false + + + var + false + false + + + scope + false + false + + + varReader + false + false + + + context + false + false + + + charEncoding + false + false + + + + + forEach + org.apache.taglibs.standard.tag.el.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + + items + false + false + + + begin + false + false + + + end + false + false + + + step + false + false + + + var + false + false + + + varStatus + false + false + + + + + forTokens + org.apache.taglibs.standard.tag.el.core.ForTokensTag + JSP + + Iterates over tokens, separated by the supplied delimeters + + + items + true + false + + + delims + true + false + + + begin + false + false + + + end + false + false + + + step + false + false + + + var + false + false + + + varStatus + false + false + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.el.core.ParamTag + JSP + + Adds a parameter to a containing 'import' tag's URL. + + + name + true + false + + + value + false + false + + + + + redirect + org.apache.taglibs.standard.tag.el.core.RedirectTag + JSP + + Redirects to a new URL. + + + var + false + false + + + scope + false + false + + + url + true + false + + + context + false + false + + + + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + Removes a scoped variable (from a particular scope, if specified). + + + var + true + false + + + scope + false + false + + + + + set + org.apache.taglibs.standard.tag.el.core.SetTag + JSP + + Sets the result of an expression evaluation in a 'scope' + + + var + false + false + + + value + false + false + + + target + false + false + + + property + false + false + + + scope + false + false + + + + + url + org.apache.taglibs.standard.tag.el.core.UrlTag + JSP + + Prints or exposes a URL with optional query parameters + (via the c:param tag). + + + var + false + false + + + scope + false + false + + + value + true + false + + + context + false + false + + + + + when + org.apache.taglibs.standard.tag.el.core.WhenTag + JSP + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + + test + true + false + + + + Index: lams_central/web/WEB-INF/struts/tlds/struts-bean-el.tld =================================================================== diff -u --- lams_central/web/WEB-INF/struts/tlds/struts-bean-el.tld (revision 0) +++ lams_central/web/WEB-INF/struts/tlds/struts-bean-el.tld (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,212 @@ + + + + + + + + + + +1.2 +1.1 +bean +http://struts.apache.org/tags-bean-el + +include +org.apache.strutsel.taglib.bean.ELIncludeTag +org.apache.struts.taglib.bean.IncludeTei +empty + +anchor +false +true + + +forward +false +true + + +href +false +true + + +id +true +false + + +name +false +true + + +page +false +true + + +transaction +false +true + + + +message +org.apache.strutsel.taglib.bean.ELMessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +page +org.apache.strutsel.taglib.bean.ELPageTag +empty + +id +true +false + + +property +true +true + + + +resource +org.apache.strutsel.taglib.bean.ELResourceTag +org.apache.struts.taglib.bean.ResourceTei +empty + +id +true +false + + +input +false +true + + +name +true +true + + + +size +org.apache.strutsel.taglib.bean.ELSizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + + +struts +org.apache.strutsel.taglib.bean.ELStrutsTag +org.apache.struts.taglib.bean.StrutsTei +empty + +id +true +false + + +formBean +false +true + + +forward +false +true + + +mapping +false +true + + + + + + Index: lams_central/web/WEB-INF/struts/tlds/struts-bean.tld =================================================================== diff -u --- lams_central/web/WEB-INF/struts/tlds/struts-bean.tld (revision 0) +++ lams_central/web/WEB-INF/struts/tlds/struts-bean.tld (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,382 @@ + + + + + + + + + + +1.2 +1.1 +bean +http://struts.apache.org/tags-bean + +cookie +org.apache.struts.taglib.bean.CookieTag +org.apache.struts.taglib.bean.CookieTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +define +org.apache.struts.taglib.bean.DefineTag +org.apache.struts.taglib.bean.DefineTei +JSP + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +header +org.apache.struts.taglib.bean.HeaderTag +org.apache.struts.taglib.bean.HeaderTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +include +org.apache.struts.taglib.bean.IncludeTag +org.apache.struts.taglib.bean.IncludeTei +empty + +anchor +false +true + + +forward +false +true + + +href +false +true + + +id +true +false + + +name +false +true + + +page +false +true + + +transaction +false +true + + + +message +org.apache.struts.taglib.bean.MessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +page +org.apache.struts.taglib.bean.PageTag +org.apache.struts.taglib.bean.PageTei +empty + +id +true +false + + +property +true +true + + + +parameter +org.apache.struts.taglib.bean.ParameterTag +org.apache.struts.taglib.bean.ParameterTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +resource +org.apache.struts.taglib.bean.ResourceTag +org.apache.struts.taglib.bean.ResourceTei +empty + +id +true +false + + +input +false +true + + +name +true +true + + + +size +org.apache.struts.taglib.bean.SizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + + +struts +org.apache.struts.taglib.bean.StrutsTag +org.apache.struts.taglib.bean.StrutsTei +empty + +id +true +false + + +formBean +false +true + + +forward +false +true + + +mapping +false +true + + + +write +org.apache.struts.taglib.bean.WriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +true +true + + +property +false +true + + +scope +false +true + + + + + + Index: lams_central/web/WEB-INF/struts/tlds/struts-html-el.tld =================================================================== diff -u --- lams_central/web/WEB-INF/struts/tlds/struts-html-el.tld (revision 0) +++ lams_central/web/WEB-INF/struts/tlds/struts-html-el.tld (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,3302 @@ + + + + + + + + + + +1.2 +1.1 +html +http://struts.apache.org/tags-html-el + +base +org.apache.strutsel.taglib.html.ELBaseTag +empty + +target +false +true + + +server +false +true + + + +button +org.apache.strutsel.taglib.html.ELButtonTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +cancel +org.apache.strutsel.taglib.html.ELCancelTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +checkbox +org.apache.strutsel.taglib.html.ELCheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.strutsel.taglib.html.ELErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.strutsel.taglib.html.ELFileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.strutsel.taglib.html.ELFormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +frame +org.apache.strutsel.taglib.html.ELFrameTag + +bundle +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +frameborder +false +true + + +frameName +false +true + + +href +false +true + + +longdesc +false +true + + +marginheight +false +true + + +marginwidth +false +true + + +name +false +true + + +noresize +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +scrolling +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +hidden +org.apache.strutsel.taglib.html.ELHiddenTag +empty + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + +write +false +true + + + +html +org.apache.strutsel.taglib.html.ELHtmlTag +JSP + +lang +false +true + + +locale +false +true + + +xhtml +false +true + + + +image +org.apache.strutsel.taglib.html.ELImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.strutsel.taglib.html.ELImgTag +empty + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +contextRelative +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +javascript +org.apache.strutsel.taglib.html.ELJavascriptValidatorTag +empty + +cdata +false +true + + +dynamicJavascript +false +false + + +formName +false +true + + +method +false +true + + +page +false +true + + +scriptLanguage +false +true + + +src +false +true + + +staticJavascript +false +false + + +htmlComment +false +true + + +bundle +false +true + + + +link +org.apache.strutsel.taglib.html.ELLinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.strutsel.taglib.html.ELMessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +false + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.strutsel.taglib.html.ELMultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +option +org.apache.strutsel.taglib.html.ELOptionTag + +bundle +false +true + + +disabled +false +true + + +key +false +true + + +locale +false +true + + +style +false +true + + +styleId +false +true + + +styleClass +false +true + + +value +true +true + + + +options +org.apache.strutsel.taglib.html.ELOptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.strutsel.taglib.html.ELOptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.strutsel.taglib.html.ELPasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.strutsel.taglib.html.ELRadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +reset +org.apache.strutsel.taglib.html.ELResetTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +rewrite +org.apache.strutsel.taglib.html.ELRewriteTag +empty + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +select +org.apache.strutsel.taglib.html.ELSelectTag +JSP + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.strutsel.taglib.html.ELSubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.strutsel.taglib.html.ELTextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.strutsel.taglib.html.ELTextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +xhtml +org.apache.struts.taglib.html.XhtmlTag +empty + + + Index: lams_central/web/WEB-INF/struts/tlds/struts-html.tld =================================================================== diff -u --- lams_central/web/WEB-INF/struts/tlds/struts-html.tld (revision 0) +++ lams_central/web/WEB-INF/struts/tlds/struts-html.tld (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,3302 @@ + + + + + + + + + + +1.2 +1.1 +html +http://struts.apache.org/tags-html + +base +org.apache.struts.taglib.html.BaseTag +empty + +target +false +true + + +server +false +true + + + +button +org.apache.struts.taglib.html.ButtonTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +cancel +org.apache.struts.taglib.html.CancelTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +checkbox +org.apache.struts.taglib.html.CheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.html.ErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.struts.taglib.html.FileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.html.FormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +frame +org.apache.struts.taglib.html.FrameTag + +bundle +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +frameborder +false +true + + +frameName +false +true + + +href +false +true + + +longdesc +false +true + + +marginheight +false +true + + +marginwidth +false +true + + +name +false +true + + +noresize +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +scrolling +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +hidden +org.apache.struts.taglib.html.HiddenTag +empty + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + +write +false +true + + + +html +org.apache.struts.taglib.html.HtmlTag +JSP + +lang +false +true + + +locale +false +true + + +xhtml +false +true + + + +image +org.apache.struts.taglib.html.ImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.html.ImgTag +empty + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +contextRelative +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +javascript +org.apache.struts.taglib.html.JavascriptValidatorTag +empty + +cdata +false +true + + +dynamicJavascript +false +false + + +formName +false +true + + +method +false +true + + +page +false +true + + +scriptLanguage +false +true + + +src +false +true + + +staticJavascript +false +false + + +htmlComment +false +true + + +bundle +false +true + + + +link +org.apache.struts.taglib.html.LinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.struts.taglib.html.MessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +false + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.html.MultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +option +org.apache.struts.taglib.html.OptionTag + +bundle +false +true + + +disabled +false +true + + +key +false +true + + +locale +false +true + + +style +false +true + + +styleId +false +true + + +styleClass +false +true + + +value +true +true + + + +options +org.apache.struts.taglib.html.OptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.html.OptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.html.PasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.html.RadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +reset +org.apache.struts.taglib.html.ResetTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +rewrite +org.apache.struts.taglib.html.RewriteTag +empty + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +select +org.apache.struts.taglib.html.SelectTag +JSP + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.html.SubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.html.TextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.html.TextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +xhtml +org.apache.struts.taglib.html.XhtmlTag +empty + + + Index: lams_central/web/WEB-INF/struts/tlds/struts-logic-el.tld =================================================================== diff -u --- lams_central/web/WEB-INF/struts/tlds/struts-logic-el.tld (revision 0) +++ lams_central/web/WEB-INF/struts/tlds/struts-logic-el.tld (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,382 @@ + + + + + + + + + +1.2 +1.1 +logic +http://struts.apache.org/tags-logic-el + +forward +org.apache.strutsel.taglib.logic.ELForwardTag +empty + +name +true +true + + + +iterate +org.apache.strutsel.taglib.logic.ELIterateTag +org.apache.struts.taglib.logic.IterateTei +JSP + +collection +false +true + + +id +true +false + + +indexId +false +false + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +match +org.apache.strutsel.taglib.logic.ELMatchTag +JSP + +cookie +false +true + + +expr +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.strutsel.taglib.logic.ELMessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.strutsel.taglib.logic.ELMessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notMatch +org.apache.strutsel.taglib.logic.ELNotMatchTag +JSP + +cookie +false +true + + +expr +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.strutsel.taglib.logic.ELNotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.strutsel.taglib.logic.ELPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +redirect +org.apache.strutsel.taglib.logic.ELRedirectTag + +action +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + + + + Index: lams_central/web/WEB-INF/struts/tlds/struts-logic.tld =================================================================== diff -u --- lams_central/web/WEB-INF/struts/tlds/struts-logic.tld (revision 0) +++ lams_central/web/WEB-INF/struts/tlds/struts-logic.tld (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,652 @@ + + + + + + + + + +1.2 +1.1 +logic +http://struts.apache.org/tags-logic + +empty +org.apache.struts.taglib.logic.EmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.logic.EqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +forward +org.apache.struts.taglib.logic.ForwardTag +empty + +name +true +true + + + +greaterEqual +org.apache.struts.taglib.logic.GreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.logic.GreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.logic.IterateTag +org.apache.struts.taglib.logic.IterateTei +JSP + +collection +false +true + + +id +true +false + + +indexId +false +false + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.logic.LessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.logic.LessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.logic.MatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.logic.MessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.logic.MessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.logic.NotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.logic.NotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.logic.NotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.logic.NotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.logic.PresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +redirect +org.apache.struts.taglib.logic.RedirectTag + +action +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + + + + Index: lams_central/web/WEB-INF/struts/tlds/struts-nested.tld =================================================================== diff -u --- lams_central/web/WEB-INF/struts/tlds/struts-nested.tld (revision 0) +++ lams_central/web/WEB-INF/struts/tlds/struts-nested.tld (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,3171 @@ + + + + + + + + + +1.2 +1.1 +nested +http://struts.apache.org/tags-nested + +nest +org.apache.struts.taglib.nested.NestedPropertyTag +JSP + +property +false +true + + + +writeNesting +org.apache.struts.taglib.nested.NestedWriteNestingTag +org.apache.struts.taglib.nested.NestedWriteNestingTei +JSP + +property +false +true + + +id +false +true + + +filter +false +true + + + +root +org.apache.struts.taglib.nested.NestedRootTag +JSP + +name +false +true + + + +define +org.apache.struts.taglib.nested.bean.NestedDefineTag +org.apache.struts.taglib.nested.bean.NestedDefineTei +empty + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +message +org.apache.struts.taglib.nested.bean.NestedMessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +size +org.apache.struts.taglib.nested.bean.NestedSizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +write +org.apache.struts.taglib.nested.bean.NestedWriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +checkbox +org.apache.struts.taglib.nested.html.NestedCheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.nested.html.NestedErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.struts.taglib.nested.html.NestedFileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.nested.html.NestedFormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +hidden +org.apache.struts.taglib.nested.html.NestedHiddenTag + +alt +false +true + + +altKey +false +true + + +indexed +false +true + + +name +false +true + + +property +true +true + + +title +false +true + + +titleKey +false +true + + +styleClass +false +true + + +styleId +false +true + + +value +false +true + + +write +false +true + + + +image +org.apache.struts.taglib.nested.html.NestedImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.nested.html.NestedImgTag +empty + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +link +org.apache.struts.taglib.nested.html.NestedLinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.struts.taglib.nested.html.NestedMessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +true + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.nested.html.NestedMultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +options +org.apache.struts.taglib.nested.html.NestedOptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.nested.html.NestedOptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.nested.html.NestedPasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.nested.html.NestedRadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +select +org.apache.struts.taglib.nested.html.NestedSelectTag +JSP + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.nested.html.NestedSubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.nested.html.NestedTextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.nested.html.NestedTextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +empty +org.apache.struts.taglib.nested.logic.NestedEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.nested.logic.NestedEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterEqual +org.apache.struts.taglib.nested.logic.NestedGreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.nested.logic.NestedGreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.nested.logic.NestedIterateTag +org.apache.struts.taglib.nested.logic.NestedIterateTei +JSP + +collection +false +true + + +id +false +true + + +indexId +false +true + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.nested.logic.NestedLessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.nested.logic.NestedLessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.nested.logic.NestedMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.nested.logic.NestedMessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.nested.logic.NestedNotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.nested.logic.NestedNotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.nested.logic.NestedNotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.nested.logic.NestedNotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.nested.logic.NestedPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + + + + Index: lams_central/web/WEB-INF/struts/tlds/struts-tiles-el.tld =================================================================== diff -u --- lams_central/web/WEB-INF/struts/tlds/struts-tiles-el.tld (revision 0) +++ lams_central/web/WEB-INF/struts/tlds/struts-tiles-el.tld (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,343 @@ + + + + + + + + + + +1.2 +1.1 +tiles +http://struts.apache.org/tags-tiles-el + +insert +org.apache.strutsel.taglib.tiles.ELInsertTag +JSP + +template +false +true + + +component +false +true + + +page +false +true + + +definition +false +true + + +attribute +false +false + + +name +false +true + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +flush +false +false + + +ignore +false +true + + +role +false +true + + +controllerUrl +false +true + + +controllerClass +false +true + + + +definition +org.apache.strutsel.taglib.tiles.ELDefinitionTag +JSP + +id +true +false + + +scope +false +false + + +template +false +true + + +page +false +true + + +role +false +true + + +extends +false +true + + + +put +org.apache.strutsel.taglib.tiles.ELPutTag +JSP + +name +false +false + + +value +false +true + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +putList +org.apache.strutsel.taglib.tiles.ELPutListTag +JSP + +name +true +false + + + +add +org.apache.strutsel.taglib.tiles.ELAddTag +JSP + +value +false +false + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +get +org.apache.strutsel.taglib.tiles.ELGetTag +empty + +name +true +true + + +ignore +false +true + + +flush +false +false + + +role +false +true + + + +getAsString +org.apache.strutsel.taglib.tiles.ELGetAttributeTag +empty + +name +true +true + + +ignore +false +true + + +role +false +true + + + +useAttribute +org.apache.strutsel.taglib.tiles.ELUseAttributeTag +empty + +id +false +false + + +classname +false +false + + +scope +false +false + + +name +true +true + + +ignore +false +true + + + +importAttribute +org.apache.strutsel.taglib.tiles.ELImportAttributeTag +empty + +name +false +true + + +scope +false +false + + +ignore +false +true + + + +initComponentDefinitions +org.apache.strutsel.taglib.tiles.ELInitDefinitionsTag +empty + +file +true +false + + +classname +false +false + + + + + + Index: lams_central/web/WEB-INF/struts/tlds/struts-tiles.tld =================================================================== diff -u --- lams_central/web/WEB-INF/struts/tlds/struts-tiles.tld (revision 0) +++ lams_central/web/WEB-INF/struts/tlds/struts-tiles.tld (revision 9bef1de27d0d527d75191115a535bc2c4311ade9) @@ -0,0 +1,344 @@ + + + + + + + + + + +1.2 +1.1 +tiles +http://struts.apache.org/tags-tiles + +insert +org.apache.struts.taglib.tiles.InsertTag +JSP + +template +false +true + + +component +false +true + + +page +false +true + + +definition +false +true + + +attribute +false +false + + +name +false +true + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +flush +false +false + + +ignore +false +true + + +role +false +true + + +controllerUrl +false +true + + +controllerClass +false +true + + + +definition +org.apache.struts.taglib.tiles.DefinitionTag +JSP + +id +true +false + + +scope +false +false + + +template +false +true + + +page +false +true + + +role +false +true + + +extends +false +true + + + +put +org.apache.struts.taglib.tiles.PutTag +JSP + +name +false +false + + +value +false +true + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +putList +org.apache.struts.taglib.tiles.PutListTag +JSP + +name +true +false + + + +add +org.apache.struts.taglib.tiles.AddTag +JSP + +value +false +false + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +get +org.apache.struts.taglib.tiles.GetTag +empty + +name +true +true + + +ignore +false +true + + +flush +false +false + + +role +false +true + + + +getAsString +org.apache.struts.taglib.tiles.GetAttributeTag +empty + +name +true +true + + +ignore +false +true + + +role +false +true + + + +useAttribute +org.apache.struts.taglib.tiles.UseAttributeTag +org.apache.struts.taglib.tiles.UseAttributeTei +empty + +id +false +false + + +classname +false +false + + +scope +false +false + + +name +true +true + + +ignore +false +true + + + +importAttribute +org.apache.struts.taglib.tiles.ImportAttributeTag +empty + +name +false +true + + +scope +false +false + + +ignore +false +true + + + +initComponentDefinitions +org.apache.struts.taglib.tiles.InitDefinitionsTag +empty + +file +true +false + + +classname +false +false + + + + + + Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/struts/web-app_2_2.dtd'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9bef1de27d0d527d75191115a535bc2c4311ade9 refers to a dead (removed) revision in file `lams_central/web/WEB-INF/struts/web-app_2_3.dtd'. Fisheye: No comparison available. Pass `N' to diff?