SRJRCFrames
v0.1.296

Package de.schwarzrot.main.app

class for the applications common main function and the base for resource configuration.

See:
          Description

Class Summary
AppMain  
 

Package de.schwarzrot.main.app Description

class for the applications common main function and the base for resource configuration. Resource configuration (package-prefix is 'res') is divided into

setup of ApplicationContext - (subdirectory 'ctx')
Application searches for 3 context definition files, which are merged into one single ApplicationContext. This separation has been made for convenience, but you're free to change it to what you like.
Currently these files build the ApplicationContext:
business-layer.xml
this file contains the "backend" definitions, which means i.e. a DataSource, TransactionManager and EntityManager definitions.
security-context.xml
Security has only a sceleton implementation yet. The interfaces have been made ready for play together with Security classes, so their configuration will happen in this file.
application-context.xml
the setup of the application. With SR-Richclient-Framework the term application is somehow ambiguous. The process startet by de.schwarzrot.main.app.AppMain is an application for the operating system. But from the point of view of SR-Richclient-Framework it is only a sceleton usable to load other applications. That "loadable" applications can be compiled in like the Sample app, or they may be loaded from separate jars. Those applications run in the same process than the sceleton, so they form just a virtual unit. To distinguish these both "applications", I refer to the sceleton as application and to the virtual units as 'loadable applications' (even if they are compiled in like the Sample application.

So this file application-context.xml is to configure the sceleton - the application base.

Definitions from business-layer.xml and security-context.xml are available, so here alle parts will be assembled to form a valid setup.

Important definitions include the MessageSource, Repository and of cause the application services.

setup of MessageResources - (subdirectory 'ui')
Message resource files are property files, having their names declared as 'basename' in the MessageSource entry in the ApplicationContext. An entry

<value>de.schwarzrot.main.app.ui.messages</value>

means, that the default name is called 'messages.properties'. Localized files may be 'messages_de.properties' or 'messages_es.properties' ...

see java.util.ResourceBundle for further details on localization.

setup of ImageResources - (subdirectory 'ui')
To allow image distribution and handling with loadable modules, images are accessed with indirection of the ImageResource. These Resouce-definitions allow a pathresolution by identifier. So the root of images is 'res/images' wich will be '/images' as path.

An image resouce entry may look like

 Sample.FILE_READ.large.icon=/images/32x32/transform.png
 
which is a toolbar icon definition for the loadable application 'Sample' and its Action FILE_READ.


SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.