Home

ROSALI Maintenance guide

image

Contents

1. 17 Page 5 of 17 7 29 2005 1 INTRODUCTION The purpose of this document is to help new ROSALI developers application administrators in the tasks of maintenance upgrade and new developments This document shall be used in conjunction with the following documents e ROSALI Coding guidelines e ROSALI Software Requirements Specification e ROSALI Design documentation 2 ROSALI INFRASTRUCTURE AND LOCATION The component diagram in Figure 1 represents the implementation perspective of the system It gives developers a general view about the location of the software such as libraries configuration files etc luseribdisofl operational java bdi jars libSaveLib ppc a fuserfesalrosali canfigData Figure 1 Deployment diagram The green box at Figure 1 represents the C library used by FESA instruments to generate their output in the ROSALI format It is placed in user fesa config FESA deploy V2 TO see in more detail its design and implementation refer to Savelib package decomposition Page 6 of 17 7 29 2005 description in the ROSALI design documentation The user s manual can be found in the ROSALI web page under Documentation Developer s corner gt ROSALI Front End library The pink box at Figure 1 contains all the libraries needed to run the ROSALI application They are under user bdisoft operational java bdi_jars containing the following modules cern fesa rosali Action
2. Team Project Set Zip file Finish Cancel Figure 4 Import project from CVS step 1 Select Checkout Projects from CVS and press Next In the next window select the option Use existing repository location and press Next In the next window titled Select module select the option Use an existing module Then Eclipse will connect to the CVS server maybe you need to enter your password and it will list the modules existing on the server All the ROSALI packages are under the ROSALI module Select the module you want to check out and press Next Select extract from HEAD and press Finish It will create a new project on the left window 3 3 MODIFY THE CODE After checking out the project from CVS you should set the environment for compiling and testing it All modules come with an Ant file with a target called setup_project Click on it and then refresh the project select project right click and then Refresh Now your project is ready for any change Page 10 of 17 7 29 2005 3 4 DEPLOYMENT OF THE NEW CODE After changing the code and testing it in the Eclipse framework it s time to deploy the JAR file in either the test or production environment As said before all modules come with an Ant file with a target called deploy_development and another one called deploy operational Select the one you need It will create t
3. this preferences getMathematicaDirectory Get the default working dir gt this preferences getWorkingDirectory Switch to a viewer tab this viewer switchToPanel ViewManager ASCII PANEL throws RosaliObjException public void execute Ex Gri car hs hp age this viewer addASCIIPanelText Testing This method is called when the user stops the action s execution or when the tool gets an error during the execution If the user wants to restore some values in the action s arguments his her code should come here public void restore Figure 8 Action template file 5 3 MKACTION APPLICATION The mkAction application is used in the Ant file for creating a new action If you want to modify the code it is in CVS under the module Admin Figure 9 shows you the activity diagram with the tasks performed by the program Page 15 of 17 7 29 2005 action already defined yes no Load properties file yes Create directory structui Java file for action exis Copy Anonymous templa Replace Anonymous by actionName Developer info file exisi lt no Get developer info from XWt copy AnonymousDeveloper file tc username yes Replace anonymous info by user info create web page for action s manual e Figure 9 Activity diagram for mkAction The application reads the configuration paramet
4. xml file Change the name there The ereate jar target compiles your project and creates the jar file that be used to test your new action inside Eclipse Once you are ready to deploy it use the target deploy for it 5 2 ACTION TEMPLATE FILES The targets that create a new action make a copy of a template file changing the action s name and the file s name At this moment there are four templates files placed on user fesa rosali e ActionAnonymous java gt Template file for a general action e ExpertAnonymous java gt Template file for an expert action e MathLinkAnonymous java gt Template file for an action that uses Mathematica e MonitorAnonymous java gt Template file for an action with monitoring features The application administrator can add as many templates as he considers The only thing he she needs to do is to create a template file following the remarks listed below and to add a new target in to the Ant file All the templates files must include e the package name cern fesa rosali Action UserAction e the class name MUST be Anonymous and extend ActionTemplate e the value for the name attribute in the constructor MUST be Anonymous e The template should provide the methods verify execute and restore as well a brief description about how to use them Example of an action template package should always be this package cern fesa rosali Action UserAction import cern fesa rosali Acti
5. CERN CH 1211 Geneva 23 Switzerland AB BDI Software Section Documents the Mass 4 Technical Description ROSALI Maintenance guide Abstract This document tries to put in place all ROSALI infrastructures to help new developers and system administrators in the tasks of maintenance upgrade and new deployments Edited By Checked By Approved By Monica Moles Xx Xx Page 2 of 17 7 29 2005 History of Change Version 1 0 1 0 1 0 1 0 Date 4 21 2005 6 14 2005 6 29 2005 7 29 2005 Pages All 5 10 5 6 Change Description Initial Submission Deployment diagram changed Section Change action sequence structure added Changed location of the executables Page 3 of 17 7 29 2005 Table of Contents 1 2 E ese 5 2 ROSALI INFRASTRUCTURE AND LOCATION 5 3 MODIFYING THE SOURCE 6 3 18 PRELIMINARY S EPS tr RR edi Sea 6 9 2 CHECKING OUT A tueantur odd se dadas acce 8 S23 MODIFY THE CODE 235r ber Rt EKAS EA 9 3 4 DEPLOYMENT OF THE NEW CODE 10 3 5 CHANGE THE ACTION SEQUENCE 5 10 4 CHANGE ROSALI CONFI GURATI ON PARAMETERS 10 5 ROSALI ACTIONS rae ences aeu resa n Nera
6. een revisions Current directory bdi ROSALI Previous Directory Action D ActionBuilder a Communication a UserAction zeller think de Figure 2 View of the ROSALI module in CVS The tool recommended to modify the code is Eclipse First of all you have to configure your CVS Repository under Eclipse to check out the code If you haven t done it yet please follow the steps 1 Click on Window gt Show view gt Other and then select CVS Repositories 2 Right click in the new panel and select New gt Repository Location Window showed in Figure 3 will appear Enter the info like in the figure then press Finish Page 8 of 17 7 29 2005 Add 5 Repository Add a new C S Repository X fuser bisw CV S Repository Figure 3 Configure CVS repository under Eclipse 3 2 CHECKING OUT A PROJ ECT Then you should check out the module you want to modify from the CVS server To do so 1 Right click on the Package Explorer tab located on the left side of the window 2 Select Import from the pop up menu Figure 4 will appear Page 9 of 17 7 29 2005 Select a Create a new project by checking out an existing project from a CYS repository Select an import source Checkout Projects from CVS Existing Ant Buildfile 15 Existing Project into Workspace External Features E External Plug ins and Fragments File system
7. eriting all its resources Due to some version incompatibilities with the XML packages the jar file xmlparserv2 must be the first one on the list in order to work properly 7 CHANGI NG THE DEPLOYMENT DI RECTORY If for any reason you need to change the location of the deployment directory here there is a list of things you should do Note that you MUST keep the default directory structure where the RosaliPoperties prop and mkActionProperties prop must be under rosali configData 1 2 First of all change the JAR files to the new directory Change the value of the property OPER_ROSALI_DIR to the new location in every build xml file Change the value of the property ROSALI_JARS_DIR to the new location in the UserAction build xml file Update the location of the resources in the application launcher see section 6 Configure the application launcher
8. ers from the mkActionProperties prop file located at user fesa rosali configData This file is listed below and defines Page 16 of 17 7 29 2005 e The path of the package to be created userPackage e The template file containing the developer s personal information developerFile e The web server name for the Rosali web page webServer e The project site name e The directory where the actions user manuals will be placed on the Rosali web page documentationPath e The name of the web page used as template templateWebPage mkAction Properties userPackage cern fesa rosali Action UserAction developerFile DeveloperAnonymous java webServer webh04 cern ch projectWebSite project rosali documentationPath ActionsDoc templateWebPage Anonymous htm Figure 10 mkActionProperties file 5 4 DELACTION APPLICATION The delAction application is used in the Ant file to delete an action from the list of available Rosali actions It doesn t delete the java source files from the user s directory If you want to modify the code it is in CVS under the module Admin 6 CONFI GURE THE APPLI CATI ON LAUNCHER The ROSALI GUI and the ActionBuilder applications are launched from the Application launcher The resources needed to launch them are already configured but if you need to modify them 1 Open the application launcher tool from the section web page 2 Select the Edit configura
9. fined in the ROSALI web page under the section Documentation gt Action s developers corner gt How to build new action 5 1 THE ANT FILE For this guide it requires a special attention the Ant file for creating new actions compile and deploy them When the user creates a ROSALI action for the first time he creates a new project in Eclipse importing a ZIP file which contains a build xml file and the classpath The build xml has the following targets ROSALIActionUser create jar amp clean amp create jar default amp delete action amp deploy new expert action amp new general action new mathlink action new monitor action amp setup eclipse Figure 7 Targets in the build xml for creating a new ROSALI action The setup eclipse target should be executed each time the user starts a project or when an external jar file has changed First of all it copies the latest version of the build xml and classpath in your project directory These files are taken from user fesa rosali configData like shows Figure 1 It also copies the external jar files needed to compile your project in the lib directory Page 12 of 17 7 29 2005 The new general action target creates the J ava code source file for the new action based on the general action template It calls the mkAction application refer section 5 3 mkAction application The name of the action to create is set in the build
10. he Jar file and move it to the right place Then you should commit the changes in the CVS server 3 5 CHANGE THE ACTION SEQUENCE STRUCTURE If the developer needs to add a new field to the action meaning to change the ActionTemplate java file this change should be also reflected in the action sequence schema When parsing a file with a sequence of actions the SequenceParser class reads the structure the sequence should have This structure is defined in the actionSequenceSchemaLoc property see Figure 6 RosaliProperties file Once the structure of the sequence is loaded the SequenceParser class reads the XML file containing the sequence If it doesn t follow the structure of the schema the file is not well formed So if the developer adds a new field to the action he she should add it also to the sequence schema to read create the file properly For instance if the developer needs to add a new type of field to the action namely checkbox he she should add it in the ActionTemplate java file and in the actionSequence xsd file Currently it has the following structure D co iare Cope qe 40 CIEL i D co ection peseword i 0 c0 Re c Peces cams X D co Figure 5 XML Sequence schema 4 CHANGE ROSALI CONFI GURATI ON PARAMETERS The configuration parameters for the ROSALI application are defined the RosaliProperties prop file under user fesa rosali configData This is the curre
11. jar is a library that provides access to the Rosali action common features It contains the implementation of the Action package defined in the Rosali Design Documentation cern fesa rosali Action UserAction jar contains all the class files for the implementation of the users actions cern fesa rosali communication jar is a library that provides methods for creating and accessing files in Rosali format It can be used by the users defined actions or as a stand alone jar file The yellow box at Figure 1 contains all the specific executables for the Rosali application located under user bdisoft operational java rosali like It also cern fesa rosali GUI jar is the executable JAR file for the ROSALI GUI application It contains the class files for the implementation of the GUI and XmlParser packages defined in the Rosali Design Documentation cern fesa rosali ActionBuilder jar is the executable JAR file for the ActionBuilder application It contains the implementation of the ActionBuilder package defined in the Rosali Design Documentation cern fesa rosali mkAction jar contains the application for creating a new Rosali action This application checks if the action already exists if not it creates the action template in the working directory and the HTML page to write the action s user manual cern fesa rosali delAction jar contains the application for deleting a Rosali action It only deletes the action from the list of available Rosa
12. li actions not deleting the source code from the user s working directory contains the configuration files under the configData directory RosaliActions xml XML file with all the available Rosali actions RosaliActions xsd XML schema defining the structure of the RosaliActions xml file The sequence of actions created by the user is saved in an XML file actionSequence xsd is the XML schema defining this structure RosaliProperties prop is used by the GUI application and sets the location of the XML files the list of super users and some other properties used by the application build xml Ant file used to create a new user action compile it and deploy it classpath Eclipse project s classpath file defining the location of the external JAR files needed to compile the project The standAlone directory contains the executable for setting up the application It also contains the script used to generate this setup file The program used for that is Inno Setup 5 can be downloaded from http www jrsoftware org isinfo php 3 MODI FYING THE SOURCE CODE 3 1 PRELIMINARY STEPS All source code is under CVS on bdidev1 under the module ROSALI At Figure 2 you can see Snapshot of the modules under the ROSALI module Page 7 of 17 7 29 2005 m ROSALI Click on a directory to enter that directory Click on a file to display its revision history and to get a chance to display diffs betw
13. nt content of the file Rosali Properties defaultSettingFile RosaliDefault prop actionSequenceSchemaLoc rosali configData actionSequence xsd RosaliActionsSchemaLoc rosali configData RosaliActions xsd RosaliActionsXML rosali configData RosaliActions xml Page 11 of 17 7 29 2005 RosaliWebPage http project rosali web cern ch project rosali ActionsDoc RosaliSuperUsers mmoles sjackson sbartped sam anag ljensen karlsson alokhovi Figure 6 RosaliProperties file The user s preferences such as the working and input directories are saved in a file whose name is defined in the property defaultSettingFile If the user is working under the Windows environment the file will be created in c Documents and Settings username otherwise under user username The actionSequenceSchemaLoc property sets the location of the XML schema file defining the structure of the sequences of actions The RosaliActionsSchemaLoc property sets the locations of the XML schema file defining the structure of the file with the Rosali actions The RosaliActionsXML property sets the location of the XML file with the list of available actions The RosaliWebPage property sets the URL where the actions documentation can be found The users listed in the RosaliSuperUsers property have special permissions and can see every Rosali action 5 ROSALI ACTI ONS The procedure to create a new action to use it in the ROSALI GUI is de
14. on import cern fesa rosali communication RosaliObjException All actions defined by a developer will be a copy of ANONYMOUS That class defines the basis methods a developer needs to implement All the common behavior will be managed by the ActionTemplate class author Monica Moles since August 20th 2004 ye i ebd hdl det D SS public class Anonymous extends ActionTemplate Constructor There the developer will specify the attributes his class need to use S public Anonymous Page 13 of 17 7 29 2005 FF FF F X F OF this developer new ActionV it creates new ActionV telus CONSEE The custom extend Cus Re Sr he mut UE ke ep CES oui Ceia eu viewer addC this viewer ne This method is fields panel If the develope them he she ha Create viewer PLEASE NOT REMOVE this name Anonymous END ATTRIBUTES Developer contact details for free new DeveloperAnonymous You have 2 ways to create it iewer a panel containing the 2D 3D and ASCII viewer iewer CustomPanel p uctor also adds a custom panel to the tab panel will be imolenesnrtec Joy the developer anc MUST tomPanel By default it contains a single button ays add the custom panel with ustomPanel customPanel ActionViewer called when an argument is changed by the U
15. ser in the r wants to check the values entered before applying S to provide the code here userFieldNam xg im iu YSL iP chm Ihe mdy GUIS Ju S developer must is the name defined by the user for the field e new value the user is trying to set That value is is argX or this dataFileX as to verify the value without setting it to the omething goes wrong in the verify method the throw an exception throw new Exception message and the application exception then will show the message in a dialog If there is no public void verify String userFieldName String value throws Exception F FF F F F X OF This method is 0206 You can access tee Ser ex aia Access to the Access to the Access to the Get the defau Ta ngine will apply the new value to the field called when the action has to be executed ide your code here to the viewers and preferences with he Ascii viewer gt this viewer addASCIIPanelText Testing he Ascii viewer gt this viewer setASCIIPanelText Testing 2D viewer this viewer view2D 3D viewer this viewer view3D custom panel this viewer viewCustom Itc anm Clineccoiny gt Page 14 of 17 7 29 2005 this preferences getInputDirectory Get the default Mathematica dir gt
16. tion tab and open BDI Generic applications 3 Select the application you want to modify i e ROSALIGUI and open jnlp resources If the location of the JAR files has changed you should modify them here Page 17 of 17 7 29 2005 Q application group BDIGenericApplications Applications that act as frameworks for other applications BDI application ExpertGUl ExpertGUl GENERIC UNDEFINED false O application ActionBuilder ExpertGUlBeta GENERIC UNDEFINED true application ActionBuilderBETA ExpertGUiBeta GENERIC UNDEFINED all true application StdlfDiff ExpertGUl GENERIC UNDEFINED all true O application ROSALIGUI ExpertGUlBeta GENERIC UNDEFINED all true 9 10 14 http slvww cern ch pcrops apps Q O resources jar http slivww cern ch pcrops apps fesa cern fesa rosali GUI jar true eager jar http slvww cern ch pcrops apps fesa cern fesa rosali communication jar false eager jar http sliww cern ch pcrops apps fesa cern fesa rosali amp ctionjar false eager jar http shwww cern ch pcrops apps fesa cern fesa rosali Action UserAction jar false eager jar http bdidev1 operational javasbdi_jars cern bdi stdif jar false eager 2 14 256M 512M application desc cern fesa rosali GUI Rosali responsible mmoles user akruk O targeted domain NONE Figure 11 Application launcher for ROSALIGUI Note that both applications extend ExpertGUI application inh
17. uc rina TREE EE 11 THEANP 11 5 2 ACTION TEMPLATE FILES deer rrr re rr 12 5 3 MKACTION APPLICATI ON cett rta nh nh net nn 14 54 DELACTION APPLICATION icis ce es dedu mee 16 6 CONFI GURE THE APPLI CATI ON LAUNCHER 16 7 CHANGI NG THE DEPLOYMENT DI RECTORY 17 Page 4 of 17 7 29 2005 Table of Figures Figure 1 Deployment diagram 2 2 7 7 2 2 2 2 2 0 6 eene 5 Figure 2 View of the ROSALI module in 5 0 7 Figure Configure CVS repository under 8 Figure 4 Import project from CVS step 1 0 0 cece eee memes ee nemen ne 9 Figure 5 XML Sequence 7 0 1 0 4 44 6 rens 10 Figure 6 RosaliProperties mm IH eem ehem 11 Figure 7 Targets in the build xml for creating a new ROSALI 11 Figure 8 Action template file 0 0 eee mense memes enne 14 Figure 9 Activity diagram for 1 nens 15 Figure 10 mkActionProperties 00 me messes 16 Figure 11 Application launcher for ROSALIGUI

Download Pdf Manuals

image

Related Search

Related Contents

  Nobo Diamond  - RideTech.com  Lightolier LLC2 User's Manual  MP10wQD Owner`s Guide  sunway station ls en    Grundig 55 VLE 9474 SL 55" Full HD 3D compatibility Smart TV Wi-Fi Silver  Case Logic PNC-118  

Copyright © All rights reserved.
Failed to retrieve file