Neither this document nor any part or extract of it may be
redistributed in a modified form,
sold as part of slides, manuals or other forms of documentation or support material,
printed by any print-on-demand service,
reused as part of commercial trainings, presentations, workshops or coachings
Table of Contents
List of Tables
List of Examples
Table of Contents
Table of Contents
OpenSAGA focuses on developing applications for eGovernment contexts. OpenSAGA is a platform for developing Java-based web applications in a manner that allows the modeling of web applications by intention and declaration instead of imperative coding. It hides technological details in an abstraction layer in order to allow for a continuous and transparent evolution of projects and simplify the learning process required to become an expert web developer.
OpenSAGA places a major focus on complying with the requirements laid down in SAGA (the german standard architecture for e-government applications). Its main target is to be as compatible as possible with those standards while at the same time advocating a new style of development. In order to achieve the second goal OpenSAGA introduces a domain specific language (DSL) for specifying web applications on a highly abstract level. By doing so it provides three major benefits:
The domain specific language requires far less knowledge about the vast amount of modern web technologies usually required by various frameworks to build highly interactive applications. It uses a combination of model-driven, generator-based and generative approaches to automatically build the appropriate technology mix from your declared intentions. Thus new developers can learn to "run" much faster and become productive much quicker than is typical for classical approaches.
The domain specific languages hides most of the technical details behind the scenes. You can get there if you want but usually you will not want to venture into those dark and dangerous recesses. Rather OpenSAGA allows you to concentrate on developing actual business logic. Even better evolving an application becomes a breeze. No longer you will need to fight with web applications that - after running for two to four years - consist of technologies long out of date. No longer will you have to dig for knowledge about ancient frameworks. Application evolution with OpenSAGA is as easy as exchanging the underlying generator and runtime and most of the time you will not have to change a single line of code to be able to use the latest web technologies.
Developers will no longer get stuck on a certain technology level. As OpenSAGA simplifies both the start of development as well as the technological evolution, your value as a developer increases over time, as you can concentrate on business aspects of your job, grow your understanding and indepth knowledge of the business processes you work on and thus can rise to much higher efficiency by really getting into the processes.
OpenSAGA targets portals and process centric web applications. We consider portal applications to be all web applications that aggregate information, content and processes under a coherent interface, e.g. in the OpenSAGA view of reality portals are a lot more than just portlet collections. Specifically we do not limit the generated portal implementation to a subset of web technologies but prefer to use the best available tool in any given situation.
In analogy to Extreme Programming and the Agile Manifesto a set of values, principles and methods form the base of the OpenSAGA design. We will explain them briefly in the following section in order to help you to get an understanding for underlying design decisions. Values define the map upon which our design and implementations are located, principles describe the roads we prefer to take and methods help us in making individual steps.
Development shall not be bogged down by details. Development must be fast and efficient. Development support must free up time to concentrate on the requirements the customer issues. This does not necessarily mean a focus on brevity and especially not on convention over configuration but rather a focus on modeling the important things precisely. And in such a manner that technological evolution becomes a commodity and not a problem.
We strive for a platform that is accessible to developers (and also for users of the platform - but that is another major focus not tackled under this specific). Projects shall be easy to set up, technical details shall not interfere with your work and the constant technology flux shall be abstracted for you. Applications shall look beautiful right away. The platform design shall be consistent and easy to pick up.
We do not want to prevent you from doing your work. 80% of all tasks shall be achievable in a simple, standardized and straight forward way. The remaining 20% shall be easily addable in the way you prefer. All points important for individualized extensions shall be easily accessible and easily extendible.
We want to focus on the conceptual and domain specific needs of our customers. Technology is only in so far of interest as that it allows us to implement solutions in a manner appropriate for the customer. The programmer should be freed from the need to understand ever changing technological contexts.
We focus on developing rich portal solutions and web applications. State of the art technology in this area is the baseline of our work and user comfort of high importance. Models must be as expressive as possible when modeling aspects in this domain.
We use a strict model driven approach. All parts of the runtime system are generated from the models. The models explicitly describe the complete system. We always use the most appropriate model at hand. If XML is not the best way to go, we will follow other paths (e.g. Groovy or SQL). Nonetheless the models must describe the domain completely, only specialties should be expressed in more appropriate ways.
Being based on the SAGA standard OpenSAGA is fully compliant with the V-Model XT (the standard project management method for e-government applications in Germany). We are currently working on providing templates for jump starting V-Model XT based projects in connection with OpenSAGA.
Additionally OpenSAGA supports a highly agile, interactive and rapid prototyping based approach to application development. This approach is based on a top down view of the system to be build and starts from a high level perspective then chiseling out the details of your project. The whole approach is strictly model driven, so you first build the models and then refine them with more and more detailed submodels until finally getting to the code level where you actually implement the business logic either in Java code or one of the many scripting languages supported by OpenSAGA.
The examples in the reference manual will give you a brief overview about how we ideally start to approach projects with top down agility. Workshops and trainings are available to train you in this highly effective method that has been in use for many projects over the past eight years. Additionally the QuinScape GmbH provides courses on how to use V-Model XT in conjunction with OpenSAGA to the utmost effect - but never forget: You just need to start.
More details about the "OpenSAGA approach" are available in Chapter 4, Top Down Design and Development and more specifically in Chapter 6, Programming Tutorial: Developing a Web Based FAQ Application.
We quite often use the names "portals" and "web applications" synonymously. Currently OpenSAGA only produces web applications in the strict sense as currently there is no portlet support available (expect that for a later version, probably before 2.0.0). Nonetheless all OpenSAGA applications share a set of common features and assumptions we briefly would like to explain in the next sections.
Although OpenSAGA models are abstract enough to also describe Swing or SWT applications we focus our development efforts on a single runtime platform - the web. We do this in order to increase our chances of providing a truly great platform as the support for a variety of platforms inevitably would lead to a lot of compromises and we do not want to compromise.
Accessibility is a complex technical topic and few web frameworks regard accessibility as a strategic topic. We are different in that we believe in supporting strong accessibility (e.g. even working completely without JavaScript support) as this is a common requirement in eGovernment applications. Nonetheless OpenSAGA includes strong support for modern web technologies including AJAX the major difference being that all OpenSAGA components take great care to include the full functionality for both JavaScript-enabled and -disabled environments.
OpenSAGA web applications are not very well suited to represent the functionality of classic content management systems (although there is some support for CMS functionality). OpenSAGA applications are better suited to presenting structured content, form based processes and complex workflow and work better with integrated CMS functionality (e.g. by retrieving content from the CMS and displaying it).
One of the major models of the OpenSAGA modeling ecosphere are the process models. Process models describe complex workflows made up from start states, view states, decision states, etc. and model the UI workflow for users. Additionally they offer various connection points to background processes.
Models are the core artifacts of OpenSAGA applications. As we believe in flexibility OpenSAGA offers a wide range of extension points which you can use to inject scripts or Java code into the models in order to exchange or enhance standard runtime behaviour. With this one exception models are the core unit of work and you will alter models in order to change behaviour.
OpenSAGA applications support both stages and extensions in order to compose complex application scenarios from simpler building blocks. Stages provide a means to separate infrastructure configuration details from the core functionality of a application and allow to define arbitrary sets of configuration data that e.g. differentiate between the settings of development, quality assurance (QA) and production settings. Additionally applications can be modularized in any way you like.
OpenSAGA additionally includes a composition feature that takes extensions with horizontal or vertical feature slices and combines them into powerful applications. As the developer is responsible for defining the boundaries of those extensions the mechanism is very powerful (and requires responsible behaviour) but can ultimately be used for various efficient architectures. For example it is possible to define a core layout for a global company in one extension and then specialize this core layout for subgroups and specialize them further down in extensions that inherit some behaviour of their parents, add new behaviours and modify existing behaviours. As the core extension mechanism is not limited to layouts but can be used for anything from single views to complex workflows highly complex and powerful configuration scenarios thus are easily supported.
Table of Contents
OpenSAGA currently exists in a strange duality: Since it stresses German eGovernment requirements the project website currently only is available in German. Additionally the issue tracker (JIRA) and the discussion forums for now also are only available in German. We will add support for English speakers over time (or as soon as someone asks ;-) ). This documentation is English since we from the start intended to be prepared for an international focus as the German SAGA standard (our guideline for what we try to achieve) also will be formulated in English starting with version 5.0. Thus currently all technical documentation is only available in English, the community and the official website are only available in German. Better approaches and help realizing them are welcome ;-)
The following addresses will help you to get started:
http://www.opensaga.org: The project website (german only right now). Contains an introduction, some overview
documentation and links to all other important places (e.g. the forum and the issue tracker).
http://www.opensaga.org/forum: The discussion forum for various aspects of OpenSAGA. This should be your first stop
if you encounter questions, problems, etc.
http://www.opensaga.org/jira: The issue tracker for the OpenSAGA project. This should be your second stop if
you couldn't find sufficient help in the forums above or come to the conclusion that some enhancement should be added
to the project.
http://www.opensaga.org/blog/team-blog: The team blog of the OpenSAGA project. Here we blog about new features,
interesting tricks and everything else of interest to the OpenSAGA project.
http://twitter.com/OpenSAGA: Our team twitter account. Occasionally we use it :-)
OpenSAGA is a very powerful and highly configurable platform. Flexibility always comes with the price that there are many things to do wrong. This section gives some brief advice on how to cope with problems while working with the OpenSAGA platform:
If there is some kind of problem while starting an OpenSAGA based application always scan your log files or your console for the first exception that occurred. As the whole startup process is pretty involved an early problem can initiate a series of subsequent problems. Don't let yourself be fooled by later exceptions (which we try to avoid as much as we can) but rather look at the origin. The first exception that occurred and is logged usually will give the best hints about the actual problem.
Ask in the OpenSAGA forum for support. You can find the official forums at http://www.opensaga.org/forum.
You can download the latest version of OpenSAGA from http://www.opensaga.org/downloads. If you feel particularly adventureous
you can also download the nightly builds of OpenSAGA from http://www.opensaga.de/downloads/nightly-builds but be warned. They consist of the latest checkins of our project team and times
we even check in broken code. So there are no guarantees attached with the nightly builds.
OpenSAGA relies on the Maven dependency management. The maven integration is independent of the IDE and addtional plugins. OpenSAGA supports a maven repository where final builds and snapshots are located. Also some third-party libraries required for a sucessful build are provided.
Projects which use OpenSAGA aren't forced to support a maven build. You could download the OpenSAGA dependencies manually
or use Maven only once for dependency resolving (This would be the more convenient way). The dependencies have to be located
(according to the default web-application structure) in WEB-INF/lib.
OpenSAGA supports the latest stable version of Maven 2. We highly recommend the use of Maven 2.2.1 for OpenSAGA builds.
Maven is distributed in several formats, you can download the recommended version from http://maven.apache.org/download.
The use of Maven 3.0 is not completely tested so its use is inadvisable although Maven 3.0 supports a great backward compatibility.
The installation instructions can be found on http://maven.apache.org/download.html#Installation.
OpenSAGA offers its own Maven2 Repository. OpenSAGA M2 Repository doesn't proxy other repositories. So additional Dependencies can't be resolved by OpenSAGA M2 Repository.
The Repository Manager is located on http://opensaga.org/maven/.
It supports the repository types listed below.
OpenSAGA uses several third-party repositories to resolve artifacts.
Table 2.1. Repositories
| Id | Name | URL |
|---|---|---|
opensaga | OpenSAGA Repository | http://www.opensaga.org/maven/content/groups/public |
jansi | Jansi Fusesource | http://jansi.fusesource.org/repo/release |
javaparser | JavaParser Repository | http://javaparser.googlecode.com/svn/maven2 |
jboss | JBoss Repository | http://repository.jboss.com/maven2 |
java.net-m2 | java.net - Maven 2 | http://download.java.net/maven/2 |
scala | Scala Tools Repository | http://scala-tools.org/repo-releases |
geotools | OSGEO GeoTools | http://download.osgeo.org/webdav/geotools |
hibernate-spatial | Hibernate Spatial Repository | http://www.hibernatespatial.org/repository |
This chapter describes the steps to achieve satisfied dependencies for OpenSAGA.
To resolve dependencies with Maven you have to create a minimal POM (Project Object Model). For further informations you should
consider reading the POM Reference (http://maven.apache.org/pom.html). The minimal POM consists of the GAV Parameters,
the OpenSAGA M2 Repository Definition and the OpenSAGA-Core dependency.
This minimal POM assumes that your projects consists of the Maven Standard Directory Layout for Web-Applications defined by convention.
An introduction to this convention can be found here http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html.
For easy Maven support you could use m2eclipse for the Eclipse IDE http://m2eclipse.sonatype.org/. To handle maven without m2eclipse you may use
the maven-eclipse-plugin to generate files for WTP and Eclipse (e.g. .classpath, .project, etc.). For an IDE independent build
you may have look into the OpenSAGA POM for inspiration.
Table 2.2. Properties of Minimal POM
| Property | Description |
|---|---|
${project.groupId} |
The group id of your project its often homogenous to your root package (e.g. org.opensaga)
|
${project.artifactId} | The artifact id of your project. |
${project.initialVersion} | Your initial version of your project (Maven default: 0.0.1-SNAPSHOT) |
${opensaga.version} | The desired version of OpenSAGA (e.g. 1.0.0). |
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.initialVersion}</version>
<packaging>war</packaging>
<repositories>
<repository>
<id>opensaga</id>
<url>http://www.opensaga.org/maven/content/groups/public</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.opensaga</groupId>
<artifactId>core</artifactId>
<version>${opensaga.version}</version>
</dependency>
</dependencies>
</project>
The properties of the minimal POM have to be replaced with your desired values. The minimal pom must be located
in your project root with the adequate filename pom.xml.
OpenSAGA currently supports the following runtime environment. Take care to use the required minimum versions of other products and libraries since subtle behaviour differences in older releases might otherwise be the cause for all kinds of bugs.
Java 5+ (tested with Java 1.5.0_15)
Tomcat 6.0.20+ (tested with 6.0.20)
Servlet API 2.5+ (tested with 2.5)
OpenSAGA can be used on a wide variety of systems. And if you find some kind of infrastructure we do not yet supported you can open
a JIRA issue at http://www.opensaga.org/jira to ask for support for your preferred infrastructure software, be it an IDE,
a server or a specific database.
Below you can find hints for installing and using some common systems. If your preferred piece of software is not yet officially supported and you run into problems you might look at the hints for similar products to see if you receive support. Additionally we welcome any hints on finetuning specific IDEs, etc.
Our preferred IDE is Eclipse, especially since we provide a powerful plugin with OSclipse, which provides additional functionality
while working with OpenSAGA in Eclipse (see http://www.opensaga.org/confluence/display/website/download-eclipse-plugin).
We highly recommend that you download the OpenSAGA-Eclipse-Plugin since it provides extensive support for working with
OpenSAGA (see http://www.opensaga.org/confluence/display/website/download-eclipse-plugin for details and documentation).
![]() | Warning | ||
|---|---|---|---|
|
Be careful to correct configure Eclipse by defining the following specific settings:
|
OpenSAGA should work with any Java Application servers but often there are difficult problems with specific configuration settings. Below we summarize some of the most important configurations.
Create a new dynamic web project in Eclipse. Create a new folder under /WEB-INF/resources/extensions that equals your module name (e.g. your extension). That's it.
OpenSAGA requires a number of dependencies in order to work. The various libraries are listed in ???, include
them in your project. Additionally you need one JAR file for the OpenSAGA base installation and the JARs that are required for the extensions you might want to use. Include them under
/WEB-INF/lib.
In order to run OpenSAGA you will need to configure a number of settings, specifically:
the underlying database,
the configuration for the deployed system,
the staging configuration.
You have to specify a data source (the section called “The Data Source Model”) with the
name portaldb. This is the default database used for all domain
types, but you can define exceptions (see the attribute data-source-name
in ???). If you don't specify
your own database, a default HSQLDB database is used.
To run a OpenSAGA Portal without problems you should set the following parameters.
-Dorg.apache.el.parser.COERCE_TO_ZERO=false
-Xms64m
-Xmx256m
-XX:MaxPermSize=256m
OpenSAGA offers two ways to configure the context path - either by defining
the context parameter opensaga.CONTEXT_PATH in the web.xml
or by setting the parameter context-path in the opensaga-project.cfg
configuration file.
Example 2.1. Context path configuration in the web.xml
<context-param>
<param-name>opensaga.CONTEXT_PATH</param-name>
<param-value>/opensaga-core</param-value>
</context-param>
OpenSAGA installations use two variables to configure a project deployment. These can be either defined globally for all installations on the server or locally for each deployed project. Configuration settings are searched in the following order for each variable described below:
A system property (e.g. defined with the -D JVM) option
is queried. If a definition is found, that definition is used.
An environment variable with the given name is queried alternatively.
OpenSAGA offers two ways to configure the extensions of a project - either by defining an environment variable or by using a configuration file. Both are explained in the next sections. The environment variable always has precedence over the configuration file.
OpenSAGA uses the configuration variable OPENSAGA_RESOURCE_EXTENSIONS
to define the list of extensions to be used in a specific project (besides the
base package which is always included). If the project is deployed under the
context path FOO, OpenSAGA first will query the configuration variable
OPENSAGA_RESOURCE_EXTENSIONS_FOO and only if no definition is
found the global variable OPENSAGA_RESOURCE_EXTENSIONS will be
queried.
Extensions are merged in the order given in the variable value. Individual values can be separated by a semicolon ";", a space " ", or a comma ",". If the underlying operation system uses the colon ":" as a separator for path definitions, the colon can also be used.
Example 2.2. Extension configuration by environment variable
OPENSAGA_RESOURCE_EXTENSIONS=gis;sandbox;qs-dev OPENSAGA_RESOURCE_EXTENSIONS_FOO=gis;sandbox;qs-dev
Extensions can be specified by using the configuration file
/WEB-INF/cfg/opensaga-project.cfg. This property file has to declare
the property extensions with a list of extensions in the format
defined above.
In order to comply with highly specialized data center requirements and configuration setups OpenSAGA also allows to
externalize parts of the current configuration. The extension loader recognizes specialized extension types (identified
by a prefix separated with a colon from the extension ID) and resolves those extension IDs to special extensions.
org.opensaga.runtime.controller.servlet.ExtensionIdLoaderServiceImpl.java contains some information
of the approach and various implementations of org.opensaga.runtime.controller.servlet.ExtensionIdResolver
come prepackaged with OpenSAGA. Additionally you can just dump your own implementations of ExtensionIdResolver
ine some 00-psb-*.xml bean context of your OpenSAGA application and those beans will be autodiscovered and used by the
extension resolver.
OpenSAGA offers two ways to configure the list of stages to be used in a project - either by defining an environment variable or by using a configuration file. Both are explained in the next sections. The environment variable always has precedence over the configuration file.
OpenSAGA uses the configuration variable OPENSAGA_STAGES to define
the list of stages to be used in a specific project (besides the base package
which is always included). If the project is deployed under the context path
FOO, OpenSAGA first will query the configuration variable
OPENSAGA_STAGES_FOO and only if no definition is found the global
variable OPENSAGA_STAGES will be queried.
Stages are queried in the order in which they are defined. Individual stages must be separated by a colon ",", a semi colon ";" or a space " ".
Example 2.4. Stage configuration by environment variable
OPENSAGA_STAGES=global,dev-barney OPENSAGA_STAGES_FOO=global,dev-homer
In the sections above we explained the usage of context path dependent configuration variables. The full variable name is created according to the following rules:
Any character that is not a character from the 26-letter ASCII alphabet is replaced by an underscore (case is ignored).
The resulting ID is appended to the global variable name by a separating underscore.
OPENSAGA_STAGES_FOO_____BAR. Hint: Don't use special characters and
numbers in your context path or live with the results ;-)
For UI testing (e.g. with Selenium) it is very important to have somewhat stable IDs to refer to in the test scripts.
This prevents having to adapt the test script whenever something in the tested views changes.
OpenSAGA offers a mode that preprocesses the XML model to ensure that every XML element has its ID. It is enabled by setting the
system property OPENSAGA_CONSTANT_IDS to true.
Start programming. More details in Chapter 4, Top Down Design and Development.
The following problems are known with OpenSAGA. Until they are fixed we provide recommended workarounds:
When using Tomcat, Tomcat requires at least one source file in a web project that you want to deploy in order to
examine /WEB-INF/classes. Since OpenSAGA uses that directory for dynamically generated classes make sure
that you create an initial source file in your own web project. This can be any kind of text file or whatever, just give
Tomcat something to deploy.
Table of Contents
One of the main benefits using the OpenSAGA platform is the concept of model based design. The OpenSAGA models define a conceptional abstract view of the domain being modeled, agnostic of the any specific technology. This approach combines documentation with prototyping since the models themselves can be verified and executed.
Using this design approach it is possible to speed up both the development process and communication with the customer by creating documentation from the model at any stage of development. Due to the chosen abstraction form any technology you are able to generate code for more than one platform or to switch to another platform with only small impact on the model (at least in theory). In practice the OpenSAGA platform tries to stay very focussed and is for now only concerned with web applications. Thus OpenSAGA users might notice occasional technological advancements under the hood but new presentation platforms currently are not planned.
Internally OpenSAGA uses a number of basic principles and technologies to describe its domain.
Everything in OpenSAGA is a model. No exception. Except for implementations for various strategy interfaces used to extend the model. Clear about that :-) ?
We'll try again: The basic idea of OpenSAGA is that everything about your application is described by a model. Models are built in such a way that you can use them in an intentional declarative way. There are some exceptions - sometimes it makes no sense to describe a complex technological context with a model abstraction. An example for this are complex SQL statements. If you want to utilize the full power of an advanced database there is no better way than directly writing down tuned SQL statements. And those are the exceptions mentioned above: If it is necessary to write code directly OpenSAGA allows that - because for many cases code is the most appropriate form of modeling (at least it does not seem reasonable - except for syntactic sugar - that there might be a better DSL than SQL for retrieving data from relational databases). Thus everything in OpenSAGA is a model - only the syntax might differ at times.
All models in OpenSAGA for now are described by XML. XML was chosen for pragmatic reasons:
XML Schema is easy to write and validate and commonly available.
XML is trivial to parse.
XPath and XSLT can be very helpful for working on XML data.
XML is a good intermediate data format for more convenient and specialized DSLs.
Each model must have an unique Id. If you do not provide an ID the platform will generate a random ID, with the impact that this model cannot be referenced in any other model. Additionally random IDs will change after server restarts, therefore you must not persist the generated IDs.
It is highly recommended to explicitly provide an ID for every defined model.
Model IDs can either be the section called “Global IDs” or the section called “Local IDs”.
Each and every ID defined must be globally unique.
While every ID definition must be unique it is possible to reference one and the same ID in different contexts and receive different results. If e.g. a part model ID is referenced in a domain object reference the domain object governing the part will be retrieved. If the part model ID is referenced by some UI update mechanism it actually refers to the part (or rather: its HTML representation) causing it to update under specific conditions. There are many such examples explained in the specific contexts.
Global IDs consist of segments and usually will look very similar to Java package names (at least in the default implementation provided by the OpenSAGA base package). If a model ID contains either a dot '.' or a dash '-' it is a global ID and can be used unchanged. Additionally the IDs of top level tags always are global IDs.
All IDs that are not regarded as global are local IDs. Local IDs can be referenced with their local name within the current model file. Internally various strategies are used to convert local IDs to global IDs (usually by processing the DOM tree containing the XML model and prefixing the local ID with IDs from parent tags). Therefor local IDs can't be referenced from outside the current model file but are nonetheless a great way to reduce the amount of writing required when e.g. creating view models and linking content element models in those view models (e.g. linking labels to input models).
Each model is defined using XML version 1.0. By default the encoding should be UTF-8, at least you should use the same encoding for all models. It is recommend to use the XML prolog element to provide the version and the encoding information to the parser.
A XML Schema Definition is available for each model, so that XSD-aware editors are able to assist you by providing code completion, hints on the structure or validating your model against the schema.
Each view (see the section called “<view />”) in OpenSAGA is associated with one primary domain object. All properties of said object are available for the content elements of the view. Additionally it is possible to list both connected objects (via some relation) and unconnected objects on a view. For more fine-grained control it is possible to divide a view into subviews and parts (see the section called “<subview />” and the section called “<part />”). Each part in turn has its own primary domain object which either equals the primary domain object of the view or must be defined via a relation chain as a related object of the primary view domain object.
OpenSAGA utilizes the notion of a target domain object. Whenever a transition is initiated from a view OpenSAGA requests carry information about the target domain object which is adressed by the transition. The target domain object equals the most likely object to which a button can be related, e.g.
if the button exists in a datagrid row, the target domain object will be the object represented by the row,
if the button exists in a view, the target domain object will be the primary domain object of the view.
As explained in Chapter 4, Top Down Design and Development OpenSAGA utilizes a topdown approach to developing applications. Modelers start with a high level and abstract view of the final system and start to drill down to the details of various aspects of the target system in a layered process that slowly adds details. This is also represented in the way the major model subsystems are structured:
The modeling process usually starts with a birds eye view on the system represented by the navigation model (see the section called “<navigation />”). The navigation model is best visualized as a kind of mind map for all the processes or workflows of the target application.
Navigation models link to process models (see the section called “<process />”) which represent the actual UI workflows of a process. Process models are made up from various states (e.g. start states, view states, decision states, etc.).
View state models (see the section called “<view-state />”) link to view models (see the section called “<view />”) which represent the visualization of a UI view. They are very similar to standard JSF pages but do not allow for code in the UI and also abstract from the details of HTML and AJAX development.
Domain type models (see the section called “<domain-type />”) and relation models (see the section called “<relation />”) describe the actual domain model of the application at hand.
OpenSAGA tries to abstract a lot of detail information from programmers. OpenSAGA can automatically discover the context of the current execution and thus "knows" about objects that are available, properties that can be referenced, etc. The following sections explain the basic assumptions OpenSAGA applies in order to structure accessible data.
OpenSAGA differentiates a number of contexts with different scopes and lifetimes. Each scope can contain data in the form of atomic properties (of any property type defined in the system), objects (of a specific domain type) or lists of objects (of a single type).
The sections below explain the various scoped data contexts available in OpenSAGA applications. All share the following properties:
Properties local to the scoped data context can be defined by creating a property set (see the section called “<property-set />”).
Objects local to the scoped data context can be defined via a scoped domain object (see the section called “<scoped-domain-object />”).
Objects local to the scoped data context can be defined via a scoped domain object list (see the section called “<scoped-domain-object-list />”).
The following sections explains the layered scoped data context approach and their lifetimes.
The session context is the most persistent and long-lived data contexts of all OpenSAGA contexts. It is created as soon as a
user logs in and exists until the user either the user logs our or closes his browser. The session context can be defined with
the session-context tag (see the section called “<session-context />”)
which is used in the portal model in the portal.xml (see the section called “<portal />”).
The conversation context is closely related to the session context in that it emulates a "per browser window" kind of session.
It is created as soon as a user logs in and exists until the user either the user logs our or closes his browser window.
The conversation context can be defined with the conversation-context tag (see
the section called “<conversation-context />”)
which is used in the portal model in the portal.xml (see the section called “<portal />”).
The process context exists for the duration of a single process execution. A process execution is bounded by the
definitions of a single process model (see the section called “<process />”).
The process context is defined with the process-context tag (see
the section called “<process-context />”) in the process model mentioned above.
The view context exists as long as the current process stays in one and the same view state. It currently cannot be extended due to model definitions. Instead it automatically picks up all data from the current view and mirrors that data as properties, objects and lists. The view context allows access to the following data:
Each property writing content element model mirrors its submission value in the view context.
The domain context is a supplementary context to the process context and shares its lifetime. The domain context is used to remember the object navigational path the user follows through the application.
Example 3.1. How a domain context path evolves
Example: The user starts on a view V-1 listing all employees of his company. He selects employee E-1 and examines the information about E-1 on view V-2. Then he clicks on the skill list of E-1 and examines the ratings ESR-1 on view S-3. The domain context path at this points contains a list of tuples containing (V-1, null), (V-2, E-1), (V-3, ESR-1).
The domain context contains all those objects in the so called domain context path. The individual objects can be accessed by referencing the ID of the corresponding view. Search starts with the last domain context path entry and proceeds to the first.
![]() | Tip |
|---|---|
|
Actually the domain context path contains triplets consisting of the view passed, the primary domain object of that view (if one was defined) and the transition that was used to arrive at the given view. Since the transition is only used for internal purposes you usually do not need to know that. |
Table of Contents
Table of Contents
OpenSAGA supports a top down approach for designing and developing applications. The basic idea is that you usually should start with a general picture of what kind of application you desire and then work out the details in an evolutinary approach. This seems to be a most natural way of designing applications since it allows business experts to gradually evolve their requirements and test them with evolving prototypes.
The following design process should be taken into account when creating a OpenSAGA application:
Define the scope of your application (e.g. "B2B order portal", "intranet", "innovation management").
Create a new project for your planned solution as explained in Chapter 2, First Steps.
Design the general navigation structure of your application. Mind maps usually work best for this step. Create an initial mind map and refine it as new or changing requirements come up. Design the mind map in such a way that its nodes will represent processes of the final solution. If you feel the need to add more detail to nodes explaining the processes, mark those nodes with some symbol representing its specification value (e.g. a light bulb).
Turn each unmarked mindmap node into a navigation item in the navigation model. You do not need to model the processes yet - just provide placeholder IDs for the processes that will be required. OpenSAGA replaces your process reference with an empty default process (just one view with no content at all) if no process model exists for the given ID. This again allows you to rapidly prototype a navigation structure.
Design the most important process by sketching out the required states (especially the required views) and connecting them with transitions. Label both states and transitions with short but meaningful labels.
Create a process model and derive the internal IDs from the labels created in the previous steps by applying the OpenSAGA naming conventions, see Chapter 10, Naming Conventions.
You do not need to create any state models at this point. OpenSAGA will derive default state models for any states you leave undefined. Specifically default views will include a title with the ID of the view and buttons enabling the use of all transitions defined for the view.
Design the individual states. You only need to design view states, all other states are fully described by the process model definitions.
Create domain type models as needed, e.g. when designing a view.
Continue with the next view and required submodels, then with the next process and so on until the portal has been completed.
Table of Contents
OpenSAGA makes heavy use of references. Nearly every model can be referenced by
its ID and via the ModelInformationService these references can be
resolved. But also properties (of objects) as well as cached domain objects and
cached lists can be referenced. Resolving these references is a little bit more
complicated. The objects, lists and properties can be stored in different scoped containers
e.g. in the ProcessContext or ViewContext.
For resolving the references the internal ScopedDataContextSearchService is used.
The search engine applies the following search order:
Search the conversation context (see the section called “Conversation context”). If it is defined search in the following order:
Inspect the contained view context (if defined, see the section called “View context”).
Inspect the contained process context (if defined, see the section called “Process context”).
Inspect the contained domain context (if defined, see the section called “Domain Context”).
Inspect the conversation context itself (see the section called “Conversation context”).
Repeat this step for the parent conversation (if defined).
Using property reference is a little bit more complicated than using the other kinds of references. The property can belong to different objects or data contexts. So it is important to know in which order the property references are resolved, so that you can reference the property you want. The following list shows the search order of the property reference resolving algorithm:
System Domain Object
For more information see the section called “Searching in System Domain Object, Working Set and Target Domain Object”.
Working Set Objects
For more information see the section called “Searching in System Domain Object, Working Set and Target Domain Object”.
Target Domain Object
For more information see the section called “Searching in System Domain Object, Working Set and Target Domain Object”.
Domain Objects of View Parts
The domain objects of the parts of the current source view are searched for the property.
Scoped data contexts and their domain object
All scoped data contexts are searched in the order as described in Chapter 5, Programming with references. First the data contexts are checked if there is a property with the given id. When the context does not contains such a property, all domain objects of the context are searched for the property.
![]() | Important |
|---|---|
|
To reference properties of cached objects, it is necessary to define virtual properties. For more information see the section called “Referencing properties of cached objects and lists via virtual properties” |
Scoped lists
All scoped data contexts are searched in the order as described in Chapter 5, Programming with references. The current objects of all cached lists of the contexts are searched for the property.
![]() | Important |
|---|---|
|
To reference properties of cached lists, it is necessary to define virtual properties. For more information see the section called “Referencing properties of cached objects and lists via virtual properties” |
The property reference resolving algorithm starts searching the property in the system domain object, then in the objects of the working set and finally in the target domain object. If the target domain object has been persisted at least once, the property is searched in objects that are related to the target domain object by to-one relations (assuming there are relation models defined for the domain type). If the target domain objecthas not yet been persisted the algorithm queries the domain context path for the property.
In OpenSAGA it is not possible to reference properties of cached objects or lists directly. It is necessary to define virtual properties. Virtual properties maps the real properties of an objects to a unique ID. So it is possible to reference the property of a special object. You can either specify virtual properties for the properties you want or expose all properties of the object with or without a prefix for the IDs.
The following example shows how to define a virtual property for a cached object.
Example 5.1. Defining a virtual property
<process-context>
<scoped-domain-object id="cached.obj" domain-type-ref="type.a" name="dummy">
<virtual-properties>
<virtual-property id="cached.obj.name" property-ref="type.a.name"/>
</virtual-properties>
</scoped-domain-object>
</process-context>
type.a. The domain type type.a has a property type.a.name.
The virtual property maps this property to the id cached.obj.name. To reference the type.a.name property of
the cached.obj, you have to use the id cached.obj.name.
The following example shows how to expose properties of a cached object with a prefix
Example 5.2. Exposing properties of a cached object with prefix
<process-context>
<scoped-domain-object id="cached.obj" domain-type-ref="type.a" name="dummy">
<virtual-properties expose-original-ids-of-domain-type-ref="type.a"
exposed-id-prefix="foo"/>
</scoped-domain-object>
</process-context>
type.a has a property type.a.name you have to
use the id foo.type.a.name when you want to reference the property type.a.name of
the cached object cached.obj.
Object references in OpenSAGA are resolved by the ScopedDomainObjectResolver
(see the java doc) that works internally with the ScopedDataContextSearchService.
The contexts are searched in the described order (see Chapter 5, Programming with references) for
the referenced object. The scoped object can be referenced by the id of its ScopedDomainObjectModel.
OpenSAGA provides object references that point to a list. For this case the contexts
are not only searched for objects with the given id, but also for a list with this
id. When a list with the id exists either in the context or is defined in the corresponding
ContextModel, the list is used. When the list is not null and it has
a current element, the resolver returns this current element, otherwise null
is returned.
OpenSAGA provides object references that point to a view model (not a view state model!). If such a reference is to be resolved the corresponding view model will be searched in the current domain context path. If an entry for the given view model (via the view state model in the domain context path) is found, the corresponding root object for that view is returned. This allows to reference all view root objects of the current context.
List references are resolved similar like object references. The ScopedDomainObjectListReferenceResolver
(see the java doc) that works internally with the ScopedDataContextSearchService is used for resolving
list references. The contexts are searched in the described order (see Chapter 5, Programming with references) for
the referenced list. The scoped object list can be referenced by the id of its ScopedDomainObjectListModel.
Table of Contents
In this chapter we show an extended example to illustrate how web application development with OpenSAGA is done. We illustrate both the design process and the development process for a small example.
FAQs (Frequently Asked Questions) are a pervasive and simple type of application: One or more authors collect questions and answers for a specific topic, all others can query the FAQ database and read the Q&A pairs. Our goal for this short tutorial is to develop a web portal that allows the management of an FAQ.
![]() | Note |
|---|---|
|
We will define the portal in such a way that the portal actually contains one application - the FAQ manager. This will be done by implementing a process model, adding view models and letting them refer domain type models for the data. OpenSAGA allows to duplicate processes with ID mappings (see the section called “Using ID Mappings to Copy Processes” for explanations) in order to duplicate the FAQ process so that each section of a company might use a separate FAQ process, etc. |
Before we start to implement the given use case we will illustrate how to model it using the OpenSAGA modeling approach. To do yo we use a top down approach enhancing the level of detail with every step.
We start with a bird's eye view of the application - the navigation model. The navigation model can be represented by a mind map that shows in a structured manner how the hierarchical organization of the web application should appear later on. When used in a moderated workshop it allows you to structure the requirements of the customer on a very high level and slowly form it into a master-detail-hierarchy that equals typical hierarchical navigation structures commonly used in web applications.
This kind of mind map then can be transformed directly into a navigation model as we will show.
The following mind map represents the rather trivial navigation for our FAQ web application:
![]() |
Each node in a mind map can reference a process model indicating the process to be initiated when the navigation representation of the node is activated.
The process model for the FAQ application is a bit more involved, although not overly so. It contains the following elements:
A start state. This state is used to initiate the overall process from a navigation entry or via a transition model from some other process. The reason for introducing arbitrary start states instead of directly connecting to some other state (e.g. a view state or a decision state) is that this allows us to execute actions before the first real business state is reached in the process model (because the start state and the next state are connected by a transition that can hold actions).
This allows features like logging users who click on a specific navigation entry, initializing the process before it is started, etc.
![]() | Note |
|---|---|
|
Naturally such things also could be done in the preprocessing phase of a view (see the section called “Interrupting the Business Logic Flow of a View” for details) but this can cause problems in some siutuations when many transitions enter one specific view and you want to execute this special initialization logic only for some of the incoming transitions. Therefor we decided that it is easier to use a mandatory start state. |
An FAQ overview. The overview will list all FAQ items (only the questions to prevent it from becoming too long) and additionally will allow to search through the questions for specific keywords.
From the FAQ overview it will be possible to either view the answer of a specific FAQ entry, edit it or delete it (if the user in question has the appropriate permissions).
An edit view that will be used for both editing existing FAQ entries and entering new FAQ entries. The edit view can be either cancelled (nothing happens and the user returns to the overview) or confirmed (which results in the data being stored).
A detail view that simply displays both the question and the answer and can be left with a button returning to the overview.
The following process model represents these requirements:
![]() |
Note that we do not say anything about permissions, etc. The roles allowed to execute certain transitions or able to access a state could be annotated at the respective transtions and states. For the sake of simplicity we omit this in this example, especially since the roles usually will be configured at runtime and only rarely belong to the static model.
Now that the overall scope and the main workflows have been specified we next define the domain. Domain modeling usually is a very complex and involved affair and a good domain model in the end probably is the most important factor in creating an application of lasting value. Usually we recommend reading Domain Driven Design by Eric Evans to get a better idea about how to model domains. Luckily this example is so trivial that the domain can be modelled trivially: We have one domain type (the FAQ entry) with two business properties (question and answer) as well as some kind of technical key.
Due to the trivial nature of the domain we omit an equally trivial UML class diagram.
Before we can start to implement our system we need to setup a project. The following example uses Eclipse since our OpenSAGA plugin also supports Eclipse but you naturally can also use other IDEs (except for the plugin support).
The following steps are required to setup a new OpenSAGA based project:
Install the latest version of the SpringSource Tool Suite (recommended since OpenSAGA heavily used Spring) or Eclipse
(a good second choice if you intend to mainly work on the XML level). See http://www.springframework.com
for download opportunities.
Install the OpenSAGA plugin. See http://www.opensaga.org for download opportunities.
Install a database of your choice to be used by the portal database. Create a database schema and note down all the connection data required to configure a JDBC connection.
![]() | Tip |
|---|---|
|
For testing purposes you can omit this step. If an OpenSAGA application is started without any database being configured it defaults to using an internal HSQLDB which should be sufficient to test OpenSAGA in general. |
Install the latest version of Tomcat with Java 5 support and enable it in Eclipse.
Create an OpenSAGA project (if using the OpenSAGA Eclipse plugin) or a dynamic web project (otherwise). If you do not use the OpenSAGA plugin execute the following additional steps:
Copy all required support libraries to WEB-INF/lib. See ??? for
an exhaustive list.
Overwrite WEB-INF/web.xml with the following content:
<?xml version="1.0" encoding="UTF-8"?> <web-app id="opensaga" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <context-param> <param-name>facelets.LIBRARIES</param-name> <param-value>/WEB-INF/facelets-taglibs/opensaga.taglib.xml</param-value> </context-param> <!-- Use JSF view templates saved as *.xhtml, for use with Facelets --> <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.xml</param-value> </context-param> <!-- Enables special Facelets debug output during development --> <context-param> <param-name>facelets.DEVELOPMENT</param-name> <param-value>true</param-value> </context-param> <!-- Causes Facelets to refresh templates during development --> <context-param> <param-name>facelets.REFRESH_PERIOD</param-name> <param-value>1</param-value> </context-param> <!-- Disable client side javascript --> <context-param> <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name> <param-value>true</param-value> </context-param> <filter> <filter-name>OpenSAGARequestContextThreadCleaningFilter</filter-name> <filter-class>org.opensaga.runtime.controller.servlet. OpenSAGARequestContextThreadCleaningFilter</filter-class> </filter> <filter-mapping> <filter-name>OpenSAGARequestContextThreadCleaningFilter</filter-name> <url-pattern>/app/process/*</url-pattern> </filter-mapping> <filter> <filter-name>MultipartRequestFilter</filter-name> <filter-class>org.opensaga.runtime.controller.servlet. MultipartRequestFilter</filter-class> <init-param> <param-name>uploadMaxFileSize</param-name> <param-value>100m</param-value> </init-param> </filter> <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages --> <filter-mapping> <filter-name>MultipartRequestFilter</filter-name> <servlet-name>Spring MVC Dispatcher Servlet</servlet-name> </filter-mapping> <!-- OpenSessionInViewFilter for Hibernate --> <filter> <filter-name>OpenSessionInViewFilter</filter-name> <filter-class>org.opensaga.runtime.persistence.hibernate. HibernateOpenGeneratedSessionInViewFilter</filter-class> <init-param> <param-name>singleSession</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>OpenSessionInViewFilter</filter-name> <url-pattern>/app/process/*</url-pattern> </filter-mapping> <!-- Enables Spring Security --> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class> org.springframework.web.filter.DelegatingFilterProxy </filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- Serves static resource content from .jar files such as spring-faces.jar --> <servlet> <servlet-name>Resources Servlet</servlet-name> <servlet-class> org.springframework.js.resource.ResourceServlet </servlet-class> <load-on-startup>0</load-on-startup> </servlet> <!-- Map all /resources requests to the Resource Servlet for handling --> <servlet-mapping> <servlet-name>Resources Servlet</servlet-name> <url-pattern>/resources/*</url-pattern> </servlet-mapping> <!-- The front controller of this Spring Web application, responsible for handling all application requests --> <servlet> <servlet-name>Spring MVC Dispatcher Servlet</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value></param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <!-- Map all "/app/*" requests to the Dispatcher Servlet --> <servlet-mapping> <servlet-name>Spring MVC Dispatcher Servlet</servlet-name> <url-pattern>/app/*</url-pattern> </servlet-mapping> <!-- Map all "*.html" requests to the Dispatcher Servlet --> <servlet-mapping> <servlet-name>Spring MVC Dispatcher Servlet</servlet-name> <url-pattern>*.html</url-pattern> </servlet-mapping> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.faces</url-pattern> </servlet-mapping> <!-- Servlet for Web Services --> <servlet> <servlet-name>opensaga-webservices</servlet-name> <servlet-class>org.springframework.ws.transport.http. MessageDispatcherServlet</servlet-class> <init-param> <param-name>transformWsdlLocations</param-name> <param-value>true</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>opensaga-webservices</servlet-name> <url-pattern>/ws/*</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <listener> <listener-class> org.opensaga.startup.BootStrapListener </listener-class> </listener> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>WEB-INF/cfg/log4j/log4j.properties</param-value> </context-param> <context-param> <param-name>log4jRefreshInterval</param-name> <param-value>60000</param-value> </context-param> </web-app>
Create a Tomcat instance in the Eclipse server view and connect it to your FAQ project. Modify Tomcat:
Configure the Tomcat instance to use -Xms64m -Xmx256m -Dorg.apache.el.parser.COERCE_TO_ZERO=false as runtime arguments (less memory will slow the runtime
system to a crawl, more is almost always good).
Set the startup timeout to 1000 milliseconds.
Disable the auto reload feature in Tomcat (it conflicts with the runtime generator used by the OpenSAGA runtime).
![]() | Note |
|---|---|
|
The following step is optional. You can run the demo application without having to define any staging configuration as OpenSAGA will use sensibel default settings. Specifically this means that instead of an external database a HSQLDB will be used for test purposes and that all mail services will be deactivated. As we just want to test a small application this nonetheless should be sufficient. If you want more this item explains the additional options for a more involved setup. |
Optional step (see note above): Create a stages.xml file under the path /WEB-INF/resources/extensions/EXTENSIONNAME/models/stages.xml
in order to mirror your local configuration. A sample stages.xml might look like this (heed the capitalized places
in which you need to insert your specific definitions):
<?xml version="1.0" encoding="utf-8"?> <stages id="system.stages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.pik.as/schema/model/stages-1.0.xsd"> <stage name="YOUR-LOGICAL-STAGE-NAME"> <data-source-set> <data-source name="portaldb" type="opensaga-hibernate"> <settings> <!-- Sample configuration for Postgres --> <setting name="driverClassName" value="org.postgresql.Driver"/> <setting name="url" value="jdbc:postgresql://YOUR-LOCAL-DATABASE-URL"/> <setting name="username" value="YOUR-LOCAL-USERNAME"/> <setting name="password" value="YOUR-LOCAL-PASSWORD"/> <setting name="hibernate.hbm2ddl.auto" value="update"/> <setting name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/> <setting name="hibernate.generate_statistics" value="true"/> <setting name="hibernate.cache.use_query_cache" value="false"/> <setting name="hibernate.cache.use_second_level_cache" value="false"/> <setting name="hibernate.cache.provider_class" value="as.pik.runtime.ExternalEhCacheProvider"/> <setting name="c3p0.initialPoolSize" value="3"/> <setting name="c3p0.minPoolSize" value="3"/> <setting name="c3p0.maxPoolSize" value="15"/> <setting name="bean.dataBaseNamingStrategy" value="postgres"/> </settings> </data-source> </data-source-set> <mail-service-configuration-set default-mail-service="mail.service.default"> <mail-service-configuration id="mail.service.default" type="fileBased" strategy-bean-ref="standardRetryStrategy"> <settings> <setting name="server" value="YOUR-MAIL-SERVER"/> <setting name="username" value="YOUR-MAIL-SERVER-USER-NAME"/> <setting name="password" value="YOUR-MAIL-SERVER-PASSWORD"/> <setting name="maxBatchSize" value="2"/> <setting name="retries" value="3"/> <setting name="directory" value="WEB-INF/mailservice/"/> </settings> </mail-service-configuration> </mail-service-configuration-set> </stage> </stages>
Create a project configuration for your project by adding a file WEB-INF/cfg/opensaga-project.cfg with the
following content:
extensions=YOUR-EXTENSION-NAME stages=global,YOUR-LOGICAL-STAGE-NAME context-path=/YOUR-CONTEXT-PATH
Create an empty extension directory under the path WEB-INF/resources/extensions/EXTENSIONNAME.
![]() | Note |
|---|---|
|
While this step might seem superfluous we have decided to not make it optional. The reasoning is that in more complex configurations (where an application might be made up from a larger number of extensions) you easily might overlook a misspelled extension name if OpenSAGA were not to throw a fatal error at you. Thus we decided to play it safe and force you to at least create an empty extension directory as the minimum requirement for each and every extension you are going to use in your setup. |
Start the Tomcat server and check the console output for errors. There should be none and after some time the server should be running.
Call http://localhost:8080/YOUR-CONTEXT-PATH/app/process to start the application. Later on you might want to write
an appropriate index.jsp that redirects to this special URL.
admin and password admin and allows you to
access the system and the whole administration interface. From there onwards you can (and should) change your password, add more users, define
roles, etc.
Now that we have modelled the use case in the section called “Modeling the FAQ Use Case” and installed a basic OpenSAGA portal in the section called “Setting Up the Project” we can proceed to implement the actual portal. We will do this by directly translating our visual models into OpenSAGA XML models.
First of all your new portal should know which new major elements (e.g. navigation models, domain type models and process models) will
be an important part of the system. To achieve this we have to link the models (that we still need to write) from the portal meta model.
The portal meta model always is contained in WEB-INF/resources/extensions/YOUR-EXTENSION-NAME/models/portal.xml.
The meta model must contain references to the process model and the domain type model we are going to create in the next step. A correct
declaration looks like this:
<?xml version="1.0" encoding="UTF-8"?> <portal id="portal.portal" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.pik.as/schema/model/portal-1.0.xsd"> <domain-type-reference-set> <domain-type-reference domain-type-ref="faq.d_faq"/> </domain-type-reference-set> <process-reference-set> <process-reference process-ref="faq.p_faq"/> </process-reference-set> </portal>
Since each model requires a unique ID we have identified our new domain type model specified in the section called “Modeling the Domain” with the
ID faq.d_faq (according to the naming conventions explained in the section called “Model IDs”). In the
same we we decided our single new process as specified in the section called “Modeling the Process” as faq.p_faq (obviously we named our
extension as faq as you can derive from the prefixing rules explained under naming conventions).
![]() | Why references? |
|---|---|
|
As we regard the XML representation of OpenSAGA models as but one representation (and e.g. serializing the data in database tables might be another viable and interesting option) you should regard these references as foreign keys and get accustomed to them. The OpenSAGA Eclipse plugin currently will warn you if you forget them and in a future version will automatically add them. So for now it's just a minor inconvenience. |
In the section called “Modeling the Domain” we defined a single domain type we are going to use to store our FAQ question and answer pairs. The
model for the domain type is straightforward. We need to define the model in a file called
WEB-INF/resources/extensions/YOUR-EXTENSION-NAME/models/domain/types/d_faq.xml (again abiding by the naming
extensions mentioned above and using the standard directory layout specified in the section called “Extension directory structure”).
A valid domain type model for our type might look like this:
<?xml version="1.0" encoding="UTF-8"?> <domain-type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.pik.as/schema/model/domain-type-1.0.xsd" id="faq.d_faq" name="faq"> <property-set> <domain-type-property-set> <domain-type-property id="faq.d_faq.guid" name="guid" type="PlainText" insert-property-value-provider="guidPropertyValueProvider" /> <domain-type-property id="faq.d_faq.question" name="question" type="PlainText"/> <domain-type-property id="faq.d_faq.answer" name="answer" type="RichText"/> </domain-type-property-set> </property-set> <primary-key> <key property-ref="faq.d_faq.guid"/> </primary-key> </domain-type>
The meaning again should be pretty obvious:
First of all we define a domain-type-model with the already introduced ID faq.d_faq. We also name
it using the name faq. The name is reused in several places (e.g. when the underlying Hibernate engine generates
a table name or when you refer to the domain type in scripts - in Groovy you e.g. can refer to domaintype.faq
in order to access the underlying object of type org.opensaga.runtime.model.domain.service.ScriptingDomainType).
Then we define a property-set containing only so-called domain-type-property declarations.
Each domain-type-property is mapped to a physical table in the underlying database table. We define three such
properties: a GUID as the primary key, the question property and the answer property. Again we define IDs according to
the already well-known naming conventions and add easily readable names to e.g. reference them in scripts. Finally we define
the type of the properties. For the question we just want to be able to enter an unformatted text, the answers should hold
a complex rich text allowing formatting, etc. Accordingly we define the property types.
The GUID property (the primary key) requires some special mentioning. We define it as PlainText and define a special
insert-property-value-provider that generates a real GUID before objects are inserted into the database.
The guidPropertyValueProvider is a default value provider available in the underlying OpenSAGA runtime.
Finally we indicate the actuao primary key by defining a primary-key block. Note that OpenSAGA naturally also
allows for complex primary keys made up from several properties.
Next we are going to model the process depicted in the section called “Modeling the Process”. Again this is pretty straightforward. The appropriate file
according to the standard directory infrastructure and the naming conventions is WEB-INF/resources/extensions/YOUR-EXTENSION-NAME/models/processes/p_faq/p_faq.xml.
The content is the most extensive so far:
<?xml version="1.0" encoding="UTF-8"?> <process id="faq.p_faq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.pik.as/schema/model/process-1.0.xsd"> <process-state-set> <!-- ============================================================ === Starts the FAQ application. === ============================================================ --> <start-state state-ref="faq.p_faq.ss_start"> <transition-list> <transition target-state-ref="faq.p_faq.vs_faq_list"/> </transition-list> </start-state> <!-- ============================================================ === Starts the FAQ application. === ============================================================ --> <view-state id="faq.p_faq.vs_faq_list"> <transition-list> <!-- Creates a new FAQ entry. --> <transition id="faq.p_faq.vs_faq_list.t_new" target-state-ref="faq.p_faq.vs_edit_faq"> <action-list> <new/> </action-list> </transition> <!-- Edits a new FAQ entry. --> <transition id="faq.p_faq.vs_faq_list.t_edit" target-state-ref="faq.p_faq.vs_edit_faq"/> </transition-list> </view-state> <!-- ============================================================ === Edits a new or existing FAQ entry. === ============================================================ --> <view-state id="faq.p_faq.vs_edit_faq" state-ref="faq.p_faq.v_edit_faq"> <transition-list> <!-- Stores an FAQ entry. --> <transition id="faq.p_faq.vs_edit_faq.t_save" target-state-ref="faq.p_faq.bs_faq_list"> <action-list> <store/> </action-list> </transition> <!-- Returns without saving. --> <transition id="faq.p_faq.vs_edit_faq.t_cancel" target-state-ref="faq.p_faq.bs_faq_list"/> </transition-list> </view-state> <!-- ============================================================ === Returns to the FAQ overview. === ============================================================ --> <back-state id="faq.p_faq.bs_faq_list" back-to-view-model-in-domain-context-path-ref="faq.p_faq.vs_faq_list"/> </process-state-set> </process>
Let us examine each submodel of this process step by step:
The start state faq.p_faq.ss_start does nothing special and simply delegates to the first
view state faq.p_faq.vs_faq_list.
The view state faq.p_faq.vs_faq_list defines two transitions:
The faq.p_faq.vs_faq_list.t_new transition creates a new object and contains one
simple action <new/> which creates a new object for the target view.
The faq.p_faq.vs_faq_list.t_edit transition contains no action and thus assumes that
an object will be selected for further processing in the next view.
The view state faq.p_faq.vs_edit_faq again defines two transitions:
The faq.p_faq.vs_edit_faq.t_save transition contains one
simple action <store/> which stores the default view object if
specified without further parameters.
The faq.p_faq.vs_faq_list.t_cancel transition does nothing and thus also no objects are stored. This effectively
loses all changes and therefore cancels as expected.
back-state. Why that?
OpenSAGA uses a simple rule for navigation: Transitions to view states always extend the domain context path and add to it.
Always. Back states always drop parts from the domain context path thus effectively shortening it. Since we do not want to
see the faq.p_faq.vs_faq_list overview we thus have to add a back state.
The back-state uses the most direct of the available back modes and just returns to a specific view model.
![]() | Back State Modes |
|---|---|
|
Back states allow for various absolute and relative adressing modes. These can be of great use when some kind
of detail view can be accessed through several paths. Take a look at the Javadoc of
|
We need to implement two views, the FAQ list and the edit page. We do this quickly, implementing the overview first:
<?xml version="1.0" encoding="UTF-8"?> <view id="faq.p_faq.v_faq_list" title="FaqList" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.pik.as/schema/model/view-1.0.xsd"> <part-set> <part> <content> <heading value="AvailableQuestionsAndAnswers"/> <datagrid domain-type-ref="faq.d_faq" filter="opened"> <datagrid-column-list> <property-column property-ref="faq.d_faq.question" filter-mode="contains"/> <button-column text="Edit" transition-ref="faq.p_faq.v_faq_list.t_edit"/> </datagrid-column-list> </datagrid> <button transition-ref="faq.p_faq.v_faq_list.t_new" text="New"/> </content> </part> </part-set> </view>
The view contains but one part and the single part contains a simple data grid. The data grid has two columns, one containing
the question, the other a button activating the edit transition faq.p_faq.v_faq_list.t_edit mentioned when we created
our process model. Additionally we add a new button below the grid.
Note how trivial the implementation of the search filter is. We define a filter mode for the single property column and specify it as contains. Additionally we tell the data grid to show the filter row at the top of the grid in an initially opened state. That's all.
We don't need to tell the system how or where to load the data, when and how to apply the filter, how to do paging or sorting. All that is pretty standard and therefor automatically provided by OpenSAGA.
Next we create the edit view under WEB-INF/resources/extensions/faq/models/processes/p_faq/views/v_edit_faq.xml.
It's as trivial:
<?xml version="1.0" encoding="UTF-8"?> <view id="faq.p_faq.v_edit_faq" title="EditFaq" domain-type-ref="faq.d_faq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.pik.as/schema/model/view-1.0.xsd"> <part-set> <part> <content> <heading value="EditFaq"/> <label value="Question" target-ref="question"/> <text-field id="question" property-ref="faq.d_faq.question"/> <label value="Answer" target-ref="answer"/><br/> <rich-text-field id="answer" property-ref="faq.d_faq.answer"/> <button text="Save" transition-ref="faq.p_faq.v_edit_faq.t_save"/> <button text="Cancel" transition-ref="faq.p_faq.v_edit_faq.t_cancel"/> </content> </part> </part-set> </view>
It contains a heading (which will be translated automatically), two labels connected to two input fields (which e.g. causes mouse clicks on the label to activate the input field automatically) and the buttons for saving or canceling the view.
Now for the final step...
Before we can test our application one final model is required: We need to add the process model to the portal navigation.
There are several ways to do this (we e.g. could create a navigation model from scratch) but for the sake of the example we opt
for the most simple approach: OpenSAGA already contains an extension point for simple scenarios out of the box. You can overload
the navigation model identified by base.n_applications. Overloading is explained in the section called “Model Overloading”
and for our use case simply means that we create a new navigation model with an already existing ID. We create the following model:
<?xml version="1.0" encoding="UTF-8"?> <navigation id="base.n_applications" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "http://www.pik.as/schema/model/navigation-1.0.xsd"> <item-list> <item label="FAQ" description="FaqApplication" process-start-state-ref="faq.p_faq.ss_start"/> </item-list> </navigation>
The navigation model again is trivial - a single item list contains one navigation item and that item points to the process we defined
in the section called “Implementing the Process” via the process model ID faq.p_faq.s_start.
That is it. Now you can restart the portal as explained in the section called “Setting Up the Project” and you should be able to access the working FAQ application. It is also provided on the OpenSAGA website as a sample download for you in order to check the complete application.
OpenSAGA allows for so called logical values in order to initialize properties in a variety of ways. Among them are the following places:
The content of the default-value attribute of domain type property models, see ???.
The content of the is attribute of insert-value models (see ???) in the
initialization-data section (see ???) of domain-type definitions.
The content of the value attribute of insert-value models (see ???) in the
initialization-data section (see ???) of domain-type definitions.
The constant value attribute of the constant-value model being available in comparison filters, see the section called “constant”.
The property-valuecode> attribute of the set-property-value action.
Logical values can be prefixed in order to address a specific provider to create a value from a template description or they can be
value repesentatives in a specific format which are directly converted to an actual value. The Javadoc documentation for the class
org.opensaga.runtime.util.service.values.LogicalValueService provides all the details about how logical values can
be defined and will be interpreted. Additionally you will find information in the Javadoc for
org.opensaga.runtime.util.service.values.ValueSpecificationEvaluationService and
org.opensaga.runtime.util.service.values.ValueSpecificationEvaluationServiceImpl on how to use value specifications to define values.
Additionally you can provide your own instances of org.opensaga.runtime.util.service.values.ValueSpecificationHandler in a bean
context in order to dynamically add new value specification types to the runtime system.
Table of Contents
OpenSAGA provides instances of org.opensaga.runtime.model.domain.properties.PropertyValueProvider in order to
provide logical property values (see Chapter 7, Defining Logical Values For Properties) to properties. These
can be used when initializing domain type objects, to define constant values and to initialize domain types.
The following default implementations are provided and will be explained below:
org.opensaga.runtime.model.domain.properties.CurrentDatePropertyValueProvider
org.opensaga.runtime.model.domain.properties.CurrentUserPropertyValueProvider
org.opensaga.runtime.model.domain.properties.DateTemplateBasedPropertyValueProvider
org.opensaga.runtime.model.domain.properties.DefaultLocalePropertyValueProvider
org.opensaga.runtime.model.domain.properties.FalsePropertyValueProvider
org.opensaga.runtime.model.domain.properties.TruePropertyValueProvider
org.opensaga.runtime.model.domain.properties.GuidPropertyValueProvider
org.opensaga.runtime.scripting.ScriptingServiceBasedPropertyValueProvider
This provider can be used to provide the current date and time. It may be useful for ... properties (e.g. "created on" or "changed on").
This provider can be used to provide the current user. It may be useful for ... properties (e.g. "created by" or "changed by").
The following section describes the DateTemplateBasedPropertyValueProvider that delivers
dates based on a textual template. This provider is very flexible and can be easily configured.
The examples shown here are based on the default OpenSAGA installation.
The date template uses two different maps (explained in the sections below) and a hardcoded operation set. To specify a date you can use one of the date providers to get a starting date. After that you alter the date with a combination of operations, numbers and unit modifiers. If you don't specify a date provider, the current date and time is used.
![]() | Important |
|---|---|
|
Please note that by default all provided dates contain the current hour, minute and second. If you want
a date where all these are set to zero you have to use the "reset" operation ( |
The next list shows some examples date template definitions:
Date Template Examples
If you want to specify the date "current time plus two hours", the textual description would be "now+2h". "now" is the date provider, "+" is the operation, "2" is the number of hours and "h" is the unit modifier for hours.
You want to specify the date "today minus fourteen days". The textual description would be "today-14D". "today" is the date provider, "-" is the operation, "14" is the number of days and "D" is the unit modifer for days. As explained above, "-14D" would return the same date.
You want to specify the date "29th Juli 2010". The textual description would
be "=29D=7M=2010Y". This example uses the "set" operation (=) to set the
exact day, month and year values.
This is an example of a more advanced definition. It may not make much sense, but it shows the flexibility of the date template provider: "last_day_of_month+4M-2m+3s:last_hour_of_day=2009Y". In detail: we use the last day of the current month as a starting date, then add four months, subtract two minutes and add three seconds. After that we reset the hour to the last hour of the day and set the year to 2009.
Table 8.1. Operation List
| Operation | Description |
|---|---|
+ | The add operation. |
- | The subtract operation. |
: | The reset operation. |
= | The set operation. |
Table 8.2. Date Provider Map
| Name | Description |
|---|---|
now | The current date and time. |
today | An alias for now. |
first_day_of_week | The first day of the current week. |
last_day_of_week | The last day of the current week. |
first_day_of_month | The first day of the current month. |
last_day_of_month | The last day of the current month. |
first_day_of_year | The first day of the current year. |
last_day_of_year | The last day of the current year. |
first_month_of_year | The first month of the current year. |
last_month_of_year | The last month of the current year. |
first_hour_of_day | The first hour of the current day. |
last_hour_of_day | The last hour of the current day. |
first_minute_of_hour | The first minute of the current hour. |
last_minute_of_hour | The last minute of the current hour. |
first_second_of_minute | The first second of the current minute. |
last_second_of_minute | The last second of the current minute. |
This provider can be used to provide the default locale of the portal. See the section called “Supported Locales” for more information.
This provider can be used to provide the result of a script. The script is executed by the
ScriptingService, see Chapter 32, Scripting. In the script you can use
the self variable to access the current domain object.
Table of Contents
Table of Contents
This chapter gives a brief overview for each model type a programmer usually will encounter when developing portals with OpenSAGA. Each model is represented by XML markup and carries a specific semantic meaning. The models are structured in a hierarchical relation and can refer to each other for advanced effects.
![]() | Important |
|---|---|
|
Read this section closely at least once if you want to start developing with OpenSAGA as it explains some very important concepts (e.g. back state handling and the domain context path, the section called “The Domain Context Path”). |
The next sections briefly outlines the idea and meaning for each model and referenced other contained models. The model reference (Part IV, “Model Reference”) provides a detailed explanation for each model type and describes all attributes and contained models with a long list of practical samples.
The portal model serves as the root node for a portal model set. It is the base container for all the submodels that detail a portal installation. Usually you will need to refer to the portal model whenever you execute one of the following actions:
You want to change the locales supported by your portal. You need to define a new supported-locales
model to do that. See the section called “Supported Locales” for more details.
You want to change the session context structure by adding new cached domain objects, new properties or new lists of
cached domain objects. You need to modify the session-context model to do that. See
??? for more details.
You define a new navigation model. A reference to the navigation model must be added to the portal model. Otherwise the
navigation model will not be available at runtime and various errors might happen. Adding this reference is done by adding
a new navigation-reference to the navigation-reference-set of the portal model.
See the section called “The Navigation Reference Set” and the section called “The Navigation Reference Set” for more information.
You define a new process model. A reference to the process model must be added to the portal model. Otherwise the
process will not be available at runtime and various errors might happen. Adding this reference is done by adding
a new process-reference to the process-reference-set of the portal model.
See the section called “The Process Reference Set” and the section called “The Process Reference Set” for more details.
You define a new domain type model. A reference to the domain type model must be added to the portal model. Otherwise the
domain type will not be available at runtime and various errors might happen. Adding this reference is done by adding
a new domain-type-reference to the domain-type-reference-set of the portal model.
See the section called “The Domain Type Reference Set” and the section called “The Domain Type Reference Set” for more details.
You want to change the default paging behaviour. You need to define a new paging model to the
portal model. See the section called “Paging” for more details.
You define a new web service. A reference to the web service model must be added to the portal model. Otherwise the
web service will not be available at runtime and various errors might happen. Adding this reference is done by adding
a new web-service-reference to the web-service-reference-set of the portal model.
See Chapter 23, Web Services for more information.
You define a new REST service. A reference to the REST service model must be added to the portal model. Otherwise the
REST service will not be available at runtime and various errors might happen. Adding this reference is done by adding
a new rest-services-reference to the rest-services-reference-set of the portal model.
See Chapter 25, REST Services for more information.
Describes the navigation of the portal. The navigation-reference-set describes a set
of navigation-reference elements that each reference a navigation model (see
the section called “The Navigation Model”). By defining a complete navigation set you are able to
divide your view navigation areas into distinct navigation models, e.g. a left hand navigation, a support navigation,
a link list for all pages and maybe some bottom navigation for the page footer. You are free in the number of distinct
navigation models you define the only restriction being that the layout template being used for the actual view layout must
be able to handle all navigation sets. If the template does not care for a specific navigation model, the navigation never will
show up. If a navigation model expected by the layout template (due to a predefined navigation model ID) is undefined, an error
might occur.
The process-reference-set element contains all processes that are used in the portal. For each process
a process-reference element with the attribute process-ref has to be defined.
This attribute refers to a process model. See the section called “The Process Model” for reference.
The domain type set contains all user defined domain types that are used in the portal. Each
domain type has to be defined by an domain-type-reference element. The
domain-type-ref attribute refers to a domain type model. See
the section called “The Domain Type Model” for reference.
During enterprise development your development progress usually will be deployed in a staged manner, e.g. first you test your latest implementation on the development stage (or dev stage) in a closed circle of persons (e.g. just the development team), then you deploy your latest implementation artifacts to the quality assurance (or QA) stage for closer examination by a larger set of people (e.g. early adopters from the customer side or the quality management team) and then finally the latest changes are rolled out to production (or prod) stage.
OpenSAGA supports this layered rollout approach by defining staging models that hold particular settings for a given stage. The stages for a particular installation can be configured in various ways (see the section called “Configuring the deployment stage for the server” for more details).
The staging model describes all stage-dependent settings of your portal (see the section called “<stages />”). Usually each stage will include database connections and drivers, access settings and more (see the section called “<stage />”). Please note that stages are purely virtual - one physical stage (e.g. QA) can be made up of several logical stages (e.g. qa-server-1, qa-db, qa-eai and global). Each logical stage is represented by a staging model, the set of logical stages (when configured as explained in the previous paragraph) makes up the phyiscal stage definition.
Layout and skin models customize the appearance of a portal on an abstract level. Internally layout templates are used to implement a specific layout. These templates contain placeholders for layout-instance-specific data (e.g. the width of the left hand navigation or the logo to use). The layout and skin model connect the theoretical layout with specific layout settings in order to define a concrete layout.
Layout models instantiate a specific layout template by binding all variables in the layout template to specific values.
A navigation model describes the structure of a single navigation. A navigation structure is composed in a hierarchical manner, e.g. it starts with a list of navigation items and each item in turn can include yet another list of (sub)items. Items themselves link to process start states, the meaning being that a click on a navigation item will initiate a process via the given start state. For now, if you want to define an access right for the navigation item, you have to specify a constant ID for the navigation model.
The navigation model (see the section called “<navigation />”), the navigation item model (see the section called “<item />”) and the navigation item list model (see the section called “<item-list />”) form the base of all navigation definitions. The following example shows a small navigation model:
Example 9.1. Navigation Example
<?xml version="1.0" encoding="utf-8"?> <navigation id="base.n_support" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/model/ navigation-1.0.xsd"> <item-list> <item id="base.n_support.help" label="mHelp" process-start-state-ref="base.p_help.ss_start"/> <item id="base.n_support.profile" label="mProfile" process-start-state-ref="base.p_user_profile.ss_start"/> <item id="base.n_support.imprint" label="mImprint" process-start-state-ref="base.p_imprint.ss_start" /> <item id="base.n_support.sitemap" label="Sitemap" process-start-state-ref="base.p_sitemap.ss_start"/> <item id="base.n_support.logout" label="mLogout" process-start-state-ref="base.p_logout.ss_start"> <visible-if> <user-logged-in/> </visible-if> </item> </item-list> </navigation>
A process model represents both workflows and background processes. Process models are always modeled from the view of an active user of the system, e.g. they contain the individual steps the user will be able to take, they describe the available actions, etc. Process models have a context of their own, the so-called process context which holds data for as long as the current user is executing that specific process (see the section called “Scoped Data Contexts” and ??? for more details).
Additionally process models contain states and transition between states.
The following process states can be used in a process model. Process states must be linked by transitions.
A start state indicates an entry point for a process. It depends on your need what you model with start states. If the process e.g. is newsletter management, one start state might initiate the read new newsletters subprocess, another might initiate write new newsletter. Alternatively you could model two separate processes to impement this - it's ultimately up to you. OpenSAGA provides support for both approaches.
One impportant feature of a start state (besides being the entry point into a process for navigation items) is the transition that leads from the start state to the next state. Since the transition can contain actions this allows you to e.g. take actions directly after a navigation item has been clicked and before any real business state is activated.
See the section called “<start-state />” for more details.
Decision states contain a list of outgoing transitions. Each transition (except for the last) must include a filter model
the semantics being that the first transition for which the filter model is true in the current request context will fire and
execute. It's good practice to not include a filter model in the last transition since this will cause the transition to fire
in all cases (remember: an empty filter model is representing the true value if it is queried during filtering).
Decision states therefor allow you to diverge the process control flow based on the current execution context.
See the section called “<decision-state />” for more details.
View states represent UI elements. The user will be presented with some kind of view (a list view, an input view, a mix of those or something else) and the process will stop until the user (or some client process) initiates a transition.
See the section called “<view-state />” for more details.
End states cause a process to stop. Usually they only will be required in conjunction with sub processes.
See the section called “<end-state />” for more details.
Returns to some parent state in the domain context path.
![]() | Important |
|---|---|
|
Back states provide one of the most important navigational concepts in OpenSAGA. They allow transitions (which are always defined as having a start and an end state) to return to variable states by defining the semantic meaning interpretation of the back operation. the section called “<back-state />” contains explanations of the various modes supported by back states. |
See the section called “<end-state />” for more details.
Transitions model state changes. Transitions always connect two states. Transitions additionally can contain action lists with an arbitrary number of actions that in turn allow to execute business logic when changing state.
Internally OpenSAGA manages a data structure called the domain context path. The domain context path collects a list of tuples storing the views, which the user passed while working with the application, together with the associated domain object of the view.
![]() | Important |
|---|---|
|
The domain context paths is automatically modified by OpenSAGA while the user steps through a process. Two simple rules are applied:
See also the section called “Domain Context” for more details about the domain context. |
Action lists are a collection of individual actions. Each action of an action list is executed in turn until either all actions have finished or an action halts action execution (see the section called “Action Results” for more details on this). Action list behaviour is described in more detail in the section called “Action Lists”.
Actions represent small pieces of busines logic. There exist a variety of predefined actions (see ???)
but you also can include customized business logic by executing the execute action which allows you to
execute beans, scripts and instantiate and run classes (see the section called “Execute Action” for more detail on how to do this.
The domain model consists of specific domain types and the relations between those domain types. In this respect OpenSAGA implements a relational database model. Domain type models describe domain objects (we call them objects instead of entities since this seems to be easier wording for non technical customers we address - it's just more tangible), relations connect two domain types (or connect a domain type to itself). Domain types define properties and restrictions on concrete objects.
The relation model defines the relation between domain types. All relations are directed and include the usual cardinalities (0..*, 1..*,
0..1, 1..1). Relation models are described in more detail in the section called “<relation />”).
All relation models are defined in one relation set model (see the section called “<relation-set />”).
The relation set model is located at /resources/models/domain/relations.xml (do not change the filename!) and identified by
the ID portal.domain.relations. Extensions must include a file of this name at the same location containing a relations set model with
this ID in order to add new relations to the domain model.
Relations can be programmatically added to objects either by using the connect action (see the section called “<connect />”) or by using appropriate content element models, e.g. the single connect (see the section called “<single-connect />”) or multi connect (see the section called “<multi-connect />”) content element models.
Domain types represent all data known in a OpenSAGA installation. The following domain type model types are available:
Domain Type Model, see the section called “<domain-type />”.
Constant Domain Type Model, see the section called “<constant-domain-type />”.
External Excel Domain Type Model, see the section called “<external-excel-domain-type />”.
External Relational Domain Type Model, see the section called “<external-relational-domain-type />”.
Joined Domain Type Model, see the section called “<joined-domain-type />”.
Each domain type contains a number of property models, see the section called “Property Models”.
A domain type has a set of property sets. We differentiate properties in several types (dependent on the domain type model only a subset of these are available):
Domain type properties, see the section called “<domain-type-property />”.
Formula properties, see see the section called “<formula-property />”.
Enumeration properties, see see the section called “<enum-property />”.
Reference properties, see see the section called “<reference-property />”.
Joined properties, see see the section called “<joined-property />”.
Each property has a property type that defines the type of data stored in the property, see the section called “Property Type Models”.
OpenSAGA supports a number of built-in property types and additionally provides an extension mechanism in order to be able to define extension-specific new property types. These two features are explained in the next two sections.
The following property types currently are built into OpenSAGA. We plan to add more property types in the future and welcome
your proposals. All available property type models defining these types can be found under the path
/base/models/domain/property-types:
Attachment: A type describing an arbitrary binary attachment to some data (usually created by
means of a file upload, sometimes programmatically).
Boolean: Either true or false.
Date: Just a date in history.
DateTime: A date in history including a specific point in time (e.g. hour, minute).
Double: A floating point number mapping to java.lang.Double.
Email: A valid email address.
Float: A floating point number mapping to java.lang.Float.
Locale: A locale consisting of a language code and an optional country code (according to
java.util.Locale).
Long: An integer value mapping to java.lang.Long.
Number: A floating point number mapping to java.math.BigDecimal.
PlainText: Plain UTF-8-encoded text (make sure that your database supports it if you use it).
Point: A GIS datatype describing a spatial point.
Polygon: A GIS datatype describing a spatial area.
RichText: Rich text content using HTML formatting.
Time: Just a point in time using hours, minutes, etc.
Timezone: A timezone info.
Wikitext: Wiki-formatted text (currently by default the markdown engine is being used).
OpenSAGA allows extension-specific new property types. They are defined in a property type model (see
the section called “<property-type />”). Property type models are
located under the path /extensionid/models/domain/property-types (for a specific extension ID). The
base models included in your OpenSAGA JAR file contain a variety of examples for property type models (as the supported
core types also are defined using this model type).
To change the input or output date format of a property type model you need to redefine it. Overwrite the
property type model using the same property type model ID (look it up in base, e.g. base.pt_date
to overwrite the Date property type) and define a new type converter reference set (see
the section called “<type-converter-reference-set />” and
the section called “<type-converter-reference />”).
Type converter reference sets map locales to type converters. Here you can thus define
new type converters. The merge strategy for type converter reference sets uses the "latest" definition for a specific
locale (as defined by the order in which extensions are included).
OpenSAGA provides extensive means to translate texts of a portal and to define language and country dependent formats for all input and output. The following section explains the basic features and references the specific models.
Translations are made up from a series of translation definitions (see the section called “Translation Definitions”). The available translations of a portal are defined by the merged set of all available definitions (in the order the stages are defined - it is possible to overwrite definitions).
The separation into translation definitions allows to collect tightly related definitions in one place. You can divide or collect your translations in any way that seems appropriate but we recommend using a logical structure.
All translation definitions are enumerated in the translations model (see
the section called “<translations />”). The base translations for all portals
are defined under the ID portal.domain.translations. Create a new model file under
models/i18n/translations/translations.xml
A single set of translation definitions can be defined in a file under the path
models/i18n/translations/definitions/some-name.xml. Each such file contains
a translations definitions model (see the section called “<translation-definitions />”)
and must be referenced from the set of translations (see the section called “Translations”). A set of definitions contains
individual definitions that are resolved according to an algorithm defined in
the section called “<translation-definition />”).
For all property types used in an OpenSAGA based portal it is possible to define individual formatters and converters in
order to represent locale specific settings (see the section called “<type-converter-reference-set />”
and the section called “<type-converter-reference />”).
This can be done by defining your own property type models
(see the section called “<property-type />”,
for which the files are defined under /models/domain/property-types, definitions
referenced in the property type reference set (see the section called “<property-type-reference-set />”
and the section called “<property-type-reference />”)
of the portal model (see the section called “<portal />”).
Additionally you can overwrite existing definitions and thus provide new converters and formatters.
OpenSAGA uses a variety of runtime data contexts to store execution specific data over the session lifetime of the current user. The lifecycle for each data context is managed by OpenSAGA and as longas a lifecycle is active all data in the respective scope is directly available for the current request. Scoped data contexts can contain properties (with all the variance allowed for domain type properties in domain type models), cached domain objects (that is references to a single object of a specific domain type) and lists of such cached domain objects.
The conversation context exists for the duration of one oncversation which means either a browser window lifecycle or a portlet instance lifecycle.
The process context exists for the execution of one specific process. As long as the user works in this process, all data in the process context is available. As soon as the process is switched or ends a new process context will be created.
The view context exists while the user is working with one view. It is special in so far as that it also contains all the data properties implicitly defined by input fields in the current view (property reading models in OpenSAGA lingo).
The request context is the most complex data context in OpenSAGA because it stores all information and data relevant for the current request. It is used throughout the framework in order to manage the request state.
OpenSAGA provides extensive data manipulation functions. All those functions share the fact the all data (e.g. properties, objects and lists) are referenced by their given IDs.
To access the value of a property you need to reference the property model ID (see the section called “<domain-type-property />”, the section called “<enum-property />” and the section called “<formula-property />”).
To reference an object you need to reference the scoped domain object model (see the section called “<scoped-domain-object />”).
To reference a list you need to reference the scoped domain object list model (see the section called “<scoped-domain-object-list />”).
OpenSAGA provides a number of manipulative actions in order to create data. The following list gives a quick overview about the most important means:
Properties can be set and referenced with the set-property-value action
(see the section called “<set-property-value />”). Handling
logical values is explained in Chapter 7, Defining Logical Values For Properties. Additionally
a number of specialized action exist for property manipulation - skim the action model reference
(Chapter 48, Actions) for details.
Objects are created with the new action (see the section called “<new />”).
Objects are set with the set-object action (see the section called “<set-object />”).
Additionally new objects can be added to lists with the add-to-list action
(see the section called “<add-to-list />”
Lists are loaded with the load-list action
(see the section called “<load-list />”).
Additionally new objects can be added to lists with the add-to-list action
(see the section called “<add-to-list />”
Table of Contents
Model IDs use the following naming conventions for handwritten models:
Names are built from a sequence of IDs separated by dots. The separated parts form a logical hierarchy.
Names use a prefix notation that describes the specialized part of the ID. The following prefixes are used:
d_ for domain types
p_ for processes
v_ for views
vs_ for view states
ss_ for start states
bs_ for back states
es_ for end states
ds_ for decision states
t_ for transitions
r_ for relations
n_ for navigations
a_ for agents
ID name sequences depend on the specific model type. All of them belong to one model (e.g. either the OpenSAGA base infrastructure, a specific extension or a specific project). For all
IDs thus the modul name is the first part of any ID. Since the module name is thus used in every ID we recommend using a very short an unique module name. If you are unsure about the
uniqeness of your module name and intend to use your module in a global context, please contact QuinScape at info@quinscape.de in order to receive information about the uniqueness of
your module name. The module name base is reserved by QuinScape for the base module that is a part of every OpenSAGA installation. Otherwise IDs use the following guidelines:
portal. for portal models.module
for domain types.module.d_domain-type-name
for domain type properties.module.d_domain-type-name.property-name
for processes.module.p_process-name
for views.module.p_process-name.v_view-name
for start states.module.p_process-name.s_start-state-name
for end states.module.p_process-name.e_end-state-name
for decision states.module.p_process-name.dc_decision-state-name
for agents.module.a_agent-name
for relations.
Preferrably the relation name will include both domain type names and the relation between them.
Note that this naming rule applies to both the actual relation ID and the inverse relation ID defined
in the same model.
module.r_relation-name
for navigations.module.n_navigation-name
Models are contained in separate XML files. For XMl files we use the following naming conventions (and in some cases requirements):
d_ for domain type model files.domain-type-name
p_ for process models.process-name
v_ for view models.view-name
a_ for agent models.agent-name
relations.xml for the relation container.
portal.xml for the portal root model.
The following directory structure is used by the OpenSAGA project itself.
Table 11.1. Directory structure
| Path | Content |
|---|---|
/src | OpenSAGA source directory |
/src/de/quinscape | QuinScape Java packages that might be used by other projects |
/src/org/opensaga | OpenSAGA Java packages |
/src/META-INF | Configuration files used by the Spring Framework |
/src/ehcache.xml | Ehcache configuration file |
/test | OpenSAGA Java packages for tests |
/db | Database files |
/db/data | Database script files that contain initialization data |
/doc | OpenSAGA documentation |
/doc/developer | Developer documentation |
/doc/reference | Reference documentation |
/doc/reference/docbook | DocBook reference documentation |
/lib | Java libraries that are used by the ant build task |
/misc | Miscellaneous script files |
/testing | Test files that are not implemented in Java |
/WebContent | Files that are deployed to the application server |
/WebContent/WEB-INF | Metadata of the OpenSAGA application |
/WebContent/WEB-INF/cfg | Configuration files |
/WebContent/WEB-INF/cfg/log4j | Configuration files for log4j |
/WebContent/WEB-INF/cfg/log4j/log4j.properties | Configuration file for log4j |
/WebContent/WEB-INF/cfg/opensaga | Configuration files for OpenSAGA |
/WebContent/WEB-INF/facelets-taglibs | OpenSAGA taglib definitions |
/WebContent/WEB-INF/prepared-flows | Webflow definitions that are not generated |
/WebContent/WEB-INF/resources | OpenSAGA resources |
/WebContent/WEB-INF/resources/base | OpenSAGA base resources, see the section called “Base directory structure” |
/WebContent/WEB-INF/resources/extensions | OpenSAGA extension resources, see the section called “Base directory structure” |
/WebContent/WEB-INF/xsd | OpenSAGA schema definitions |
/WebContent/WEB-INF/faces-config.xml | Spring Faces configuration file |
/WebContent/WEB-INF/jsSnoop.jspx | File used for JavaScript snooping |
/WebContent/WEB-INF/mime.types | Mime type definitions |
The base project uses the following directory structure.
Table 11.2. Directory structure
| Path | Content |
|---|---|
/actionscripts | Action script files |
/actionscripts/bsh | BeanShell action script files |
/actionscripts/groovy | Groovy action script files |
/java/cfg | Additional Spring Framework configuration files |
/media | Media files |
/media/icon-experience | Icon library for OpenSAGA. The files from this directory are NOT directly accessed by OpenSAGA. |
/media/icons | OpenSAGA uses this directory to access icons |
/media/icons/src | Files that have been used to create icons |
/models | OpenSAGA model definitions |
/models/agents | OpenSAGA agents |
/models/agents/domaintype-based | Domain-type based agents |
/models/agents/event-based | Event based agents |
/models/agents/time-based | Time based agents |
/models/agents/trigger-based | Trigger based agents |
/models/agents/agents.xml | Agent configuration file |
/models/domain | OpenSAGA domain type definitions |
/models/domain/constant-types | Constant domain type definitions |
/models/domain/external | External domain type definitions |
/models/domain/external/excel | Excel domain type definitions |
/models/domain/external/relational | Relational domain type definitions |
/models/domain/joined | Joined domain type definitions |
/models/domain/types | Domain type definitions |
/models/domain/relations.xml | Relation definition file |
/models/i18n | Internationalization for OpenSAGA |
/models/i18n/definitions | Internationalization definitions |
/models/gis | Geographic information system (GIS) definitions |
/models/layout | Layout definitions |
/models/navigation | Navigation definitions |
/models/processes | Process definitions |
/models/services | Service definitions |
/models/services/web-services | Web Service definitions |
/models/portal.xml | Portal configuration file |
/models/stages.xml | Stages configuration file |
/reports | Report files |
/scripts | JavaScript files |
/styles | CSS files |
/templates | Template files |
/templates/email | Email template files |
Extension projects use the same directory structure as the base directory, see the section called “Base directory structure”. If you want to extend some aspect of the base system (e.g. a Spring application context of your own) add the directory responsible for holding the extension (as described above) to your extension project and add the extension files to that directory. OpenSAGA will auto-discover the content and use it.
OpenSAGA always comes with a "base extension" that provides enough infrastructure to jump start a portal or web application right out of the box. In this respect OpenSAGA works similar to a Portal Server that comes with all the infrastructure required to run portlets (e.g. user management, basic configuration management and more).
In contrast to Portal Servers the implicit OpenSAGA infrastructure is more flexible and more useful due to a number of reasons:
There are no black boxes. The whole infrastructure is specified via standard OpenSAGA models. To repeat: There is no magic being used. You can touch and modify each part of the system by extending, overloading or overlaying the base models as described in Chapter 29, OpenSAGA Extensions.
The model based infrastructure implementation for all OpenSAGA portals is publicly available. You can find it in the
OpenSAGA sources under WEB-INF/resources/base and it uses the directory infrastructure described in
Chapter 11, Project Layout. Have a look at the models and learn how we use them to implement the OpenSAGA
infrastructure. We are trying to improve the documentation all the time and advise you to file issues under
http://www.opensaga.org/issues if you find
problems with the documentation. We know there is a lot left to be done but we strive to cope with the challenge.
There is enough infrastructure available to start an empty portal right away without loads of configuration. You can log in right away, work on user management, start with text translations and so on by following the steps explained in Chapter 2, First Steps and Chapter 6, Programming Tutorial: Developing a Web Based FAQ Application.
We try to provide comments for all the XML models defined in base. Please let us know where you want to see more
documentation and what kind of documentation would be of interest to you.
The implicit base portal is provided by OpenSAGA in order to allow to jumpstart projects. Even without defining any models a new project thus is equipped with a login process, a registration process, user management, translation management, various monitoring functions and administrative support and so on.
Usually such support is known only from Portal Server technologies. But in contrast to portal servers OpenSAGA is even more convenient and streamlined: All the base functionalities are defined by OpenSAGA models - thus there is no black box and it is very easy to customize, alter or drop any part of the base suppport. The next sections will explain various means to customize 'base' - the starting point for all your projects.
The 'base' portal comes with a predefined navigation. All navigation models are located at
/models/navigation. The navigation is structured like this:
n_main.xml (ID base.n_main) contains the overall navigation. It is built from
the sub navigation models defined in the next items of this list and also contains a number of hard-coded menu items
(e.g. the separation in "Home", "Administration" and so on). Overwrite this model if you want to create your own
navigation structure from scratch.
n_applications.xml (ID base.n_applications) contains an extension point for
your own navigation. By default it contains nothing and thus no "Applications" menu item will show up ever.
If you want to insert your own applications into a portal without having to change anything about the remaining
default structure you should overwrite this model and provide your application menu structure. As soon as you
do this a top level menu item "Applications" will show up in your portal while the remaining default
navigation remains unchanged. Remember that you can easily customize the defaults by simply configuring
appropriate permissions for your specific portal (and thus e.g. removing certain menu items for specific user
groups).
n_admin-applications.xml (ID base.n_admin-applications) works like
n_applications.xml but is used as an extension point for administrative additions that
will show up in the "Administration" menu. Your extensions will show up at the end of the administration menu.
See the item above for more customization hints.
n_support.xml (ID base.n_support) implements the support navigation shown
at the top right of the default layout. It contains the "Help", "Profile", "Imprint", "Sitemap" and "Logout"
standard menu items (with corresponding base processes linked to them). Overwrite this model if you want to
provide a custom support navigation.
Table of Contents
You have to differenciate between the two logging mechanisms that are provided by OpenSAGA. The first mechanism (described here) is used to log events created by the OpenSAGA framework while the second mechanism (described in chapter the section called “<system-log />”) is used to log events created by the business logic.
The initial logging configuration is provided by the file log4j.properties. This
configuration is used in the OpenSAGA startup phase. If no other configuration is provided by one of the
stages, it is also used in the runtime phase. If you need a different logging configuration in the runtime
phase, you can add the configuration to one of the stages that you use. The order of the stages is
important, since the logging configuration defined in a stage overwrites the logging configuration
that is defined in a previous stage. The initial logging configuration is an exception to this rule
(i.e. it is never overwritten).
Example 13.1. Logging configuration within a stage
<stage ...> ... <logging-configuration><![CDATA[ log4j.rootLogger=... ]]> </logging-configuration> </stage>
Technical information (should be moved to the developer docs):
The initial logging configuration (startup phase) is loaded by the Log4jConfigListener
defined in the contextListenerTypes of the BootStrapListener. The
configuration parameters for the Log4jConfigListener are located in the file
web.xml:
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/cfg/log4j/log4j.properties</param-value>
</context-param>
<context-param>
<param-name>log4jRefreshInterval</param-name>
<param-value>60000</param-value>
</context-param>
The logging configuration for the runtime phase is loaded by the
LoggingConfigurationServiceListener that is also defined in the
contextListenerTypes. The LoggingConfigurationServiceListener
calls the LoggingConfigurationService to activate the current logging configuration
after the startup phase is finished.
The LoggingConfigurationService searches the logging configuration in the following
order:
the stage models (in reversed order)
the log4j.properties file
OpenSAGA defines a multitude of services that are used during runtime. This chapter indicates the services and the interfaces they implement.
Table 14.1. Predefined Services
| Name | Implemented Interface |
|---|---|
cacheRepository | org.opensaga.runtime.cache.CachedRepository |
| Scripting Services | |
BeanShellScriptingService | org.opensaga.runtime.scripting.beanshell.BeanShellScriptingService |
GroovyScriptingService | org.opensaga.runtime.scripting.groovy.GroovyScriptingService |
PythonScriptingService | org.opensaga.runtime.scripting.python.PythonScriptingService |
RubyScriptingService | org.opensaga.runtime.scripting.ruby.RubyScriptingService |
Table of Contents
Using an agent you can model a task that is run when a defined event occurs. This enables you to create an event based behavior to ensure data integrity or aggregate and transfer data. The following sections describe the currently provided types of agents.
For event based agents the system provides trigger IDs to identify the event. Currently the following trigger IDs are supported:
Table 15.1. Agent Trigger IDs
| Trigger ID | Description |
|---|---|
__opensaga:insertingDomainObject
| Posted before a domain object is inserted into a persistence layer. |
__opensaga:insertedDomainObject
| Posted after a domain object is inserted into a persistence layer. |
__opensaga:deletingDomainObject
| Posted before a domain object is deleted from a persistence layer. |
__opensaga:deletedDomainObject
| Posted after a domain object is deleted from a persistence layer. |
__opensaga:updatingDomainObject
| Posted before a domain object is updated to a persistence layer. |
__opensaga:updatedDomainObject
| Posted after a domain object is updated to a persistence layer. |
__opensaga:readingDomainObject
| Posted before a domain object is read from a persistence layer. |
__opensaga:readDomainObject
| Posted after a domain object is read from a persistence layer |
__opensaga:userLoggedIn
| Posted after a user is logged in. |
__opensaga:userLoggedOut
| Posted after a user is logged out. |
Beside the action attributes that configure the execution behaviour of the action, an action includes a list of actions that are executed, when the agent is run.
The action defined by the domaintyp-based-agent tag, that can handle writing access events on domain types. The action is configured by the following attributes:
Table 15.2. Attributes of DomainTypeBaseAgent
| Attribute | Description |
|---|---|
id
| Unique identifier of the acion. |
name
| Descriptive name of the agent. |
domain-type-ref
| Reference to the domain type model that is handled by this client. |
trigger-event-id
| Id of the trigger event. |
An event based agents handles events that are provided by the platform.
Table 15.3. Attributes of EventBasedAgent
| Attribute | Description |
|---|---|
id
| Unique identifier of the acion. |
name
| Descriptive name of the agent. |
domain-type-ref
| Reference to the domain type model that is handled by this client. |
trigger-event-id
| Id of the trigger event. |
A time based agent executes an action list at a point of time defined by an repeat intervall. For more complex execution scenarios you may define a cron expression.
Table 15.4. Attributes of TimeBasedAgent
| Attribute | Description |
|---|---|
cron-expression
| When defining a cron expression the scheduler ignores the repeat-count and the repeat-intervall, since the cron expression defines in its own format. |
repeat-count
| Times to repeat the agent. |
repeat-interval
| Time span between to executions. |
start-time
| A DateTime that defines the start of the timer. |
end-time
| A DateTime that defines the end of the timer. |
Table of Contents
The portal model is the main model wherefrom all other model sets are referenced and initialized. It is subdivided in relevant parts as described in the following sections. The table below contains a list of all attributes that can be set on the portal model.
![]() | Warning |
|---|---|
|
Take care while changing these settings. |
Table 16.1. Portal model attributes
| Attribute | Description | Default value |
|---|---|---|
id | The ID of the portal. | portal.base |
home-process-start-state-ref | The start state ID of the home process. | p_home.s_start |
login-process-start-state-ref | The start state ID of the login process. | p_login.s_start |
logout-process-start-state-ref | The start state ID of the logout process. | p_logout.s_start |
error-process-start-state-ref | The start state ID of the error process. | p_error.s_start |
access-denied-process-start-state-ref | The start state ID of the access denied process. | p_access_denied.s_start |
relation-set-ref | The ID of the relation set model. | portal.domain.relations |
translations-ref | The ID of the translations model. | portal.domain.translations |
layout-ref | The ID of the layout model. | portal.layout |
title-tag | The title tag of the portal. | PortalTitle |
agents-ref | The ID of the agents model. | agents.list |
stages-ref | The ID of the stages model. | system.stages |
deletion-mode | The default deletion mode, see the section called “<portal />”. | logical |
system-domain-type-ref | The domain type model ID of the domain type used for system settings. | system.domain.virtual.info |
Example 16.1. Portal Definition
<portal id="portal.base" home-process-start-state-ref="p_home.s_start" login-process-start-state-ref="p_login.s_start" logout-process-start-state-ref="p_logout.s_start" error-process-start-state-ref="p_error.s_start" access-denied-process-start-state-ref="p_access_denied.s_start" relation-set-ref="portal.domain.relations" translations-ref="portal.domain.translations" layout-ref="portal.layout" title-tag="PortalTitle" agents-ref="agents.list" stages-ref="system.stages" deletion-mode="logical" system-domain-type-ref="system.domain.virtual.info">
The meta model contains meta information for vitally functionality of the portal, such as user authentication, permission management or logging.
Table 16.2. Meta model attributes
| Attribute | Description | Default value |
|---|---|---|
scoped-current-user-object-ref | The cached object for the current user. See scoped-domain-object
in the SessionContext model (the section called “The Session Context”). | portal.user.current |
user-domain-type-ref | The domain type that describes a user. | system.domain.user |
user-login-property-ref | The login property of the user domain type. | system.domain.user.login |
user-password-property-ref | The password property of the user domain type. | system.domain.user.password |
user-active-property-ref | The active property of the user domain type. | system.domain.user.active |
user-native-locale-property-ref | The native locale property of the user domain type. | system.domain.user.nativeLocale |
user-profile-locale-property-ref | The profile locale property of the user domain type. | system.domain.user.profileLocale |
user-profile-timezone-property-ref | The timezone property of the user domain type. | system.domain.user.profileTimeZone |
user-last-login-property-ref | The last login property of the user domain type. | system.domain.user.lastLogin |
user-role-relation-ref | The relation between the user domain type and the role domain type. | system.domain.user.relation.role |
user-web-service-relation-ref | The relation between the user domain type and the portal web service domain type. | system.domain.user.relation.portal_web_service |
user-superuser-property-ref | The super user property of the user domain type. | system.domain.user.superUser |
user-portaluser-property-ref | The portal user property of the user domain type. | system.domain.user.portalUser |
role-domain-type-ref | The domain type that describes a role. | system.domain.role |
role-permission-relation-ref | The relation between role domain types and permission domain types. | system.domain.role.relation.permission |
role-name-property-ref | The name property of the role domain type. | system.domain.role.name |
permission-type-property-ref | The type property of the permission domain type. | system.domain.permission.type |
system-logging-domain-type-ref | The domain type that describes a system logging entry. | system.domain.logging |
system-logging-timestamp-property-ref | The timestamp property of the system logging domain type. | system.domain.logging.timestamp |
system-logging-component-property-ref | The component property of the system logging domain type. | system.domain.logging.component |
system-logging-level-property-ref | The level property of the system logging domain type. | system.domain.logging.level |
system-logging-message-property-ref | The message property of the system logging domain type. | system.domain.logging.message |
system-logging-login-property-ref | The login property of the system logging domain type. | system.domain.logging.login |
translation-domain-type-ref | The domain type that descibes a translation. | system.domain.translation |
translation-code-property-ref | The code property of the translation domain type. | system.domain.translation.code |
translation-language-property-ref | The language property of the translation domain type. | system.domain.translation.language |
translation-country-property-ref | The country property of the translation domain type. | system.domain.translation.country |
translation-process-id-property-ref | The process property of the translation domain type. | system.domain.translation.processId |
translation-view-id-property-ref | The view property of the translation domain type. | system.domain.translation.viewId |
translation-translation-property-ref | The translation property of the translation domain type. | system.domain.translation.translation |
web-service-name-property-ref | The name property of the portal web service domain type. | system.domain.portal_web_service.name |
default-email-address | The default email address used by OpenSAGA to sent emails. | info@quinscape.de |
session-locale-ref | The cached domain object for the session locale. | session.locale |
use-join-table | Specifies if join tables should be used for relations. | true |
Example 16.2. Meta Definition
<meta scoped-current-user-object-ref="portal.user.current" ... session-locale-ref="session.locale" > <anonymous-model-permissions> ... </anonymous-model-permissions> <user-model-permissions> ... </user-model-permissions> </meta>
In addition to the above attributes the model permissions for anonymous and logged on users are
defined in the meta model. The anonymous-model-permissions and
user-model-permissions each contain a list of model-permissions.
Example 16.3. Anonymous Model Permissions Definition
<anonymous-model-permissions>
<model-permission model-id-property-ref="system.domain.portal_view.guid">
<relation-chain>
<relation-reference
relation-ref="system.domain.role.relation.portal_view"/>
</relation-chain>
</model-permission>
...
</anonymous-model-permissions>
Each model-permission contains a relation-chain that describes the relations
that are necessary to reach the permission model by starting at the role domain type.
For example the following code block
Example 16.4. User Model Permissions Definition
<user-model-permissions>
<model-permission model-id-property-ref="system.domain.portal_view.guid">
<relation-chain>
<relation-reference
relation-ref="system.domain.role.relation.portal_view"/>
</relation-chain>
</model-permission>
...
</user-model-permissions>
view permissions (defined by the portal view domain type)
can be reached by starting at the role domain type and then following the relation
system.domain.role.relation.portal_view to the portal view domain type model.
The model-id-property-ref defines the domain type of the permission.
The navigation reference set contains a set of references to navigation models. Check out ??? for more details.
Example 16.5. Navigation Reference Set Definition
<navigation-reference-set>
<navigation-reference navigation-ref="base.n_main"/>
<navigation-reference navigation-ref="base.n_support"/>
<navigation-reference navigation-ref="base.n_applications"/>
<navigation-reference navigation-ref="base.n_admin-applications"/>
</navigation-reference-set>
The set of locales that are supported by the portal can be specified here. For each locale a
locale element with the attributes language-code and
country-code has to be defined. The values of these attributes correspond to
the language and country properties of the java.util.Locale Java class.
The default locale can be configured by the attribute default-locale-ref.
Example 16.6. Supported Locales Definition
<supported-locales default-locale-ref="balvi.locale.de_DE"> <locale id="balvi.locale.en_US" language-code="en" country-code="US"/> <locale id="balvi.locale.de_DE" language-code="de" country-code="DE"/> </supported-locales>
The domain type reference set contains all domain types of the portal. For each domain type a
domain-type-reference element with the attribute domain-type-ref has to be
defined. This attribute refers to a domain type model, see Chapter 51, Domain Type Models.
Example 16.7. Domain Type Reference Set Definition
<domain-type-reference-set>
<domain-type-reference domain-type-ref="system.domain.user"/>
...
<domain-type-reference domain-type-ref="system.domain.role"/>
</domain-type-reference-set>
You can specify a default property set that contains a set of properties that are added to all domain type models.
Example 16.8. Default Property Set Definition
<domain-type-reference-set>
<default-property-set>
<default-property id-suffix="createdBy" name="createdBy"
type="PlainText"
insert-property-value-provider="currentUserPropertyValueProvider"/>
...
</default-property-set>
<domain-type-reference .../>
...
</domain-type-reference-set>
The example shows the definition of a createdBy property.
You have to specify the name and type just like you do
for a normal domain type property. Here we use the currentUserPropertyValueProvider,
so that the property is initialized if a new domain object is inserted into the database.
The attribute id-suffix is used for the ID of the generated property
model. The ID is generated by using the ID of the domain type, then adding a dot and
the ID suffix. E.g. if you assume a domain type with the ID example.company
and the ID suffix createdBy, the resulting ID would be example.company.createdBy.
You can use this generated ID like any other property model ID.
The process reference set contains all processes that can be used in the portal. For each process
a process-reference element with the attribute process-ref has to be defined.
This attribute refers to a process model.
Example 16.9. Process Set Definition
<process-reference-set>
<process-reference process-ref="portal.p_login"/>
...
<process-reference process-ref="portal.p_monitoring"/>
</process-reference-set>
OpenSAGA can also duplicate processes by copying them and replacing a selected set of IDs with new IDs.
![]() | Note |
|---|---|
|
Internally all old IDs are replaced with new IDs. Random IDs are created to do that. But usually you need a set of IDs with known IDs in order to integrate the copy into your overall system (by e.g. referencing a new start state ID). Therefor you usually will need to define a limited set of IDs manually. |
process-reference tag already explained in the section called “The Process Reference Set” but need to enhance it
with the specific ID mappings that you need to control. The following example shows how to do this.
Example 16.10. Duplicating a Process
Let us assume that a process with the ID test.p_foo exists in your project. For some reason you want to copy the
process (probably to modify it with some other means). Your goal is to create a new process test.p_bar that can be started
via the navigation by adressing a start state with the new ID p_bar.s_bar (which overwrites the old start state ID p_foo.s_foo).
This can be done easily by the following code:
<process-reference process-ref="test.p_bar" template-process-ref="test.p_foo">
<id-mapping-set>
<id-mapping original-id="p_foo.s_foo" new-id="p_bar.s_bar"/>
</id-mapping-set>
</process-reference>
The web service reference set contains references to all web services that can be used in the portal.
For each web service a web-service-reference element with the attribute
web-service-ref has to be defined. This attribute refers to a web service model,
see Chapter 23, Web Services.
Example 16.11. Web Service Reference Set Definition
<web-service-reference-set>
<web-service-reference web-service-ref="portal.w_example_web_service"/>
...
</web-service-reference-set>
The REST service reference set contains references to all REST services that can be used in the portal.
For each REST service a rest-services-reference element with the attribute
rest-service-ref has to be defined. This attribute refers to a REST service model,
see Chapter 25, REST Services.
Example 16.12. REST Service Reference Set Definition
<rest-services-reference-set>
<rest-services-reference rest-services-ref="portal.r_test"/>
...
</rest-services-reference-set>
The paging element contains the default paging definition for all data grids in the portal.
With the default-page-size attribute you can specify the default page size. You can override
this setting by adding a paging element with a different paging size to a data grid.
Each paging-button definition has the attributes offset, label
and event. The offset attribute defines the offset to the current page, i.e.
an offset of 1 jumps to the next page while an offset of -2 jumps two pages
back. The label attribute describes the button label that is displayed; if no label
is specified, the target page number is used instead. The event attribute describes the
event that the button fires. The value of the event attribute is only used to
identify the button that fired it, i.e. you can specifiy any event name that you like.
If no event attribute is specified, the button is inactive.
Example 16.13. Paging Definition
<paging default-page-size="10"> <paging-button offset="first" label="|<" event="first"/> <paging-button offset="-1" label="<" event="prev"/> <paging-button offset="-3" event="prev3"/> <paging-button offset="-2" event="prev2"/> <paging-button offset="-1" event="prev"/> <paging-button offset="0"/> <paging-button offset="1" event="next"/> <paging-button offset="2" event="next2"/> <paging-button offset="3" event="next3"/> <paging-button offset="1" label=">" event="next"/> <paging-button offset="last" label=">|" event="last"/> </paging>
If you have frequently used filter specifications, you should define them in a
filter specification set. You can define such a set within view, process and portal models.
To reference a filter defined in such a set, you have to use the include command,
see the section called “IncludeFilter” for more information.
![]() | Important |
|---|---|
| The search order for filter specifications is: view, process and portal. |
Example 16.14. Filter Specification Set
<filter-specification-set>
<filter-specification id="filter1">
...
</filter-specification>
...
</filter-specification-set>
This set contains settings for UI components. Each setting consists of a
name and value.
Example 16.15. UI Component Setting Set
<ui-component-setting-set>
<ui-component-setting name="domaincontextpath.display" value="true"/>
<ui-component-setting name="domaincontextpath.length" value="5"/>
...
</ui-component-setting-set>
If you have frequently used action lists, you should define them in an action list set.
You can define such a set within process and portal models. To reference an action list
defined in such a set, you have to use the call action, see
the section called “CallAction” for more information.
![]() | Important |
|---|---|
| The search order for filter specifications is: process and portal. |
Example 16.16. Action List Set
<action-list-set>
<action-list id="example.action1">
...
</action-list>
<action-list id="example.action2">
...
</action-list>
...
</action-list-set>
The stages model contains a set of stage definitions. The stages that are used by the portal can either
be defined by the startup parameter OPENSAGA_STAGES or by using the configuration file
opensaga-project.cfg. See the section called “Configuring the deployment stage for the server” for more information.
Example 16.18. A single stage definition
<stage name="dev-example"> <data-source-set> <data-source name="portaldb" type="opensaga-hibernate"> <settings> <setting name="driverClassName" value="org.postgresql.Driver"/> ... <setting name="password" value="iGro1tWHHIXupoiW57hsIg==" decryption-bean-name="aesDecrypter"/> <setting name="bean.dataBaseNamingStrategy" value="postgres"/> ... <setting name="hibernate.dialect" value="org.hibernatespatial.postgis.PostgisDialect"/> ... <setting name="c3p0.initialPoolSize" value="3"/> ... </settings> </data-source> </data-source-set> </stage>
The stage name (in this example dev-example) is defined by the attribute name.
![]() | Note |
|---|---|
|
Some technical details: the stage models of all selected stages are merged in the usual way.
To get a list of all specified stage models you can use the |
Each stage definition contains a set of data sources. For example the portaldb data source that
is the default one for all domain types. Above you can find an example of a data source definition (Example 16.18, “A single stage definition”).
Each data source has a name and a type. The name is referenced by
the domain type that uses the data source. The type attribute specifies the data source type.
See the section called “Data Source Types” for a list of supported types.
The data source configuration is specified by using a settings set that contains
setting definitions. Each setting consists of a parameter name (name attribute) and
a parameter value (value attribute). If you want to use encrypted values, you have to specify
a decryption-bean-name that refers to a configured decryption bean. See Chapter 27, Encryption
for more information.
Table 16.3. Data source configuration parameter
| Parameter | Description |
|---|---|
| Database configuration parameter | |
driverClassName |
Java classname of the database driver. Example: org.postgresql.Driver
|
url |
URL of the database. Example: jdbc://postgresql://db-server/database
|
username | Name of the database user. |
password | Password of the database user. |
bean.dataBaseNamingStrategy |
The set of naming strategies used for table- and column-names in the database.
Valid values are
Technically this value is a prefix used to identify the correct beans from the
application context. See |
| Hibernate configuration parameter | |
hibernate.dialect |
Java classname of the Hibernate dialect. Example:
org.hibernatespatial.postgis.PostgisDialect used for a PostgreSQL database
with GIS support.
|
hibernate.hbm2ddl.auto | Database schema export mode. See the section called “Choosing the correct database schema export mode” for a detailed description. |
hibernate.generate_statistics |
Flag indicating if Hibernate statistic should be generated. Default: true
|
hibernate.cache.use_query_cache |
Flag indicating if the query cache should be used. Default: false
|
hibernate.cache.use_second_level_cache |
Flag indicating if the second level cache should be used. Default: false
|
hibernate.cache.provider_class |
Java classname of the cache provider. Default: org.opensaga.runtime.ExternalEhCacheProvider
|
... | Refer to the Hibernate documentation for additional configuration parameters. |
| Connection pool configuration parameter | |
c3p0.initialPoolSize | Initial pool size of the c3p0 connection pool. |
c3p0.minPoolSize | Minimum pool size of the c3p0 connection pool. |
c3p0.maxPoolSize | Maximum pool size of the c3p0 connection pool. |
... | Refer to the c3p0 documentation for additional configuration parameters. |
This section describes how to choose the correct database schema export mode for Hibernate.
The mode is set by the configuration parameter hibernate.hbm2ddl.auto.
The valid values are: create, create-drop, update
and validate.
If this parameter is not set, Hibernate does not export the schema, i.e. no database tables are created
or validated. Missing tables and/or missing/mismatching column types are only detected at runtime.
Hibernate creates a new database schema. All tables included in this schema are dropped (if they existed before) and created again. On every OpenSAGA startup you start with a new database. Tables not included in the Hibernate schema are ignored.
![]() | Caution |
|---|---|
|
Never use this mode in a production environment. You will probably loose all your data. He who laughs last has a backup. |
In addition to the create mode, all tables that were created by Hibernate are
dropped if the SessionFactory is closed.
![]() | Caution |
|---|---|
|
This mode is even more critical than the |
This is the preferred mode for development. If you add new domain types or domain type properties, the database is updated accordingly. If you delete domain types or domain type properties, the corresponding tables/columns are not deleted from the database.
![]() | Important |
|---|---|
|
If you change the type of domain type properties, the corresponding database column is not changed. This can lead to strange errors or confusion. To prevent this from happening, you have to make sure that the database table is changed in the same way that you have changed the property (either by modifying/deleting the database columns or by deleting the whole table). |
It is possible to use a proxy for all outgoing http connections of OpenSAGA. Therefore you have just to define a proxy configuration model with the data of the proxy. The following example shows how to configure a proxy.
Example 16.19. Configure a proxy for OpenSAGA
<stage name="dev-example"> ... <proxy-configuration> <settings> <setting name="host" value="proxy.myserver.de" /> <setting name="port" value="8000" /> <setting name="user" value="Foo" /> <setting name="password" value="Bar" /> </settings> </proxy-configuration> ... </stage>
System.setProperty("http.proxyHost", proxyConfigurationModel.getHost());
System.setProperty("http.proxyPort", proxyConfigurationModel.getPort());
System.setProperty("http.proxyUser", proxyConfigurationModel.getUser());
System.setProperty("http.proxyPassword", proxyConfigurationModel.getPassword());
Table 16.4. Proxy configuration parameters
| Parameter | Description |
|---|---|
| host | Defines the host of the proxy |
| port | Defines the port of the proxy |
| user | Defines the username that is used to login at the proxy |
| password | Defines the password that is used to login at the proxy |
By setting the development-mode attribute on stage to true, you can enable the development mode which changes some of the behaviour
of the OpenSAGA platform to be less efficient but supporting convient development methods. In development mode
Hot reloading of more and more resources is enabled. You can already edit views, layout models and processes and to some degree without even restarting the context. The models get recompiled and reenhanced on-the-fly and you can just continue working. New models in general still require a restart.
The bundling mechanisms that merge CSS and JavaScript resources into large compressed resource bundles is deactivated in parts. Scripts are still resolved via dependencies but are included as single files to aid script development. This is not possible on Internet Explorer which puts arbritrary limits on the number of resources being included. Since many widgets have one or more resource dependencies this leads to quite a number of resource inclusions on the average OpenSAGA view.
The view id is displayed after the view title to aid working on OpenSAGA applications you have not designed yourself.
Exceptions are only displayed on the client side in production mode.
Table of Contents
Views offer very flexible means of layout. Chapter 38, Working with layouts in OpenSAGA provides a detailed introduction about how to create such layouts.
Parts contain the actual content of a view. A variety of content elements is available to build individual views, Chapter 22, Content Elements introduces all available content elements.
Views can specify special validation rules to which the input of a view must comply. If any such restrictions fail the view
cannot transition to the next state in the process model and will be redisplayed with appropriate error messages provided by
the validation rules. To display these error messages, an error-message-list must be provided on at least one visible part
of the view, see Chapter 18, Error Handling for more about this.
Validation rules for a specific view are defined following the part-set. The rules are defined by using the
restriction-set model element also available for domain types. Chapter 70, Restrictions provides detailed
information about how to define such a restriction set. Note that no implicit objects are available when defining view restrictions.
Instead all the implicit scripting objects described in the section called “What to use?” can be used to access objects,
lists and properties defined on the source view. Then the scripting language can be used as usual in order to define specific restrictions.
The following example shows a trivial view with two restrictions:
Example 17.1. View Restrictions
<?xml version="1.0" encoding="UTF-8"?> <view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/model/view-1.0.xsd" id="sandbox.p_view_validation.view" process-ref="sandbox.p_view_validation" title="CheckFormValidation"> <part-set> <part> <content> <label value="Input" target-ref="p_attachment.attachment"/><br/> <plain-text value="EnterNonEmptyWordsStartingWithTheLetterAThenPressCheck"/><br/> <error-message-list title-tag="Error List"/><br/> <text-field id="sandbox.p_view_validation.view.input" type="PlainText" property-ref="sandbox.p_view_validation.view.input"/><br/> <button transition-ref="sandbox.p_view_validation.t_validate" icon="load" text="Check" /> </content> </part> </part-set> <restriction-set> <restriction error-tag="MustNotBeEmpty"> property["sandbox.p_view_validation.view.input"] != null </restriction> <restriction error-tag="DoesNotStartWithA"> property["sandbox.p_view_validation.view.input"] != null && property["sandbox.p_view_validation.view.input"].startsWith("A") </restriction> </restriction-set> </view>
![]() | Note |
|---|---|
|
View restrictions will be ignored under two circumstances:
|
Views are very special states in a process because they result in an interrupt until the client responds. They are surrounded by server side business logic:
A preprocessing phase that loads all the data required for displaying the view.
A postprocessing phase in which a transition moves to a new (or the same old) state and optionally executes business logic by processing the actions of a transition model (see ??? for details about how processes are defined).
Preprocess the next view (e.g. load its data).
Display the view and wait for the client.
Postprocess the client response.
Before data for the view is preprocessed (to e.g. manipulate the overall data to display).
After the data for the view is preprocessed (to e.g. manipulate individual values of the overall data or add some more data).
Before the client response is processed (to always execute some logic when leaving a view).
After the client response is processed (to always execute some final clean-up oerations).
Example 17.2. Interrupting the Preprocessor and the Postprocessor
<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/model/view-1.0.xsd" id="..." process-ref="..." domain-type-ref="..." title="..."> <before-preprocessing> <action-list> ... </action-list> </after-preprocessing> <after-preprocessing> <action-list> ... </action-list> </after-preprocessing> <before-postprocessing> <action-list> ... </action-list> </before-postprocessing> <after-postprocessing> <action-list> ... </action-list> </after-postprocessing> ...
Table of Contents
OpenSAGA provides two ways of communicating errors to the user:
Errors can be global.
Errors can be bound to a specific content element.
Global errors are not connected with a specific input element but rather with the overall content of the source view or the application state. Global errors are visualized in a list like this:
<error-message-list title-tag="ErrorList"/>OpenSAGA will display a list of all error messages created during the validation lifecycle step. OpenSAGA will not display errors that will be displayed in a more local place due to a local error tag (see below). Those errors will automatically be filtered from the global list. If you want to see all errors in the global error list although they also are shown in another place you can use the
global-only attribute of the error-message-list tag and set it to false.
Local errors are connected to a specific content element model. They can be displayed like this:
<textarea id="content" property-ref="..."/> <error-message target-ref="content"/>The
error-message tag will show the validation message for the referenced content element model if there
was a validation error. Otherwise no output will be produced. Since the tag displays an actual message you must take care to
insert it into the layout in such a way that the optional message will not destroy your layout.
Table of Contents
Data source types provide the meta information required to configure a data source. OpenSAGA supports the following data source types:
Table 19.1. Data Source Types
| Type | Description |
|---|---|
opensaga-cache-repository | Provides a data source type to connect a virtual domain type with all cached items. |
opensaga-constant | Provides access to constant data that is defined by a list of
constant-data-list elements. |
opensaga-hibernate | Provides access to a database by using Hibernate. |
opensaga-external-relational | Provides access to an external relational database by using JDBC. |
opensaga-external-excel | Provides access to an external Excel file. |
opensaga-native-locales | Provides access to all locales that are defined by
java.util.Locale. |
opensaga-supported-locales | Provides access to all locales that are supported by the current portal. |
opensaga-portal-views | Provides access to all views that are defined in the current portal. |
opensaga-portal-processes | Provides access to all processes that are defined in the current portal. |
opensaga-portal-transitions | Provides access to all transitions that are defined in the current portal. |
opensaga-portal-navigation-items | Provides access to all navigation items that are defined in the current portal. |
opensaga-vfs | Provides a data source type to connect a virtual file system type. |
To configure a new data source you have to complete the following steps:
(1) Add a new data source to stages.xml.
(2) Add an element for the data source to the file
model-based-data-sources-1.0.xsd.
(3) Create a new domain type for the data source content.
(4) Add the new domain type to the correct
portal.xml.
The opensaga-hibernate data source uses a set of predefined naming
strategies (for table names, column names, etc.). The specific set that is used is
determined by the data source setting bean.dataBaseNamingStrategy. The
following values can be used: postgres and oracle. The
value oracle defines a set of strategies that work with an Oracle data
base, the value postgres does the same for a PostgreSQL data base.
It is possible that the naming strategies can not automatically create names that
are unique. In this case you get a NotUniqueException on system
startup. To resolve this conflict you have to set one of the conflicting table names
to a unique value (the table name can be manually defined for domain type models and
relation models). If you use different data bases (e.g. for development and
deployment) you might get different naming conflicts. Therefore we
recommend to use the same type of data base for all systems.
OpenSAGA-vfs implements an API for accessing file systems. You are able to generate an uniform view of different files from different sources (e.g. local disk) or search/list files inside of a zip or jar archive sources.
Getting started: We will start by following the upper steps of section
the section called “Configuring a new data source”. First Step (1) is to add a new
datasource to stages.xml. Here is an example how can it look like:
<data-source name="sample-file-data-source" type="opensaga-vfs"> <settings> <setting name="baseDirectory" value="c:/"/> <setting name="0.directory" value="test/"/> <setting name="0.files" value="**/*gv*.html"/> </settings> </data-source>
This example will show files with *gv*.html-ending in
C:/Test/. To declare a base directory is always necessary -
it is the parent node of all following settings. More settings are not
essential, unless you want to establish more criteria.
The next step (2) is to add an element to model-based-data-sources-1.0.xsd for our vfs-datasource:
<xsd:element name="virtual-file-system-data-source"> <xsd:complexType> <xsd:complexContent> <xsd:extension base="beans:identifiedType"> <xsd:attribute name="domain-type-ref" type="DomainTypeRefType" use="required"/> </xsd:extension> </xsd:complexContent> </xsd:complexType> </xsd:element>
In step (3) we have only to create a new domain type and add it correct to
portal.xml (4): Therefore create a file
samplefiles.xml in your-extension/models/domain/types
with the content:
<?xml version="1.0" encoding="UTF-8"?> <domain-type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "http://www.opensaga.org/schema/model/domain-type-1.0.xsd" id="your-extension.samplefiles" name="SampleFiles" extends="system.domain.file" data-source-name="sample-file-data-source"> </domain-type> <!-- Take care: The id here is an example extension -->
If that is done lets close up the last step (4) in
portal.xml
<domain-type-reference-set>
..
<domain-type-reference domain-type-ref="system.domain.file"/>
..
</domain-type-reference-set>
Last but not least you can make your work viewable by creating a new suitable view - and that's it! Now there will follow some examples, how to handle with the datasource-settings:
<!-- Example 1: --> <data-source name="sample-file-data-source" type="opensaga-vfs"> <settings> <setting name="baseDirectory" value="c:/folder1"/> </settings> </data-source> <!-- To specify only the base directory - without any other settings - will result in a wildcard (*.*) search in your given basedir: C:/folder1 -->
<!-- Example 2: --> <data-source name="sample-file-data-source" type="opensaga-vfs"> <settings> <setting name="baseDirectory" value="c:/"/> <setting name="0.directory" value="test/"/> <setting name="0.files" value="**/*.html"/> <setting name="0.files" value="**/*.xhtml"/> <setting name="0.files" value="**/New*.txt"/> <!-- filename: beginning with --> <setting name="0.files" value="**/*test*.txt"/><!-- filename: containing test --> </settings> </data-source> <!-- This example shows in C:/test all *.html, *.xhtml, *.txt with begining filename 'new' and all *.txt containing in filename 'test'. -->
<!-- Example 3: --> <data-source name="sample-file-data-source" type="opensaga-vfs"> <settings> <setting name="baseDirectory" value="c:/"/> <setting name="0.directory" value="test/"/> <setting name="0.files" value="**/*.html"/> <setting name="0.files" value="**/*.xhtml"/> <setting name="0.files" value="**/*.txt"/> <setting name="1.directory" value="bars/"/> <setting name="1.files" value="**/*.wav"/> <setting name="1.files" value="**/*.rtf"/> <setting name="2.directory" value="foos/"/> </settings> </data-source> <!-- This example shows in C:/test all *.html, *.xhtml, *.txt and in C:/bars all *.wav, *.rtf. The last directory setting will make a wildcard search to C:/foos. -->
How to search in archives?
<!-- Example 4: To search in an zip-archive according to different files. --> <setting name="baseDirectory" value="zip:c://"/> <setting name="0.directory" value="test/test.zip"/> <setting name="0.files" value="**/*.html"/> <setting name="1.directory" value="foo/java.zip"/> <setting name="1.files" value="**/*.js"/> <setting name="1.files" value="**/*.java"/>
<!-- Example 5: To search in more than one archive with different compressesion kinds is possible, too. Let the baseDirectory empty, set the directory-values to your wished compression like zip: and specify the right path like in the example (with two slashes). The following files will be searched. --> <setting name="baseDirectory" value=""/> <setting name="0.directory" value="zip:c://test/test.zip"/> <setting name="0.files" value="**/*.html"/> <setting name="1.directory" value="jar:c://test/java.jar"/> <setting name="1.files" value="**/*.js"/> <!-- Indeed it is possible to search additionally in a normal directory --> <setting name="2.directory" value="c:/test/"/> <setting name="2.files" value="**/*.zip"/>
For more information and documentation check out the Commons Virtual File System website or the Commons VFS API website.
Table of Contents
OpenSAGA has an extensive set of actions that provide high level functionality hiding the complexity for the most common use cases in web application modeling. An action executes on defined input parameters, which are, depending on the type of action, constant values, references to other models or context values. It returns an action result that indicates a success or a failure.
Actions are always contained within an action list. The list has to contain at least one action.
You can specify a filter-specification that determines if the action list
should be executed. See Chapter 21, The Filter Models for more information.
There are two different kinds of actions. The simple actions (see the section called “Simple Actions”) that provide literally simple functionality and multi actions (see the section called “Multi Actions”) that handle more complex functionality even on lists of objects.
You can specify a filter-specification that determines if the action
should be executed. If the action uses a filter itself, it can be specified by using
with-filter (that contains another filter-specification).
Example 20.1. Filter Specifications Used By Action
<action-list>
<delete-by domain-type-ref="...">
<filter-specification ... />
<with-filter>
<filter-specification ... />
</with-filter>
</delete-by>
</action-list>
The following simple actions are predefined:
Adds domain objects to a scoped domain object list defined by the list-ref attribute.
Either a scoped domain object or a list of new objects that can be configured in the action
will be added to the list. It is possible to specify where to insert the object into the list by
the index attribute. If no index is specified, the object will be added
to the end of the list.
Table 20.1. Attributes of AddToListAction
| Attribute | Description |
|---|---|
list-ref
| Defines the scoped domain object list to that the domain object is added (see the section called “List references”). |
scoped-domain-object-ref
| Defines the scoped domain object that is added to the list (see the section called “Object references”). |
index
| Specifies the index where to add the object. |
Table 20.2. Children of AddToListAction
| Child | Description |
|---|---|
new-object
| Defines a new domain object that is added to the list. |
The following example shows how to add a scoped domain object to a list at a given index.
Example 20.2. AddToListAction: Adding a scoped domain object
<add-to-list list-ref="scoped.list" scoped-domain-object-ref="scoped.object" index="1" />
The AddToListAction supports also the possibility to add objects that are created inside the action.
Therefore you have to define new-object children. Each child represents a single object. The domain type
of the object is specified by domain-type-ref. It is possible to set properties of these objects. For that
a property-mappings is necessary. Each property-mapping sets one property. The target-ref
specifies which property is set and the value attribute defines the value that is set. Following example
shows how to add three new objects to a list.
Example 20.3. AddToListAction: Adding new objects to a list
<add-to-list list-ref="p_reference_to_scoped_list_element.list"> <new-object domain-type-ref="domain.a"> <property-mappings> <property-mapping target-ref="domain.a.name" value="First Object" /> </property-mappings> </new-object> <new-object domain-type-ref="domain.a"> <property-mappings> <property-mapping target-ref="domain.a.name" value="Second Object" /> </property-mappings> </new-object> <new-object domain-type-ref="domain.a"> <property-mappings> <property-mapping target-ref="domain.a.name" value="Third Object" /> </property-mappings> </new-object> </add-to-list>
This action executes a predefined action list that are defined in the portal model or a process model (for more information see the section called “Action List Set”).
Table 20.3. Attributes of CallAction
| Attribute | Description |
|---|---|
action-list-ref
| References the action list that is executed by this action. |
To execute a predefined action list you have just to reference it by its id as shown in the following example (assuming a action list with the id 'portal.p_script.python.action' is defined).
Example 20.4. CallAction: Execute a action list
<call action-list-ref="portal.p_script.python.action" />
The connect action connects two domain objects with each other. To connect two domain objects a relation model between the two domain type models must exists. For more information about relation models see the section called “The Relation Model”.
Table 20.4. Attributes of ConnectAction
| Attribute | Description |
|---|---|
source-ref
| References the source domain object. The type of the object must be the start domain type of the using relation model. |
target-ref
| References the target domain object. The type of the object must be the end domain type of the using relation model. |
relation-ref
| Specify which relation model is used for connecting the domain objects. |
mode
|
The following modes are available:
|
The connect action can work in one of the following ways:
Connect one object to another:
<connect source-ref="..." target-ref="..." relation-ref="..."/>
Connect one source object to each of the listed objects (connecting source to the list elements via the given relation):
<connect source-ref="..." relation-ref="..."> <filtered-list> ... </filtered-list> </connect>
Connecting each list element to the target object via the given relation:
<connect target-ref="..." relation-ref="..."> <filtered-list> ... </filtered-list> </connect>
Current special case: If neither source nor target reference are defined, this case is executed and the target object is RequestContext.getTargetDomainObject
Deletes either the current domain object (either logically or physically
depending on the deletion mode) or domain objects related with the current
domain object, when a relation-chain-list is specified. The
delete action provides also cascading deletion. When the cascade
attribute is set to true, all domain objects of the relation chain inclusive
the current domain object are deleted
Table 20.5. Attributes of DeleteAction
| Attribute | Description |
|---|---|
cascade
|
Defines whether the objects of the relation chain are deleted
cascaded (true) or only the last objects of the
relation chain are deleted (false). The default
value is false.
|
Table 20.6. Children of DeleteAction
| Child | Description |
|---|---|
relation-chain-list
| Defines a relation chain list. All objects that are related with the current domain object via this relation chain list will be deleted. |
Following example shows how to delete the current domain object.
Following example shows how to delete related domain object. In the process
only the domain objects of the last relation of each specified relation chain
will be deleted. For the example it means that all domain object of type c
that are related to a b domain object which is again related to the current
domain object (of type a) will be deleted.
Example 20.6. Deletes related domain objects
<action-list>
<delete>
<relation-chain-list>
<relation-chain>
<relation-reference relation-ref="portal.domain.a.relation.b" />
<relation-reference relation-ref="portal.domain.b.relation.c" />
</relation-chain>
</relation-chain-list>
...
</delete>
</action-list>
To delete all objects of the relation chain described in the example above, you have to
set the cascade attribute to true. In this way all connected domain objects
of domain type c and b and the root domain object are deleted.
Example 20.7. Deletes domain objects cascaded
<action-list>
<delete cascade="true">
<relation-chain-list>
<relation-chain>
<relation-reference relation-ref="portal.domain.a.relation.b" />
<relation-reference relation-ref="portal.domain.b.relation.c" />
</relation-chain>
</relation-chain-list>
...
</delete>
</action-list>
Deletes domain objects of a given type (either logically or physically depending on the deletion mode). If a filter specification is provided to the action only the objects that match the filter are deleted, otherwise all objects are deleted.
Table 20.7. Attributes of DeleteByAction
| Attribute | Description |
|---|---|
domain-type-ref
| Defines the domain type of the domain objects that are deleted by this action. |
Table 20.8. Children of DeleteByAction
| Child | Description |
|---|---|
with-filter
| Defines a filter. Only the objects that match the filter are deleted. |
The following example shows how to delete all objects of a given domain type.
Example 20.8. DeleteByAction: Delete all domain objects of a given type
<delete-by domain-type-ref="domain.location"/>
Example 20.9. DeleteByAction: Delete domain objects with a given filter specification
<delete-by domain-type-ref="domain.location"> <with-filter> <filter-specification> <starts-with> <property-value property-ref="domain.location.zip"/> <constant value="4" /> </starts-with> </filter-specification> </with-filter> </delete-by>
Disconnects a source domain object (either the current domain object or a referenced domain object) from another domain objects. Thereby you can disconnect the source domain object either from a specified domain object or from a set of directly or indirectly related domain objects.
Table 20.9. Attributes of DisconnectAction
| Attribute | Description |
|---|---|
source-object-ref
| Defines the source object. References a cached domain object (see the section called “Object references”). If no source object is defined the current domain object is used as source object. |
target-object-ref
|
Defines the target object that is disconnect from the source object.
References a cached domain object (see the section called “Object references”).
This attribute will be ignored when a relation-chain-list is specified.
|
relation-ref
|
Defines the relation between the source and target object. This
attribute will be ignored when a relation-chain-list is
specified.
|
Table 20.10. Children of DisconnectAction
| Child | Description |
|---|---|
relation-chain-list
| Defines a list of relation chains. The action disconnects the domain objects related to the source object through the relation chains from the source object. Only the objects of the last relation of every chain will be disconnected. |
Following example shows how to disconnect the current domain object from a specified domain object.
Example 20.10. Disconnects the current domain object from a specified object
<action-list>
<disconnect target-object-ref="object.ref.b"
relation-ref="portal.domain.a.relation.b" />
</action-list>
Following example shows how to disconnect a cached domain object from a another one.
Example 20.11. Disconnects a cached domain object from a another one
<action-list>
<disconnect source-object-ref="object.ref.a"
target-object-ref="object.ref.b"
relation-ref="portal.domain.a.relation.b" />
</action-list>
To disconnect the current domain object from a set of related domain objects, you have
to specify a relation-chain-list with containing relation-chains.
Only the last domain objects of each relation chain (so the domain objects that are related by the
last relation model) are disconnected.
Example 20.12. Disconnect the current domain object from a set of related domain objects
<action-list>
<disconnect>
<relation-chain-list>
<relation-chain>
<relation-reference relation-ref="portal.domain.a.relation.b" />
<relation-reference relation-ref="portal.domain.b.relation.c" />
</relation-chain>
</relation-chain-list>
...
</disconnect>
</action-list>
Custom business logic preferrably will be embedded into a OpenSAGA project by using the execute action. The following
example shows two different ways of executing scripts, other means also are available - see the full attribute reference below.
<action-list>
<execute action-script="System.out.println('HelloG')"/>
<execute action-script="System.out.println(new StringBuilder()
.append('H').append('e').append('l')
.append('l').append('o')
.append('B').toString());"
scripting-dialect="bsh"/>
</action-list>
Table 20.11. Attributes of ExecuteAction
| Attribute | Description |
|---|---|
action-bean |
Defines the name of a Spring configured bean implementing the org.opensaga.runtime.model.action.Action
interface. This class is permitted to implement arbitrary business logic. Database operations run within the enclosing transaction
of the action list.
|
action-class |
Defines the fully qualified class name of a class implementing the
Additionally the class will be initialized by executing the
In summary you usually will be better of using the |
action-script |
Contains an inline script implemented in the given scripting-dialect (see that attribute).
This script is permitted to implement arbitrary business logic. Database operations run within the enclosing transaction
of the action list.
|
scripting-dialect |
Defines a valid scripting dialect (the section called “Supported Scripting Dialects”) to use for executing the
action-script defined for this action. May only be used in conjunction with the
action-script attribute. If no specific dialect is specified by this dialect, by default
the Groovy scripting language will be used.
|
The ImportAction provides importing data to a domain type from
either another domain type (the section called “Domain type import”) or a xml
resource (the section called “XML import”). Following sections describe the
different options and modes of importing.
Table 20.12. Attributes of ImportAction
| Attribute | Description |
|---|---|
from-domain-type-ref
| Defines the domain type from that the data are imported. If this attribute is specified, the domain type importing is used (see the section called “Domain type import”). |
to-domain-type-ref
| Defines the domain type that is used for storing the data. |
import-mode
|
Defines if the import shall either 'replace' or 'update'
the data in the to-domain-type. (see
the section called “Import Mode”).
|
from-resource
|
Defines the xml resource from that the data are imported
via the script defined in the script attribute.
This attribute is only used, when no from-domain-type-ref
is specified (see the section called “XML import”).
|
script
|
Defines the path to the script that implements the importing of the
xml data that are defined in from-resource.
|
scripting-dialect
| Defines the dialect of the importing script. |
The ImportAction provides two import modes 'replace' and
'update'. The default mode is 'update'.
The 'replace' mode deletes all domain objects of the domain type defined
in to-domain-type-ref and then imports the data.
The 'update' mode checks first if the importing data set already exists by searching a domain object with the same primary key. If a domain object exists, the domain object will be updated, otherwise a new one will be created.
![]() | Important |
|---|---|
|
When the import mode is 'update' the primary key of the |
For importing data from another domain type, you have to specify the domain type
of the importing domain objects in the from-domain-type-ref. Furthermore
a property mapping is required that defines which property value of the from-domain-type
is stored in which property of the to-domain-type. The PropertyMappingsModel
is defined within a MappingModel. Following an example import is shown:
Example 20.13. ImportAction: import from a domain type
<import import-mode="replace" from-domain-type-ref="domain.location" to-domain-type-ref="domain.import_target" > <mapping> <property-mappings> <property-mapping source-ref="domain.location.guid" target-ref="domain.import_target.guid"/> <property-mapping source-ref="domain.location.code_uni" target-ref="domain.import_target.code_uni"/> <property-mapping source-ref="domain.location.longitude" target-ref="domain.import_target.longitude"/> <property-mapping source-ref="domain.location.latitude" target-ref="domain.import_target.latitude"/> <property-mapping source-ref="domain.location.location" target-ref="domain.import_target.location"/> <property-mapping source-ref="domain.location.zip" target-ref="domain.import_target.zip"/> <property-mapping source-ref="domain.location.country_fk" target-ref="domain.import_target.country"/> </property-mappings> </mapping> </import>
For importing data from a XML resource, you need to write a script
that creates the object from the data. The script
attribute defines the path to the import script. In the from-resource
you define the XML resource that should be imported. The definition of
the ImportAction may look like this:
Example 20.14. ImportAction: import from a XML resource
<import import-mode="replace" from-resource="/actionscripts/groovy/importsearch.xml" script="/actionscripts/groovy/importsearch.groovy" scripting-dialect="groovy" to-domain-type-ref="domain.search"/>
![]() | Note |
|---|---|
|
In OpenSAGA 'groovy' is the default scripting dialect. So when using groovy scripts, it is not necessary to specify the scripting dialect separately. |
The import script is necessary for creating and filling the DomainObjects.
Therefore the script has access to the XML resource and some other objects. All created
DomainObjects have to be stored in the 'result' list, otherwise the objects
will not be imported. The table below shows the predefined objects for import scripts.
Additionally you have access to all beans that are provided by the ScriptContextInitializationService,
see the section called “What to use?”.
Table 20.13. Predefined objects in import scripts
| Object | Description |
|---|---|
dom
|
The XML from-resource as a
org.opensaga.runtime.scripting.groovy.GroovyXmlNode
object (see the section called “GroovyXmlNode”).
|
source
|
The XML from-resource as a
groovy.util.slurpersupport.GPathResult object.
|
result
|
An empty list of DomainObjects. The script has to add all
DomainObjects to this list that shall be imported. After
script execution all objects in this list are stored.
|
<?xml version="1.0" encoding="utf-8"?>
<searches>
<search>
<query>Test</query>
<offset>0</offset>
<count>10</count>
</search>
<search>
<query>Foo</query>
<offset>100</offset>
<count>10</count>
</search>
<search>
<query>blub</query>
<offset>23</offset>
<count>7</count>
</search>
<search>
<query>Bar</query>
<offset>50</offset>
<count>78</count>
</search>
<search>
<query>QWERTZ</query>
<offset>987</offset>
<count>123</count>
</search>
</searches>
Example 20.15. ImportAction: example import script with GPathResult
source.search.each() {
def search = domaintype.Search.create()
search.query = it.query
search.count = Integer.parseInt(it.count.text())
search.offset1 = Integer.parseInt(it.offset.text())
result.add(search)
}
Example 20.16. ImportAction: example import script with GroovyXmlNode
def searchNodes = dom.xpath("searches/search");
for(searchNode in searchNodes)
{
def search = domaintype.Search.create()
search.query = searchNode.query
search.count = Integer.parseInt(searchNode.count)
search.offset1 = Integer.parseInt(searchNode.offset)
result.add(search)
}
The org.opensaga.runtime.scripting.groovy.GroovyXmlNode enables
easy accessing XML content in groovy scripts. Accessing nodes is enabled
via XPath expressions and node context accessing is enabled via property
accessing.
Accessing nodes
To access nodes, you have to use the xpath method, which returns a list of GroovyXmlNodes.
Example 20.17. GroovyXmlNode: Accessing nodes
def nodes = groovyXmlNode.xpath("/rootnode/childnode")
Accessing values
To access the text content of child nodes, you treat them like properties:
org.w3c.dom.Node.getNodeValue()) or text content
(org.w3c.dom.Node.getTextContent()) of the current node, you have to use the
methods getValue() and getText().
Example 20.20. GroovyXmlNode: Accessing current node value
groovyXmlNode.getValue() groovyXmlNode.getText()
Creates a new cached/target domain object or cached domain object list. If a reference to a cached domain object or list is specified, then the new domain object will be put into the specified scope, otherwise the new domain object is used as target domain object.
Table 20.14. Attributes of NewAction
| Attribute | Description |
|---|---|
scoped-domain-object-ref
| Creates a new cached domain object for the given reference (see the section called “Object references”). |
scoped-domain-object-list-ref
| Creates a new cached domain object list for the given reference (see the section called “List references”). |
Example 20.22. NewAction: Creating a cached domain object
<new scoped-domain-object-ref="scoped.object"/>
Example 20.23. NewAction: Creating a cached domain object list
<new scoped-domain-object-list-ref="scoped.list" />
Removes a cached domain object from its scope. The domain object is not deleted in the database.
Table 20.15. Attributes of RemoveAction
| Attribute | Description |
|---|---|
scoped-domain-object-ref
| Defines the object that is removed from its scope. |
The example shows how to remove a cached domain object from its scope (assuming
p_temporary_scoped.bar_temp is a scoped domain object).
Example 20.24. RemoveAction: Remove a cached object from its scope
<remove scoped-domain-object-ref="p_temporary_scoped.bar_temp"/>
Removes a cached domain object list from its scope. The domain objects of the list are not deleted in the database.
Table 20.16. Attributes of RemoveListAction
| Attribute | Description |
|---|---|
scoped-domain-object-list-ref
| Defines the cached list that is removed from its scope. |
The example shows how to remove a cached domain object list from its scope (assuming
p_temporary_scoped.bar_temp_list is a scoped domain object list).
Example 20.25. RemoveListAction: Remove a cached list from its scope
<remove-list scoped-domain-object-list-ref="p_temporary_scoped.bar_temp_list"/>
Resets either the cache with the given name or all caches when no name is specified.
Table 20.17. Attributes of ResetCacheAction
| Attribute | Description |
|---|---|
name
| Defines the name of the cache that is reseted. |
name-ref
| Defines the reference to a property that contains the name of the cache that is reseted. |
The following example shows how to reset all caches.
system.cache.permissions cache.
The action resets all translations. That is necessary when you specify new translations. The new translation are not active until the translations are reseted.
This action sends the outgoing e-mails that are enqueued by the email action (see ???). The action sends the mails either of from a specified mail service or from all mail services.
Table 20.18. Attributes of SendOutgoingEmailsAction
| Attribute | Description |
|---|---|
mail-service-ref
| Defines the mail service that is used. |
The following example shows how to send the outgoing mails of the mail.service.default mail service.
Example 20.29. SendOutgoingEmailsAction: Sending the outgoing emails
<send-outgoing-emails mail-service-ref="mail.service.default" />
Sets programmatically the active navigation item that is referenced by the
navigation-item-ref attribute.
Example 20.30. SetActiveNavigationAction: Sets programmatically the active navigation item
<set-active-navigation navigation-item-ref="navigation.sandbox.a" />
Table 20.19. Attributes of SetActiveNavigationAction
| Attribute | Description |
|---|---|
navigation-item-ref
| Defines the navigation item that is highlighted by this action. The navigation item needs a id for referencing it. |
The following example shows how to active a special navigation item.
Example 20.31. SetActiveNavigationAction: Active a navigation item programmatically
<set-active-navigation navigation-item-ref="navigation.qs_test.p_navigation_highlight.item.a" />
Sets a given property to a new value. Either the property is set in the current domain object or in a set of domain objects related with the current domain object. The following values can be set:
Constant value
Value from a property
Computed value by a property value provider bean
Computed value by a script
Table 20.20. Attributes of SetPropertyValueAction
| Attribute | Description |
|---|---|
property-ref
| The reference to the property that is set by this action. |
property-value
|
A constant value that is set by this action.
Only if no source-property-ref
is specified, this value will be used.
|
source-property-ref
|
The reference to a property of the current domain
object. The value of this property is set in the
property defined by property-ref.
|
value-property-ref
|
Synonym for source-property-ref
|
property-value-provider-bean
| Define a property value provider bean that is used for setting the value. |
value-script
| Defines a script that computes the value to set. |
value-script-resource
| Defines a resource that contains a script that computes the value to set. |
value-scripting-dialect
|
Defines the scripting dialect for the script of the value-script
or value-script-resource attribute.
|
Table 20.21. Children of SetPropertyValueAction
| Child | Description |
|---|---|
relation-chain-list
|
Defines a list of relation-chains. The value is set in
the domain objects of the last relation of every specified
relation-chain. If no relation-chain-list
is defined, the value is set in the current domain object.
|
The set property value action can works in the following ways:
Setting a constant value
Example 20.32. SetPropertyValueAction: Setting a constant constant value in the current domain object
<set-property-value property-ref="domain.a.name" property-value="Test" />
Setting the value of a property of the current domain object in a set of related domain objects.
Example 20.33. SetPropertyValueAction: Setting a value of another property in a set of domain objects
<set-property-value property-ref="domain.c.name" source-property-ref="domain.a.name"> <relation-chain-list> <relation-chain> <relation-reference relation-ref="portal.domain.a.relation.b" /> <relation-reference relation-ref="portal.domain.b.relation.c" /> </relation-chain> </relation-chain-list> </set-property-value>
Setting a value that is computed by a property value provider bean
Example 20.34. SetPropertyValueAction: Setting a value with a property value provider bean
<set-property-value property-ref="domain.a.guid" property-value-provider-bean="guidPropertyValueProvider" />
Setting a value that is computed by a script resource. The script file must be in the
/extensions/[extensions-name]/actionscripts/[dialect-name]/ folder.
Example 20.35. SetPropertyValueAction: Setting a value with a property value provider bean
<set-property-value property-ref="domain.a.guid" value-script-resource="test.js" scripting-dialect="javascript" />
![]() | Note |
|---|---|
|
Alternative you can define the script directly in the xml file by using the |
Transforms data of the current domain object. The action needs two property references. One for reading the input data and the other for writing the transformed data. The transformation that is performed on the data is defined in a transformer-list (see chapter 'Chapter 26, Transformation' ).
![]() | Warning |
|---|---|
|
At the moment, there is a problem, when none xml data are
transformed. For script and bean condition the data is provided
as an |
Table 20.22. Attributes of TransformAction
| Attribute | Description |
|---|---|
source-property-ref
| Defines the property to read the data from for the transformation. |
target-property-ref
| Defines the property to write the transformed data into. |
Example 20.36. TransformAction
<transform source-property-ref="sandbox.transform.attachment" target-property-ref="sandbox.transform.transformed"> <transformer-list> <transformer id="replace.zahl" condition-script="/models/services/web-services/exampleCondition.groovy" transformation-bean="exampleTransformation" /> </transformer-list> </transform>
![]() | Note |
|---|---|
|
There is a special behavior when the property type is 'Attachment'. If the source is an attachment, the content of the file will be read from the attachement for transforming. If the target is an attachment, the transformed data will be written into the attachment. |
Validates a given domain object (either the target domain object or a given scoped domain object). The action checks all restrictions that are defined in the domain type of the domain object.
Table 20.23. Attributes of ValidateAction
| Attribute | Description |
|---|---|
scoped-domain-object-ref
|
Defines the scoped domain object that is validated by this action.
If no scoped-domain-object-ref is specified the target
domain object will be used. See also the section called “Object references”.
|
Example 20.38. ValidateAction: Validating a scoped domain object
<validate scoped-domain-object-ref="validate.object" />
Allows to programmatically define validation errors.
![]() | Warning |
|---|---|
|
Currently this action does not correctly adjust the domain context path if the following state is a back state. |
Table 20.24. Attributes of ValidateErrorAction
| Attribute | Description |
|---|---|
content-element-ref
| The optional ID of a content element to which the error is attributed. See Chapter 22, Content Elements for details about possible content elements. |
text
| The text tag which represents the translated error text. |
Example 20.39. ValidationErrorAction
<validation-error text="GenericError"/> <validation-error content-element-ref="sandbox.p_view_validation.view.input" text="SpecificError"/>
This action calls a web service and stores the result. Because this action is more complicated it is described in a separated chapter. So for more information see Chapter 24, Web Service Clients.
A multi action provides performing actions on a list of DomainObjects. For each
domain object in the list the action will be performed. The list can be either a scoped list
or a filtered-list. To reference a scoped list you specify the scoped list id in
the attribute list-ref. To use a filtered list the list has to be specified as
child tag. If no list is specified the action is only executed one time (as a single action).
The domain object that is used by the action is either a scoped domain object that is specified
by the object-ref attribute or the target domain object, if none scoped domain object
is specified.
Table 20.25. Attributes of all multi actions
| Attribute | Description |
|---|---|
list-ref
| References the scoped list for this multi action (see the section called “List references”). |
object-ref
| References the scoped object for this multi action (see the section called “Object references”). |
A filtered list is a list of domain object either from the domain object repository or from
a scoped list. The list can be manipulated e.g. filtered by a filter-specification
or sorted by a sort-order-model. Following tables show the attributes and children
of the filtered-list.
Table 20.26. Attributes of filtered-list
| Attribute | Description |
|---|---|
domain-type-ref
|
The filtered list uses all domain objects of the domain type defined by
this attribute that are in the domain object repository, when no
scoped-domain-object-list-ref is specified.
|
scoped-domain-object-list-ref
| References the scoped list that is used by the filtered list (see the section called “List references”). |
max-size
|
Specifies the maximum size of this list. When there are more than max-size
domain objects, only the first max-size elements are used. If no max size is
specified or max-size is -1, then all elements are used.
|
Table of Contents
The following sections describe some filters available in OpenSAGA:
The IsDefinedFilter checks if a given value (see the section called “Values”),
a cached domain object or a cached domain object list is defined (that it is not
null). Therefore either a value (as child) or a scoped domain object
reference or a scoped domain object list reference (as attribute) must be defined.
Table 21.1. Attributes of is-defined-filter
| Child/Attribute | Description |
|---|---|
value (child)
| A value that is checked if it is defined. Possible values are documented in the section called “Values”. |
scoped-domain-object-ref
| Defines a reference to a scoped object. The filter checks if the referenced object is defined. That means that the reference points to a object and not to null. |
scoped-domain-object-list-ref
| Defines a reference to a scoped object list. The filter checks if the referenced list is defined. That means that the reference points to a list and not to null. |
The following example shows how to check that a value of a property is not
null. The example check if the property with the id local.name
of the current object is not null.
Example 21.1. IsDefinedFilter: Checking a value
<is-defined>
<property-value property-ref="local.name"/>
</is-defined>
null.
The example checks that the cached domain object with the id p_example.obj
is not null.
Example 21.2. IsDefinedFilter: Checking a cached domain object
<is-defined scoped-domain-object-ref="p_example.obj"/>
null.
The example checks that the cached domain object list with the id p_example.list
is not null.
Example 21.3. IsDefinedFilter: Checking a cached domain object list
<is-defined scoped-domain-object-list-ref="p_example.list"/>
The IsUndefinedFilter checks if a given value (see the section called “Values”),
a cached domain object or a cached domain object list is undefined (that it is
null). Therefore either a value (as child) or a scoped domain object
reference or a scoped domain object list reference (as attribute) must be defined.
Table 21.2. Attributes of is-undefined-filter
| Child/Attribute | Description |
|---|---|
value (child)
| A value that is checked if it is undefined. Possible values are documented in the section called “Values”. |
scoped-domain-object-ref
| Defines a reference to a scoped object. The filter checks if the referenced object is undefined. That means that the reference points to null. |
scoped-domain-object-list-ref
| Defines a reference to a scoped object list. The filter checks if the referenced list is undefined. That means that the reference points to null. |
The following example shows how to check that a value of a property is
null. The example check if the property with the id local.name
of the current object is null.
Example 21.4. IsUndefinedFilter: Checking a value
<is-undefined>
<property-value property-ref="local.name"/>
</is-undefined>
null.
The example checks that the cached domain object with the id p_example.obj
points to null.
Example 21.5. IsUndefinedFilter: Checking a cached domain object
<is-undefined scoped-domain-object-ref="p_example.obj"/>
null.
The example checks that the cached domain object list with the id p_example.list
points to null.
Example 21.6. IsUndefinedFilter: Checking a cached domain object list
<is-undefined scoped-domain-object-list-ref="p_example.list"/>
The IncludeFilter provides the possibility to include a FilterSpecification
within another. The resulting filter will be executed in the same way as if you would write the
filter directly into the FilterSpecification. This can be very useful, if you use
one and the same filter several times or you want to have a common filter that you can extend
with some more filter rules.
A FilterSpecification that should be included by other filters has to be defined
either in the PortalModel (see the section called “Filter Specification Set”),
in a ProcessModel or in a ViewModel within a filter-specification-set.
![]() | Important |
|---|---|
|
The search order for filter specifications is: view, process and portal. |
Example 21.7. Defining a filter within a filter specification set
<filter-specification-set>
<filter-specification id="filter1">
...
</filter-specification>
</filter-specification-set>
The example below shows how you can include the FilterSpecification
that is defined above.
Example 21.8. Including a filter from a filter specification set
<filter-specification>
<include filter-specification-ref="filter1"/>
</filter-specification>
Because the IncludeFilter is like any other Filter, you can use it
within other filters like and, or and so on. So you
can extend the filter easily.
Example 21.9. Including and extending a filter specification
<filter-specification>
<and>
<include filter-specification-ref="filter1"/>
...
</and>
</filter-specification>
Table 21.3. Attributes of the IncludeFilter
| Attribute | Description |
|---|---|
filter-specification-ref
|
Defines the FilterSpecification that
is included by this filter.
|
The HasElementsFilter checks whether a list has elements.
The list can be either a scoped domain object or a loaded list from
the database.
Table 21.4. Attributes of HasElementsFilter
| Attribute | Description |
|---|---|
scoped-domain-object-list-ref
| Defines a scoped list that is checked by this filter. |
domain-type-ref
| Loads a list of domain objects from the database with the defined domain type. This loaded list is checked by this filter. |
Table 21.5. Children of HasElementsFilter
| Child | Description |
|---|---|
filter-specification
|
Defines a filter specification that filters the
loaded domain objects from the database.
Important: This
filter specification is only used in combination
with the domain-type-ref attribute.
|
The HasElementsFilter can be used in following ways:
To check whether a scoped list has elements.
Example 21.10. HasElementsFilter: Checking a scoped list
<has-elements scoped-domain-object-list-ref="my.list" />
To check whether a list of loaded domain objects of the given domain type has elements.
Example 21.11. HasElementsFilter: Checking a scoped list
<has-elements domain-type-ref="domain.type.model" />
To check whether a list of loaded domain objects of the given domain model that satisfy the given filter specification has elements.
Example 21.12. HasElementsFilter: Checking a scoped list
<has-elements domain-type-ref="system.domain.user"> <filter-specification> <equals> <property-value property-ref="system.domain.user.login" /> <property-value property-ref="system.domain.proposed_user.login" /> </equals> </filter-specification> </has-elements>
The following expression defines a constant value:
<constant value="true"/>Values are logical values (Chapter 7, Defining Logical Values For Properties). The following attributes are supported for
constant:
Table 21.6. Attributes of Constant Filter
| Attribute | Description |
|---|---|
value | Defines a logical value. |
value-provider-bean |
Defines a Spring configured bean ID for a bean of Type org.opensaga.runtime.model.domain.properties.PropertyValueProvider
which then is reponsible for converting the default-value attribute value to a real value. OpenSAGA also provides
some default implementations for specific template based value providers (Chapter 8, Property Value Providers).
|
Table of Contents
OpenSAGA provides a wide range of content elements that can be used within view definitions. The elements are used as tags. This chapter will deal with the various elements.
The following tags can be used within a part section. There can be declared an ID for each tag. Some tags relate on each other, communicating using these IDs.
This tag defines an attachment related content element. E.g. for uploading some binary document.
Example 22.1. Attachment Element
<attachment id="attachment" property-ref="domain.test.attachment" display-mode="upload"/>
Table 22.1. Attributes of Attachment Content Element
| Attribute | Description |
|---|---|
id | Defines the view related ID. Relation to other content elements is based on this one. This attribute is optional - if not specified an automatic ID will be calculated. |
property-ref | Specifies the property this element shall be linked to. It must be a valid domain property UID. The property's type must be 'Attachment'. |
display-mode |
Defines the mode of the attachment element.
Valid modes are embed, link, edit and upload
(see AttachmentDisplayMode for reference).
|
This tag provides a checkbox ('selected' vs. 'unselected') element.
Example 22.2. Checkbox Element
<checkbox id="positionOrdered" property-ref="domain.position.ordered"/>
Table 22.2. Attributes of CheckBox Content Element
| Attribute | Description |
|---|---|
id | Defines the view related ID. Relation to other content elements is based on this one. This attribute is optional - if not specified an automatic ID will be calculated. |
property-ref | Specifies the property this element shall be linked to. It must be a valid domain property UID. The property's type must be 'Boolean'. If no value is set, this will be interpreted as 'false'. |
This tag produces a list of all registered error messages that are not bound to a tag. Only will be rendered if one relevant message is present at least.
Table 22.3. Attributes of ErrorMessageList Content Element
| Attribute | Description |
|---|---|
title-tag | If rendering (at least one relevant message is present) an additional title tag with the given text key will be produced. |
This tag provides an external link.
Example 22.4. External Link Element
<external-link target="_blank" text="An External Link" url="http://www.google.com"/>
Table 22.4. Attributes of ExternalLink Content Element
| Attribute | Description |
|---|---|
id | Defines the view related ID. Relation to other content elements is based on this one. |
targett | Specifies the HTML target attribute. |
text | Specifies the text key to specify the displayed link text. |
url | Specifies the link URL. |
This tag defines a label for another content element.
Example 22.5. Label Element
<label value="Name" target-ref="personName"/> <text-field id="personName" property-ref="domain.person.name"/>
Table 22.5. Attributes of Label Content Element
| Attribute | Description |
|---|---|
id | Defines the view related ID. Optional - if not given a default one will be calculated. |
value | Defines the label text key. |
target-ref | The related content element's ID. |
This tag defines 'multi-connect' selection UI element. The component contains to lists (selected, not selected) and buttons to move one or more items from one list to the other one. It can be used for assignments. The assignment relation is be defined via a relation chain.
Example 22.6. Multi Connect Element
<multi-connect
id="users"
display-property-ref="system.domain.user.login"
size="10"
selected-heading="Assigned Users"
unselected-heading="Unassigned Users"
>
<relation-chain>
<relation-reference
relation-ref="domain.project.relation.system.domain.user"/>
</relation-chain>
</multi-connect>
Table 22.6. Attributes of MultiConnect Content Element
| Attribute | Description |
|---|---|
id | Defines the view related ID. Relation to other content elements is based on this one. This attribute is optional - if not specified an automatic ID will be calculated. |
object-relative | Decides if this assignment shall be relative to the current domain object that will be used as parent. Valid values are 'true' and 'false'. |
display-property-ref | Specifies the assignable domain type's property to be used for representation. |
size | Specifies the number of visible rows (vertical size of the lists). |
selected-heading | Specifies the title key for the list of selected items. |
unselected-heading | Specifies the title key for the list of unselected items. |
Table 22.7. Sub Elements
| Element | Description |
|---|---|
relation-chain | Defines the relation related to the realizing assignment. |
This tag provides an element for hidden password typing.
Table 22.8. Attributes of Password Content Element
| Attribute | Description |
|---|---|
id | Defines the view related ID. Relation to other content elements is based on this one. This attribute is optional - if not specified an automatic ID will be calculated. |
property-ref | Specifies the property this element shall be linked to. It must be a valid domain property UID. The property's type must be 'Password' or 'PlainText'. |
This tag defines an HTML-editor.
Example 22.8. Rich Text Field Element
<rich-text-field id="itemDescription" property-ref="domain.item.description"/>
Table 22.9. Attributes of RichTextField Content Element
| Attribute | Description |
|---|---|
id | Defines the view related ID. Relation to other content elements is based on this one. This attribute is optional - if not specified an automatic ID will be calculated. |
property-ref | Specifies the property this element shall be linked to. It must be a valid domain property UID. The property's type must be 'RichText'. |
rich-text-configuration |
Specifies the configuration to use. Optional.
The requested configuration must have been registered in the
richtextConfigurationRepository-bean.
|
This tag defines a drop down list. It can either be based on constant enumeration types or on domain relations.
Example 22.9. Select Field Element (Using an Enumeration Type)
<select-field id="select" property-ref="domain.workingstep.timeUnit_id" select-domain-type-ref="domain.enum_timeunit" value-property-ref="domain.enum_timeunit.id" display-property-ref="domain.enum_timeunit.unit" empty-selection-allowed="false"/>
Table 22.10. Attributes of SelectField Content Element
| Attribute | Description |
|---|---|
id | Defines the view related ID. Relation to other content elements is based on this one. This attribute is optional - if not specified an automatic ID will be calculated. |
property-ref | Specifies the property this element shall be linked to. It must be a valid domain property UID. |
select-domain-type-ref | Specifies the domain type of the selectable items. |
value-property-ref | Specifies the domain type property to be used as logical representation. |
display-property-ref | Specifies the domain type property to display (textual representation). |
empty-selection-allowed | Specifies if the user is allowed to select nothing or - otherwise - he is forced to select an entry. Legal values are 'true' and 'false'. |
This tag defines a multi-line text input element.
Example 22.10. Textarea Element
<textarea id="itemDescription" property-ref="domain.item.description"/>
Table 22.11. Attributes of Textarea Content Element
| Attribute | Description |
|---|---|
id | Defines the view related ID. Relation to other content elements is based on this one. This attribute is optional - if not specified an automatic ID will be calculated. |
property-ref | Specifies the property this element shall be linked to. It must be a valid domain property UID. The property's type must be 'PlainText'. |
This tag defines a single line text input element.
Table 22.12. Attributes of Textfield Content Element
| Attribute | Description |
|---|---|
id | Defines the view related ID. Relation to other content elements is based on this one. |
property-ref | Specifies the property this text field shall be linked to. It must be a valid domain property UID. The property's type must be 'PlainText'. |
Table of Contents
OpenSAGA allows the definition of Web Services to provide access to business processes and data. This chapter decribes how to use the existing Web Services and how to create new ones.
Each web service is configured by a XML file in the directory /models/services/web-services/.
Below you can find an example:
Example 23.1. Web service definition
<web-service
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"http://www.opensaga.org/schema/model/web-service-1.0.xsd"
id="portal.w_test">
<web-service-endpoint-reference
name="Test Web Service"
endpoint-bean-ref="testWebService"
url-suffix="holidayService/"
schema="test-web-service.xsd"
port-type-name="Holiday"
wsdl-name="holiday"
request-document-type="HolidayRequest"
authentication-type="digest-password"
/>
</web-service>
The web service definition can contain one or more web-service-endpoint-references.
A description of all endpoint reference attributes can be found in the table below:
Table 23.1. Attributes of Web Service Definition
| Attribute | Description |
|---|---|
name | The logical web service name. |
endpoint-bean-ref |
Defines a reference to a Spring configured bean ID for a bean of type
org.springframework.ws.server.endpoint.PayloadEndpoint.
|
url-suffix |
Defines the URL suffix of the URL that the Web service can be accessed at:
If no URL suffix is specified,
the following value is used: |
schema | Defines the XML schema file that describes the message format that is accepted by the Web service. |
port-type-name | Defines the port type name. |
wsdl-name |
Defines the name of the WSDL file that can be accessed at the URL:
If no WSDL name is specified, the normalized web service name is used for
|
request-document-type | Defines the request document type (the root element of the accepted document format). |
authentication-type |
Defines the authentication type that the web service requires. The following types are
allowed: none, plaintext-password and
digest-password.
|
script | Path to script file that implements the web service endpoint class. |
validate-request | A flag indicating if the request should be validated. |
validate-response | A flag indicating if the response should be validated. |
request-domain-type-ref | Domain type that is mapped to the input document. |
[1] All illegal characters (i.e. not contained in | |
comment element to describe the web service function.
If you want to specify more than one operation for a web service, you can use a web-service-operation-set.
Example 23.2. Web service with multiple operations
<web-service-endpoint-reference name="MultiTest" schema="multi.xsd" <web-service-operation-set> <web-service-operation request-document-type="FirstRequest" script="first.groovy"/> <web-service-operation request-document-type="SecondRequest" endpoint-bean-ref="secondEndpoint"/> <web-service-operation request-document-type="ThirdRequest" request-domain-type-ref="holiday_request"/> </web-service-operation-set> </web-service-endpoint-reference>
Each web-service-endpoint-reference and each web-service-operation-set can
contain a validation-rule-set with a set of validation-rules:
Example 23.3. Validation rules
<web-service-endpoint-reference ...> <validation-rule-set> <validation-rule expression="string-length(/HolidayRequest/Employee/lastName) <= 10" fault-message="lastName maximum length is 10 characters"/> <validation-rule validation-bean="exampleWebServiceValidationBean"/> </validation-rule-set> </web-service-endpoint-reference>
Each validation-rule can either contain a XPath expression and a fault-message
or a validation-bean reference. The validation bean has to be declared in the application context
and it has to implement the interface org.opensaga.runtime.model.service.webservice.WebServiceValidationBean.
If at least one of the validation rules fails, the request is rejected and a corresponding error message is returned.
Each web-service-operation-set can contain a transformer-list with a list of transformers.
The transformation that are defined in the transformers are performed on the incoming request. The request is transformed
after validating the validation rules and before executing the groovy script.
For defining simple and complex transformer-lists see chapter 'Chapter 26, Transformation'.
Example 23.4. Web service endpoint with transformers
<web-service-endpoint-reference name="Test" schema="test-web-service.xsd"> <web-service-operation-set> <web-service-operation request-document-type="" request-domain-type-ref="sandbox.holiday_request"> <transformer-list> <transformer id="change.name" condition="/HolidayRequest/Employee/lastName = 'Mustermann'" transformation="/models/services/web-services/testtransformation.xslt"/> <transformer id="change.start.date" condition="/HolidayRequest/Holiday/endDate = '30.8.2009'" transformation="/models/services/web-services/ChangeStartDate.xslt" stop-condition-bean="exampleCondition"/> <transformer id="change.end.date" transformation="/models/services/web-services/ChangeEndDate.xslt"> <next-transformer transformer-ref="change.start.date" condition="/HolidayRequest/Employee/number = '2'"/> <next-transformer transformer-ref="change.name" /> </transformer> </transformer-list> </web-service-operation> </web-service-operation-set> </web-service-endpoint-reference>
This section describes the definition of Web Services based on Groovy.
In the web service Groovy scripts you have access to some predefined objects listed in the following table.
Additionally you have access to all beans that are provided by the ScriptContextInitializationService,
see the section called “What to use?”.
Table 23.2. Predefined Objects for Groovy Web Service Endpoint Scripts
| Object | Description |
|---|---|
input |
XmlSlurper that provides access to the input XML document
|
dom |
GroovyXmlNode that provides access to the DOM of the input XML document.
|
inputDomainObject |
If a request-domain-type-ref was specified, the inputDomainObject
is an instance of this domain type. All properties are set to the values provided by the
input document. If no request-domain-type-ref is specified, the
inputDomainObject is not available.
|
output |
MarkupBuilder that can be used to return a XML document to the caller of
the web service.
|
The following example shows the usage of the web service infrastructure with a Groovy script. All you
have to do is to provide a schema file (for input/output document type definitions) and a Groovy script.
The purpose of this example web service is to provide a list of all users that are defined in the system.
It uses the existing system domain type User (system.domain.user).
Example 23.5. "all users" web service definition
<web-service-endpoint-reference
name="All Users"
schema="all-users-web-service.xsd"
script="AllUsersGroovyWebServiceEndpoint.groovy">
<comment>
This web service provides a list of all portal users.
</comment>
</web-service-endpoint-reference>
Example 23.6. "all users" web service schema
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:hr="http://www.opensaga.org/schema" elementFormDefault="qualified" targetNamespace="http://www.opensaga.org/schema"> <!-- request --> <xs:element name="AllUsersRequest"/> <!-- response --> <xs:element name="AllUsersResponse"> <xs:complexType> <xs:sequence> <xs:element name="user" type="hr:UserType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="UserType"> <xs:attribute name="active" type="xs:string" use="required" /> <xs:attribute name="lastLogin" type="xs:string" use="required" /> <xs:attribute name="login" type="xs:string" use="required" /> <xs:attribute name="portalUser" type="xs:boolean" use="required" /> <xs:attribute name="superUser" type="xs:boolean" use="required" /> </xs:complexType> </xs:schema>
Example 23.7. "all users" Groovy script
output.AllUsersResponse(xmlns:'http://www.opensaga.org/schema')
{
domaintype.User.all().each
{
user(
login:it.login,
lastLogin:it.lastLogin,
active:it.active,
superUser:it.superUser,
portalUser:it.portalUser
)
}
}
Example 23.8. Example output of the "all users" Groovy script
<AllUsersResponse xmlns="http://www.opensaga.org/schema"> <user active="true" lastLogin="2009-06-22 11:10:59.281" login="admin" portalUser="true" superUser="true"/> <user active="true" lastLogin="2009-06-05 16:20:36.203" login="system" portalUser="false" superUser="false"/> </AllUsersResponse>
Example 23.9. Enhanced "all users" Groovy script
def filter = filterBuilder.specification()
{
eq()
{
propertyref("system.domain.user.portalUser")
constant("true")
}
}
def sortOrder = sortOrderBuilder.sortOrder()
{
propertyref("system.domain.user.lastLogin", desc:"true")
}
output.AllUsersResponse(xmlns:'http://www.opensaga.org/schema')
{
domaintype.User.findBy(filter, sortOrder).each
{
user(
login:it.login,
lastLogin:it.lastLogin,
active:it.active,
superUser:it.superUser,
portalUser:it.portalUser
)
}
}
The default web service endpoint script (DefaultWebServiceEndpoint.groovy) stores the
input domain object (if it is declared).
The default script is used if a request-domain-type-ref is declared, but no script
or endpoint-bean-ref are specified. The schema file holiday-web-service.xsd has
to contain a "Request" element definition for the input document. Each property of the domain type is
automatically mapped to the corresponding tag or attribute by using the property name. E.g. the property
with the name firstName is mapped to the tag firstName in the input document.
Example 23.10. Web service definition without script and endpoint bean
<web-service-endpoint-reference
name="HolidayWebService"
schema="holiday-web-service.xsd"
request-domain-type-ref="holiday_request"
/>
Example 23.11. holiday-web-service.xsd
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:hr="http://www.opensaga.org/schema" elementFormDefault="qualified" targetNamespace="http://www.opensaga.org/schema"> <xs:element name="HolidayRequest"> <xs:complexType> <xs:all> <xs:element name="Holiday" type="hr:HolidayType"/> <xs:element name="Employee" type="hr:EmployeeType"/> </xs:all> </xs:complexType> </xs:element> <xs:complexType name="HolidayType"> <xs:sequence> <xs:element name="startDate" type="xs:string"/> <xs:element name="endDate" type="xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name="EmployeeType"> <xs:sequence> <xs:element name="number" type="xs:integer"/> <xs:element name="firstName" type="xs:string"/> <xs:element name="lastName" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:schema>
Example 23.12. Holiday request domain type
<?xml version="1.0" encoding="UTF-8"?> <domain-type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/model/domain-type-1.0.xsd" id="holiday_request" name="HolidayRequest"> <property-set> <domain-type-property-set> <domain-type-property id="holiday_request.id" name="id" type="Long"/> <domain-type-property id="holiday_request.startDate" name="startDate" type="Date"/> <domain-type-property id="holiday_request.endDate" name="endDate" type="Date"/> <domain-type-property id="holiday_request.number" name="number" type="Integer"/> <domain-type-property id="holiday_request.firstName" name="firstName" type="PlainText"/> <domain-type-property id="holiday_request.lastName" name="lastName" type="PlainText"/> </domain-type-property-set> </property-set> <primary-key> <key property-ref="sandbox.holiday_request.id" generated="true"/> </primary-key> </domain-type>
Table of Contents
OpenSAGA provides the access to external web services. This chapter describes how to create a client in OpenSAGA for calling such a web service.
There are two different kinds of clients you can create with OpenSAGA.
At first a client (DefaultWebServiceClient) that is very
easy and does the web service call almost automatically.
The second client type (GroovyScriptBasedWebServiceClient)
is more flexible and dynamically, but not so simple as the first one.
At the moment the web service clients can only be used as action.
Table 24.1. Web service client action attributes
| Attribute | Description |
|---|---|
domain-type-ref
| Domain Type for storing the response data. |
wsdl-path
| Defines the path to the wsdl file. |
operation-name
| Defines the operation that the client executes. |
target-tag
| Defines the tag name that contains the data for one domain object. When the response message contains a list of domain objects, this attribute is required or otherwise no data will be stored. |
script-path
| Path to a groovy script that implements a web service client. |
Example 24.1. Abstract Web Service Client Action Definition
<view-state state-ref="..."> <transition-list> <transition id="..." target-state-ref="..." description="..."> <action-list> <webservice domain-type-ref="{domain.type}" wsdl-path="{wsdl.path}" operation-name="{operation.name}"/> </action-list> </transition> </transition-list> </view-state>
The DefaultWebServiceClient provides calling a web service via
the wsdl file. It takes the data for the request from a domain type and store
the response data in another domain type. Following the use of the
DefaultWebServiceClient is explained by an example web service.
In the following the use of the DefaultWebServiceClient is
described with a web service for looking up locations by the ZIP code.
The web service is reachable under http://wetter.t-online.de:80/soap.php.
The example shows how to call the 'searchLocationByZIP' Operation.
To create the web service client 4 steps are required:
Making a local copy of the wsdl file
Defining a domain type for the request
Defining a domain type for the response
Configure the web service client as action
The client needs the wsdl file for generating and sending
the request message. At the moment the wsdl is stored local under
models/services/web-services/, so that the file does not
need to be reload again for each call.
For sending the request a domain type is required. How this have to be built depends on the request. So you have to look on the xsl definition in the wsdl file for the request.
<message name="searchLocationByZIPRequest"> <part name="searchstring" type="xsd:string" /> </message>As you see, the operation needs only one parameter. A 'searchstring' which contains the zip code. The corresponding domain type looks like this:
Example 24.2. Domain type for web service request
<?xml version="1.0" encoding="UTF-8"?> <domain-type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/model/domain-type-1.0.xsd" id="domain.zip" name="ZIP"> <property-set> <domain-type-property-set> <domain-type-property id="domain.zip.guid" name="guid" type="Long" /> <domain-type-property id="domain.zip.searchstring" name="searchstring" type="PlainText" /> </domain-type-property-set> </property-set> <primary-key> <key property-ref="domain.zip.guid" generated="true" /> </primary-key> </domain-type>
![]() | Important |
|---|---|
|
If the request contains a tag name multiple times, the value is set in all tags with this name. |
If the request contains optional parameters, the optional tags will not be written in the request when no value exists for it. When for a required parameter no value exists, an empty tag will be written in the request.
To store the response data a domain type is required. Again you have to look at the schema definition in the wsdl file to decide how the domain type is built.
<message name="searchLocationByZIPResponse"> <part name="result" type="tns:ArrayOfLocation" /> </message> ... <xsd:complexType name="ArrayOfLocation"> <xsd:complexContent> <xsd:restriction base="SOAP-ENC:Array"> <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="Location[]" /> </xsd:restriction> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="Location"> <xsd:all> <xsd:element name="code_uni" type="xsd:string" /> <xsd:element name="longitude" type="xsd:float" /> <xsd:element name="latitude" type="xsd:float" /> <xsd:element name="location" type="xsd:string" /> <xsd:element name="location_roman" type="xsd:string" /> <xsd:element name="zip" type="xsd:string" /> <xsd:element name="country_fk" type="xsd:string" /> </xsd:all> </xsd:complexType>
Expecting that you get only one location for a given zip code, the content of the location tag have to be stored in a domain type. For each property in this domain type the response message is searched for a tag with an equivalent name (first case sensitive, then lower case). The property value will be set to the content of the found tag. When no tag was found, no value is set.
![]() | Caution |
|---|---|
|
The property tag name matching must be unique, otherwise the value will not be set. So when a tag name appears more than one time, no value is set in the domain object for this property. |
Example 24.3. Domain type for web service response
<?xml version="1.0" encoding="UTF-8"?> <domain-type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/model/domain-type-1.0.xsd" id="domain.location" name="Location" deletion-mode="physical"> <property-set> <domain-type-property-set> <domain-type-property id="domain.location.guid" name="guid" type="Long" /> <domain-type-property id="domain.location.code_uni" name="code_uni" type="PlainText" /> <domain-type-property id="domain.location.longitude" name="longitude" type="PlainText" /> <domain-type-property id="domain.location.latitude" name="latitude" type="PlainText" /> <domain-type-property id="domain.location.location" name="location" type="PlainText" /> <domain-type-property id="domain.location.zip" name="zip" type="PlainText" /> <domain-type-property id="domain.location.country_fk" name="country_fk" type="PlainText" /> </domain-type-property-set> </property-set> <primary-key> <key property-ref="domain.location.guid" generated="true" /> </primary-key> </domain-type>
After defining the domain types and storing the wsdl file, you have to
define the web service client as action. For this example only the attributes
domain-type-ref, wsdl-path and operation-name
are necessary. It is important that a domain object of the
specified domain type for the request is the current target domain object,
when the action is executed. The attribute domain-type-ref specifies
the domain type for the response message.
Example 24.4. Web service client action for 'ZIP' Web Service
<transition id="..." target-state-ref="..." description="..."> <action-list> <webservice domain-type-ref="domain.location" wsdl-path="/models/services/web-services/wetter.wsdl" operation-name="searchLocationByZIP"/> </action-list> </transition>
Often a web service does not only return a single data set, but also
a list of data sets. To store these data sets in a list of domain
objects the attribute target-tag exists. Following the way
of storing such response data is explained by the web service for the search
engine 'Bing'. Only the difference to storing a single data set is described
here. For creating a complete DefaultWebServiceClient see the section called “Calling a 'ZIP' web service”
The response of the 'Bing' web service may look like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <SearchResponse xmlns="http://schemas.microsoft.com/LiveSearch/2008/03/Search"> <parameters> <Version>2.2</Version> <Query> <SearchTerms>Test</SearchTerms> </Query> <Web> <Total>515000000</Total> <Offset>0</Offset> <Results> <WebResult> <Title>Testberichte und Verbraucherinformationen - Stiftung Warentest - test ...</Title> <Description>Stiftung Warentest Test Themen Shop Abonnement Hilfe Wir über uns</Description> <Url>http://www.test.de/</Url> <DisplayUrl>www.test.de</DisplayUrl> <DateTime>2009-08-18T10:31:09Z</DateTime> </WebResult> <WebResult> <Title>Schulranzen - Testbericht - Stiftung Warentest - test.de</Title> <Description>Stiftung Warentest Test Themen Shop Abonnement Hilfe Wir über uns</Description> <Url> http://www.test.de/themen/kinder-familie/test/-Schulranzen/1359904/1359904/1359557/ </Url> <DisplayUrl> www.test.de/themen/kinder-familie/test/-Schulranzen/1359904/1359904/1359557 </DisplayUrl> <DateTime>2009-08-10T14:58:20Z</DateTime> </WebResult> </Results> </Web> </parameters> </SearchResponse>The data that should be stored are the search results, the other data are ignored in this example. Each search result is enclosed by a
WebResult
tag. To store the data it is required to define a domain type for this tag.
The domain type may look like this:
Example 24.5. Domain type for 'Bing' response
<?xml version="1.0" encoding="UTF-8"?> <domain-type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/model/domain-type-1.0.xsd" id="domain.result" name="result" deletion-mode="physical"> <property-set> <domain-type-property-set> <domain-type-property id="domain.result.guid" name="guid" type="Long" /> <domain-type-property id="domain.result.title" name="title" type="PlainText" /> <domain-type-property id="domain.result.description" name="description" type="PlainText" /> <domain-type-property id="domain.result.url" name="url" type="PlainText" /> <domain-type-property id="domain.result.displayurl" name="displayurl" type="PlainText" /> <domain-type-property id="domain.result.datetime" name="datetime" type="PlainText" /> </domain-type-property-set> </property-set> <primary-key> <key property-ref="domain.result.guid" generated="true" /> </primary-key> </domain-type>
Defining the web service action is similiar to the action definition of the 'ZIP' web service with the difference that you have to specify the tag name that contains data for one domain object.
Example 24.6. Web service action definition for a list of data sets
<transition-list>
<transition id="..." target-state-ref="..." description="...">
<action-list>
<webservice domain-type-ref="domain.result"
wsdl-path="/models/services/web-services/search.wsdl"
operation-name="Search"
target-tag="WebResult"/>
</action-list>
</transition>
</transition-list>
The DefaultWebServiceClient creates and stores a new domain
object for each tag with the specified name in the target-tag
attribute. Even when the tag has no content, a new (empty) domain object
is created.
![]() | Caution |
|---|---|
|
Within the |
Sometimes the DefaultWebServiceClient is not flexible enough for
some web service calls because the data are only mapped automatically by name.
For example you have already a domain type for storing the data and it is not
possible to modify the column names, so that the matching works fine or when
you want to modify the data before storing. In this cases the GroovyScriptBasedWebServiceClient
is used. This client executes a given Groovy script that implements a web service
client.
In the web service client Groovy scripts you have access to some predefined objects.
Additionally you have access to all beans that are provided by the ScriptContextInitializationService,
see the section called “What to use?”.
Table 24.2. Predefined objects in Groovy web service client scripts
| Object | Description |
|---|---|
inputDomainObject
|
Target DomainObject of the current request.
|
request
|
BufferedMarkupBuilder (a subclass of
groovy.xml.MarkupBuilder) for building
the xml request.
|
gateway
|
WebServiceGateway provides sending a request
to a web service and receiving the response.
|
domaintype |
Provides access to all domain types of the portal by using
the name of the domain type. E.g. domaintype.User
delivers a GroovyDomainType for the domain
type that has the name "User".
|
To build the XML request OpenSAGA provides the BufferedMarkupBuilder
a subclass of groovy.xml.MarkupBuilder. BufferedMarkupBuilder
adds a functionality that returns the content of the built XML document as
String, which is necessary to send it via the
WebServiceGateway. The MarkupBuilder provides building
XML document easily. For its description see the groovy documentation.
You can also build the XML request with any library/class you want. It is only
important that the request can be cast to one of the following classes, otherwise
sending the request via the WebServiceGateway is not possible.
org.opensaga.runtime.model.service.webservice.BufferedMarkupBuilder
java.lang.String
javax.xml.transform.Source
The WebServiceGateWay provides methods to send a web service
request message to a given URL and returns the response message as a
WebServiceXmlHandler.
Table 24.3. Methods of WebServiceGateWay
| Method |
|---|
send(RequestContext context, BufferedMarkupBuilder request,
String url)
|
send(RequestContext context, BufferedMarkupBuilder request,
String url, String soapAction)
|
send(RequestContext context, String request, String url)
|
send(RequestContext context, String request, String url,
String soapAction)
|
send(RequestContext context, Source request, String url)
|
send(RequestContext context, Source request, String url,
String soapAction)
|
send(RequestContext context, Source request,
String url, String soapAction). This method sends the request via Spring´s
WebServiceGatewaySupport to the specified URL with the soap action (when
given). The method returns the response as an instance of WebServiceXmlHandler.
The WebServiceXmlHandler provides functions for easy handling the
response message. It provides the following methods.
Table 24.4. Methods of WebServiceXmlHandler
| Method | Description |
|---|---|
getXmlDocument()
|
Returns the response message as org.w3c.dom.Node.
|
getXml()
|
Returns the response message as
groovy.util.slurpersupport.GPathResult.
|
getXmlString() |
Returns the response message as java.lang.String.
|
getDomainObject(String domainTypeReference)
|
Creates a DomainObject of the given DomainType and tries to fill the object
with data of the response message, if property name and tag name match.
A property will only be set if the matching is unique!
So when there a two or more tags that match with the same property, it will not be
set. The behavior of the method is the same as the behavior of the DefaultWebServiceClient
(see the section called “Defining a domain type for the response”).
|
getDomainObjectList(String domainTypeReference, String tag)
|
Searches for the specified tag in the response and creates for each found tag
a new DomainObject of the given DomainType.
Then the method tries to fill each object with the data enclosed by the tag.
Within the tag the property tag name matching matching
is unique or the property will not be set. The method returns a list
of the created domain objects. The behavior of the method is the same as the
behavior of the DefaultWebServiceClient (see
the section called “Response with a list of objects”).
|
For defining the GroovyScriptBasedWebServiceClient only the
script-path attribute is necessary.
Example 24.7. Defining GroovyScriptBasedWebServiceClient as action
<transition id="..." target-state-ref="..." description="..."> <action-list> <webservice script-path="/models/services/web-services/SearchGroovyWebServiceClient.groovy"/> </action-list> </transition>
The following example shows how to call the 'ZIP' web service with a
groovy client instead of the DefaultWebServiceClient (see
the section called “Calling a 'ZIP' web service”). The example uses the GPathResult
to get the data from the response.
Example 24.8. Groovy web service client for 'ZIP' web service (with GPathResult)
request.searchLocationByZIP()
{
searchstring(inputDomainObject.searchstring)
}
def result = gateway.send(requestContext, request,
"http://wetter.t-online.de:80/soap.php");
def xml = result.getXml()
def locationTag = xml.result.item
def location = domaintype.Location.create()
location.code_uni = locationTag.code_uni
location.longitude = locationTag.longitude
location.latitude = locationTag.latitude
location.location = locationTag.location
location.zip = locationTag.zip
location.country_fk = locationTag.country_fk
domaintype.Location.update(location)
DefaultWebServiceClient shows the next example.
Example 24.9. Groovy web service client for 'ZIP' web service (with WebServiceXmlHandler)
request.searchLocationByZIP()
{
searchstring(inputDomainObject.searchstring)
}
def result = gateway.send(requestContext, request,
"http://wetter.t-online.de:80/soap.php");
def location = result.getDomainObject("domain.location")
domaintype.Location.update(location)
The following example shows how to create a list of DomainObjects
from the response message like the DefaultWebService (see the section called “Response with a list of objects”).
Example 24.10. Calling the 'Bing' web service via groovy client
request.SearchRequest
{
parameters
{
Query(inputDomainObject.query)
AppId(inputDomainObject.appid)
Sources
{
SourceType(inputDomainObject.sourcetype)
}
Web
{
Offset(inputDomainObject.offset1)
Count(inputDomainObject.count)
}
}
}
def result = gateway.send(requestContext, request, "http://api.bing.com:80/soap.asmx")
def webResults = result.getDomainObjectList("domain.result", "WebResult")
webResults.each
{
it.store(requestContext)
}
DefaultWebServiceClient needs always property
tag name matchings. The request of the 'Bing' web service has a 'offset'
tag, but it is not possible to create a property with this name because
'offset' is a key word. This is the reason why the DefaultWebServiceClient
is not able to set this data in the request. But the groovy client provides
setting any data. So it is possible to set the 'offset' data with a groovy
client.
Table of Contents
OpenSAGA allows the definition of Representational State Transfer (REST) services to provide access to business processes and data. This chapter describes how to create REST services.
REST services are configured by XML files in the directory
/models/services/rest-services/. Each file represents a RestServicesModel
which can contains a set of RestService definitions. See the example below:
Example 25.1. REST Service definition
<?xml version="1.0" encoding="UTF-8"?> <rest-services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "http://www.opensaga.org/schema/model/rest-services-1.0.xsd" id="portal.r_test"> <rest-service url="/json" script="/models/services/rest-services/jsontest.groovy" scripting-dialect="groovy" /> <rest-service url="/user/{id}/xml" script="/models/services/rest-services/userxml.groovy" scripting-dialect="groovy" /> <rest-service url="/user/{id}/json" script="/models/services/rest-services/userjson.groovy" scripting-dialect="groovy" /> <rest-service url="/user/{id}/stream" script="/models/services/rest-services/userstream.groovy" scripting-dialect="groovy" /> </rest-services>
rest-services tag all RestServices
are defined. Each RestService have 3 attributes. A description of them can be found
in the table below.
Table 25.1. Attributes of RestService
| Attribute | Description |
|---|---|
url |
Defines the url suffix for this RestService. For more information
see the section called “REST Url”.
|
script |
Defines the path to the script that implements this RestService.
For more information see the section called “REST Service Script”.
|
scripting-dialect | Defines the scripting dialect of the rest service script, e.g. 'groovy'. |
RestServices definition in the PortalModel, otherwise
it is not possible to call these RestServices.
Example 25.2. Making RestService in OpenSAGA available
<?xml version="1.0" encoding="utf-8"?> <portal id="portal.sandbox" title-tag="Sandbox Title" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/model/portal-1.0.xsd"> ... <rest-services-reference-set> <rest-services-reference rest-services-ref="portal.r_test"/> </rest-services-reference-set> ... </portal>
rest-services-reference-set
in the portal model. Within this tag you have to define a rest-services-reference
for each XML file, that shall be available. The only attribute of the rest-services-reference tag
is rest-services-ref that contains the id of the RestServicesModel.
The url suffix of the rest service is defined by the RestServiceModel. The complete url
of a rest service in OpenSAGA is http://[server]/app/rest/[url-suffix]. E.g. the server runs
on localhost and the defined url suffix is /json, then the url to call
this rest service is http://localhost:8080/opensaga-core/app/rest/json.
The REST Url pattern starts with a leading '/' and can have any number of parts (parts a divided by '/').
A possible pattern is e.g. /my/first/rest/service. The parts of this url are 'my', 'first',
'rest' and 'service'.
REST Service Urls can also contain parameters in any part. A parameter starts with a '{' and ends with a '}'. Between
the brackets the name of the parameter is specified. A parameter must be always a
complete part, e.g. /product/{id}/amount/{amount}. But the following example is
not possible: /product{id}/ware{amount}.
When an rest service request is incoming only the rest service with the most specific url that matches the request url is executed. So for example you have following rest urls defined.
/rest/{id}/bar/{bar}/rest/{foo}/bar/test/rest/new/bar/{test}/rest/param1/bar/param2
The matching is clear, the url matches only the first url pattern.
/rest/param1/bar/test
The url matches the first and the second pattern, but the second pattern is more specific.
/rest/new/bar/test
The url matches all pattern. Again the most specific one is chosen. In this case it is the third url, because the url resolving algorithms matches part after part. As soon as one matching part is not a parameter, all url patterns that have matched until this part must not have a parameter in this part, otherwise they will be ignored. So in this example the first part of every pattern matches. The second part of every pattern matches too, but the third pattern has no parameter in the second part, so every other pattern does not have to have a parameter there. Because the first and the second pattern have a parameter in this part, they will be ignored for the further matching. So only the third pattern matches.
When two or more rest services define the equal url, OpenSAGA throws an exception in the start up process.
![]() | Caution |
|---|---|
Two REST urls are also equal, when only the pattern is the same. So for example /foo/{foo}/bar
and /foo/{test}/bar are the same because both have the pattern /foo/[variable]/bar.
|
REST Services are implemented by scripts. In the RestServiceModel the path to the script
is defined. The script has the following bindings. Additionally you have access to all beans that are
provided by the ScriptContextInitializationService, see the section called “What to use?”.
Table 25.2. Bindings of REST Service Scripts
| Name | Description |
|---|---|
input
| The input object contains data from the incoming request. For more information see the section called “The input object”. |
output
| With the output object the responses are built. There are different kinds of responses possible for example xml and streams. For more information see the section called “The output object”. |
| [parameter-name] |
Every parameter defined in the url can be accessed with its name. So for instance
the url pattern is /product/{id}, you can use the paramter like in the
following code:
log.debug("/product/{id} = /product/" + id)
|
Example 25.3. Example rest services implementation
def user = [
"1" : ["Name":"Foo", "Nachname":"Bar"],
"2" : ["Name":"Blub", "Nachname":"Blubber"],
"3" : ["Name":"Max", "Nachname":"Moritz"],
]
log.debug("users = " + user);
log.debug("ID = " + id);
log.debug("user[ID] = " + user[id]);
if(id == input.etag) {
output.noChanges()
return;
}
if(!user.containsKey(id)) {
output.send(404)
return;
}
output.etag = id;
output.xml.user{
Name(user[id]['Name'])
Nachname(user[id]['Nachname'])
}
The input object contains data from the incoming request. It has the following properties.
Table 25.3. Methods of InputObject
| Name | Description |
|---|---|
method
|
The HTTP method of the incoming request. For example
GET or POST.
|
etag
| The ETag that is defined in the "If-None-Match" header field. |
body
| The body of the http request. |
header
| A map that contains all header fields of the incoming http request. |
The output object generates the response. There a different kinds of responses possible. Following all properties and methods of the output object are described.
![]() | Important |
|---|---|
|
None of the output object methods terminates the script early. So the script is always executed completely
(unless there is a |
output.noChanges()
This method sends to the client, that there are no changes (HTTP 403 - Not Modified).
It should be called when the incoming etag is equal to the etag of the requesting data. The call is
equal to output.send(403).
Following example shows how noChanges() is normally used.
Example 25.5. RestServiceScriptingOutputObject: noChanges()
// id is here the etag of the requested data
if(id == input.etag) {
output.noChanges()
return; // terminates the execution
}
output.send(int code)
This method expects a HTTP Code as parameter and sends this code to the client. Following example
sends the HTTP Code 404 - Not found to the client.
output.etag
The etag property sets the value for the ETag header field. The ETag
will be set in the header when the response is either XML, JSON or
binary data (send with the binary(stream, mimeType) method).
output.xml
The xml property is a org.opensaga.runtime.model.xml.BufferedMarkupBuilder
(OpenSAGA own subclass of groovy.xml.MarkupBuilder). For using the MarkupBuilder
see the groovy documentation. The REST Service will send the built XML to the client.
Example 25.8. RestServiceScriptingOutputObject: XML response
output.xml.Person
{
Name("Mustermann")
Vorname("Max")
Adresse{
Strasse("MusterStrasse 2")
Ort("MusterStadt")
}
}
output.json
The json property is a org.opensaga.runtime.model.service.rest.JSONGroovyBuilder.
It is a JSON builder for groovy. For using the JSONGroovyBuilder see the section called “JSONGroovyBuilder”.
The REST Service will send the built JSON to the client.
Example 25.9. RestServiceScriptingOutputObject: XML response
output.json.Person
{
Name("Mustermann")
Vorname("Max")
Adresse{
Strasse("MusterStrasse 2")
Ort("MusterStadt")
}
}
output.binary(stream, mimeType)
This expected two parameters, the first one is a InputStream and the second parameter is a string
that defines the mime type of the InputStream data. This method will send the data of the InputStream to the
client and set the mime type as ContentType in the HTTP header. For example you can send content
of a file to the client with this method.
Example 25.10. RestServiceScriptingOutputObject: binary(stream, mimeType)
def bytes = "<test>StreamContent</test>".getBytes("UTF-8");
def stream = new ByteArrayInputStream(bytes);
output.binary(stream, "text/xml")
The org.opensaga.runtime.model.service.rest.JSONGroovyBuilder is a JSON builder for groovy. It makes
building JSONs very easy. The syntax is similar to the syntax of the MarkupBuilder.
For creating a single string:string key-value pair you just have to write:
jsonbuilder.Person("Max")
The builder will produce following json output.
{
"Person":"Max"
}
For creating a string:object key-value pair with containing string:string pairs
you can write the inner key-value pairs into the brackets.
jsonbuilder.Person(firstname:"Max", name:"Testname")The builder will produce following json output.
{
"Person":{
"name":"Testname",
"firstname":"Max"
}
}
With this syntax it is not possible to create inner string:object pairs.
Another way to get the same result is to use curly brackets instead of round brackets.
Within curly brackets you can define "string:string" pairs in the syntax you already know: key("value").
jsonbuilder.Person{
firstname("Max")
name("Testname")
}
With this syntax it is also possible to define inner "string:object" pairs.
jsonbuilder.Person{
firstname("Max")
name("Testname")
address{
city("London")
street("Victoria Street")
}
}
This code will produce this json output.
{
"Person":{
"address":{
"street":"Victoria Street",
"city":"London"
},
"name":"Testname",
"firstname":"Max"
}
}
It is also possible to combine both syntax. This is not always recommended, but to complete the documentation the following example shows the use of the combined syntax to produce the same json as above.
jsonbuilder.Person(firstname:"Max", name:"Testname"){
address{
city("London")
street("Victoria Street")
}
}
Table of Contents
OpenSAGA provides transforming different (input) data for example incoming web service requests. In OpenSAGA there is transformation support for two different data types: xml and string. This chapter describes how to create lists of the different transformers (e.g. for XSLT transformation) that OpenSAGA provides.
Transformers are supported by/can be used as:
Action (see the section called “TransformAction”)
Web service endpoints (see the section called “Transformation”)
Transformers are always defined in a list of transformers. The list have to
contain one up to any number of transformers. Each transformer list can contains
only transformers for either string data or xml data, but not for both types.
So that the transformers get the input data in the right format, it is necessary to
define the type as an attribute in the transformer-list.
Example 26.1. Defining a list of transformers for xml data
<transformer-list type="xml"> <transformer .../> <transformer ...> ... </transformer> ... </transformer-list>
Table 26.1. Transformer List attributes
| Attribute | Description |
|---|---|
type
| Defines the type of the input data. All transformers in this list must support this type otherwise an exception is thrown. |
A transformer defines a transformation that will be executed on the input data. A transformer can be conditional, this means that the input data must satisfy a condition to perform the transformation on it. A transformer can also have a stop condition that terminates the execution of the current transformation list.
Table 26.2. Transformer attributes
| Attribute | Description for xml type | Description for string type |
|---|---|---|
condition
| Defines a xpath condition that must be satisfied by the input data to perform the transformation. (For more information see the section called “XPath condition”) |
The attribute behaves like the condition-script attribute.
|
condition-bean
| Defines a bean condition that must be satisfied by the input data to perform the transformation. (For more information see the section called “Bean condition”) | |
condition-script
| Defines a script condition that must be satisfied by the input data to perform the transformation. (For more information see the section called “Script condition”) | |
condition-scripting-dialect
| Defines the scripting dialect of the condition script. E. g. 'groovy' or 'bsh'. | |
transformation
| Defines a XSLT transformation that transforms the input data (For more information see the section called “XSLT transformation”). |
The attribute behaves like the transformation-script attribute.
|
transformation-bean
| Defines a Bean transformation that transforms the input data (For more information see the section called “Bean transformation”). | |
transformation-script
| Defines a script transformation that transforms the input data (For more information see the section called “Script transformation”). | |
transformation-scripting-dialect
| Defines the scripting dialect of the transformation script. E. g. 'groovy' or 'bsh'. | |
stop-condition
| Defines a xpath condition that terminates the execution of the current transformer list, when the condition is satisfied by the input data after transformation (For more information see the section called “XPath stop condition”). |
The attribute behaves like the stop-condition-script attribute.
|
stop-condition-bean
| Defines a bean condition that terminates the execution of the current transformer list, when the condition is satisfied by the input data after transformation (For more information see the section called “Bean stop condition”). | |
stop-condition-script
| Defines a script condition that terminates the execution of the current transformer list, when the condition is satisfied by the input data after transformation (For more information see the section called “Script stop condition”). | |
stop-condition-scripting-dialect
| Defines the scripting dialect of the stop condition script. E. g. 'groovy' or 'bsh'. | |
A transformer can execute different types of transformation. The following sections describe each of them. Provided transformation are:
XSLT transformation (only for the xml type)
Bean transformation
Scripting transformation
A transformer can perform any XSLT file on the input data for transforming it. The transformer definition for an XSLT transformation looks like this.
Example 26.2. Defining a transformer with xslt transformation
<transformer transformation="/models/services/web-services/ChangeNumber.xslt">
![]() | Important |
|---|---|
|
XSLT transformations are only supported when the type of the transformer list is
|
Example 26.3. An example XSLT transformation
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sch="http://www.opensaga.org/schema">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*" />
</xsl:copy>
</xsl:template>
<xsl:template match="sch:number">
<xsl:copy>2</xsl:copy>
</xsl:template>
</xsl:stylesheet>
A transformer can perform a Spring Bean for transforming the input
data. The only requirement is that this Bean implements a special interface.
For a bean-transformation with xml data it is necessary to implement
org.opensaga.runtime.model.xml.transformation.XmlTransformation
package org.opensaga.runtime.model.xml.transformation;
import org.w3c.dom.Document;
public interface XmlTransformation
{
Document getTransformed(Document orginal);
}
and with
string data the org.opensaga.runtime.model.xml.transformation.StringTransformation
package org.opensaga.runtime.model.xml.transformation;
public interface StringTransformation
{
String getTransformed(String orginal);
}
must be implemented.
The following examples shows an Transformation implementation for
replacing all '1' with '9'. The transformation in the example is only for the
string type because it only implements the StringTransformation
interface.
Example 26.4. Example implementation of StringTransformation
package org.opensaga.runtime.model.xml.transformation;
public class ExampleTransformation
implements StringTransformation
{
public String getTransformed(String document)
{
return document.replace('1', '9');
}
}
Example 26.5. Definition of a transformation bean
<bean id="exampleTransformation" class="org.opensaga.runtime.model.xml.transformation.ExampleTransformation" />
Example 26.6. Defining a transformer with a transformation bean
<transformer transformation-bean="exampleTransformation" />
A transformer can perform a script for transforming the input data. Provided script dialects (and their attribute value) are
Groovy ('groovy')
BeanShell ('bsh')
There are some predefined objects available in the scripts.
Table 26.3. Predefined objects in transformation scripts
| Object | Description for xml type | Description for string type |
|---|---|---|
| input |
The input data as an org.w3c.dom.Document
object.
| A string that contains the input data to transform. |
| log |
A org.apache.log4j.Logger for logging debug
messages.
| |
The script gets the input data either as a string or as an org.w3c.dom.Document
object as seen above in the table. The script can transform the input data or even replace
it complete. The result of the transformation must be returned by the script. When the type
is xml the script must return an org.w3c.dom.Document
object and when the type is string it must return a String.
Following example shows a very easy groovy script for replacing all '0' with '1'.
The corresponding transformer definition for this transformation script looks like this:
Example 26.8. Defining a transformer with a transformation script
<transformer id="change.zahl" transformation-script="/models/services/web-services/transformationscript.groovy" transformation-scripting-dialect="groovy" />
![]() | Note |
|---|---|
|
In OpenSAGA 'groovy' is the default scripting dialect. So when using groovy scripts, it is not necessary to specify the scripting dialect separately. |
OpenSAGA provides conditional transformers, this means that the input data must satisfy a condition to perform the transformation on it. There are different types of conditions. Provided condition types are:
XPath condition
Bean condition
Script condition
![]() | Caution |
|---|---|
|
If the condition is not satisfied, the stop condition will not be executed either. |
![]() | Important |
|---|---|
|
If more than one condition type is defined in a transformer, only one condition will be executed. The following list shows the priority of the condition attributes:
|
The following sections describe the different types of condition.
A transformer provides XPath conditions. Any XPath expression can be used for the condition. Only if the expression returns true for the input data, the transformation will be executed.
![]() | Important |
|---|---|
|
XPath conditions are only supported when the type of the transformer
list is xml. When it is string you can specify a path to a script like
in the |
The XPath expression is directly written into the transformer definition. ('[transformation]' can be any transformation that is described in the previous section)
Example 26.9. Defining a conditional transformer with XPath condition
<transformer condition="/HolidayRequest/Employee/lastName = 'Mustermann'" [transformation] />
A transformer can use a Spring Bean as condition. The only requirement
is that this Bean implements a special interface.
For a condition-bean with xml data it is necessary to implement
org.opensaga.runtime.model.xml.transformation.XmlCondition
package org.opensaga.runtime.model.xml.transformation;
import org.w3c.dom.Document;
public interface XmlCondition
{
boolean isSatisfiedBy(Document object);
}
and with string data the org.opensaga.runtime.model.xml.transformation.StringCondition
package org.opensaga.runtime.model.xml.transformation;
public interface StringCondition
{
boolean isSatisfiedBy(String object);
}
must be implemented.
The following example shows an Condition that requires a '1'
in the input data to be satisfied. The condition in the example is only for
the string type because it only implements the StringCondition interface.
Example 26.10. Example implementation of StringCondition
package org.opensaga.runtime.model.xml.transformation;
public class ExampleCondition implements StringCondition
{
public boolean isSatisfiedBy(String document)
{
return document.indexOf("1") != -1;
}
}
Example 26.11. Definition of a condition bean
<bean id="exampleCondition" class="org.opensaga.runtime.model.xml.transformation.ExampleCondition" />
Example 26.12. Defining a conditional transformer with a condition bean
<transformer condition-bean="exampleCondition" [transformation] />
A transformer can use a script as condition. Provided script dialects (and their attribute value) are
Groovy ('groovy')
BeanShell ('bsh')
There are some predefined objects available in the scripts.
Table 26.4. Predefined objects in transformation scripts
| Object | Description for xml type | Description for string type |
|---|---|---|
| input |
The input data as an org.w3c.dom.Document
object.
| A string that contains the input data to transform. |
| log |
A org.apache.log4j.Logger for logging debug
messages.
| |
The script gets the input data either as a string or as an org.w3c.dom.Document
object as seen above in the table. It must return whether true when the implemented
condition is satisfied or otherwise false. Following example shows a groovy condition
which proofs if the input data contains a '2'.
The corresponding transformer definition for this condition script looks like this:
Example 26.14. Defining a conditional transformer with a script condition
<transformer condition-script="/models/services/web-services/exampleCondition.groovy" [transformation] />
![]() | Note |
|---|---|
|
In OpenSAGA 'groovy' is the default scripting dialect. So when using groovy scripts, it is not necessary to specify the scripting dialect separately. |
Transformers are always defined in a transformer list. Sometimes the execution of the list should be terminated early. For this cases a stop condition can be used. After performing the current transformation, the stop condition is proofed. If this condition is satisfied, the execution of the current transformer list will be terminated. There are the same stop condition types as there are for the conditional transformers.
XPath condition
Bean condition
Script condition
![]() | Caution |
|---|---|
|
The stop condition will only be executed, if the transformation of the transformer is also executed. So when it is a conditional transformer the condition must be satisfied, otherwise the stop condition is ignored. |
![]() | Important |
|---|---|
|
If more than one stop condition type is defined in a transformer, only one stop condition will be executed. The following list shows the priority of the condition attributes:
|
A transformer provides XPath stop conditions that are similar to the XPath condition of conditional transformers. Following only an example is shown. For more information see the section called “XPath condition”.
![]() | Important |
|---|---|
|
XPath stop conditions are only supported when the type of the transformer
list is xml. When it is string you can specify a path to a script like
in the |
Example 26.15. Defining a transformer with XPath stop condition
<transformer-list>
<transformer [transformation]
stop-condition="/HolidayRequest/Employee/lastName = 'Mustermann'" />
<transformer [transformation] />
...
</transformer-list>
A transformer can use a Spring Bean as stop condition similar to the bean conditions of conditional transformers. The implementation and bean definition is exactly the same. So only an example for defining the transformer is shown. For more information see the section called “Bean condition”.
Example 26.16. Defining a transformer with a stop condition bean
<transformer-list>
<transformer [transformation]
stop-condition-bean="exampleCondition" />
<transformer [transformation] />
...
</transformer-list>
A transformer can use a script as stop condition similar to the script condition of conditional transformers. The scripts behave exactly the same (same predefined objects, same required return...). Following only an example is shown. For more information see the section called “Script condition”.
Example 26.17. Defining a transformer with a script stop condition
<transformer-list>
<transformer [transformation]
stop-condition-script="/models/services/web-services/exampleCondition.groovy" />
<transformer [transformation] />
...
</transformer-list>
When you have a transformer list like the following one, all transformers are processed in the definition order.
Example 26.18. Transformer list with static execution order
<transformer-list>
<transformer [transformation] />
<transformer [condition] [transformation] />
<transformer [condition] [transformation] [stop-condition] />
<transformer [transformation] />
<transformer [transformation] />
</transformer-list>
![]() | Caution |
|---|---|
|
A next-transformer will only be used, if the transformation is executed. So when a conditional transformer defines next-transformers, the condition must be satisfied. |
Following table shows an overview of attributes of the next-transformer tag.
Table 26.5. Attributes of the next-transformer tag
| Attribute | Description for xml type | Description for string type |
|---|---|---|
transformer-ref
| References the transformer that shall be executed next (see the section called “Next-transformer”). | |
condition
| Defines a XPath condition that must be satisfied to use this next-transformer. (see the section called “Conditional next-transformers”). |
The attribute behaves like the condition-script
attribute.
|
condition-bean
| Defines a bean condition that must be satisfied to use this next-transformer. (see the section called “Conditional next-transformers”). | |
condition-script
| Defines a script condition that must be satisfied to use this next-transformer. (see the section called “Conditional next-transformers”). | |
condition-scripting-dialect
| Defines the scripting dialect of the condition script. | |
A next-transformer is defined as a child tag of a transformer. The next-transformer
point at the transformer that will be executed next. Hence it is necessary
to specify ids for transformers to reference them. These ids are used in the
transformer-ref attribute to specify a next transformer.
Example 26.19. Transformer list with a simple next-transformer
<transformer-list>
<transformer [transformation] />
<transformer [condition] [transformation] />
<transformer id="foo" [condition] [transformation] [stop-condition] />
<transformer id="bar" [transformation]>
<next-transformer transformer-ref="foo"/>
</transformer>
<transformer [transformation] />
</transformer-list>
In the above example the transformers are processed in the order they are
defined until 'bar'. After the transformation OpenSAGA jumps
to the transformer that is specified in the attribute transformer-ref
of the next-transformer tag. So in this example the last transformer
in the list will never be executed, because there is an endless loop between
'foo' and 'bar'. The only exit of this loop is the stop-condition of 'foo'.
![]() | Caution |
|---|---|
|
Be careful using the next-transformer. Endless loops can be created easily without noticing it! |
A transformer can have any number of next-transformers, but only one next-transformer will be executed. Then the execution of the transformer-list is continued with the specified transformer. All other next-transformers are ignored. So using more than one next-transformer is only useful with conditional next-transformers.
Example 26.20. Transformer list with multiple next-transformers
<transformer-list>
<transformer [transformation] />
<transformer id="foobar" [condition] [transformation] />
<transformer id="foo" [condition] [transformation] [stop-condition] />
<transformer id="bar" [transformation]>
<next-transformer transformer-ref="foo"/>
<!-- following next-transformers are ignored, see description above -->
<next-transformer transformer-ref="bar"/>
<next-transformer transformer-ref="foobar"/>
</transformer>
<transformer [transformation] />
</transformer-list>
Sometimes the next transformation depends on the input data. For this case OpenSAGA provides conditional next-transformers. The conditions of all defined next-transformers are proofed in the given order. Once a condition is satisfied, the transformer will be used and the others are ignored. A conditional next-transformer is like a conditional transformer, so for defining conditions see section 'the section called “Defining conditional transformer”'.
Example 26.21. Transformer list with multiple conditional next-transformers
<transformer-list> <transformer [transformation] /> <transformer id="foobar" [condition] [transformation] /> <transformer id="foo" [condition] [transformation] [stop-condition] /> <transformer id="bar" [transformation]> <next-transformer transformer-ref="foo" condition-bean="exampleCondition" /> <next-transformer transformer-ref="bar" condition="/HolidayRequest/Employee/number = '2'"/> <next-transformer transformer-ref="foobar" [condition] /> </transformer> <transformer [transformation] /> </transformer-list>
![]() | Note |
|---|---|
|
If no condition is satisfied, the execution of the transformer-list will be continued with the following transformer in the transformer-list |
Table of Contents
Encryption and decryption of data within OpenSAGA is easy. All you have to do is to define an encryptor (and/or decryptor) bean and use it at the appropriate place.
![]() | Caution |
|---|---|
|
The following section describes a symmetric encryption. We are absolutely aware that this is only useful for obfuscation of data. You should NOT use this mechanism to encrypt sensitive/important data. |
The following encrytor and decryptor beans are defined in the base configuration of OpenSAGA:
Example 27.1. Encryptor and decryptor bean definitions
<bean id="aesEncryptor" class="org.opensaga.runtime.security.AesEncryptor"> <property name="keyFile" value="WEB-INF/cfg/aes_key.bin"/> <property name="algorithm" value="AES"/> <property name="transformation" value="AES/CBC/PKCS5Padding"/> </bean> <bean id="aesDecryptor" class="org.opensaga.runtime.security.AesDecryptor"> <property name="keyFile" value="WEB-INF/cfg/aes_key.bin"/> <property name="algorithm" value="AES"/> <property name="transformation" value="AES/CBC/PKCS5Padding"/> </bean>
In this configuration, both use the same keyFile, algorithm and
transformation. The key file contains a binary key that is used for the en-/decryption.
The algorithm parameters specifies the algorithm to use and the transformation
specifies the transformation (with more details, e.g. the padding information).
For now OpenSAGA only supports the AES (Advanced Encryption Standard) encryption. If you want
to implement your own en-/decryption beans you should take a look at the interfaces
org.opensaga.runtime.security.Encryptor and org.opensaga.runtime.security.Decryptor.
To create an encoded password (e.g. for a data-source configuration setting), you
can use OpenSSL. The following command encodes the password from the file
in.txt. If the password is quincy the
result is the string iGro1tWHHIXupoiW57hsIg==.
Example 27.2. Encrypt a password with OpenSSL (on Windows)
openssl aes-128-cbc -base64 -K E8A2EB85CAB3029EA600ACFC9FF58322 -iv 23F47781194D48E7BA08700910327354 -in in.txt
Example 27.3. Encrypt a password with OpenSSL (on Linux)
echo -n "quincy" | openssl aes-128-cbc -base64 -K E8A2EB85CAB3029EA600ACFC9FF58322 -iv 23F47781194D48E7BA08700910327354
The first parameter value is the binary data contained in the file "aes_key.bin" and the
second parameter value can be found in the org.opensaga.runtime.security.AbstractKeyFileBasedCryptor.
Table of Contents
OpenSAGA allows the definition of mail services to send mail. This chapter decribes how to set them up. The system needs at least one default mail service.
Each mail service is configured in the stages.xml. Below you can find an
example:
Example 28.1. Mail service definition
<mail-service-configuration-set
default-mail-service="mail.service.default">
<mail-service-configuration
id="mail.service.default"
type="fileBased"
strategy-bean-ref="standardRetryStrategy">
<settings>
<!-- default settings -->
<setting name="server" value="host.name"/>
<setting name="username" value="ruth"/>
<setting name="password" value="secret"/>
<setting name="maxBatchSize" value="42"/>
<!-- used by standardRetryStrategy -->
<setting name="retries" value="23"/>
<!-- used by type fileBased -->
<setting name="directory" value="~/WEB-INF/mailservice/"/>
</settings>
</mail-service-configuration>
</mail-service-configuration-set>
A description of the mail service configuration set attributes can be found in the table below:
Table 28.1. Attributes of Mail Service Configuration Set
| Attribute | Description |
|---|---|
default-mail-service | The ID of the default mail service. This service will be used if the email action does not define an other one. |
mail-service-configurations.
A description of all mail service configuration attributes can be found in the table below:
Table 28.2. Attributes of Mail Service Configuration
| Attribute | Description |
|---|---|
id | The ID of the mail service. |
type | The type of the mail service. See the section called “How to setup a new type” for a more comprehensive explanation. |
strategy-bean-ref | Defines a reference to a Spring configured bean ID for a bean of
type
org.opensaga.runtime.model.service.mailservice.RetryMailServiceSendStrategy.
See the section called “How to setup a new strategy” for a more
comprehensive explanation. |
settings
element with setting elements to configure service specific settings.
Futher type specific, strategy specific and other can be set here. See the section called “How to setup a new mail service” for a more comprehensive explanation.Table 28.3. default settings
| name | value | Description |
|---|---|---|
server | ip or host (e.g. "host.name") | Sets the ip or host name for the mail server.
[required] |
username | string (e.g. ruth) | Sets the user name for the mail server.
[optional] |
password | string (e.g. secret) | Sets the password for the mail server.
[optional] |
maxBatchSize | integer (e.g. 42) | Sets the number of maximal mails per send()-call.
[required] |
Table 28.4. RetryMailServiceSendStrategy settings
| name | value | Description |
|---|---|---|
retries | integer (e.g. 23) | Sets the number of maximal tries to send a mail. If the this
count is reached the strategy methode "isLastTry" will return true.
[required] |
Table 28.5. FileBasedMailService type settings
| name | value | Description |
|---|---|---|
directory | ~/WEB-INF/mailservice/ | Sets the path to the directory to store the mail. See Chapter 42, File Path Syntax for a more comprehensive
explanation. [required] |
At first you need to define a new mail-service-configuration in the
stages.xml.
Example 28.2. new mail service definition
<mail-service-configuration-set
default-mail-service="newID">
<mail-service-configuration
id="newID"
type="someType"
strategy-bean-ref="someStrategy">
<settings>
<!-- default settings -->
<setting name="server" value="host.name"/>
<setting name="username" value="ruth"/>
<setting name="password" value="secret"/>
<setting name="maxBatchSize" value="42"/>
<!-- settings for the strategy -->
<setting name="someName" value="23"/>
<!-- settings for the type -->
<setting name="someOtherName" value="~/WEB-INF/someDir/"/>
</settings>
</mail-service-configuration>
</mail-service-configuration-set>
type or strategy
attribute see the section called “How to setup a new type” or the section called “How to setup a new strategy” and the section called “Mail service configuration”.
A type has to be a Java class implementing
org.opensaga.runtime.model.service.mailservice.AbstractMailService. It is
defined in 03-pdg-model-configuration-template.xml. See the section called “The mail services config generator” for further information.
A strategy has to be a Java class implementing
org.opensaga.runtime.model.service.mailservice.MailServiceSendStrategy. It is
defined in 03-pdg-model-configuration-template.xml as an Spring configured
bean.
Example 28.3. new strategy definition
<bean
id="someStrategy"
class="fully.qualified.path.to.Class" />
The mail services config generator is a bean definition to generate the bean
definitions for all defined mail services. It is defined in
03-pdg-model-configuration-template.xml.
Example 28.4. mail services config generator definition
<bean id="mailServicesConfigGenerator" class="org.opensaga.runtime.model.process.startup. MailServicesConfigGenerator"> <property name="mailServicesConfigTemplateName" value="templates/cfg/generated-mail-services.ftl"/> <property name="generatedMailServicesConfigName" value="05-psr-mail-services.xml"/> <property name="outputDirectory" value="WEB-INF/cfg/generated/"/> <property name="resourceManager" ref="resourceManager"/> <property name="modelRepository" ref="modelRepository"/> <property name="stagingService" ref="stagingService"/> <property name="mailServiceClassesMap"> <map> <entry key="someType" value="fully.qualified.path.to.Class"/> </map> </property> </bean>
Table 28.6. Properties
| Property | Description |
|---|---|
mailServicesConfig TemplateName | Relative path to the Free Marker template. Starting from the
resource folder. [required] |
generatedMail ServicesConfigName | Name of the file to generate. [required] |
outputDirectory | Relative path to the output directory. Strarting from the
WebContent folder. [required] |
resourceManager | Defines a reference to a Spring configured bean ID for a bean of
type org.opensaga.runtime.OpenSAGAResourceManager. |
modelRepository | Defines a reference to a Spring configured bean ID for a bean of
type org.opensaga.core.model.ModelRepository
[required] |
stagingService | Defines a reference to a Spring configured bean ID for a bean of
type org.opensaga.runtime.model.service.StagingService
[required] |
mailServiceClassesMap | Defines a map of all available mail service types. The key have
to be unique. The value is a full qualified Java class name.
[required] |
Table of Contents
Table of Contents
OpenSAGA can be extended without directly altering the source code of the OpenSAGA base system or its components. This is done by combining so-called extensions into a complete OpenSAGA application. An extension is a set of models and other files in a standardized directory layout. The relative extension trees are then combined by stacking them on top of each other in the defined extension order. (See the section called “Configuring the project extensions for the server” for details).
All extensions are merged into the final resource tree by relative path inside the extension. This can be thought of as a three-dimensional operation like shown in the illustration below.
The "base" extension is a special extension that contains all OpenSAGA components, graphics and templates. For more details see Chapter 12, Base Support.
![]() |
Models and other files that have a unique relative path are just added to the final resource tree. Only when
two or more resources exist for the same relative path they are merged according to local merge rules. This can simply
mean that the top-most is taken as final resource (grey box / "some.png"). Models are usually merged into one final model
based on its type. (green box / "portal.xml"). In the case illustrated above for example, the final
portal.xml would include all process and domain type definitions from the "base" extension as well as from "extension 2".
OpenSAGA provides three essential means of extending or modifying existing application components:
You can overload existing models. See the section called “Model Overloading” for more details.
You can extend existing models. See the section called “Model Extension” for more details.
You can overlay existing models. See the section called “Model Overlays” for more details.
Model overloading means that you define a new model instance with an existing model ID and place it in the directory where models of its type belong. For all models supporting overloading the new model instance will completely replace the existing model instance thus allowing you to provide a new implementation of some fact.
View models are a good example for overloading existing models. For a specific view it is usually very hard to imagine a way by which part of the view can be modified in a safe manner (except by using overlays as indicated in the section called “Model Overlays” to e.g. replace a single button or button behaviour of a complex existing view). Thus the default mechanism for view models (see Chapter 17, The View State) is to be overloaded by more recent view model instances completely relacing the original definition.
the section called “Model Overloading” explains how to use overloading in more detail, the overloading order being the most important detail.
For some models its pretty clear how extensions work, e.g. for domain types. Domain types can be extended by defining new model instances for an existing domain type model ID with new property definitions being contained in the new model instance. The resulting domain type model is a merge of all domain type instances with the same ID resulting in an aggregate with all properties ever defined.
??? explains how to use overloading in more detail.
Model overlays are the most powerful and the least recommended mechanism to modify existing models. Being a mechanism inspired by the overlay techniques offered by XUL we provide a means to modify existing XML models by grafting XML fragments onto them with various alteration operations being supported.
![]() | Warning |
|---|---|
|
The overlay feature is quite dangerous in that it can easily compromise a clean architecture and introduce all kind of side effects and hard to discover error sources in the your models. Use them only if all other means have been exhausted. |
Model overloading is used to completely replace existing models (identified by their ID) with a new model definition. Model overloading only works with models that are defined as root elements in XML model files (e.g. processes and views). Model overloading works by first gathering all model instances defined with the same model ID and then using the "latest" instance definition. The "latest" in this context is defined as the model instance defined in the latest (e.g. last) extension configured for your application (see the section called “Configuring the project extensions for the server” for details on how extensions are configured - basically the instance defined in the right-most extension of your configuration wins and overwrites all others).
Model overloading can be done by the following steps:
Identify a model either in base (see Chapter 12, Base Support or one of the extensions configured for your application (see the section called “Configuring the project extensions for the server”).
Note both ID and location of the model in question.
Create a new model instance in the same relative location as noted in the previous step, use the same model type and provide the new instance with the ID you noted in the previous step.
Implement the new model and declare the behaviour you need. That's it. You are done. All the rest of the work will be handled by the OpenSAGA model compiler.
Example 29.1. Example: Overloading a Model
Let us illustrate model overloading with a tiny but relevant example: A typical use case for model overloading is the home view of a new portal. The default home view provided by the base infrastructure is somewhat boring, being defined like this:
<?xml version="1.0" encoding="UTF-8"?>
<view id="p_home.v_home"
process-ref="portal.p_home"
title = "Logged In View"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/model/view-1.0.xsd">
<part-set>
<part>
<content>
<plain-text value="WelcomeYouAreLoggedIn"/>
</content>
</part>
</part-set>
</view>
>
The model above defines a model instance with the given ID p_home.v_home and provides a trivial part set for the view
that outputs a plain text identified by the value WelcomeYouAreLoggedIn. Once this text has been translated the home
page thus will consist of nothing but a bland welcome message - probably not the right way to win over enthusiastic users for your
portal.
Instead of damning the OpenSAGA core team for their lack of imagination and premonition regarding your particular project needs you decide to overload this bland home view model instance with a more brilliant implementation of a home view. You note the two important facts you require in order to provide a new implementation:
The model ID is p_home.v_home.
The model is located at the relative path /models/processes/p_home/views/v_home.xml (the absolute path
being /WebContent/WEB-INF/resources/base/models/processes/p_home/views/v_home.xml).
In order to implement a new home view you create a new home model under the corresponding location for your particular application
extension of the base infrastructure. Let us assume that your extension project is called wonder-project and your
extension is therefore also named wonder-project. The new model instance thus needs to be located under
/resources/extensions/wonder-project/models/processes/p_home/views/v_home.xml (the file name is arbitrary but we
recommend being consistent) and looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<view id="p_home.v_home"
process-ref="portal.p_home"
title = "WonderProjectHomeView"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/model/view-1.0.xsd">
<part-set>
<part>
<content>
<!-- Here goes your wondrous home content... -->
</content>
</part>
</part-set>
</view>
And that's it. The OpenSAGA model compiler will correctly overwrite the bland default implementation with your improved home view.
The most common places where overloading is being used are:
Navigation models (see ???), Process models (see ???), View models (see Chapter 17, The View State), Translation models (see the section called “Translations”),
The workings of overlays are explained in the Javadoc documentation for the org.opensaga.core.compiler.overlay.OverlayManager
interface. Heed the warnings given in the section called “Model Overlays”
Implementing new actions is very simple. Just follow these steps:
Define an interface extending org.opensaga.core.model.action.ActionModel. By convention the interface should be named after
the XML representation of the action. For example if you do want to implement a do-foo action, the interface should be named
DoFooActionModel.
Hint: Technically you must not write an interface of your own. Since you want to be a good programmer, you want to test. In order to test you often want to mock. In order to be able to mock you need an interface. Thus: Write the interface first.
Provide an implementation of the model interface. Again by convention the name of the implementation should equal the name of the interface
with the additional suffix Impl. Use one of the following base classes for your implementation:
org.opensaga.core.model.action.AbstractActionModel if you want to implement the most basic
type of action model without extra bells and whistles.
org.opensaga.core.model.action.AbstractMultiActionModel if you want to implement an action that can
process both single objects and lists of objects (e.g. delete-object).
org.opensaga.core.model.action.AbstractScopedDomainObjectListReferencingActionModel if you want to implement
an action that works on some kind of cached domain object list.
Action. For example if you define the action bean
name for the do-foo action, it would be doFooAction.
Code a class that implements either the org.opensaga.runtime.model.action.Action
or base your class on one of the following abstract implementations:
org.opensaga.runtime.model.action.AbstractAction if you want to have a basic action that usually will do one thing or
org.opensaga.runtime.model.action.AbstractMultiAction if you want to implement an action that can process a list of objects in some way.
BindingAction interface for classes and beans that are meant to be used in conjunction with
classes or beans that are called by the execute action. By doing so you can leave out the requires-binding
attribute otherwise required and simplify life your users of your action bean.
Remember to inject any services, repositories or whatever else you need to implement your action. If you extend org.opensaga.runtime.model.action.AbstractAction for
your action you can use the following Spring bean definition (OpenSAGA provides an abstract bean definition named abstractActionBean
that already resolves all required properties):
<bean id="doFooAction" class="de.quinscape.samples.opensaga.actions.foo.FooAction" parent="abstractActionBean"/>If you extend
org.opensaga.runtime.model.action.AbstractMultiAction for
your action you can use the following Spring bean definition (OpenSAGA provides an abstract bean definition named abstractMultiActionBean
that already resolves all required properties):
<bean id="doFooMultiAction" class="de.quinscape.samples.opensaga.actions.foo.FooMultiAction" parent="abstractMultiActionBean"/>
Configure the action bean in a Spring context of your extension under the name that was used when implementing the model interface.
To implement a new filter (e.g. the FooFilter) you have to complete the following steps:
Implement org.opensaga.core.model.filter.FilterModel to create a FooFilterModel. You can specify filter
attributes with the @Attribute annotation (e.g. @Attribute("new-attribute"). If your filter works on
one or more child filter models, you have to add the @Child annotation to the appropriate method. Dependent on the
type of filter, the abstract base classes
org.opensaga.core.model.filter.AbstractFilterModel, org.opensaga.core.model.filter.AbstractComparatorFilterModel and
org.opensaga.core.model.filter.AbstractFilterModelListModel are a good base for your own filter.
Implement org.opensaga.runtime.model.filter.request.RequestContextFilter to create
a FooRequestContextFilter. The abstract base class
org.opensaga.runtime.model.filter.request.AbstractFilterModelAwareRequestContextFilter
might be helpful.
Implement org.opensaga.runtime.model.filter.dao.hibernate.CriterionFilterModelTransformer to create
a FilterModelTransformer for the Hibernate Criteria API. The result is a FooCriterionFilterModelTransformer.
The abstract base class org.opensaga.runtime.model.filter.dao.hibernate.AbstractComparatorCriterionFilterModelTransformer
provides a lot of useful methods and infrastructure objects.
![]() | Runtime evaluated filters |
|---|---|
|
When the |
Implement org.opensaga.runtime.model.filter.dao.sql.SQLFilterModelTransformer to create
a FilterModelTransformer for SQL. The result is a FooSQLFilterModelTransformer.
The abstract base class org.opensaga.runtime.model.filter.dao.sql.AbstractComparatorSQLFilterModelTransformer
provides a lot of useful methods and infrastructure objects.
![]() | Runtime evaluated filters |
|---|---|
|
When the |
Add the FooFilterModel to the filterModelClasses definition in
02-psm-model-configuration.xml.
Add the FooRequestContextFilter to the transformerMap property of the
requestTypeMappingFilterModelTransformerRepository definition in
04-pdr-services-configuration-template.xml.
Add the FooCriterionFilterModelTransformer to the transformerMap property of the
criterionTypeMappingFilterModelTransformerRepository definition in
04-pdr-dao-configuration-template.xml.
Add the FooSQLFilterModelTransformer to the transformerMap property of the
sqlTypeMappingFilterModelTransformerRepository definition in
04-pdr-dao-configuration-template.xml.
Update the XSD schema file filter-specification-1.0.xsd to include a type definition
for the FooFilterModel.
Table of Contents
OpenSAGA provides a number of predefined objects in each scripting environment. They can be referenced with the following logical names:
requestContext holds the request context object for the current request. The request context itself grants
access to a vast number of additional services and information sets. Refer to the Javadoc of the RequestContext
class for all the details.
user holds the current user object.
The modelInformationService provides access to a variety of model query functions that allow static model analysis during runtime
situations. Refer to the Javadoc of the ModelInformationService class for all the details.
The runtimeService provides access to variety of methods and objects that are useful during runtime.
Refer to the Javadoc of the RuntimeService class for all the details.
The value and property map provides access to all properties referenceable in the current context.
The object map provides access to all cached domain objects referenceable in the current context.
The list map provides access to all cached domain object lists referenceable in the current context.
The domaintype map contains a ScriptingDomainType for each available domain type.
Use the name of the domain type (case-sensitive) as a key to access the map.
The log object is a org.slf4j.Logger for logging messages. The name of the logger
is org.opensaga.runtime.scripting.[file-name-without-extension] when the file is known or otherwise
org.opensaga.runtime.scripting.Script.
OpenSAGA supports many different scripting languages. Each language is handled by a specific scripting service. The following sections describe all scripting services that are currently available. You can add your own scripting service, see the section called “Adding More Scripting Languages”.
All scripting services are managed by the ScriptingManager that calls the scripting service
for the specified scripting language.
This scripting service is used for BeanShell scripts. Check the BeanShell website for more information.
This scripting service is used for Groovy scripts. Check the Groovy website for more information.
The Groovy scripting service provides some special predefined objects. They can be referenced with the following logical names:
Table 32.1. Predefined Objects for Groovy Scripts
| Object | Description |
|---|---|
filterBuilder |
Builder that provides a FilterSpecificationModel
|
sortOrderBuilder |
Builder that provides a SortOrderInfoList
|
The groovy scripting service allows the definition of function libraries. I.e. all
scripts that are contained in one of the specified directories can call or reference
each other, see Example 32.1, “HelloWorld.groovy”.
The default directories are: [base/extension]/actionscripts/groovy/,
[base/extension]/models/services/rest-services/
and [base/extension]/models/services/web-services/. You can specify
additional directories by setting the attribute additionalRootDirectories
on the GroovyScriptingService bean definition.
You can create objects of the class HelloWorld by using the following
script:
This scripting service is used for Python scripts. Check the Python website for more information.
This scripting service is used for Ruby scripts. Check the Ruby website for more information.
Just in case you are missing your favoured scripting language, you need to take the following steps to add a new scripting language for your extension:
Implement org.opensaga.runtime.scripting.ScriptingService with a new class of your choice (e.g. FooScriptingService).
You will need to provide implementations for a couple of abstract methods explained in the corresponding javadoc. Basically you will
be coding four things:
How to identify a given scripting language by a given dialect identifier (e.g. bsh for BeanShell).
How to create a new binding.
How to insert a named object into the binding object.
How to execute a specific script for a given binding and return the result.
You might want to extend AbstractScriptingervice in order to save some time.
The following sample code shows the (rather trivial) implementation for BeanShell:
public class BeanShellScriptingService
extends AbstractScriptingService<Map<String, Object>>
{
private static final Logger log = Logger.getLogger(BeanShellScriptingService.class);
public BeanShellScriptingService()
{
super("bsh");
}
@Override
protected void bind(Map<String, Object> binding, String name, Object value)
{
binding.put(name, value);
}
@Override
protected Map<String, Object> createDialectSpecificBinding()
{
return new HashMap<String, Object>();
}
@Override
protected Object executeInSpecificDialect(RequestContext requestContext, String script, Map<String, Object> binding)
{
Interpreter bsh = new Interpreter();
Object result = null;
try
{
for (Entry<String, Object> entry : binding.entrySet())
{
bsh.set(entry.getKey(), entry.getValue());
}
result = bsh.eval(script);
}
catch (EvalError e)
{
throw ExceptionConverter.runtimeException(e);
}
return result;
}
}
Note that we simply decided to use a Map<String, Object> instance to collect all bound values
since BeanShell does not provide an extra binding object.
Configure your scripting service instance in a Spring application context of your extension (see the section called “Spring Configuration Extensions”), e.g.
<bean id="groovyScriptingService" class="org.opensaga.runtime.scripting.groovy.GroovyScriptingService"/>
Optionally you can also make logical value expressions (see Chapter 7, Defining Logical Values For Properties)
definable in your new scripting language. To configure this is also very simple. Just define a new bean of type
org.opensaga.runtime.scripting.ScriptingServiceBasedPropertyValueProvider in a
Spring application context of your extension (see the section called “Spring Configuration Extensions”), e.g.
<bean id="groovyPropertyValueProvider" class="org.opensaga.runtime.scripting.ScriptingServiceBasedPropertyValueProvider"> <property name="scriptingService" ref="groovyScriptingService"/> </bean>and you are done. OpenSAGA will auto discover your logical value provider and use it in all places where it is referenced by name (e.g.
value-provider-bean="groovyPropertyValueProvider").
That's it. You are done.
Table of Contents
OpenSAGA supports using syntaxes (WikiDialects) for formatting text. There are already WikiDialects in OpenSAGA, but also own WikiDialects can be implemented. The following sections describe how to use WikiText and how to implement new WikiDialects.
The following dialects are supported by the base extensions:
markdown
OpenSAGA supports the 'Markdown' WikiDialect. For more information about Markdown visit Markdown website.
opensaga-markdown
The dialect 'opensaga-markdown' is a OpenSAGA own WikiDialect based on 'markdown'. All WikiTags of 'markdown' are available. Furthermore following WikiTags are supported:
ImageAttachmentTag
[alt](attachment:labelid "optionalTitle")
This WikiTag embeds an image that is stored as attachment into the text. Therefore
it is necessary to specify first a domain type in that the image is stored
(see the section called “How to use WikiText?”). Then the labelid is used for
getting the domain object. The associated image with that domain object will be embedded
into the text. The parameters alt and optionalTitle are used
for the alt and title attribute of the img HTML tag.
In OpenSAGA there is a special data type (WikiText) for properties containing WikiText. Which dialect is used for
formatting the text depends on a property parameter. The WikiDialect can be specified by the parameter
with the name "wikiDialect". The following example shows how to define a domain type with a WikiText property.
Example 33.1. Defining a WikiText property with a special WikiDialect
<?xml version="1.0" encoding="UTF-8"?> <domain-type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/model/domain-type-1.0.xsd" id="domain.wiki_text" name="WikiText"> <property-set> <domain-type-property-set> <domain-type-property id="domain.wiki_text.guid" name="guid" type="Long" /> <domain-type-property id="domain.wiki_text.title" name="title" type="PlainText" /> <domain-type-property id="domain.wiki_text.text" name="text" type="WikiText" length="5000"> <property-type-parameter-set> <property-type-parameter name="wikiDialect" value="opensaga-markdown"/> </property-type-parameter-set> </domain-type-property> </domain-type-property-set> </property-set> <primary-key> <key property-ref="domain.wiki_text.guid" generated="true" /> </primary-key> </domain-type>
![]() | Note |
|---|---|
|
If no WikiDialect is specified by a property type parameter, the default WikiDialect
( |
To edit WikiText properties normal textfields are used (see the section called “Textfield”).
To display the formatted WikiText the wiki-text-property must be used. In the
wiki-text-property tag, you can specify additional information for the opensaga-markdown
dialect. In the attribute attachment-domain-type-ref you specify which domain type is used
by ImageAttachmentTag. The attachment-label-property-ref defines the property which is used
for the comparison with the labelid specified by the ImageAttachmentTag. When a domain object
with corresponding labelid is found, the attachment in the property specified by
attachment-image-property-ref is used.
In OpenSAGA you can implement your own WikiDialects. There are two different ways to define WikiDialect. Either
you declare the whole WikiDialect in one class by implementing the WikiDecodingService
(see the section called “Implementing a WikiDialects with the WikiDecodingService”) or you define each WikiTag in a WikiTagDecoder
and define the WikiDialect by a set of WikiTags in a MultiTagWikiDecodingService
(see the section called “Implementing a WikiDialect by a set of WikiTags”).
A simple way of implementing a WikiDialect is to create a new WikiDecodingService. Therefore you have implement
the org.opensaga.runtime.decoding.wiki.WikiDecodingService interface which has two methodes: One specifiy
the name of the dialect and the other one convert the WikiText to the formatted text (normally to HTML).
public interface WikiDecodingService
{
/**
* Returns the dialect that is used by this service.
*
* @return the wiki dialect
*/
String getDialect();
/**
* Decodes the given wiki text to html.
*
* @param requestContext request context
* @param wikiText wiki text to decode
* @param wikiTextPropertyModel wiki text property model
*
* @return html text
*/
String decode(RequestContext requestContext,
String wikiText,
WikiTextPropertyModel wikiTextPropertyModel);
}
Following example shows the implementation of the Markdown WikiDialect.
Example 33.2. Implementing a WikiDecodingService (Markdown WikiDialect)
public class MarkdownWikiDecodingService
implements WikiDecodingService
{
/** the markdown processor */
private MarkdownProcessor markdownProcessor = new MarkdownProcessor();
public String getDialect()
{
return "markdown";
}
public String decode(RequestContext requestContext,
String wikiText,
WikiTextPropertyModel wikiTextPropertyModel)
{
if(StringUtils.hasText(wikiText))
{
return markdownProcessor.markdown(wikiText);
}
return null;
}
}
Now it is necessary to make the new WikiDialect available in OpenSAGA, otherwise you cannot use it. For that you have to define the WikiDialect as Spring Bean.
Example 33.3. Making a WikiDialect available in OpenSAGA by defining a Spring Bean
<bean id="markdownDecodingService"
class="org.opensaga.runtime.decoding.wiki.MarkdownWikiDecodingService" />
OpenSAGA supports also a more comfortable and more flexible way of defining WikiDialects. Instead of declaring the whole WikiDialect at once in a single file, it is also possible to declare each WikiTag in his own class and then building a WikiDialect with a set of these WikiTags. This 'MultiTagWikiDialect' way has two advantages:
For defining a WikiTag you have to implement the org.opensaga.runtime.decoding.wiki.WikiTagDecoder
interface. It is similar to the WikiDecodingService, but has only one method which shall
replace all occurring WikiTags and returns the formatted text.
public interface WikiTagDecoder
{
/**
* Decodes the tag defined by this class. Gets the wiki text
* and returns the decoded wiki text.
*
* @param requestContext the request context
* @param wikiText the wiki text to decode
* @param wikiTextPropertyModel the wiki text property model
* (containing additional information)
* @return the decoded wiki text
*/
String decodeTag(RequestContext requestContext,
String wikiText,
WikiTextPropertyModel wikiTextPropertyModel);
}
Often you can easy find the syntax of your WikiTags in the WikiText by regular expression. For that
there are an abstract implementation (org.opensaga.runtime.decoding.wiki.AbstractRegexWikiTagDecoder)
of the WikiTagDecoder that needs a regular expression and calls a method for each match.
This method has to return only the formatted WikiTag. Then the WikiTag will be automatically replaced
by the formatted WikiTag.
public abstract class AbstractRegexWikiTagDecoder
implements WikiTagDecoder
{
/**
* Returns the regex pattern.
*
* @return the regex pattern
*/
protected abstract String getPattern();
/**
* Decodes the tag. This method is called for each match with the pattern
* specified by getPattern(). The method gets an array of the matching groups.
* The groups are equivalent to the groups of {@link Matcher}.
*
* @param requestContext the request context
* @param groups the matched groups
* @param wikiTextPropertyModel wiki text property model
* (with additional information)
*
* @return the replacement for the match
*/
protected abstract String decodeTag(RequestContext requestContext,
String[] groups,
WikiTextPropertyModel wikiTextPropertyModel);
[...]
}
As seen above you only have to implement the getPattern() method that
specify the regular expression and the decodeTag-method. The groups
array corresponds to the groups of the java.util.regex.Matcher. So the first
group is the whole match and the other groups are parts of the match.
Furthermore there is a special abstract class for linking a resource of OpenSAGA, for example an Attachment or a process. The following pattern is a good syntax for such a tag and is used in this abstract class:
label](prefix:id "optionalTitle")label,
id and optionalTitle (which is optional) are variables which can be used for generating
the formatted text.
For instance the ImageAttachmentTag of the opensaga-markdown dialect uses this class.
public abstract class AbstractLinkingWikiTag
extends AbstractRegexWikiTagDecoder
{
[...]
@Override
protected String getPattern()
{
return "\\[(.*?)\\]\\s*?\\(\\s*?"+getPrefix()+":(.*?)\\s*?(?:\"(.*?)\")?\\)";
}
/**
* Returns the "prefix" in the regular expression pattern.
*
* @return the "prefix" in the regular expression pattern
*/
protected abstract String getPrefix();
/**
* Decodes the tag. This method is called for each match with the pattern
* specified by getPattern(). The method gets the 3 parameters of the
* pattern <code>[[label]](prefix:[id] "[optionalTitle]")</code>, but the
* last parameter is optional, so it can be <code>null</code>.
*
* @param requestContext the request context
* @param label the label (first parameter)
* @param id the id (second parameter)
* @param optionalTitle the title (the optional third
* parameter)
* @param wikiTextPropertyModel wiki text property model (with
* additional information)
*
* @return the replacement for the match
*/
protected abstract String decodeTag(RequestContext requestContext,
String label, String id,
String optionalTitle,
WikiTextPropertyModel wikiTextPropertyModel);
}
To create a WikiDialect with WikiTags a new Spring Bean of
org.opensaga.runtime.decoding.wiki.MultiTagWikiDecodingService
has to be configured.
Example 33.4. Configure a MultiTagWikiDialect
<bean id="openSAGAMarkdownDecodingService" class="org.opensaga.runtime.decoding.wiki.MultiTagWikiDecodingService"> <property name="wikiTagDecoders"> <list> <bean class="org.opensaga.runtime.decoding.wiki.ImageAttachmentWikiTagDecoder"> <property name="attachmentRepository" ref="attachmentRepository" /> </bean> </list> </property> <property name="dialectName" value="opensaga" /> <property name="dialectNameAsPrefix" value="true" /> <property name="decoratedWikiDecodingService" ref="markdownDecodingService" /> </bean>
Table 33.1. Properties of MultiTagWikiDecodingService
| Name | Description |
|---|---|
wikiTagDecoders
| A list of all WikiTags that will be used for this WikiDialect. |
dialectName
| Defines the dialect name of this WikiDialect. |
dialectNameAsPrefix
|
Defines whether the dialect name specified by the dialectName
property is only a prefix (true) or the whole name(false).
If it is a prefix, the dialect name will be "[dialectName]-[name of the decorated WikiDialect]".
So this property have only influence, when decoratedWikiDecodingService is set.
The default value is true.
|
decoratedWikiDecodingService
|
Defines a WikiDialect that shall be decorated by this WikiDialect. After decoding all
defined WikiTags by wikiTagDecoders the WikiDecodingService
delegates to the defined decorated WikiDecodingService.
|
Internal data source types for OpenSAGA always lie beneath the package org.opensaga.runtime.model.domain.datasources.extensions. Just
introduce a new appropriate sub package. External data source types can be defined according to your own project guidelines and simply need
to be configured as described below.
To implement a new data source (e.g. the FooDataSource) you have to complete the following steps:
Implement org.opensaga.runtime.model.domain.datasources.DataSourceType to create a FooDataSourceType.
The abstract base class org.opensaga.runtime.model.domain.datasources.AbstractDataSourceType might be useful. To important
things need be remembered when extending the abstract base class:
The root ID necessary must be globally unique and it must be a legal XML ID.
Your data source type must be virtual if it is not represented by physical database tables in the local portal database (e.g. whenever you bypass the standard Hibernate based ORM).
Create a new FooDataSourceBeanDefinitionParser based on one of the abstract base classes:
org.opensaga.runtime.model.domain.datasources.AbstractDomainObjectFactoryBeanDefinitionParser (if you want to
provude your own domain object factory),
org.opensaga.runtime.model.domain.datasources.AbstractMapBasedDomainObjectFactoryBeanDefinitionParser (if
you only want to provide a data handler and otherwise are willing to rely on a MapBasedDomainObjectFactory) or
org.opensaga.runtime.model.domain.datasourcees.AbstractDataHandlerBasedDataSourceBeanDefinitionParser (if you
want to do everything yourself).
Implement a new org.opensaga.runtime.model.domain.service.DataHandler to create the FooDataHandler.
The abstract base classes org.opensaga.runtime.model.domain.virtual.AbstractBeanBasedDomainObjectDataHandler
or org.opensaga.runtime.model.domain.virtual.AbstractMapBasedDomainObjectDataHandler can be used.
Register the FooDataSourceBeanDefinitionParser in the
org.opensaga.runtime.model.domain.datasources.extensions.modelbased.ModelBasedDataSourcesNamespaceHandler.
See the section called “Data Source Types” for a description on how to use the new FooDataSource.
Table of Contents
OpenSAGA supports two kinds of extensions:
Extension projects implement some kind of solution by extending the OpenSAGA base, adding one or more supporting extensions according to the merge rules as specified in ??? and providing solution specific models in the web project itself.
Extension projects must be deployed as normal WAR archives to any servlet container supported by OpenSAGA.
Extension modules that usually will not stand on its own but rather can be used as packaged extensions in action projects like the one described above. Such extension modules also should be developed like a normal web projects according to the rules specified above but then require a different packaging.
Extensions can contain models, spring configurations and JAR archives which all are added to the runtime system. This section explains where to place these individual artifacts in the extension directory layout.
Spring configurations can be placed in any directory directly beneath the extension root. Configurations can either be extensions to a specific startup phase or be handled like interceptors in that they are loaded before or after a given phase.
The following file patterns are valid for Spring configurations (the patterns use the Ant wildcard syntax) and will be instantiated in the phases alluded to by the names:
**/01-psk-*.xml
**/01-after-psk-*.xml
**/02-before-psm-*.xml
**/02-psm-*.xml
**/02-after-psm-*.xml
**/03-before-pdg-*.xml
**/03-pdg-*.xml
**/03-after-pdg-*.xml
**/04-before-pdr-*.xml
**/04-pdr-*.xml
**/04-after-pdr-*.xml
**/05-before-psr-*.xml
**/05-psr-*.xml
**/05-after-psr-*.xml
Each pattern applies to a separate and distinct initialization phase. OpenSAGA itself does not use any of the *-before-*
or *-after-* phase configurations.
Table of Contents
So far we've seen the model mostly as XML files in extensions. But of course there is a runtime aspect to the model, too. The OpenSAGA XML Compiler reads all the model XML files and transforms them into a graph of java object instances.
This process is controlled by some basic interfaces and annotations.
Table 37.1. OpenSAGA Model Interfaces for extension
| Class Name | Description |
|---|---|
org.opensaga.core.model.Model |
Interface implemented by all OpenSAGA models. Each model has an id, can take abritrary attributes (beyond those defined in the XML schema) and a textual description. |
org.opensaga.core.model.view.content.ContentElementModel |
Interface implemented by all UI elements within a view. Extends model to Extension authors can also extend
|
org.opensaga.core.model.action.ActionModel |
Interface implemented by all action models. |
The process of turning XML elements into Java classes is controlled by annotations defined in the org.opensaga.core.compiler.annotation
Marks the class as tag class.
Annotation elements
Name or pipe ( |) separated list of tag names to use
for this class.
If set to true, the tag cannot be used as a general
substitute for its super classes unless explicitly requested in a
reference.
Marks a setter method or a method of the format void methodName(String
name, String value) as attribute method. If the method has 2
parameters, the method can receive any kind of attribute with the name being the
first parameter and the value being the second parameter.
Annotation elements
Name of the attribute. If not set, the name will be taken from the property name of the setter method.
If set to true, the the attribute is required.
Marks a setter method or adder method as child method. Child methods enable
specification of possible tags nested inside the tag class. The parameter type
of the method must be either another tag class or
String
Annotation elements
Minimum number of times the child must occur (default: no minimum).
Maximum number of times the child must occur (default: no maximum).
Marks a setter method as parent method. The parameter type of the setter method will be the parent type. For each parent method declared, the method will be fed the next parent of that type.
String setter marked with this annotation will be called with the actual name of the tag instance for tags with multiple possible names.
Can be used to mark an attribute method as id reference method. By convention,
the name of such an attribute method should end in "-ref"
Annotation elements
Target type of this id reference.
if set to true, the configured
org.opensaga.core.compiler.IdReferenceResolvingStrategy
configured for the tag factory will be used to resolve local
unqualified id references (Ids that do not contain . or
-). See XML Compiler Configuration
Can be used to mark an attribute method as id generation method. This method
is called with an value generated by the configured
org.opensaga.core.compiler.IdGenerationStrategy.
Marks a getter method as trait method delivering a tag trait. Traits can be
used to group common sets of attributes, behaviour and state into their own
class. The attributes, childs and parent method of a trait are added to the
parent tag class as if they belong to that class. The trait method must return
an instance of the trait, it is an error for it to return null.
Can be used to document dynamic/abritrary attributes on a tag class.
Annotation elements
An array of @AttributeDoc annotations for that class.
Documents one dynamic attribute.
Annotation elements
Name of the attribute.
Description of the attribute.
If set to true, this attribute is required.
Java type of the attribute.
The XML compilers (one for every type of model XML) are
registered in the modelCompilerRepository bean in the
02-psm-model-configuration.xml.
<bean id="modelCompilerRepository" class="org.opensaga.core.compiler.model.MappedModelCompilerRepository"> <property name="compilers"> <map> … <entry key="org.opensaga.core.model.view.ViewModel"> <bean parent="abstractCompiler"> <property name="tagFactory"> <bean parent="abstractTagFactory"> <property name="tagPackages"> <set> <value>org.opensaga.core.model.view</value> <value>org.opensaga.core.model.view.content.*</value> <value>org.opensaga.core.model.view.paging</value> <value>org.opensaga.core.model.value</value> <value>org.opensaga.core.model.filter</value> <value>org.opensaga.core.model.domain.relation.reference</value> <value>org.opensaga.core.model.process.phase</value> <value>org.opensaga.core.model.action</value> <value>org.opensaga.core.model.xml.transformation</value> <value>org.opensaga.core.model.restrictions</value> <value>org.opensaga.core.model.uicomponent</value> </set> </property> </bean> </property> </bean> </entry> … </map> </property> </bean>
For every document type, such an tag factory entry extending the abstract spring
bean defintion abstractTagFactory is defined. The entry maps the Java
document root type to a list of packages that is scanned for tag classes.
If the package specification ends with a * , the package and all its
sub-packages are scanned for tag classes, otherwise only the package itself is
scanned.
To avoid conflicts it is generally wise to create your own sub package for the company and/or project you are working on.
Creating new UI Elements (ContentElementModels in OpenSAGA lingo) requires you to create an annotated Model class that defines the tag of the element and its attributes and children et cetera inside the model XML files. You also have to create a model template which is a freemarker template that renders the JSF code for the element.
First you have to create a new class implementing
org.opensaga.core.model.view.content.ContentElementModel.
This is most easily done by extending one of the abstract base classes available
-- which you need to extend depends on the type of UI element you need.
Abstract types in org.opensaga.core.model.view.content
Content element model without any data-binding or children.
Content element model without any data-binding but with children.
Content element model with read-only property access.
Content element model that reads data from and writes data to a property
Your tag class needs to be in one of the packages scanned by the view model tag factory, which is most easily done by adding it to project and/or company specific packages below org.opensaga.core.model.view.content.
In addition to your model class you need to create a component template. This is a freemarker template that creates the JSF code for your component.
The component template must be added to an extension. The resource name of
this component template is built by adding the simple name of your class (full
class name without package) without the Model suffix to the template base path
/templates/view-faces/. For example if you have the class
org.opensaga.core.model.view.content.TextFieldModel, the
corresponding component template is at
/templates/view-faces/TextField.ftl, for the class
org.opensaga.core.model.view.content.mycompany.myproject.MyFooModel,
the corresponding component template is at
/templates/view-faces/MyFoo.ftl, etc.
The templates transform the models and their sub models into JSF code that fits into the special OpenSAGA JSF Component world. OpenSAGA defines a set of template macros and functions that can help you with this.
Let's take a look at Grid.ftl to see how a simple component template looks like:
<@meta.style name="widget/grid.css,widget/grid-ext.css"/> <@meta.component> <table ${p.id()}${p.classes("grid")}${p.dynAttrs()}> @@BODY@@ </table> </@meta.component>
This component template creates a layout table out of a org.opensaga.core.model.view.content.GridModel
The macros and templates listed here are defined in the resources /templates/view-faces/opensaga-common.ftl and /templates/view-faces/opensaga-meta.ftl.
These two files are configured as freemarker auto imports in the bean viewRenderer in 05-psr-view-configuration.xml.
Returns an id attribute with the properly escaped id of the current model.
![]() | Caution |
|---|---|
|
While this is the correct way to create a model attribute in most cases, i.e. where the id of a JSF tag is generated, in case you are generating an id of an HTML tag that is supposed to be in the OpenSAGA id space for script related reasons, you need to use the following construct id="${p.clientId(model.id)}"
because a normal HTML tag will not be subject to extension of its (escaped) model id
through a JSF naming container.
|
Returns a class attribute containing the combined classes of the value parameter and the classes given in the current model. The name of the attribute is "class" by default and can be changed to "styleClass" where it should generate a JSF class attribute.
Returns the attribute with the given name and the given value if the value is not null, nothing otherwise.
Returns JSF expression evaluating to the internationalized value for the given key. The
key must not be null.
Returns JSF expression evaluating to the internationalized value for the given key, but only
if the key is not null.
renders the given JSF expression in a properly escaped way to avoid it being evaluated as freemarker expression.
escapes the given model id to be a valid JSF id. All invalid characters are transformed into an underline followed by 4 hex characters defining the unicode character. Underlines themselves are converted into two underlines.
Returns the JSF client id for the given model id.
![]() | Caution |
|---|---|
|
So far, these method only works correctly for models that are a first level child of the form. |
Returns a class attribute declaration that is a mix of the classes being given as first argument and the classes set on the model. The name of the class attribute being generated can be given as second argument. you need to use "class" for HTML tags and "styleClass" for JSF tags.
Returns a attribute declaration for the first argument if the second argument is not null.
Returns a JSF expression returning the translated key. the key might be null in which case an empty string is returned.
Returns a JSF expression returning the domain object property value referenced by
the current model. Only works for instances of org.opensaga.core.​model.view.content.​PropertyReadingModel
and org.opensaga.core.​model.view.content.​PropertyWritingModel
Returns a JSF expression returning the value stored for the current list reading model in the form list bean.
Returns a JSF expression returning bean name of the current form list bean.
Returns a "disabled" attribute declaration whose value is based on the current writing model's filter-specifications.
Returns a JSON representation of the given value as escaped class-based decoration.
This method hides JSON meta data as element class starting with "deco:", directly
followed by a JSON string whose spaces have been replaced by underlines and whose underlines
have been replaced by two underlines.
Returns the CSS style given as optional second argument with the styles registered
for the model with the given id in the org.opensaga.runtime.model.view.style.ContentElementStyleService>.
Macro to generate a OpenSAGA command which is a button or a "link" (button converted into a link by script) that supports all features such as AJAX reloading etc.
@p.command Attribute
the unescaped model id to use for this button
classes to set on the command
true if it's a button, false if its a "link".
true if it's a button, false if its a "link".
OpenSAGA transition to invoke from this command.
Internationalized text on the button / link.
Icon for the button / link
Webflow transition id to execute. Normally this
will be the id corresponding to the transition model given
with the transition parameter. For component events this
can be a declared component event name and the id of the component event source
model, separated by a ":". In that case no transition attribute
should be given.
Internationalized desription set as title for this button.
Directly defines the disabled attribute of this command for component event buttons that are not bound to a transition and are therefore not bound to the disabling policy.
Defines the rights based disabling policy used for this button. Must be
a valid enum name of org.opensaga.core.model.view.content.CommandDisablingPolicy.
In addition to normal JSF components, OpenSAGA defines a set of components and functions that bridge
the component world of JSF and the model world of OpenSAGA. They are defined in facelets taglibrary /WEB-INF/facelets-taglibs/opensaga.taglib.xml
and consist of components in the package org.opensaga.runtime.controller.faces.component and functions
in org.opensaga.util.OpenSAGAFacesELFunctions und are included in OpenSAGA JSF documents
with the namespace "opensaga"
OpenSAGA command link component. Offers all the special OpenSAGA integration including AJAX reloads etc. Should be used instead of <h:commandLink>, except for links to external URLs.
OpenSAGA command button component. Offers all the special OpenSAGA integration including AJAX reloads etc. Should be used instead of <h:commandButton>.
Include script dependencies. The dependencies are usually not included on their own but merged into bundles, which is done automatically. The resource paths to include are given as body of this component, separated by white-space.
Include CSS dependencies. The dependencies are usually not included on their own but merged into bundles, which is done automatically. The resource paths to include are given as body of this component, separated by white-space.
Renders a navigation tree based on a nested structure of org.opensaga.runtime.model.navigation.NavigationNode
created by the navigation service based on the navigation models and the user's rights.
Attribute
classes for this component
Id of the root navigation model for this navigation
Limits the depth of the displayed navigation.
Starts rendering at a selected, greater than zero depth. In combination with maxDepth this can be used to split navigation into multiple parts depthwise, i.e. to only render the top navigation items at one location and only render the sub navigation points of the navigation node selected in the first navigation at the location of the second navigation.
if true, display navigation child nodes in opposite order
Renders the little up or down arrow icon for a data grid header
Attribute
Id of the property this component is representing. only if the datagrid is really sorted by this property, an icon will be displayed..
data grid model id
Icon for descending sort order
Icon for ascending sort order.
Renders an attachment.
Attribute
Id of the attachment.
Maximum width for the embedded attachment.
Maximum height for the embedded attachment.
If true, try to embed the attachment (if the media type allows that), otherwise just link to it..
Renders an iterator.
Attribute
Sets the variable name to receive the value for each repitition.
Sets the SerializableListDataModel wrapped list of domain objects to display in this iterator.
HTML classes
OpenSAGA specific facet component meant to be used with the OpenSAGA datagrid. In contrast to normal facet component can contain other components as child. This however is only supported in combination of the OpenSAGA data grid.
Attribute
Facet name.
HTML classes for this facet.
Renders a message list.
Attribute
If set to true ( the default) , render only those messages that
are not displayed by a <os:message> tag in the same view.
Internationalized headline for this message list.
Renders a single select field for a multi connect element.
Attribute
Id of the multi connect model.
disabled attribute.
CSS styles.
true if the select field for the connected items is
to be rendered, false for the unconncted items.
Renders the decoration for a surrounding ajax button component.
Attribute
Comma separated lists of ids to proccess for the ajax request for this command.
Renders an component consisting of an icon and a text.
Attribute
HTML classes
Icon for this icon text component.
Internationlized text of this icon text component
Internationalized title to set for this icon text component. for this command.
Renders an boolean element.
Attribute
Runtime value.
Id of the boolean element model to render.
A container component that only renders its children if a certain write mode is matched.
Attribute
Id of the writing model whose write mode is obeyed.
Comma separated list of modes of which one must be matched. Valid values are ENABLED,
DISABLED and READ_ONLY.
(see org.opensaga.core.model.view.content.WriteMode)
A readonly select component that is basically a complicated plaintext.
Attribute
List of javax.faces.model.SelectItem containing all values.
Current value of the read only select component.
HTML classes
Component to edit a OpenSAGA attachment.
Attribute
Id of the attachment model.
Current value of the attachment model.
The following JSF functions are defined in the OpenSAGA facelets tag library.
Run a wiki decode operation on the given text for the wiki dialect given as "wikiDialect" property type parameter in the property model being referenced by the given property ref.
Returns a JSON representation of the given pipe separated list of i18n tags.
Returns a list of SelectItems with the locale names supported by the portal.
Returns an encoded model decoration for the given view model id and content element model id
Returns true if the command with the given transition id and the given policy name is rendered.
The visibile function also checks the disabled visible according to a nested visible-if
filter specification model if a button with the given buttonId exists for the given View.
Returns true if the command with the given transition id, and the given policy name is disabled.
The disabled function also checks the disabled status according to a sub command
filter specification model if a button with the given buttonId exists for the given View.
Returns the write mode for the given view model Id and the given writing model id.
Returns true if the visibility group for the given visibility group model id and the given view model id is visible.
Table of Contents
In this chapter we are going to discuss the way OpenSAGA integrates CSS and Javascript into the HTML output created by JSF and how to create or change component layouts and portal layouts.
OpenSAGA puts an emphasis on using standard web technologies in the most compatible and accessible way possible and goes much further in this regard than JSF does. Although it implements a sophisticated declarative component model, it continues to employ state of the art cross-browser technologies like progressive enhancement or (via jQuery integration) feature simulation.
This makes OpenSAGA practically a Standards-oriented Web-Developer-in-a-box because it does things automatically that are bothersome and tiring work when done in an environment that is not model based.
![]() |
The diagram above shows the theoretically available views on a portal or web site, depending on the technological abilities of the browser. OpenSAGA primarily supports the Views 2 and 3, which means you can use a OpenSAGA portal with or without javascript. Of course there are drastic differences when not using Javascript. For example instead of being presented a nice map widget where you can click on to select a point on the map, you just have to enter a coordinate pair of longitude and latitude. This is achieved with a technology called progressive enhancement. OpenSAGA' JSF components and templates generate pure semantic HTML output that is styled by externally included stylesheets, which together form a usable portal in View 2. Then external widget scripts transform this into a View 3 portal with all bells and whistles.
View layouts in OpenSAGA are based on a dynamically rendered Blueprint CSS grid. The grid is usually 24 columns wide. These are columns like you would have them in a e.g. newspaper. They have a certain width that is usually a part of the whole newspaper page. These columns can be ordered in horizontal and vertical groups. If you're not sure which is which, remember thelittle mnemonic visualized in the image below: Items in a horizonal group form a horizon.
![]() |
The following diagram shows an example of a view layout:
It consists of a top column that spans the complete size of the view and three columns below it that divide the full width into three equal parts. A view definition for that would look like this.
<?xml version="1.0" encoding="UTF-8"?> <view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/model/view-1.0.xsd" id="example.p_example.v_example" process-ref="example.p_example" title="Example Layout" > <part-set> <part> <vgroup> <col width="24"> … </col> <hgroup> <col width="8"> … </col> <col width="8"> … </col> <col width="8"> … </col> </hgroup> </vgroup> </part> </part-set> </view>
To create such a view it often helps to make a sketch of the layout you want to have and then take a look at the grouping to determine the nescessary tags.
Everything starts with the outer view frame, which is marked with a
1 in the diagram above. Then that square is subdivided
horizontally and vertically and maybe once again on the smaller parts. So in
this case the outer frame 1 is cut horizontally into two pieces by
the line 2 forming two full-width parts in vertical order thus
forming a vgroup, which is our outmost group. The lines of which
one is marked with 3 cut the lower part into three equal peaces,
forming a hgroup.
Above is another example starting with a outmost hgroup. Following the above way of seeing which lines cut with areas in what order, we arrive at the view model for the example:
<?xml version="1.0" encoding="UTF-8"?> <view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/model/view-1.0.xsd" id="example.p_example.v_example" process-ref="example.p_example" title="Example Layout" > <part-set> <part> <hgroup> <col width="8"> … </col> <vgroup> <col width="16"> … </col> <hgroup> <col width="8"> … </col> <col width="8"> … </col> </hgroup> </vgroup> </hgroup> </part> </part-set> </view>
The layouts formed by hgroups and vgroups are what we call the "inner" layout structures. Their purpose is mostly visual except for a grouping function they can have on their content.
Parts are layouted the same way but also reference domain types or objects. In the example above there is you already see the elements <part-set /> and <part />. If you have only one part that's all you need to define and the ModelAutoCompleter will autocomplete this into the full structure needed internally by OpenSAGA
<?xml version="1.0" encoding="UTF-8"?> <view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/model/view-1.0.xsd" id="example.p_example.v_example" process-ref="example.p_example" title="Example Layout" > <subview-vgroup> <subview > <part-reference part-ref="id.hgz"/> </subview> </subview-vgroup> <part-set> <part id="id.hgz"> … </part> </part-set> </view>
If you need to have more than one domain type in your view, you need to setup a <subview-vgroup /> or <subview-hgroup /> structure analog to the way described for the inner layout structures and declare references to all parts in the part set. <hgroup /> and <vgroup /> are analog to <subview-hgroup /> and <subview-vgroup />, <col /> is analog to <subview />.
<?xml version="1.0" encoding="UTF-8"?> <view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/model/view-1.0.xsd" id="example.p_example.v_example" domain-type-ref="example.d_something" process-ref="example.p_example" title="Example Layout" > <subview-hgroup> <subview width="16"> <part-reference part-ref="example.p_example.v_example.main_part"/> </subview> <subview width="8"> <part-reference part-ref="example.p_example.v_example.detail_part"/> </subview> </subview-hgroup> <part-set> <part id="example.p_example.v_example.main_part"> … </part> <part id="example.p_example.v_example.detail_part"> <relation-chain> <relation-reference relation-ref="example.r_relation_to_something"/> </relation-chain> <content> … </content> </part> </part-set> </view>
The example above shows a simple two part view that references two domain types. One is referenced directly by the view, the other is implicitly referenced by a relation-chain that has to start at the view's domain type and go to the part's domain type. For this to actually work in a view that relation-chain must use relations that lead to a non-ambiguous domain object, i.e. it must be a "to-1" relation or a filtered relation.
Table of Contents
OpenSAGA uses a variety of caches in order to optimize internal processes. Usually this will be transparent for the user but for some process modifications and process additions it is important to know about existing caches in order to reset them at relevant points in time. Most often this will concern permission based caches, but there might be other use cases.
To reset a cache simply use the reset-cache action and parametrize it with the name of the cache you want to reset.
That's it.
If you want to reset all caches at once, you simply need to address the system.cache.all cache name with the reset action.
The following internal caches are used by OpenSAGA:
Table 39.1. Internal OpenSAGA Caches
| Cache Name | Description |
|---|---|
system.cache.all | Reset this special cache (which does not exist physically) if you want to reset all system caches at once. |
system.cache.permissions | Identifies the internal permission cache. Since OpenSAGA checks permissions in many places it also caches all permissions granted by a set of roles in order to prevent costly recalculations. Changing roles, permissions, etc. thus creates a difference between the cached permissions and the persistently defined permissions in the system tables. Whenever some definition changes the way users, rules and roles are connected, the permission cache must be immediately reset. Failing to do so will delay permissions from taking effect until the server is restarted or some other action flushes the cache. |
system.cache.repository.cached | Identifies the cache repository itself. If you want to enforce a reload of all cached beans (not a reset!) you can address this cache name. |
system.cache.repository.actions | Identifies the cache holding all action beans that provide actual implementations for underlying action models. |
system.cache.repository.attachmentContentRepositories | Identifies the cache for all attachment content repositories. See the chapter describing OpenSAGA attachment handling for more information. |
system.cache.repository.propertyValueProviders |
Identifies the cache of all PropertyValueProvider
instances configured in the system (see Chapter 8, Property Value Providers).
|
system.cache.repository.scriptingServices |
Identifies the cache of all ScriptingService
instances configured in the system (see Chapter 32, Scripting).
|
system.cache.groovyScriptingService | Identifies the cache of all compiled Groovy scripts transformed by the the section called “Groovy Scripting Service”. |
system.cache.modelDecorationService | Identifies the cache of all model decorator beans. |
system.cache.all or by using the
appropriate administration interface provided by the base implementation.
OpenSAGA defines a cacheRepository as an instance of org.opensaga.runtime.cache.CachedRepository. This repository
knows all cached objects and provides access to them by the names defined above.
In order to implement a bean conforming to the OpenSAGA caching protocol (e.g. being visible in the relevant administration views and being
resettable by action models) you simply need to implement the interface org.opensaga.runtime.cache.Cached. The javadoc for this
interface provides detailed information about the rather trivial methods you need to implement.
As a consequence OpenSAGA will automatically pick up any bean defined in a Spering context of an extension and consider it for all caching relevant actions.
Table of Contents
OpenSAGA contains a variety of repositories providing access to runtime resources. Usually these resources are represented by named beans and will be configured in the Spring application contexts provided with extensions.
A bean based extension is implemented by implementing a strategy interface for the extension in question. Currently the following strategy interfaces can be extended and will be auto-discovered by OpenSAGA:
org.opensaga.runtime.attachment.content.AttachmentContentRepository
org.opensaga.runtime.model.action.Action
To export such an extension to the system, the following steps need to be taken:
Implement a class with the given interface.
Configure this class in a Spring configuration in your extension, see the section called “Spring Configuration Extensions”.
package your special implementation in a JAR archive and drop that into your extension, see ???.
Some extensions do not rely on named bean types but rather on named types which are found in the class path of an
application and instantiated from there. Extensions of the DataSourceType interface are one such example.
The ClassPathBasedDataSourceTypeRepository (which is the OpenSAGA default implementation) scans all files in
the classpath and tries to instantiate each class implementing the interface DataSourceType. All you need to
do is to implement this interface for your extension and abide by the given contract. Then just package your special
implementation in a JAR archive and drop that into your extension, see ???.
If you want to implement a named repository of your own making, simply extend org.opensaga.runtime.NamedBeanTypeRepository
in your repository interface and base your implementation on the abstract base class which will be doing all
the complex work for you. It simply needs to be configured with the specific type of bean that you want to auto discover and
will find all beans of the given type in all Spring configurations of the current project.
In the Process Model (see the section called “The Process Model”) you work with Process States.
These states are declared in the process-state-set of the ProcessModel.
But these declarations are only references and
not the states themselves . So the [name]-state is a state reference model and the
correspond state model is [name].
This behavior allows you to define states in other files and reuse them instead of declaring it again and again in the
process models. This is especial useful for the view states. But there are states like the decision-state
that references a decision model which contains no additional information. So it would be circuitous to
define a decision model in separate file. Therefore the ModelAutoCompleter completes these missing states
and you do not need to define a separate decision.
Some kinds of states has only a few attributes e.g. the back-state. Instead of declaring a back model
it is possible to define these attributes in the back-state (back-state extends the back model).
But notice: The AutoModelCompleter creates the state if it not exists
and copies the attributes manually from the state reference model to the state model. When you add more attributes to such
state models, you have to copy the new attribute manually.
Table of Contents
If you have to specify file paths for you portal, you have to differentiate between absolute and relative paths.
Relative file paths (e.g. "WEB-INF/resources") start from the "WebContent" directory.
Absolute file paths have to be prefixed with file: (e.g. "file:/E:/Data/Attachments").
Table of Contents
In order to keep documentation for OpenSAGA models centralized, the reference part of the documentation is auto-generated. The model classes contain OpenSAGA compiler annotations as well as javadoc comments that are transformed into:
The reference part of this documentation.
The XML schema for OpenSAGA.
Javadoc HTML output.
In order to do this, OpenSAGA uses a somewhat restricted subset of javadoc that can be converted to XSD and docbook.
The basic format for the documentation is javadoc. Internally we use the tag soup library to turn HTML soup into valid XHTML, auto-closing your tags and automatically adding parent tags you forgot. So unless you go totally wild with your javadoc, you will be ok.
The first paragraph of your Javadoc will be turned into the description being put into the XML schema description. If you need more than one paragraph, you can additionally mark the paragraph with the intro class.
Example 43.1. Marking additional XML Schema paragraphs
/**
First paragraph that is always converted to XML schema,
whether it is enclosed in a paragraph or not.
<p class="intro">
Additional paragraph.
*/
@Tag("example-tag")
public class ExampleTagModel extends AbstractModel
{
…
}
This extends the idea of only the first sentence of in a Javadoc being included in the overview. All tags will just be stripped from the XML schema as there is just no way to include them.
The docbook output is of course much richer than the XML schema output and supports the following transformations of Javadoc or HTML tags to Docbook.
These simple text decorations (<b />, <strong />, <i />, <em /> ) are transformed into their corresponding docbook equivalent.
<ul />, <ol />, <li /> are converted to the corresponding docbook list equivalent.
Examples come in two flavors for Docbook output: example and informal example.
Example 43.2. Example
/**
<p>First paragraph</p>.
<pre title="Title of example"><code>
<example-code attribute="foo" />
</code></pre>
*/
@Tag("example-tag")
public class ExampleTagModel extends AbstractModel
{
…
}
pre and code tag combination shown above.
If you specify a title attribute on the pre tag, the output will be an example, without title
it will be an informal example. You can either escape tags in the example as shown above or you can use a CDATA block.
@link tags that are embedded into the javadoc are converted to docbook cross references if the
class they are pointing to has a reference entry. This means you need to link the tag implementation, not the tag interface!
@see tags are turned into a list of cross references at the end of the current javadoc. In addition to classes
you can also reference docbook ids in @see. In this case you need to prefix the id with id:.
Example 43.3. Example
/**
<p>First paragraph</p>.
@see id:file-path-syntax
@Tag("example-tag")
public class ExampleTagModel extends AbstractModel
{
…
}
Both XML schema generation and Docbook reference documentation generation is started by executing
ant scripts build-schema.xml or build-reference-doc.xml in the OpenSAGA project root.
You can configure new reference sections or schemata by editing the spring context files schema-config.xml or reference-doc-config.xml. Both
contexts are hopefully self-documenting.
Table of Contents
OpenSAGA relies on integration tests in order to check is functionality. Unit tests are only sparingly used for more specific or complicated pieces of the code where we felt that they added real value. Many other code parts require (in our opinion) highly complicated setups due to the complexity of the underlying OpenSAGA models and we so far failed to come up with a viable unit testing approach for this situation. Good ideas are welcome.
For the time being we thus decided to test the core functionalities with Selenium based tests that work on the generated base infrastructure of OpenSAGA. Additionally we internally add each and every project we finish to the test suites used in order to ensure the overall stability of the platform. The following sections describe how you can use the Selenium test subset provided with the OpenSAGA distribution for your own tests.
There are two ways to start selenium tests:
with the Selenium IDE
by running one of the ant scripts in the test section
The tests expect a running clean instance of opensaga-core under
http://localhost:8080/opensaga-core.
Clean in this case means:
an empty database (only the data provided by OpenSAGA should be present)
the log4j configuration from
/testing/bamboo/opensaga-core/stuff/log4j.properties
is used (copy it's content to the configuration in /WebContent/WEB-INF/cfg/log4j/log4j.properties).
/testing/bamboo/opensaga-runtime/selenium.
The "startBaseTest*" tasks from the ant file located in
/testing/bamboo/opensaga-core/database/postgres/build.xml
will start automatic tests. The tests expect the following infrastructure:
a PostgreSQL database server with a super user role 'bamboo' and the password 'bamboo'
the ant task is started by an operating system user that is allowed to open TCP ports
Table of Contents
The login process defines a property set consisting of two domain type properties
(request.login.username and request.login.password) in
the process scope. These are used to hold the values entered by the user in the login
view (see v_login.xml for reference).
The view state p_login.v_login contains two transitions (that are
of interest here): p_login.t_login_ok and p_login.t_login_failed.
The first transition is executed if the login was successful, the second is executed
if the login failed.
OpenSAGA differentiates between two kinds of content streaming - both must be secured by different means as explained below:
It is possible to download resources while being logged into a OpenSAGA based portal. In this case OpenSAGA ensures that a user can only download resources to which he is eligible by appropriate internal security checks.
It is possible to download resources through the general streaming service. This service does not require a valid login and as a consequence is not able to check OpenSAGA based security rules. Therefore installations utilizing the external streaming service need to provide appropriate additional security measures if access to such streamed resources is to be restricted.
Table of Contents
| ||||||||||
Q: | How do I add a confirmation dialog to a transition? | |||||||||
A: |
Add a | |||||||||
Q: | How to add an attribute to the user type? | |||||||||
A: |
Extend the base domain type. Create a file Example 46.1. A numeric salary attribute <?xml version="1.0" encoding="UTF-8"?>
<domain-type id="system.domain.user" name="User"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/
model/domain-type-1.0.xsd">
<property-set>
<domain-type-property-set>
<domain-type-property id="system.domain.user.
salary" name="salary" type="Integer"
default-value="2000" required="true"/>
</domain-type-property-set>
</property-set>
</domain-type>
| |||||||||
Q: | How do I specify a field's default value? | |||||||||
A: | If this is a globally default value (process-independent), you should specify it within your domain type definition. The old and the new attributes will be merged into a new type that will replace the old type and its extension. Example 46.2. A numeric salary attribute <domain-type-property id="domain.type.attr" name="attr"
type="Integer" default-value="2000" />
| |||||||||
Q: | How to translate enumerations to OpenSAGA? | |||||||||
A: |
Let's use the following example: We have a domain type attribute
First we will have to define a constant type file. E.g. Example 46.3. Enumeration type <?xml version="1.0" encoding="UTF-8"?>
<constant-domain-type id="domain.enum_timeunit" name="Time Unit"
data-source-name="enum_timeunit-data-source"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/
model/constant-domain-type-1.0.xsd">
<property-set>
<domain-type-property-set>
<domain-type-property id="domain.enum_timeunit.
unit"
name="unit" type="PlainText"
translation-required="true"/>
<domain-type-property id="domain.enum_timeunit.
id"
name="id" type="Long"/>
</domain-type-property-set>
</property-set>
<primary-key>
<key property-ref="domain.enum_timeunit.id" />
</primary-key>
<constant-data-list>
<constant-data>
<constant value="Hours"/>
<constant value="0"/>
</constant-data>
<constant-data>
<constant value="Days"/>
<constant value="1"/>
</constant-data>
</constant-data-list>
</constant-domain-type>
The actual property is
You will notice the used data source. This one does not exist yet.
You will have to define it within your
<?xml version="1.0" encoding="utf-8"?>
<stages id="system.stages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/
model/stages-1.0.xsd">
<stage name="global">
<data-source-set>
<data-source name="enum_timeunit-data-source"
type="opensaga-constant"/>
</data-source-set>
</stage>
</stages>
Actually this one extends the base system stages definition.
Now we want to define a domain type that uses or enumeration type. We must reference each property we want to use within processes. The notation is quiet confusing, but just follow this procedure:
Keep in mind that the properties per set are accessed individually but the set defines a logical unit. The following example illustrates the enumeration's usage: Example 46.4. Enumeration using domain type <?xml version="1.0" encoding="UTF-8"?>
<domain-type id="domain.job" name="Job"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.opensaga.org/schema/
model/domain-type-1.0.xsd">
<property-set>
<domain-type-property-set>
<domain-type-property id="domain.job.id"
name="id" type="Long" />
<domain-type-property id="domain.job.name"
name="name" type="PlainText"
/>
</domain-type-property-set>
<enum-property-set domain-type-ref="domain.enum_timeunit">
<enum-property id="domain.job.timeunit_id"
name="enum_id"
property-ref="domain.enum_timeunit.id"/>
<enum-property id="domain.job.timeunit_unit"
name="enum_unit"
property-ref="domain.enum_timeunit.unit"/>
</enum-property-set>
</property-set>
<primary-key>
<key property-ref="domain.job.id" generated="true"/>
</primary-key>
</domain-type>
You will notice that we did not map the enumeration to one attribute domain.job.timeunit
(instead we are binding all enumeration element's sub-attributes explicitly).
OpenSAGA lacks a wrapping mechanism featuring such abstaction yet.
Now we want to use our enumeration attribute within a view. Let's use the following selection tag: <select-field id="timeunit"
property-ref="domain.serviceItem.timeunit_id"
select-domain-type-ref="domain.enum_timeunit"
value-property-ref="domain.enum_timeunit.id"
display-property-ref="domain.enum_timeunit.unit"
empty-selection-allowed="false"/>
By using the related child elements, you may specify sorting (sort-order-list) and
filtering (filter-specification. But attention:
You will notice the usage of the constant and the actual type. This really is kind of confusing, but after the attributes have been explained, it will seam much more simple:
As mentionewd above, a higher level of abstraction would be great here but was not realized for extensibility reasons. | |||||||||
Q: | Is domain type inheritance supported? (Like merging, but the original type co-exists besides the merged one) | |||||||||
A: |
Yes. Just use the
| |||||||||
Q: | How do I create a details page containing a list of children datasets? | |||||||||
A: |
You set the view's
The overview table needs the | |||||||||
Q: | How do I define business logic in Java? | |||||||||
A: | There are two general ways of handling this:
| |||||||||
Q: | How do I build a new portal with the Eclipse OpenSAGA feature? | |||||||||
A: | Follow these steps:
| |||||||||
46.2. Open questions | ||||||||||
| ||||||||||
Q: | How do I fire an 'reload part' event by using a selection tag? | |||||||||
Q: | How do I realize a dataset assignment (a one-to-many loosy relation)? | |||||||||
Q: | Where do I find information about domain object life cycles? | |||||||||
Q: | Can I use reusable sub processes (like web flow's helpy sub flow concept)? | |||||||||
Q: | What about view-reusing? Example: An overview used as selection for administration and for parent data set selection in two processes. | |||||||||
Q: | Feature request: What about field related right management (visible, read-only depending on role and data set state)? | |||||||||
Q: | Feature request: What about button related right management (visible, read-only depending on role and data set state)? | |||||||||
Q: | Feature request: What about generic data set representation (field type by attribute type, fields automaticly extracted from domain type definition)? | |||||||||
Q: | Is it possible to secure transactions? | |||||||||
Table of Contents
Table of Contents
Describes a sequential lists of actions. All actions together are executed in one transaction (with configurable parameters). Validation errors abort the execution of the action, rollback the transaction and return to the previous view displaying any errors that occurred.
| Attributes of <action-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
isolation |
Defines the isolation level for transaction isolation. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific isolation levels. |
propagation |
Defines the transaction propagation mode for the action block. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific propagation levels. |
Valid inside <action-list /> are: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <set-property-value />, <dequeue-report />, <webservice />, <transform />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <for-each />, <reset-translations />, <set-object />, <send-outgoing-emails />, <connect />, <remove-list />, <email />, <load-list />, <bind />, <disconnect />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <import />, <add-to-list />, <remove />, <switch />, <define-password />
<action-list /> is valid inside: <session-context />, <after-preprocessing />, <try />, <before-preprocessing />, <for-each />, <on-update-refresh />, <transition />, <conversation-context />, <action-list-set />, <case />, <domain-context />, <agent-action />, <before-postprocessing />, <after-postprocessing />, <process-context />
If you have frequently used action lists, you should define them in an action
list set. You can define such a set within process and portal models. To
reference an action list defined in such a set, you have to use the
call action, see the section called “<call />” for more
information.
![]() | Important |
|---|---|
The search order for filter specifications is: process and portal. |
Example 48.1. Action List Set
<action-list-set>
<action-list id="example.action1">
...
</action-list>
<action-list id="example.action2">
...
</action-list>
...
</action-list-set>| Attributes of <action-list-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <action-list-set /> are: <start-action-list />, <action-list />
<action-list-set /> is valid inside: <process />, <portal />
( Additional names: script )
Contains an action script. Can be referenced by the the section called “<execute />” and other scriptable models. Usually you want to surround the action script by a CDATA block in order to keep a sane syntax in the script.
| Attributes of <action-script /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <action-script /> is: text content
Encapsulates a sequential list of actions. See the section called “<action-list />” for general information about such action lists.
| Attributes of <actions /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
isolation |
Defines the isolation level for transaction isolation. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific isolation levels. |
propagation |
Defines the transaction propagation mode for the action block. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific propagation levels. |
Valid inside <actions /> are: <set-property-value />, <dequeue-report />, <webservice />, <transform />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <for-each />, <reset-translations />, <set-object />, <send-outgoing-emails />, <connect />, <remove-list />, <email />, <load-list />, <bind />, <disconnect />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <import />, <add-to-list />, <remove />, <switch />, <define-password />
<actions /> is valid inside: <case />
Adds domain objects to a scoped domain object list defined by the list-ref attribute.
Either a scoped domain object or a list of new objects that can be configured in the action
will be added to the list. It is possible to specify where to insert the object into the list by
the index attribute. If no index is specified, the object will be added
to the end of the list.
The following example shows how to add a scoped domain object to a list at a given index.
Example 48.2. AddToListAction: Adding a scoped domain object
<add-to-list list-ref="scoped.list"
scoped-domain-object-ref="scoped.object"
index="1" />
The AddToListAction supports also the possibility to add objects that are created inside the action.
Therefore you have to define new-object children. Each child represents a single object. The domain type
of the object is specified by domain-type-ref. It is possible to set properties of these objects. For that
a property-mappings is necessary. Each property-mapping sets one property. The target-ref
specifies which property is set and the value attribute defines the value that is set. Following example
shows how to add three new objects to a list.
Example 48.3. AddToListAction: Adding new objects to a list
<add-to-list list-ref="p_reference_to_scoped_list_element.list">
<new-object domain-type-ref="domain.a">
<property-mappings>
<property-mapping target-ref="domain.a.name" value="First Object" />
</property-mappings>
</new-object>
<new-object domain-type-ref="domain.a">
<property-mappings>
<property-mapping target-ref="domain.a.name" value="Second Object" />
</property-mappings>
</new-object>
<new-object domain-type-ref="domain.a">
<property-mappings>
<property-mapping target-ref="domain.a.name" value="Third Object" />
</property-mappings>
</new-object>
</add-to-list>
Attention: This action initiates data binding and validation before it is executed.
See also:
| Attributes of <add-to-list /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
index |
Defines the index where to add the object into the list. |
list-ref |
Defines the scoped domain object list to that the domain object is added (see the section called “List references”). |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scoped-domain-object-ref |
Defines the reference to the scoped domain object that is added to the list (see the section called “Object references”). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <add-to-list /> are: <new-object />, <execute-if />, <with-filter />
<add-to-list /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Aggregates all values related to the target domain object by a given relation into one string value. The source property values of each such object is connected by the given separator to build the result string. The string ist written to the target property of the action.
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <aggregate /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref |
Defines the property model ID of the property to be modified. |
relation-ref (required) |
Defines the relation reference. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
separator |
Defines the separator. |
source-property-ref (required) |
Defines the source property reference. |
Valid inside <aggregate /> are: <execute-if />, <with-filter />
<aggregate /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Audits either the source domain object or the referenced scoped domain object. Auditing according to the given audit mode will write data to the audit log if either the given object was changed or the audit mode requires a write operation in any case. Again depending on the mode either only the object or the object and all referenced (dependent) objects will be logged in the audit log table. Use the administration processes to examine the content of the audit logs and refer to the OpenSAGA base models in order to add specialized behaviour.
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <audit-trail /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
audit-trail-mode |
Defines the audit trail mode. |
audit-trail-relation-ref |
Defines the audit trail relation reference. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
operation-name |
Defines the operation name. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scoped-domain-object-ref |
Defines the scoped domain object reference. |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <audit-trail /> are: <relation-chain-list />, <execute-if />, <with-filter />
<audit-trail /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Implements the bind action. This is not an actual action, but just a marker to indicate that binding has to take place. Validation also occurs.
| Attributes of <bind /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <bind /> are: <execute-if />, <with-filter />
<bind /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
This action executes a predefined action list that are defined in the portal model or in a process model (for more information see the section called “<action-list-set />”).
| Attributes of <call /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-list-ref |
Defines the reference to the action list that is executed by this action |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <call /> are: <execute-if />, <with-filter />
<call /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Implements the "case" part of a switch statement the section called “<switch />”. See
| Attributes of <case /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <case /> are: <constant />, <geo-polygon />, <geo-point />, <current-property-value />, <property />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <action-list />, <finally />
<case /> is valid inside: <switch />
Implements CatchExceptionModel as the optional third part of a try...catch...finally
action. The code in this block will be executed when an exception was thrown during the action
list being tried.
The catch-exception tag contains a list of actions and is itself an the section called “<actions />”
allowing various options for finetuning the actions.
The following example shows how to use this tag.
<try> ... <catch-exception ...> <some-action .../> ... </catch-exception> ... </try>
The catch-exception tag allows various parameters which are explained below.
If you want to catch any kind of exception the following code is sufficient:
<catch-exception>
...
</catch-exception>
All exceptions will be caught by this block and the contained action list will execute.
If you want to catch one specific exception the following code should be used:
<catch-exception exception-type="foo.bar.BazException"> ... </catch-exception>
The specific foo.bar.BazException will be caught and execute the contained action list.
If you want to catch one specific exception class (identified by name) the following code should be used:
<catch-exception exception-type="BazException"> ... </catch-exception>
The specific BazException will be caught and execute the contained action list.
This variant ignores the package of the exception - so it either should only be used
if you are sure that but one exception of the given type exists or that all types are valid for your
concern.
If you want to catch all exceptions defined in a specific package the following code should be used:
<catch-exception exception-type="foo.bar.*"> ... </catch-exception>
All exceptions contained in the package foo.bar (or one of its subpackages) will be caught
and execute the contained action list. Make sure that you know which exceptions are contained in those
packages!
If you want to catch all exceptions defined in a specific package the following code should be used:
<catch-exception exception-type="foo.bar.*,Baz,bar.foo.FrozzException"> ... </catch-exception>
Combines the various exception patterns explained above and executes the contained action list if at least one of them executes.
| Attributes of <catch-exception /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
exception-type |
Defines the pattern describing the exceptions to be caught. |
id |
Defines the GUID of the model. |
isolation |
Defines the isolation level for transaction isolation. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific isolation levels. |
propagation |
Defines the transaction propagation mode for the action block. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific propagation levels. |
Valid inside <catch-exception /> are: <set-property-value />, <dequeue-report />, <webservice />, <transform />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <for-each />, <reset-translations />, <set-object />, <send-outgoing-emails />, <connect />, <remove-list />, <email />, <load-list />, <bind />, <disconnect />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <import />, <add-to-list />, <remove />, <switch />, <define-password />
Implements CatchValidationErrorModel as the optional second part of a try...catch...finally
action. The code in this block will be executed when a validation error occurred during the action
list being tried.
The catch-validation-error tag contains a list of actions and is itself an the section called “<actions />”
allowing various options for finetuning the actions.
The following example shows how to use this tag.
<try>
...
<catch-validation-error>
<some-action .../>
...
</catch-validation-error>
...
</try>
| Attributes of <catch-validation-error /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
isolation |
Defines the isolation level for transaction isolation. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific isolation levels. |
propagation |
Defines the transaction propagation mode for the action block. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific propagation levels. |
Valid inside <catch-validation-error /> are: <set-property-value />, <dequeue-report />, <webservice />, <transform />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <for-each />, <reset-translations />, <set-object />, <send-outgoing-emails />, <connect />, <remove-list />, <email />, <load-list />, <bind />, <disconnect />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <import />, <add-to-list />, <remove />, <switch />, <define-password />
<catch-validation-error /> is valid inside: <try />, <case />
Defines the "condition" block of an the section called “<if />”.
It works like filter-specification.
See also:
FilterSpecificationModelImp
| Attributes of <condition /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <condition /> are: <greater-than />, <is-property-modified />, <and />, <geo-within />, <matches />, <user-logged-in />, <validation-failed />, <complies-to />, <criterion />, <less-than-or-equal-to />, <has-current-element />, <is-undefined />, <has-changed />, <or />, <is-connected-to />, <can-access />, <ends-with />, <geo-contains />, <has-permission />, <contains-comparator />, <starts-with />, <not />, <equals />, <is-new />, <has-elements />, <dynamic-condition />, <true />, <less-than />, <in />, <include />, <in-transition />, <filter-pattern />, <has-type />, <greater-than-or-equal-to />, <is-super-user />, <false />, <is-defined />, <filter-pattern-set />
<condition /> is valid inside: <external-excel-domain-type />, <external-relational-domain-type />, <count />, <filter-specification-set />, <joined-domain-type />, <if />, <constant-domain-type />, <start-action-list />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <radio-buttons />, <multi-connect />, <tree-connect />, <transition />, <list-iterator />, <case />, <wfs-domain-type />, <multi-connect />, <single-connect />, <relation-reference />, <has-elements />, <filtered-list />, <agent-action />, <datagrid />, <start-action-list />, <action-list />, <radio-buttons />, <select-field />, <request-context />, <cell-format />
Implements the connect action. Creates a relational dependency between two or more objects. Note that all objects need to be stored if you want to persistently create the connection by using the the section called “<store />”.
connect can work in one of the following ways:
Connect one object to another:
<connect source-ref="..." target-ref="..." relation-ref="..."/>
Connect one source object to each of the listed objects (connecting source to the list elements via the given relation):
<connect source-ref="..." relation-ref="...">
<filtered-list>
...
</filtered-list>
</connect>
Connecting each list element to the target object via the given relation:
<connect target-ref="..." relation-ref="...">
<filtered-list>
...
</filtered-list>
</connect>
Alternatively the filtered-list in each of the previous examples can be replaced by
the attribute list-ref, e.g.
<connect target-ref="..." relation-ref="..." list-ref="..."/>
Finally the mode for the connection process can be configured via the attribute mode and one of the following
values:
replace: Removes all existing relational connections for the source object and adds the new connections.
add: Adds the missing connections between source and target.
The default mode is "add".
Attention: This action initiates data binding and validation before it is executed.
See the the section called “<disconnect />” for details on how to remove relational dependencies between objects.
| Attributes of <connect /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
list-ref |
Defines a reference to a scoped list. |
mode |
Defines the connection mode. |
object-ref |
Defines a reference to a scoped object. |
relation-ref |
Defines the relation reference. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
source-ref |
Defines the source object reference. |
target-ref |
Defines the target object reference. |
Valid inside <connect /> are: <filtered-list />, <execute-if />, <with-filter />
<connect /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
| Attributes of <create-message /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
icon | |
id |
Defines the GUID of the model. |
message-id | |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
resource | |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
text | |
type | |
Valid inside <create-message /> are: <message-parameter />, <execute-if />, <with-filter />
<create-message /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Implements the "default" part of a switch statement, see the section called “<switch />” and
| Attributes of <default /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
isolation |
Defines the isolation level for transaction isolation. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific isolation levels. |
propagation |
Defines the transaction propagation mode for the action block. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific propagation levels. |
Valid inside <default /> are: <set-property-value />, <dequeue-report />, <webservice />, <transform />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <for-each />, <reset-translations />, <set-object />, <send-outgoing-emails />, <connect />, <remove-list />, <email />, <load-list />, <bind />, <disconnect />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <import />, <add-to-list />, <remove />, <switch />, <define-password />
<default /> is valid inside: <case />, <switch />
Creates a new password value for a given property.^The salt source
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <define-password /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref |
Defines the property model ID of the property to be modified. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
salt-source-ref |
Sets the salt-source reference. |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <define-password /> are: <execute-if />, <with-filter />
<define-password /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Deletes either the current domain object (either logically or physically
depending on the deletion mode) or domain objects related with the current
domain object, when a relation-chain-list is specified. The
delete action provides also cascading deletion. When the cascade
attribute is set to true, all domain objects of the relation chain inclusive
the current domain object are deleted.
Following example shows how to delete the current domain object.
Following example shows how to delete related domain object. In the process
only the domain objects of the last relation of each specified relation chain
will be deleted. For the example it means that all domain object of type c
that are related to a b domain object which is again related to the current
domain object (of type a) will be deleted.
Example 48.5. Deletes
<action-list>
<delete>
<relation-chain-list>
<relation-chain>
<relation-reference relation-ref="portal.domain.a.relation.b" />
<relation-reference relation-ref="portal.domain.b.relation.c" />
</relation-chain>
</relation-chain-list>
...
</delete>
</action-list>
To delete all objects of the relation chain described in the example above, you have to
set the cascade attribute to true. In this way all connected domain objects
of domain type c and b and the root domain object are deleted.
Example 48.6. Deletes domain objects cascaded
<action-list>
<delete cascade="true">
<relation-chain-list>
<relation-chain>
<relation-reference relation-ref="portal.domain.a.relation.b" />
<relation-reference relation-ref="portal.domain.b.relation.c" />
</relation-chain>
</relation-chain-list>
...
</delete>
</action-list>
Attention: This action initiates data binding and validation before it is executed.
See also{@linkRelationReferenceChainListModelImpl} and{@linkDeleteByActionModel}.
| Attributes of <delete /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
cascade |
Defines whether the objects of the relation chain are deleted
cascaded ( |
description |
Defines the description. |
disconnect-before-deletion |
Defines a flag indicating if all connections of the domain object should be disconnected before deletion. |
id |
Defines the GUID of the model. |
list-ref |
Defines a reference to a scoped list. |
object-ref |
Defines a reference to a scoped object. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <delete /> are: <relation-chain-list />, <filtered-list />, <execute-if />, <with-filter />
<delete /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Deletes domain objects of a given type (either logically or physically depending on the deletion mode). If a filter specification is provided to the action only the objects that match the filter are deleted, otherwise all objects are deleted.
The following example shows how to delete all objects of a given domain type.
Example 48.7. DeleteByAction: Delete all domain objects of a given type
<delete-by domain-type-ref="domain.location"/>
Instead of deleting all domain objects of a given type you can also define a filter specification so that the delete by action only deletes the objects which match the filter.
Example 48.8. DeleteByAction: Delete domain objects with a given filter specification
<delete-by domain-type-ref="domain.location"> <with-filter> <filter-specification> <starts-with> <property-value property-ref="domain.location.zip"/> <constant value="4" /> </starts-with> </filter-specification> </with-filter> </delete-by>
Attention: This action initiates data binding and validation before it is executed.
See also:
| Attributes of <delete-by /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
domain-type-ref (required) |
Defines the domain type of the domain objects that are deleted by this action. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <delete-by /> are: <execute-if />, <with-filter />
<delete-by /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Currently under construction. Do no yet use!
| Attributes of <dequeue-report /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <dequeue-report /> are: <execute-if />, <with-filter />
<dequeue-report /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Disconnects a source domain object (either the current domain object or a referenced domain object) from another domain objects. Thereby you can disconnect the source domain object either from a specified domain object or from a set of directly or indirectly related domain objects.
Following example shows how to disconnect the current domain object from a specified domain object.
Example 48.9. Disconnects the current domain object from a specified object
<action-list>
<disconnect target-object-ref="object.ref.b"
relation-ref="portal.domain.a.relation.b" />
</action-list>
Following example shows how to disconnect a cached domain object from a another one.
Example 48.10. Disconnects a cached domain object from a another one
<action-list>
<disconnect source-object-ref="object.ref.a"
target-object-ref="object.ref.b"
relation-ref="portal.domain.a.relation.b" />
</action-list>
To disconnect the current domain object from a set of related domain objects, you have
to specify a relation-chain-list with containing relation-chains.
Only the last domain objects of each relation chain (so the domain objects that are related by the
last relation model) are disconnected.
Example 48.11. Disconnect the current domain object from a set of related domain objects
<action-list>
<disconnect>
<relation-chain-list>
<relation-chain>
<relation-reference relation-ref="portal.domain.a.relation.b" />
<relation-reference relation-ref="portal.domain.b.relation.c" />
</relation-chain>
</relation-chain-list>
...
</disconnect>
</action-list>
Attention: This action initiates data binding and validation before it is executed.
See also the section called “<relation-chain-list />” and{@linkRelationReferenceChainModelImpl} for more details.
| Attributes of <disconnect /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
relation-ref |
Defines the relation between the source and target object. This
attribute will be ignored when a |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
source-object-ref |
Defines the source object. References a cached domain object (see the section called “Object references”). If no source object is defined, the current domain object is used as source object. |
target-object-ref |
Defines the target object that is disconnect from the source object.
References a cached domain object (see the section called “Object references”).
This attribute will be ignored when a |
Valid inside <disconnect /> are: <relation-chain-list />, <execute-if />, <with-filter />
<disconnect /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Implements the "else" block of an the section called “<if />”.
| Attributes of <else /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
isolation |
Defines the isolation level for transaction isolation. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific isolation levels. |
propagation |
Defines the transaction propagation mode for the action block. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific propagation levels. |
Valid inside <else /> are: <set-property-value />, <dequeue-report />, <webservice />, <transform />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <for-each />, <reset-translations />, <set-object />, <send-outgoing-emails />, <connect />, <remove-list />, <email />, <load-list />, <bind />, <disconnect />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <import />, <add-to-list />, <remove />, <switch />, <define-password />
Implements the email action. Emails are sent from someone to someone (as defined by the referenced properties), contain a subject and a mail body. The mail body is generated from a given template using Freemarker markup. The email action provides access to the context of the action by adding several maps to the template evaluation context:
v is a map mapping all property IDs to the actual property values for all properties
of domain objects contained in the source view, as well as all request paramater (name, value) pairs
fv is a map mapping all property IDs to the formatted property values (according to
the current runtime locale) for all properties of domain objects contained in the source view
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <email /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
from |
Sets the email-from parameter. |
from-ref |
Sets the from-reference. |
id |
Defines the GUID of the model. |
list-ref |
Defines a reference to a scoped list. |
mail-service-ref |
Sets the mail service reference |
object-ref |
Defines a reference to a scoped object. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
subject |
Sets the subject. |
template |
Sets the template. |
to |
Sets the email-to parameter. |
to-ref |
Sets the to-reference. |
Valid inside <email /> are: <parameter-set />, <filtered-list />, <execute-if />, <with-filter />
<email /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
currently under construction ... Action model for a report registration within the queue of reports to deal with later. An embedded report generation specification or a reference to a global one has to be defined.
| Attributes of <enqueue-report /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
report-generation-specification-ref |
Sets the reference to a globally used report generation specification. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <enqueue-report /> are: <execute-if />, <with-filter />
<enqueue-report /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Custom business logic preferrably will be embedded into a OpenSAGA project by using the execute action. The following
example shows two different ways of executing scripts, other means also are available - see the full attribute reference below.
<action-list>
<execute action-script="System.out.println('HelloG')"/>
<execute action-script="System.out.println(new StringBuilder()
.append('H').append('e').append('l')
.append('l').append('o')
.append('B').toString());"
scripting-dialect="bsh"/>
</action-list>
Additionally custom logic can be executed by either executing an action bean defined in some Spring context of your extension the only requirement being that the action bean implements the Action interface. Finally you can provide just a class name and the class also needs to implement the Action interface. The latter way is the least preferred as it denies you any means to have services, etc. injected into the class instance. Additionally it is the most costly way of executing business logic since class instances will be created for every call.
Attention: This action initiates data binding and validation before it is executed.
See also:
| Attributes of <execute /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <execute /> are: <script />, <parameter-set />, <execute-if />, <with-filter />
<execute /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Can be added as a modifier to all other actions to decide if the specific action should be executed given the current runtime context. See the section called “<filter-specification />” for more generic information about how to use filters.
| Attributes of <execute-if /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <execute-if /> are: <greater-than />, <is-property-modified />, <and />, <geo-within />, <matches />, <user-logged-in />, <validation-failed />, <complies-to />, <criterion />, <less-than-or-equal-to />, <has-current-element />, <is-undefined />, <has-changed />, <or />, <is-connected-to />, <can-access />, <ends-with />, <geo-contains />, <has-permission />, <contains-comparator />, <starts-with />, <not />, <equals />, <is-new />, <has-elements />, <dynamic-condition />, <true />, <less-than />, <in />, <include />, <in-transition />, <filter-pattern />, <has-type />, <greater-than-or-equal-to />, <is-super-user />, <false />, <is-defined />, <filter-pattern-set />
<execute-if /> is valid inside: <set-property-value />, <external-excel-domain-type />, <dequeue-report />, <webservice />, <transform />, <external-relational-domain-type />, <count />, <filter-specification-set />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <joined-domain-type />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <constant-domain-type />, <start-action-list />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <for-each />, <reset-translations />, <radio-buttons />, <multi-connect />, <tree-connect />, <transition />, <list-iterator />, <set-object />, <case />, <wfs-domain-type />, <send-outgoing-emails />, <connect />, <multi-connect />, <single-connect />, <remove-list />, <relation-reference />, <email />, <load-list />, <bind />, <disconnect />, <has-elements />, <filtered-list />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <agent-action />, <datagrid />, <start-action-list />, <action-list />, <radio-buttons />, <select-field />, <request-context />, <import />, <cell-format />, <add-to-list />, <remove />, <switch />, <define-password />
Implements FinallyModel as the optional third part of a try...catch...finally
action. The code in the finally block will be executed in any case not caring for whether a
validation error or some kind of exception occurred. It is guaranteed to be executed last.
The finally tag contains a list of actions and is itself an the section called “<actions />”
allowing various options for finetuning the actions.
The following example shows how to use this tag.
<try>
...
<finally>
<some-action .../>
...
</finally>
</try>
| Attributes of <finally /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
isolation |
Defines the isolation level for transaction isolation. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific isolation levels. |
propagation |
Defines the transaction propagation mode for the action block. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific propagation levels. |
Valid inside <finally /> are: <set-property-value />, <dequeue-report />, <webservice />, <transform />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <for-each />, <reset-translations />, <set-object />, <send-outgoing-emails />, <connect />, <remove-list />, <email />, <load-list />, <bind />, <disconnect />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <import />, <add-to-list />, <remove />, <switch />, <define-password />
Implements the for-each action. Each object identified by the contained the section called “<filtered-list />” will be used as the target domain object for the action list specified as the content of this model. See the section called “<action-list />” for more details about executing action lists.
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <for-each /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
list-ref |
Defines a reference to a scoped list. |
object-ref |
Defines a reference to a scoped object. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <for-each /> are: <start-action-list />, <action-list />, <filtered-list />, <execute-if />, <with-filter />
<for-each /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Defines the classical "if-then-else" sequence. See the section called “<condition />”, the section called “<then />” and the section called “<else />” for details about the contained submodels.
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <if /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <if /> are: <condition />, <then />, <else />, <execute-if />, <with-filter />
<if /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Implements an action that wraps another action list and executes all contained actions without interrupting execution when validation errors occur. This allows to gather a series of validation errors when e.g. doing view validation instead of being interrupted as soon as the first error is discovered.
The following example illustrates the usage of this action:
<ignore-validation-results>
<some-action ... />
<some-other-action .../>
...
</ignore-validation-results>
All wrapped actions will be executed and only after the ignore-validation-results
action block will the current validation status of the request be taken into consideration.
| Attributes of <ignore-validation-results /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
isolation |
Defines the isolation level for transaction isolation. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific isolation levels. |
propagation |
Defines the transaction propagation mode for the action block. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific propagation levels. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <ignore-validation-results /> are: <set-property-value />, <dequeue-report />, <webservice />, <transform />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <for-each />, <reset-translations />, <set-object />, <send-outgoing-emails />, <connect />, <remove-list />, <email />, <load-list />, <bind />, <disconnect />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <import />, <add-to-list />, <remove />, <switch />, <define-password />, <execute-if />, <with-filter />
<ignore-validation-results /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <case />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
The ImportAction provides importing data to a domain type from
either another domain type (the section called “Domain type import”) or a xml
resource (the section called “XML import”). Following sections describe the
different options and modes of importing.
The ImportAction provides two import modes 'replace' and
'update'. The default mode is 'update'.
The 'replace' mode deletes all domain objects of the domain type defined
in to-domain-type-ref and then imports the data.
The 'update' mode checks first if the importing data set already exists by searching a domain object with the same primary key. If a domain object exists, the domain object will be updated, otherwise a new one will be created.
![]() | Important |
|---|---|
When the import mode is 'update' the primary key of the
|
For importing data from another domain type, you have to specify the domain type
of the importing domain objects in the from-domain-type-ref. Furthermore
a property mapping is required that defines which property value of the from-domain-type
is stored in which property of the to-domain-type. The PropertyMappingsModel
is defined within a MappingModel. Following an example import is shown:
Example 48.12. ImportAction: import from a domain type
<import import-mode="replace" from-domain-type-ref="domain.location" to-domain-type-ref="domain.import_target" > <mapping> <property-mappings> <property-mapping source-ref="domain.location.guid" target-ref="domain.import_target.guid"/> <property-mapping source-ref="domain.location.code_uni" target-ref="domain.import_target.code_uni"/> <property-mapping source-ref="domain.location.longitude" target-ref="domain.import_target.longitude"/> <property-mapping source-ref="domain.location.latitude" target-ref="domain.import_target.latitude"/> <property-mapping source-ref="domain.location.location" target-ref="domain.import_target.location"/> <property-mapping source-ref="domain.location.zip" target-ref="domain.import_target.zip"/> <property-mapping source-ref="domain.location.country_fk" target-ref="domain.import_target.country"/> </property-mappings> </mapping> </import>
For importing data from a XML resource, you need to write a script
that creates the object from the data. The script
attribute defines the path to the import script. In the from-resource
you define the XML resource that should be imported. The definition of
the ImportAction may look like this:
Example 48.13. ImportAction: import from a XML resource
<import import-mode="replace" from-resource="/actionscripts/groovy/importsearch.xml" script="/actionscripts/groovy/importsearch.groovy" scripting-dialect="groovy" to-domain-type-ref="domain.search"/>
![]() | Note |
|---|---|
In OpenSAGA 'groovy' is the default scripting dialect. So when using groovy scripts, it is not necessary to specify the scripting dialect separately.
|
The import script is necessary for creating and filling the DomainObjects.
Therefore the script has access to the XML resource and some other objects. All created
DomainObjects have to be stored in the 'result' list, otherwise the objects
will not be imported. The table below shows the predefined objects for import scripts.
Additionally you have access to all beans that are provided by the ScriptContextInitializationService,
see the section called “What to use?”.
Predefined objects in import scripts
Object
Description
dom
The XML from-resource as a
org.opensaga.runtime.scripting.groovy.GroovyXmlNode
object (see the section called “GroovyXmlNode”).
source
The XML from-resource as a
groovy.util.slurpersupport.GPathResult object.
result
An empty list of DomainObjects. The script has to add all
DomainObjects to this list that shall be imported. After
script execution all objects in this list are stored.
The following scripts shows two different ways how to import data from a xml file like
this one:
<?xml version="1.0" encoding="utf-8"?>
<searches>
<search>
<query>Test</query>
<offset>0</offset>
<count>10</count>
</search>
<search>
<query>Foo</query>
<offset>100</offset>
<count>10</count>
</search>
<search>
<query>blub</query>
<offset>23</offset>
<count>7</count>
</search>
<search>
<query>Bar</query>
<offset>50</offset>
<count>78</count>
</search>
<search>
<query>QWERTZ</query>
<offset>987</offset>
<count>123</count>
</search>
</searches>
Example 48.14. ImportAction: example import script with GPathResult
source.search.each() {
def search = domaintype.Search.create()
search.query = it.query
search.count = Integer.parseInt(it.count.text())
search.offset1 = Integer.parseInt(it.offset.text())
result.add(search)
Example 48.15. ImportAction: example import script with GroovyXmlNode
def searchNodes = dom.xpath("searches/search");
for(searchNode in searchNodes)
{
def search = domaintype.Search.create()
search.query = searchNode.query
search.count = Integer.parseInt(searchNode.count)
search.offset1 = Integer.parseInt(searchNode.offset)
result.add(search)
}
The org.opensaga.runtime.scripting.groovy.GroovyXmlNode enables
easy accessing XML content in groovy scripts. Accessing nodes is enabled
via XPath expressions and node context accessing is enabled via property
accessing.
Accessing nodes
To access nodes, you have to use the xpath method, which returns a list of GroovyXmlNodes.
Example 48.16. GroovyXmlNode: Accessing nodes
def nodes = groovyXmlNode.xpath("/rootnode/childnode")
Accessing values
To access the text content of child nodes, you treat them like properties:
If there is no child with the given name, the value of the attribute with this name is returned, when it exists. When there is a child element and an attribute with the same name and you want to access the attribute value, you have to write an '@' before the attribute name.
org.w3c.dom.Node.getNodeValue()) or text content
(org.w3c.dom.Node.getTextContent()) of the current node, you have to use the
methods getValue() and getText().
Example 48.19. GroovyXmlNode: Accessing current node value
groovyXmlNode.getValue()
groovyXmlNode.getText()]]>
| Attributes of <import /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
from-domain-type-ref |
Defines the domain type from that the data are imported. If this attribute is specified, the domain type importing is used (see the section called “Domain type import”). |
from-resource |
Defines the xml resource from that the data are imported
via the script defined in the |
id |
Defines the GUID of the model. |
import-mode (required) |
Defines if the import shall either 'replace' or 'update'
the data in the |
import-script |
Defines the script to execute |
import-script-resource |
Defines the path to the script to execute. |
import-scripting-dialect |
Defines the dialect of the script. |
import-using-script-dialect-dir |
Defines whether the script resource path is relative to the script dialect directory or not. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
to-domain-type-ref (required) |
Defines the domain type that is used for storing the data. |
Valid inside <import /> are: <output />, <mapping />, <input />, <execute-if />, <with-filter />
<import /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
( Additional names: reset-list-iterator-index )
Resets a list for iteration. Each existing scoped domain object list contains an internal index that initially points to the first element of the list (if non empty). The current iteration element can be accessed by defining a scoped domain object reference using the ID of the scoped domain object list in the relevant place. The iteration index can be incremented using the the section called “<next-element />”.
| Attributes of <iterate-list /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scoped-domain-object-list-ref |
Defines the cached domain object list. |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <iterate-list /> are: <execute-if />, <with-filter />
( Additional names: set-list )
Loads data for a scoped list. Data can be retrieved by using a the section called “<filtered-list />” or by referencing another scoped list.
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <load-list /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
source-scoped-domain-object-list-ref |
Defines the source cached domain object list. |
target-scoped-domain-object-list-ref |
Defines the target cached domain object list. |
Valid inside <load-list /> are: <filtered-list />, <execute-if />, <with-filter />
Logs out current user. It has no effect when no user is logged in.
| Attributes of <logout /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <logout /> are: <execute-if />, <with-filter />
<logout /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Implements MapValuesActionModel.
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <map-values /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
list-ref |
Defines a reference to a scoped list. |
object-ref |
Defines a reference to a scoped object. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <map-values /> are: <output />, <mapping />, <input />, <filtered-list />, <execute-if />, <with-filter />
<map-values /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
| Attributes of <message-parameter /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref | |
value | |
<message-parameter /> is valid inside: <create-message />
Creates a new cached/target domain object or cached domain object list. If a reference to a cached domain object or list is specified, then the new domain object will be put into the specified scope, otherwise the new domain object is used as target domain object.
Example 48.21. NewAction: Creating a cached domain object
<new scoped-domain-object-ref="scoped.object"/>
Example 48.22. NewAction: Creating a cached domain object list
<new scoped-domain-object-list-ref="scoped.list" />
| Attributes of <new /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scoped-domain-object-list-ref |
Defines the reference of the cached domain object list to fill with a new list (see the section called “List references”). |
scoped-domain-object-ref |
Defines the reference of the cached domain object to fill with a new object (see the section called “Object references”). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <new /> are: <execute-if />, <with-filter />
<new /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Implements NewObjectModel.
| Attributes of <new-object /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
domain-type-ref |
Defines the domain type reference. |
id |
Defines the GUID of the model. |
Valid inside <new-object /> is: <property-mappings />
<new-object /> is valid inside: <add-to-list />
Defines a "next" iterator for scoped domain object lists incrementing the internal iteration index
by one. See the section called “<iterate-list />” for details about list iteration works as a concept. The
referenced list must exist. If the iteration index eceeds the number of contained objects nothing special
will happen ({@linkHasCurrentElementFilterModel} will return false as soon as the
current iteration run exceeds the number of contained elements).
| Attributes of <next-element /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scoped-domain-object-list-ref |
Defines the cached domain object list. |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <next-element /> are: <execute-if />, <with-filter />
<next-element /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
| Attributes of <publish-message /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
channel | |
constant-value | |
description |
Defines the description. |
id |
Defines the GUID of the model. |
object-reference | |
property-reference | |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <publish-message /> are: <execute-if />, <with-filter />
<publish-message /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Removes a scoped domain object from its scope. The domain object is not deleted in the database!
The example shows how to remove a cached domain object from its scope (assuming
p_temporary_scoped.bar_temp is a scoped domain object).
Example 48.23. RemoveAction: Remove a cached object from its scope
<remove scoped-domain-object-ref="p_temporary_scoped.bar_temp"/>
| Attributes of <remove /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scoped-domain-object-ref |
Defines the reference of the cached domain object to remove from its scope. |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <remove /> are: <execute-if />, <with-filter />
<remove /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Removes a scoped domain object list from its scope. The domain objects of the list are not deleted in the database!
The example shows how to remove a cached domain object list from its scope (assuming
p_temporary_scoped.bar_temp_list is a scoped domain object list).
Example 48.24. RemoveListAction: Remove a cached list from its scope
<remove-list scoped-domain-object-list-ref="p_temporary_scoped.bar_temp_list"/>
| Attributes of <remove-list /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scoped-domain-object-list-ref |
Defines the cached domain object list. |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <remove-list /> are: <execute-if />, <with-filter />
<remove-list /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Resets either the cache with the given name or all caches when no name is specified.
The following example shows how to reset all caches.
Sometimes you only want to reset one cache. By defining a name you can specify which cache is reseted.
The next example shows how to reset the system.cache.permissions cache.
| Attributes of <reset-cache /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the name of the cache that is reseted. |
name-ref |
Defines the reference to a property that contains the name of the cache that is reseted. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <reset-cache /> are: <execute-if />, <with-filter />
<reset-cache /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
( Additional names: iterate-list )
Resets a list for iteration. Each existing scoped domain object list contains an internal index that initially points to the first element of the list (if non empty). The current iteration element can be accessed by defining a scoped domain object reference using the ID of the scoped domain object list in the relevant place. The iteration index can be incremented using the the section called “<next-element />”.
| Attributes of <reset-list-iterator-index /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scoped-domain-object-list-ref |
Defines the cached domain object list. |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <reset-list-iterator-index /> are: <execute-if />, <with-filter />
<reset-list-iterator-index /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
The action resets all translations. That is necessary when you specify new translations. The new translation are not active until the translations are reseted.
| Attributes of <reset-translations /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <reset-translations /> are: <execute-if />, <with-filter />
<reset-translations /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Resets the current validation status. Will be most commonly used in conjunction with the section called “<catch-validation-error />” in order to prevent a transition from aborting due to validation errors.
Just call it without arguments in order to clear all possible validation errors that have occurred so far:
<reset-validation-status/>
| Attributes of <reset-validation-status /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <reset-validation-status /> are: <execute-if />, <with-filter />
<reset-validation-status /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
( Additional names: action-script )
Contains an action script. Can be referenced by the the section called “<execute />” and other scriptable models. Usually you want to surround the action script by a CDATA block in order to keep a sane syntax in the script.
| Attributes of <script /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <script /> is: text content
<script /> is valid inside: <execute />
This action sends the outgoing e-mails that are enqueued by the email action (see the section called “<email />”). The action sends the mails either of from a specified mail service or from all mail services.
The following example shows how to send the outgoing mails of the mail.service.default mail service.
Example 48.28. SendOutgoingEmailsAction: Sending the outgoing emails
<send-outgoing-emails mail-service-ref="mail.service.default" />
Attention: This action initiates data binding and validation before it is executed.
See also:
| Attributes of <send-outgoing-emails /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
mail-service-ref |
Defines the reference to the mail service that is used. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <send-outgoing-emails /> are: <execute-if />, <with-filter />
<send-outgoing-emails /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Sets programmatically the active navigation item that is referenced by the
navigation-item-ref attribute.
Example 48.29. SetActiveNavigationAction: Sets programmatically the active navigation item
<set-active-navigation navigation-item-ref="navigation.sandbox.a" />
The following example shows how to active a special navigation item.
Example 48.30. SetActiveNavigationAction: Active a navigation item programmatically
<set-active-navigation navigation-item-ref="navigation.qs_test.p_navigation_highlight.item.a" />
Usually you want to use this action to ensure that the correct navigation item entry is highlighted when a process transition switches from the current process to some other process. In that case you should call this action with an appropriate parameter as the final action of the transition to ensure that the UI will display the correctly highlighted navigation.
| Attributes of <set-active-navigation /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
navigation-item-ref |
Defines the navigation item reference to the navigation item that is highlighted by the action. The navigation item needs a id for referencing it. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <set-active-navigation /> are: <execute-if />, <with-filter />
<set-active-navigation /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
( Additional names: load-list )
Loads data for a scoped list. Data can be retrieved by using a the section called “<filtered-list />” or by referencing another scoped list.
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <set-list /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
source-scoped-domain-object-list-ref |
Defines the source cached domain object list. |
target-scoped-domain-object-list-ref |
Defines the target cached domain object list. |
Valid inside <set-list /> are: <filtered-list />, <execute-if />, <with-filter />
<set-list /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Implements the set-object action, which sets a target domain object reference to a source domain object reference.
| Attributes of <set-object /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
source-list-current-object-ref |
Defines the list from which the current iteration object should be used. |
source-object-ref |
Defines the source object reference. |
target-object-ref |
Defines the target object reference. |
Valid inside <set-object /> are: <execute-if />, <with-filter />
<set-object /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Sets a given property to a new value. Either the property is set in the current domain object or in a set of domain objects related with the current domain object. The following values can be set:
Constant value
Value from a property
Computed value by a property value provider bean
Computed value by a script
The value null
The set property value action can work in the following ways:
Setting a constant value
Example 48.31. SetPropertyValueAction: Setting a constant constant value in the current domain object
<set-property-value property-ref="domain.a.name" property-value="Test" />
Setting the value of a property of the current domain object in a set of related domain objects.
Example 48.32. SetPropertyValueAction: Setting a value of another property in a set of domain objects
<set-property-value property-ref="domain.c.name" source-property-ref="domain.a.name"> <relation-chain-list> <relation-chain> <relation-reference relation-ref="portal.domain.a.relation.b" /> <relation-reference relation-ref="portal.domain.b.relation.c" /> </relation-chain> </relation-chain-list> </set-property-value>
Setting a value that is computed by a property value provider bean
Example 48.33. SetPropertyValueAction: Setting a value with a property value provider bean
<set-property-value property-ref="domain.a.guid" property-value-provider-bean="guidPropertyValueProvider" />
Setting a value that is computed by a script resource. The script file must be in the
/extensions/[extensions-name]/actionscripts/[dialect-name]/ folder.
Example 48.34. SetPropertyValueAction: Setting a value with a property value provider bean
<set-property-value property-ref="domain.a.guid" value-script-resource="test.js" scripting-dialect="javascript" />
Alternative you can define the script directly in the xml file by using the value-script attribute.
Setting a property value to null
You can null property values by specifying no value at all, e.g.:
<set-property-value property-ref="some.property.ref"/>
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <set-property-value /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref |
Defines the property model ID of the property to be modified. |
property-value |
Defines a constant value that is set by this action. Only if
no |
property-value-provider-bean |
Define the property value provider bean that is used for setting the value. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
source-property-ref |
Defines the reference to a property. The value of this property
is set in the property defined by |
value-property-ref |
Defines the source property reference. Delegates to #setSourcePropertyReference(String). See also:
|
value-script |
Defines the script to execute |
value-script-resource |
Defines the path to the script to execute. |
value-scripting-dialect |
Defines the dialect of the script. |
value-using-script-dialect-dir |
Defines whether the script resource path is relative to the script dialect directory or not. |
Valid inside <set-property-value /> are: <relation-chain-list />, <execute-if />, <with-filter />
<set-property-value /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Implements the store action. If a cached domain object is referenced only that object will be stored. Otherwise all objects contained in the source view (e.g. the main object and the objects referenced by parts of the the section called “<view />”) will be stored.
Additionally it is possible to store the target domain object which only is required when you alter it during the current transition by e.g. connecting or disconnecting it to other objects (see the section called “<connect />” and the section called “<disconnect />”).
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <store /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
object-identified-by-property-ref |
Defines the property reference used to identify the object that should be stored. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scoped-domain-object-list-ref |
Defines the reference of the cached domain object list to sore. |
scoped-domain-object-ref |
Defines the reference of the cached domain object to store. |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
target-domain-object |
Indicates if the target domain object should be stored. Usually you only will set this attribute
to |
Valid inside <store /> are: <execute-if />, <with-filter />
<store /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Defines an action model for a classical switch statement.
An example for the switch sequence is:
<switch property-ref="...">
<case>
<constant value="..." | property-value property-ref="..." .../>
<action-list>...</action-list>
<action-list>...</action-list>
<action-list>...</action-list>
</case>
<case>...</case>
<default>
<action-list>...</action-list>
</default>
</switch>
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <switch /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref |
Defines the reference to a property in the current runtime context. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <switch /> are: <case />, <default />, <execute-if />, <with-filter />
<switch /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Implements system logging. A message for an arbitrary component and an arbitrary logging level will be written to the system log which can be accessed from the administration processes and which is defined via specific models in the OpenSAGA base. The component is an arbitrary string that you can use to segment application-defined logging messages. The logging level also is an arbitrary string that can be used for application specific logging levels and types.
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <system-log /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
component |
Defines the component of the message. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
level |
Defines the level of the message. |
list-ref |
Defines a reference to a scoped list. |
message |
Defines a literal message. |
object-ref |
Defines a reference to a scoped object. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <system-log /> are: <parameters />, <filtered-list />, <execute-if />, <with-filter />
<system-log /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Implements tagging functionality as known from typical Web 2.0 applications.
The value contained in the source property will be split into a list of strings according to the given separator value and separation strategy (see below for custom separation strategies). For each string value the tag action will text if the tag already exists in the referenced domain type and under the referenced domain type property. If the tag does not yet exist a new entry will be created in the referenced domain type and connected to the target domain object via the given relation. Finally you can specific a connection mode that either replaces existing tags or adds to the set of existing tags. The default mode is to add new tags to the current set.
Note that it is possible to introduce custom tag separation logic by defining either a tag separator bean (which must exist in some Spring context of the current application) or a tag separator class. Either the bean or the class need to implement the TagSeparator interface.
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <tag /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
list-ref |
Defines a reference to a scoped list. |
mode |
Determines the way the tag action combines a new list of tags with an already existing tag list. "add" adds all elements of the new list to the old, "replace" replaces the old list with the new one. |
name-property-ref (required) |
Reference to the label property within the tag |
object-ref |
Defines a reference to a scoped object. |
relation-ref (required) |
Reference to the relation connecting the tagged type and the tag type. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
separator-bean | |
separator-class | |
source-tag-property-ref (required) |
The property reference containing the separated tag names |
tag-domain-type-ref (required) |
Reference to the tag type. |
tagged-object-ref |
ScopedDomainObject to tag. (default is the target domain object) |
to-list-ref | |
Valid inside <tag /> are: <filtered-list />, <execute-if />, <with-filter />
<tag /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Implements the "then" part of an the section called “<if />”.
| Attributes of <then /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
isolation |
Defines the isolation level for transaction isolation. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific isolation levels. |
propagation |
Defines the transaction propagation mode for the action block. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific propagation levels. |
Valid inside <then /> are: <set-property-value />, <dequeue-report />, <webservice />, <transform />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <for-each />, <reset-translations />, <set-object />, <send-outgoing-emails />, <connect />, <remove-list />, <email />, <load-list />, <bind />, <disconnect />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <import />, <add-to-list />, <remove />, <switch />, <define-password />
Transforms data of the current domain object. The action needs two property references. One for reading the input data and the other for writing the transformed data. The transformation that is performed on the data is defined in a transformer-list (see chapter Chapter 26, Transformation).
Attention: This action initiates data binding and validation before it is executed.
See also:
| Attributes of <transform /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
source-property-ref |
Defines the source property to read the data from for the transformation. |
target-property-ref |
Defines the target property to write the transformed data into. |
Valid inside <transform /> are: <transformer-list />, <execute-if />, <with-filter />
<transform /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Wraps the execution of a given action list and provides means to handle error results of said execution. The general form of tag usage is:
<try>
<action-list>
...
</action-list>
<catch-validation-error>
...
</catch-validation-error>
<catch-exception [exception-type="foo.*|foo.bar.Baz|Baz"]>
...
</catch-exception>
<finally>
...
</finally>
</try>
The semantics for this construct are defined as follows:
The try action list will execute. It aborts if either a validation error
or an exception occurs during execution.
If a validation error occurs in the try block the (optional)
catch-validation-error block (see the section called “<catch-validation-error />”) will execute.
If an exception occurs in the try the (optional) catch-exception
block (see the section called “<catch-exception />”) will execute. All such blocks will be checked
sequentially and the first match executes.
The finally block will start executing. It ignores initial validation errors
(this it also will execute after validation errors and exceptions) but it will abort as soon
as a new validation error or exception occurs. See the section called “<finally />” for details.
| Attributes of <try /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <try /> are: <start-action-list />, <action-list />, <catch-validation-error />, <catch-exception />, <finally />, <execute-if />, <with-filter />
<try /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Implements a tweet action in order to be able to tweet to Twitter. Due to unresolved licensing
questions we failed to address before OpenSAGA 1.0.0 this action had to be disabled. We are working on this issue.
Please contact us if this functionality is important for you to help steering us into the right direction.
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <tweet /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
message-property-ref |
Defines the message to tweet. |
password-property-ref |
Defines the Twitter password. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
user-property-ref |
Defines the Twitter user. |
Valid inside <tweet /> are: <execute-if />, <with-filter />
<tweet /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Validates a given domain object (either the target domain object or a given scoped domain object). The action checks all restrictions that are defined in the domain type of the domain object.
Example 48.37. ValidateAction: Validating a scoped domain object
<validate scoped-domain-object-ref="validate.object" />
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <validate /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
continue-after-validation-failed |
Defines the "continue after validation failed" flag. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scoped-domain-object-ref |
Defines the reference to the scoped domain object that is validated by
this action. If no See also: |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
Valid inside <validate /> are: <restriction-set />, <execute-if />, <with-filter />
<validate /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
Allows to programmatically define validation errors.
| Attributes of <validation-error /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
content-element-ref |
Defines a field reference to which the validation error belongs. See Chapter 22, Content Elements for details about possible content elements. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
text |
Defines the validation error message tag which represents the translated error text. |
Valid inside <validation-error /> are: <execute-if />, <with-filter />
<validation-error /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
This action calls a web service and stores the result. Because this action is more complicated it is described in a separated chapter. So for more information see Chapter 24, Web Service Clients.
Attention: This action initiates data binding and validation before it is executed.
| Attributes of <webservice /> | |
|---|---|
| Attribute | Description |
action-bean |
Defines the action bean to execute. The action bean must implement Action. |
action-class |
Defines the fully qualified class name for the actual action. The action class must implement Action. |
action-script |
Defines the action script to execute. |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
domain-type-ref |
Defines the domain type reference. |
id |
Defines the GUID of the model. |
operation-name |
Defines the operation name. |
requires-binding |
Defines whether any parameters send by the client should be bound (and validated). |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
target-tag |
Defines the target tag. |
webservice-script |
Defines the script to execute |
webservice-script-resource |
Defines the path to the script to execute. |
webservice-scripting-dialect |
Defines the dialect of the script. |
webservice-using-script-dialect-dir |
Defines whether the script resource path is relative to the script dialect directory or not. |
wsdl-path |
Defines the WSDL path. |
Valid inside <webservice /> are: <execute-if />, <with-filter />
<webservice /> is valid inside: <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <else />, <default />, <then />, <start-action-list />, <on-update />, <catch-exception />, <on-delete />, <on-create />, <actions />, <on-insert />, <catch-validation-error />, <action-list />, <finally />, <on-insert />, <catch-validation-error />, <ignore-validation-results />, <start-action-list />, <action-list />, <finally />
This filter is used by some actions that require a local filter definition for their custom business logic. Currently only the the section called “<delete-by />” makes use of this feature.
| Attributes of <with-filter /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <with-filter /> are: <greater-than />, <is-property-modified />, <and />, <geo-within />, <matches />, <user-logged-in />, <validation-failed />, <complies-to />, <criterion />, <less-than-or-equal-to />, <has-current-element />, <is-undefined />, <has-changed />, <or />, <is-connected-to />, <can-access />, <ends-with />, <geo-contains />, <has-permission />, <contains-comparator />, <starts-with />, <not />, <equals />, <is-new />, <has-elements />, <dynamic-condition />, <true />, <less-than />, <in />, <include />, <in-transition />, <filter-pattern />, <has-type />, <greater-than-or-equal-to />, <is-super-user />, <false />, <is-defined />, <filter-pattern-set />
<with-filter /> is valid inside: <set-property-value />, <external-excel-domain-type />, <dequeue-report />, <webservice />, <transform />, <external-relational-domain-type />, <count />, <filter-specification-set />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <joined-domain-type />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <constant-domain-type />, <start-action-list />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <for-each />, <reset-translations />, <radio-buttons />, <multi-connect />, <tree-connect />, <transition />, <list-iterator />, <set-object />, <case />, <wfs-domain-type />, <send-outgoing-emails />, <connect />, <multi-connect />, <single-connect />, <remove-list />, <relation-reference />, <email />, <load-list />, <bind />, <disconnect />, <has-elements />, <filtered-list />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <agent-action />, <datagrid />, <start-action-list />, <action-list />, <radio-buttons />, <select-field />, <request-context />, <import />, <cell-format />, <add-to-list />, <remove />, <switch />, <define-password />
Table of Contents
Provides the complex action behavior of an agent. The complex behavior is made up from a complex action list (as defined in the section called “<actions />”) and a condition (as defined by a the section called “<filter-specification />”) which specifies if the given list should be executed under the current runtime context.
| Attributes of <agent-action /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <agent-action /> are: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <start-action-list />, <action-list />
<agent-action /> is valid inside: <agent-action-list />
Contains a list of the section called “<agent-action />”s that define the behavior of the agent.
| Attributes of <agent-action-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <agent-action-list /> is: <agent-action />
<agent-action-list /> is valid inside: <trigger-based-agent />, <event-based-agent />, <domaintype-based-agent />, <time-based-agent />, <domaintype-based-agent />
Defines a reference to a top level the section called “<agents />” when enumerating all available agents via the section called “<agents />”.
| Attributes of <agent-reference /> | |
|---|---|
| Attribute | Description |
agent-ref |
Defines the agent reference. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
<agent-reference /> is valid inside: <agents />
Enumerates all agents defined via top level the section called “<agents />” models that current exist in the application.
| Attributes of <agents /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the model name. |
Valid inside <agents /> is: <agent-reference />
Defines an agent with DB-like trigger functionality. The agent listens to event from a specific given domain type model and reacts to those events. Valid event trigger IDs are defined in AgentEventIds. The event source (the domain object being accessed) will be the target domain object when the agent actions are executed.
| Attributes of <domaintype-based-agent /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
domain-type-ref |
Defines the domain type model. |
id |
Defines the GUID of the model. |
name |
Defines the agent name. |
trigger-event-id |
Defines the trigger event ID. See AgentEventIds for valid event trigger IDs built into the system. |
Valid inside <domaintype-based-agent /> is: <agent-action-list />
Implements an agent that reacts to specific event triggers and executes actions based on the current runtime context.
| Attributes of <event-based-agent /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the agent name. |
trigger-event-id |
Defines the trigger event ID. See AgentEventIds for valid event trigger IDs built into the system. |
Valid inside <event-based-agent /> is: <agent-action-list />
Defines a time base agent that can handle a simple repeat/interval trigger or a more complex cron expression.
| Attributes of <time-based-agent /> | |
|---|---|
| Attribute | Description |
cron-expression |
Sets the cron expression string |
description |
Defines the description. |
end-time |
Defines the end time. |
id |
Defines the GUID of the model. |
name |
Defines the agent name. |
repeat-count |
Defines the repeat count. |
repeat-interval |
Defines the repeat interval in milliseconds. |
start-time |
Defines the start time. |
Valid inside <time-based-agent /> is: <agent-action-list />
Describes agents that must be explicitly triggered by external events. Such agents usually are directly addressed with their ID, e.g. by an action:
<trigger agent-ref="foo"/>
| Attributes of <trigger-based-agent /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the agent name. |
Valid inside <trigger-based-agent /> is: <agent-action-list />
Table of Contents
( Additional names: h1, h2, h3, h4, h5, h6, b, em, p, ul, li, ol, dl, dt, dd, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <a /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <a /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
This tag defines an attachment related content element. E.g. for uploading some binary document, but also to embed, edit or link attachments in a domain type.
Example 50.1. Attachment Element
<attachment id="attachment" property-ref="domain.test.attachment" display-mode="upload"/>
| Attributes of <attachment /> | |
|---|---|
| Attribute | Description |
accept |
Sets the accept value for the file upload that gets passed through to HTML. |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
display-mode |
Defines the mode of the attachment element. Valid modes are |
id |
Defines the GUID of the model. |
max-height |
Sets the maximum image height for displaying the attachment |
max-length |
Sets the maximum attachment length in bytes. |
max-width |
Sets the maximum image width for displaying the attachment |
mode |
Sets a fixed write mode for this attachment model. |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
Valid inside <attachment /> are: <disabled-if />, <read-only-if />, <style-set />
<attachment /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
A datagrid column displaying attachments.
| Attributes of <attachment-column /> | |
|---|---|
| Attribute | Description |
attachment-max-height |
Sets the maximum attachment display height. |
attachment-max-width |
Sets the maximum attachment display width. |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
display-mode |
Sets the attachment display mode for this |
escape-data |
If set to |
filter-mode |
Defines the filter mode for the property. |
heading |
Defines the heading. |
id |
Defines the GUID of the model. |
info |
Sets the column info for this
The javascript |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
sortable |
Set this to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
target-domain-type-ref |
Defines the target domain type reference. |
transition-ref |
Sets the id of the transition invoked when clicking on this column. |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
Valid inside <attachment-column /> are: <cell-format-set />, <style-set />
<attachment-column /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <datagrid-column-list />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
Specialization of a filter specification model that filters the data for a auto-completing the section called “<text-field />”.
| Attributes of <auto-complete-filter /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <auto-complete-filter /> are: <greater-than />, <is-property-modified />, <and />, <geo-within />, <matches />, <user-logged-in />, <validation-failed />, <complies-to />, <criterion />, <less-than-or-equal-to />, <has-current-element />, <is-undefined />, <has-changed />, <or />, <is-connected-to />, <can-access />, <ends-with />, <geo-contains />, <has-permission />, <contains-comparator />, <starts-with />, <not />, <equals />, <is-new />, <has-elements />, <dynamic-condition />, <true />, <less-than />, <in />, <include />, <in-transition />, <filter-pattern />, <has-type />, <greater-than-or-equal-to />, <is-super-user />, <false />, <is-defined />, <filter-pattern-set />
<auto-complete-filter /> is valid inside: <external-excel-domain-type />, <external-relational-domain-type />, <count />, <filter-specification-set />, <text-field />, <password />, <joined-domain-type />, <constant-domain-type />, <start-action-list />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <radio-buttons />, <multi-connect />, <tree-connect />, <transition />, <list-iterator />, <case />, <wfs-domain-type />, <multi-connect />, <single-connect />, <relation-reference />, <has-elements />, <filtered-list />, <agent-action />, <datagrid />, <start-action-list />, <action-list />, <radio-buttons />, <select-field />, <request-context />, <cell-format />, <password />
Defines an data export options. Supported formats are (using JasperReports):
html
xls
csv
xml
xmlss
odt
rtf
txt
| Attributes of <available-export /> | |
|---|---|
| Attribute | Description |
action-script-resource |
Defines a action script resource to execute. |
description |
Defines the description. |
format |
Sets the format of the available export. |
generator |
Sets the generator. |
icon |
Defines the icon. |
id |
Defines the GUID of the model. |
rows |
Returns the rows. |
scripting-dialect |
Defines the scripting dialect for scripts to be executed. Defaults to |
template |
Sets the template. |
text (required) |
Sets the tag of the available export. |
title |
Returns the title. |
<available-export /> is valid inside: <available-export-list />
Defines the available data export types for a the section called “<datagrid />”.
| Attributes of <available-export-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <available-export-list /> is: <available-export />
<available-export-list /> is valid inside: <list-iterator />, <datagrid />
( Additional names: a, h1, h2, h3, h4, h5, h6, em, p, ul, li, ol, dl, dt, dd, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <b /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <b /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
A datagrid column displaying boolean values as optional icon and/or text.
| Attributes of <boolean-column /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
escape-data |
If set to |
false-icon |
Sets the icon to be displayed if the value is |
false-text |
Sets the text to be displayed if the value is |
filter-mode |
Defines the filter mode for the property. |
heading |
Defines the heading. |
id |
Defines the GUID of the model. |
info |
Sets the column info for this
The javascript |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
sortable |
Set this to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
target-domain-type-ref |
Defines the target domain type reference. |
transition-ref |
Sets the id of the transition invoked when clicking on this column. |
true-icon |
Sets the icon to be displayed if the value is |
true-text |
Sets the text to be displayed if the value is |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
Valid inside <boolean-column /> are: <cell-format-set />, <style-set />
<boolean-column /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <datagrid-column-list />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
Displays a boolean-value in the form of icons or images with a variable String.
Example:
| Attributes of <boolean-element /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
false-icon |
Icon to be displayed in the |
false-resource |
Resource path of the image resource to be displayed for the |
false-text |
Internationalized Text to be displayed in the |
id |
Defines the GUID of the model. |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
true-icon |
Icon to be displayed in the |
true-resource |
Resource path of the image resource to be displayed for the |
true-text |
Internationalized Text to be displayed in the |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
Valid inside <boolean-element /> is: <style-set />
<boolean-element /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
( Additional names: a, h1, h2, h3, h4, h5, h6, b, em, p, ul, li, ol, dl, dt, dd, strong, hr, div, span, pre )
Creates a HTML element with the model name.
| Attributes of <br /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <br /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
( Additional names: link )
Defines a command button that triggers a transition if the user clicks on it. The button can have an icon and a text.
| Attributes of <button /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
disable | |
icon |
Defines the icon used for this button. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
target |
Sets the link target for the given command link. This will only work if
|
text |
Defines the button text. |
text-property-ref |
References a property to receive the command button text from. |
transition-ref (required) |
Defines the transition ID. |
Valid inside <button /> are: <disabled-if />, <visible-if />, <style-set />
Displays a column of buttons.
| Attributes of <button-column /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
disable | |
heading |
Sets the column heading for this button column. |
icon |
Defines the icon used for this button. |
id |
Defines the GUID of the model. |
info | |
show-text |
If set to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
target |
Sets the link target for the given command link. This will only work if
|
target-domain-type-ref |
Defines the target domain type reference. If you use the datagrid to display a joined domain type, you can use this attribute to specify that the column uses the primary key of the target domain type instead of the primary key of the joined domain type. |
text |
Defines the button text. |
text-property-ref |
References a property to receive the command button text from. |
transition-ref (required) |
Defines the transition ID. |
Valid inside <button-column /> are: <cell-format-set />, <disabled-if />, <visible-if />, <style-set />
<button-column /> is valid inside: <content />, <content-group />, <tab />, <datagrid-column-list />, <list-iterator />, <column />, <toolbar />, <a />, <col />
Defines the rules for providing a the section called “<datagrid />” row with additional HTML classes based on a filter specification. CSS rules can be defined for the classes added to highlight certain data grid rows or cells based on their content.
| Attributes of <cell-format /> | |
|---|---|
| Attribute | Description |
class (required) |
Sets the class names to set when the filter specification model matches the current object in the data grid. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <cell-format /> are: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />
<cell-format /> is valid inside: <cell-format-set />
Represents a set of formatting rules applied to data grid cells if
a configured filter returns true for the object of the
current data grid row.
If the the section called “<cell-format-set />” is defined directly on the data grid,
it sets its class to every cell of the complete row. If it's added to a
column, it only sets its class on the cell in that column.
| Attributes of <cell-format-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <cell-format-set /> is: <cell-format />
<cell-format-set /> is valid inside: <property-column />, <url-column />, <boolean-column />, <attachment-column />, <button-column />, <url-column />, <boolean-column />, <attachment-column />, <datagrid />
This tag provides a checkbox ('selected' vs. 'unselected') element.
Example 50.2. Checkbox Element
<checkbox id="positionOrdered" property-ref="domain.position.ordered"/>
| Attributes of <checkbox /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
mode |
Sets a constant write mode for this widget. |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
Valid inside <checkbox /> are: <on-update-refresh />, <disabled-if />, <read-only-if />, <style-set />
<checkbox /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
Special button to clear the filter on filtered data grids. Normally only used by the ModelAutoCompleter.
| Attributes of <clear-filter-button /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
disable | |
icon |
Defines the icon used for this button. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
target |
Sets the link target for the given command link. This will only work if
|
text |
Defines the button text. |
text-property-ref |
References a property to receive the command button text from. |
transition-ref (required) |
Defines the transition ID. |
Valid inside <clear-filter-button /> are: <disabled-if />, <visible-if />, <style-set />
<clear-filter-button /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <toolbar />, <a />, <col />
Displays CMS content.
| Attributes of <cms-content /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
cms-content-source (required) |
Defines the name of the used cms content source. |
content-path (required) |
Defines the content path of the content that is shown by this element. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <cms-content /> is: <style-set />
<cms-content /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
Blueprint layout column inside a the section called “<hgroup />”.
| Attributes of <col /> | |
|---|---|
| Attribute | Description |
append |
Sets the number of columns appended to the right of this column. |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
prepend |
Sets the number of column prepended to the left of this column. |
pull |
Sets the number of layout columns this column is pulled out. |
push |
Sets the number of layout columns this column is pushed in. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
width |
Sets the width in layout columns. |
Valid inside <col /> are: <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <disabled-if />, <read-only-if />, <visible-if />, <style-set />
<col /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <hgroup />, <a />, <col />
( Additional names: collapse-link )
Widget that hides or shows its target reference.
| Attributes of <collapse-button /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
disable | |
icon |
Defines the icon used for this button. |
id |
Defines the GUID of the model. |
open |
If |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
target |
Sets the link target for the given command link. This will only work if
|
target-ref |
Id of the content element model that you want to hide or show. |
text |
Defines the button text. |
text-property-ref |
References a property to receive the command button text from. |
transition-ref (required) |
Defines the transition ID. |
uncollapse-icon |
Sets the icon used in the uncollapsed/open state. |
Valid inside <collapse-button /> are: <disabled-if />, <visible-if />, <style-set />
( Additional names: collapse-button )
Widget that hides or shows its target reference.
| Attributes of <collapse-link /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
disable | |
icon |
Defines the icon used for this button. |
id |
Defines the GUID of the model. |
open |
If |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
target |
Sets the link target for the given command link. This will only work if
|
target-ref |
Id of the content element model that you want to hide or show. |
text |
Defines the button text. |
text-property-ref |
References a property to receive the command button text from. |
transition-ref (required) |
Defines the transition ID. |
uncollapse-icon |
Sets the icon used in the uncollapsed/open state. |
Valid inside <collapse-link /> are: <disabled-if />, <visible-if />, <style-set />
<collapse-link /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <toolbar />, <a />, <col />
Content element representing a column in an layout table.
| Attributes of <column /> | |
|---|---|
| Attribute | Description |
alignment |
Defines the column alignment. |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
span |
Defines the column span. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <column /> are: <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
<column /> is valid inside: <row />, <filter-row />, <content />, <content-group />, <tab />, <list-iterator />, <column />, <filter-row />, <a />, <col />
Contains all content / widgets of a part.
| Attributes of <content /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <content /> are: <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
<content /> is valid inside: <part />, <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
Defines a group of content elements that may be refreshed by a the section called “<on-update-refresh />”. The content grouph has an optional border and optional heading.
| Attributes of <content-group /> | |
|---|---|
| Attribute | Description |
anchor |
Sets the HTML anchor name generated for this content group. |
border |
Set this to |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
heading |
Sets the internationalization key for the heading of this content group. |
heading-property-ref |
References a property from which the heading text is received. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <content-group /> are: <disabled-if />, <read-only-if />, <visible-if />, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
<content-group /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
Data grid widget that can display domain types in a tabular fashion and also act as navigational helper for such data.
There are three basic data grid modes:
Example 50.3. Simple data grid with user filter
<datagrid domain-type-ref="faq.d_faq" filter="opened"> <datagrid-column-list> <property-column property-ref="faq.d_faq.question" filter-mode="contains"/> <button-column text="Edit" transition-ref="faq.p_faq.v_faq_list.t_edit"/> </datagrid-column-list> </datagrid>
The example above shows a basic datagrid displaying the question property from the FAQ example and a button that invokes a transition to the edit page for that FAQ type.
The filter and filter-mode attributes enable a user filter on this Datagrid. The nescessary filter fields etc
are created automatically. The displayed domain type can the filtered with a child the section called “<filter-specification />”.
Example 50.4. Object relative data grid
<datagrid heading="Role List" domain-type-ref="base.d_role" object-relative="true"> <relation-chain> <relation-reference relation-ref="base.r_base.d_user_base.d_role"/> </relation-chain> <datagrid-column-list> <property-column heading="Role Name" property-ref="base.d_role.name"/> <property-column heading="Comment" property-ref="base.d_role.comment"/> </datagrid-column-list> <sort-order-list> <sort-order property-ref="base.d_role.name"/> </sort-order-list> </datagrid>
This example out the base processes shows the roles connected to the current user. The view's domain-type-reference is set to the user domain type
and the relation-chain references the relation with which users are connected to roles. The data grid is sorted by the role name.
Example 50.5. Data grid showing a scoped domain object list
<datagrid heading="Virtual Foo List" scoped-domain-object-list-ref="list.of.foo"> <datagrid-column-list> <property-column heading="Name" property-ref="sandbox.foo.name" /> </datagrid-column-list> <available-export-list> <available-export generator="jasper" format="pdf" icon="export_pdf" text="PDF" title="Export to PDF" /> </available-export-list> </datagrid>
"list.of.foo" and allows exporting of the data grid to PDF.
| Attributes of <datagrid /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
create-joined-domain-type |
Defines the flag indicating if a joined domain type has to be created. |
description |
Defines the description. |
domain-type-ref |
Defines the top level domain type to be listed in this data grid. |
escape-data |
If set to |
filter |
Defines the filter display mode. To enable user filtering you also have to define a |
heading |
Defines the data grid heading internationalization key. |
id |
Defines the GUID of the model. |
object-relative |
Defines if the data grid as object relative. You also need to include a child RelationReferenceChainModel to define the relative type. |
scoped-domain-object-list-ref |
Defines a reference to a cached domain object list. |
show-row-count |
Disables display of the row count if set to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
transition-ref |
References the object transition which is the transition that is executed when the user clicks on a the section called “<property-column />” in the data grid.
To enable different transitions per column, you have to set the |
Valid inside <datagrid /> are: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <sort-order-list />, <cell-format-set />, <info-header-row-list />, <relation-chain />, <paging />, <datagrid-column-list />, <toolbar />, <available-export-list />, <header-row-list />, <footer-row-list />, <on-update-refresh />, <filter-row />, <style-set />
<datagrid /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
Contains and orders all columns inside a the section called “<datagrid />”.
| Attributes of <datagrid-column-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <datagrid-column-list /> are: <property-column />, <button-column />, <url-column />, <boolean-column />, <attachment-column />
<datagrid-column-list /> is valid inside: <datagrid />
( Additional names: a, h1, h2, h3, h4, h5, h6, b, em, p, ul, li, ol, dl, dt, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <dd /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <dd /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
Special button that enables the use of the debug console on a page. This widget is inserted automatically if your
the section called “<stage />”'s debug-console attribute is set to true.
| Attributes of <debug-console /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
disable | |
icon |
Defines the icon used for this button. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
target |
Sets the link target for the given command link. This will only work if
|
text |
Defines the button text. |
text-property-ref |
References a property to receive the command button text from. |
transition-ref (required) |
Defines the transition ID. |
Valid inside <debug-console /> are: <disabled-if />, <visible-if />, <style-set />
<debug-console /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <toolbar />, <a />, <col />
Specialization of a filter specification model that sets writing models to disabled if it evaluates to true.
| Attributes of <disabled-if /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <disabled-if /> are: <greater-than />, <is-property-modified />, <and />, <geo-within />, <matches />, <user-logged-in />, <validation-failed />, <complies-to />, <criterion />, <less-than-or-equal-to />, <has-current-element />, <is-undefined />, <has-changed />, <or />, <is-connected-to />, <can-access />, <ends-with />, <geo-contains />, <has-permission />, <contains-comparator />, <starts-with />, <not />, <equals />, <is-new />, <has-elements />, <dynamic-condition />, <true />, <less-than />, <in />, <include />, <in-transition />, <filter-pattern />, <has-type />, <greater-than-or-equal-to />, <is-super-user />, <false />, <is-defined />, <filter-pattern-set />
<disabled-if /> is valid inside: <external-excel-domain-type />, <row />, <filter-row />, <clear-filter-button />, <login-button />, <clear-filter-button />, <login-button />, <button />, <button-column />, <debug-console />, <collapse-link />, <help-button />, <external-relational-domain-type />, <count />, <button-column />, <filter-specification-set />, <text-field />, <password />, <joined-domain-type />, <content-group />, <constant-domain-type />, <select-popup />, <checkbox />, <start-action-list />, <debug-console />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <textarea />, <radio-buttons />, <radio-buttons />, <rich-text-field />, <locale-select />, <multi-connect />, <multi-connect />, <tree-connect />, <tree-connect />, <transition />, <list-iterator />, <case />, <wfs-domain-type />, <location-field />, <multi-connect />, <single-connect />, <multi-connect />, <single-connect />, <relation-reference />, <collapse-link />, <filter-row />, <hgroup />, <has-elements />, <help-button />, <filtered-list />, <attachment />, <agent-action />, <datagrid />, <start-action-list />, <action-list />, <radio-buttons />, <select-field />, <radio-buttons />, <select-field />, <request-context />, <cell-format />, <password />, <col />
( Additional names: a, h1, h2, h3, h4, h5, h6, b, em, p, ul, li, ol, dl, dt, dd, strong, hr, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <div /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <div /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
( Additional names: a, h1, h2, h3, h4, h5, h6, b, em, p, ul, li, ol, dt, dd, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <dl /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <dl /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
( Additional names: a, h1, h2, h3, h4, h5, h6, b, em, p, ul, li, ol, dl, dd, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <dt /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <dt /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
( Additional names: a, h1, h2, h3, h4, h5, h6, b, p, ul, li, ol, dl, dt, dd, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <em /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <em /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
This tag displays a validation error message for another tag. If no error is present, no content will be produced during rendering.
Example 50.6. Error Message Element
<text-field id="personName" property-ref="domain.person.name"/> <error-message target-ref="personName"/>
| Attributes of <error-message /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
target-ref (required) |
Specifies the related element. A valid element ID must be given. |
Valid inside <error-message /> is: <style-set />
<error-message /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
This tag produces a list of all registered error messages that are not bound to a tag. Only will be rendered if one relevant message is present at least.
| Attributes of <error-message-list /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
global-only |
Sets this to |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
title-tag |
Title to use for the error list. If rendering (at least one relevant message is present) an additional title tag with the given text key will be produced.
|
Valid inside <error-message-list /> is: <style-set />
<error-message-list /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
Displays a java exception including stack trace if the stage is in development-mode.
See also:
| Attributes of <exception /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <exception /> is: <style-set />
<exception /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
This tag provides an external link.
Example 50.8. External Link Element
<external-link target="_blank" text="An External Link" url="http://www.google.com"/>
| Attributes of <external-link /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
target |
Specifies the HTML target attribute. |
text |
Specifies the text key to specify the displayed link text. |
url |
Specifies the link URL. |
Valid inside <external-link /> is: <style-set />
<external-link /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
Widget that can upload files to be processed by a script. If you just want to upload and store files, you might want to use an the section called “<attachment />”.
| Attributes of <file-upload /> | |
|---|---|
| Attribute | Description |
accept |
Sets the accept value for the file upload that gets passed through to HTML. |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <file-upload /> is: <style-set />
<file-upload /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
Data grid row containing filter fields ; normally created by model enhancement automatically.
| Attributes of <filter-row /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
span |
Defines the row span. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <filter-row /> are: <column />, <disabled-if />, <read-only-if />, <visible-if />, <style-set />
<filter-row /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <footer-row-list />, <a />, <datagrid />, <header-row-list />, <grid />, <col />
Contains a list of fixed data grid rows to be inserted after the data rows.
| Attributes of <footer-row-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <footer-row-list /> are: <row />, <filter-row />
<footer-row-list /> is valid inside: <datagrid />
A layout table grid that can be used with a layout manager.
| Attributes of <grid /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
layout |
Name of the layout used for this grid model. There is currently one predefined layout manager named "gridFormLayout" which will resize labels and input widgets in alternating columns to fill the enclosing layout column, restrained to a maximum width. This attribute must correspond to a layout manager bean with the same name with or without "Manager" suffix. You can define other layout managers as spring beans. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <grid /> are: <row />, <filter-row />, <style-set />
<grid /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
( Additional names: a, h2, h3, h4, h5, h6, b, em, p, ul, li, ol, dl, dt, dd, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <h1 /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <h1 /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
( Additional names: a, h1, h3, h4, h5, h6, b, em, p, ul, li, ol, dl, dt, dd, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <h2 /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <h2 /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
( Additional names: a, h1, h2, h4, h5, h6, b, em, p, ul, li, ol, dl, dt, dd, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <h3 /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <h3 /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
( Additional names: a, h1, h2, h3, h5, h6, b, em, p, ul, li, ol, dl, dt, dd, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <h4 /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <h4 /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
( Additional names: a, h1, h2, h3, h4, h6, b, em, p, ul, li, ol, dl, dt, dd, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <h5 /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <h5 /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
( Additional names: a, h1, h2, h3, h4, h5, b, em, p, ul, li, ol, dl, dt, dd, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <h6 /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <h6 /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
Contains a list of fixed rows inserted in the data grid after all headers but before the data rows.
| Attributes of <header-row-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <header-row-list /> are: <row />, <filter-row />
<header-row-list /> is valid inside: <datagrid />
A heading label widgets. Either normal text sized or larger.
| Attributes of <heading /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
size | |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
value |
Defines the heading. |
value-property-ref | |
Valid inside <heading /> is: <style-set />
<heading /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
Special help button implementation triggering a controller/AJAX based help system without any transitions.
| Attributes of <help-button /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
disable | |
help-id |
Help id for this help button. Default is the view id. |
icon |
Defines the icon used for this button. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
target |
Sets the link target for the given command link. This will only work if
|
text |
Defines the button text. |
text-property-ref |
References a property to receive the command button text from. |
transition-ref (required) |
Defines the transition ID. |
Valid inside <help-button /> are: <disabled-if />, <visible-if />, <style-set />
<help-button /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <toolbar />, <a />, <col />
( Additional names: vgroup )
Is a vertical or horizontal blueprint column group inside a part.
| Attributes of <hgroup /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
width |
Sets the width in layout columns. |
Valid inside <hgroup /> are: <hgroup />, <col />, <disabled-if />, <read-only-if />, <visible-if />, <style-set />
( Additional names: a, h1, h2, h3, h4, h5, h6, b, em, p, ul, li, ol, dl, dt, dd, strong, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <hr /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <hr /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
Defines an image widget.
| Attributes of <image /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
resource |
Defines the image resource. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <image /> is: <style-set />
<image /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
Info Header row for the table, possibly spanning more than one column.
| Attributes of <info-header /> | |
|---|---|
| Attribute | Description |
class | |
description |
Defines the description. |
heading (required) | |
id |
Defines the GUID of the model. |
info |
Sets the column info for this
The javascript |
span |
Sets the number of columns this |
<info-header /> is valid inside: <info-header-row />
Contains a row with additional info headers.
| Attributes of <info-header-row /> | |
|---|---|
| Attribute | Description |
class | |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <info-header-row /> is: <info-header />
<info-header-row /> is valid inside: <info-header-row-list />
Contains all additional info headers. Info headers are additional headers of datagrid columns for complex data sets or multilanguage headers.
| Attributes of <info-header-row-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <info-header-row-list /> is: <info-header-row />
<info-header-row-list /> is valid inside: <datagrid />
This tag defines a label for another content element.
Example 50.9. Label Element
<label value="Name" target-ref="personName"/> <text-field id="personName" property-ref="domain.person.name"/>
| Attributes of <label /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
target-ref |
Defines the related content element's ID. |
value |
Defines the label text key. |
value-property-ref |
Defines the label property reference. |
Valid inside <label /> is: <style-set />
<label /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
( Additional names: a, h1, h2, h3, h4, h5, h6, b, em, p, ul, ol, dl, dt, dd, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <li /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <li /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
( Additional names: button )
Defines a command button that triggers a transition if the user clicks on it. The button can have an icon and a text.
| Attributes of <link /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
disable | |
icon |
Defines the icon used for this button. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
target |
Sets the link target for the given command link. This will only work if
|
text |
Defines the button text. |
text-property-ref |
References a property to receive the command button text from. |
transition-ref (required) |
Defines the transition ID. |
Valid inside <link /> are: <disabled-if />, <visible-if />, <style-set />
<link /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <toolbar />, <a />, <col />
A widget that displays a domain object list by repeating its body for every object in the list. Property references to properties of the listed type resolve to the current domain object. Options are somewhat similar to those of the the section called “<datagrid />”.
| Attributes of <list-iterator /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
domain-type-ref | |
id |
Defines the GUID of the model. |
object-relative | |
scoped-domain-object-list-ref |
Defines a reference to a cached domain object list. |
show-row-count | |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <list-iterator /> are: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <on-update-refresh />, <sort-order-list />, <relation-chain />, <paging />, <available-export-list />, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
<list-iterator /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
A widget for selecting a locale.
| Attributes of <locale-select /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
instant |
If this is set to |
mode |
Sets a constant write mode for this widget. |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
Valid inside <locale-select /> are: <disabled-if />, <read-only-if />, <style-set />
<locale-select /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
A widget to select a Point property from a map. Needs GIS support to work. Non-JavaScript fallback is a simple text field for lat/lon coordinates.
| Attributes of <location-field /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
mode |
Sets a constant write mode for this widget. |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
Valid inside <location-field /> are: <disabled-if />, <read-only-if />, <style-set />
<location-field /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
Tag class for login button widgets.
| Attributes of <login-button /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
disable | |
failure-transition-ref |
Defines the failure transition ID. |
icon |
Defines the icon used for this button. |
id |
Defines the GUID of the model. |
password-field-id |
Defines the password field ID. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
success-transition-ref |
Defines the success transition ID. |
target |
Sets the link target for the given command link. This will only work if
|
text |
Defines the button text. |
text-property-ref |
References a property to receive the command button text from. |
transition-ref (required) |
Defines the transition ID. |
username-field-id |
Defines the username field ID. |
Valid inside <login-button /> are: <disabled-if />, <visible-if />, <style-set />
<login-button /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <toolbar />, <a />, <col />
Defines a map widget.
| Attributes of <map /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
latitude |
Defines the latitude. |
longitude |
Defines the longitude. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
zoom |
Defines the zoom. |
Valid inside <map /> is: <style-set />
<map /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
Display one message with a given message Id.
| Attributes of <message /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
message-id (required) | |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <message /> is: <style-set />
<message /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
is an invisible component event that refreshes view parts, groups or rows upon receiving a DomainObjectMessage.
| Attributes of <message-based-refresh /> | |
|---|---|
| Attribute | Description |
channel |
Configures the channel filtered by the channel. Must be configured in the spring context. |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
domain-type-refs |
Configures the domain type models which are led through by the filter for this content element model (comma separated list of ids). |
id |
Defines the GUID of the model. |
object-refs |
Configures the cached domain object references which are led through by the filter for this content element model (comma separated list of ids). |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <message-based-refresh /> are: <on-update-refresh />, <style-set />
<message-based-refresh /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
Displays all messages that are not displayed by a the section called “<message />”.
| Attributes of <message-list /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <message-list /> is: <style-set />
<message-list /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
Connects the current target domain object to one or more objects over a relation-chain. It is a complex widget that consists of two list of objects (connected and not-connected ones) and two buttons to change the connection status of the objects in the list.
Example 50.10. Multi Connect Element
<multi-connect
id="users"
display-property-ref="system.domain.user.login"
size="10"
selected-heading="Assigned Users"
unselected-heading="Unassigned Users"
>
<relation-chain>
<relation-reference
relation-ref="domain.project.relation.system.domain.user"/>
</relation-chain>
</multi-connect>
| Attributes of <multi-connect /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
display-property-ref |
References the property model that is displayed as representation for the domain object instance to be connected. Must be a property model of the domain type model referenced by the connect model. |
domain-type-ref |
Defines the domain type to be used in this connect field. |
icon |
Sets the icon to be used for every entry. |
id |
Defines the GUID of the model. |
mode |
Sets a constant write mode for this widget. |
required |
If set to |
scoped-domain-object-list-ref |
Defines a reference to a cached domain object list. |
selected-class |
Additional classes to set on the list containing the connected/selected objects. |
selected-first |
If set to |
selected-heading |
Specifies the title internationalization key for the list of selected items. |
size |
Specifies the number of visible rows (vertical size of the lists). |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
unselected-class |
Additional classes to set on the list containing the connected/selected objects. |
unselected-heading |
Specifies the title internationalization key for the list of unselected items. |
vertical |
if set to |
Valid inside <multi-connect /> are: <sort-order-list />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <on-update-refresh />, <relation-chain />, <disabled-if />, <read-only-if />, <style-set />
<multi-connect /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
( Additional names: a, h1, h2, h3, h4, h5, h6, b, em, p, ul, li, dl, dt, dd, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <ol /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <ol /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
| Attributes of <on-update-refresh /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
elem-ref | |
group-ref | |
id |
Defines the GUID of the model. |
part-ref | |
refreshView | |
Valid inside <on-update-refresh /> are: <start-action-list />, <action-list />
<on-update-refresh /> is valid inside: <text-field />, <password />, <message-based-refresh />, <checkbox />, <radio-buttons />, <multi-connect />, <tree-connect />, <list-iterator />, <multi-connect />, <single-connect />, <datagrid />, <radio-buttons />, <select-field />, <password />
( Additional names: a, h1, h2, h3, h4, h5, h6, b, em, ul, li, ol, dl, dt, dd, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <p /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <p /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
The paging element contains the default paging definition for
all data grids in the portal. With the default-page-size
attribute you can specify the default page size. You can override this
setting by adding a paging element with a different paging size
to a data grid. Each paging-button definition has the attributes
offset, label and event. The
offset attribute defines the offset to the current page, i.e. an
offset of 1 jumps to the next page while an offset of
-2 jumps two pages back. The label attribute
describes the button label that is displayed; if no label is specified, the
target page number is used instead. The event attribute
describes the event that the button fires. The value of the
event attribute is only used to identify the button that fired
it, i.e. you can specifiy any event name that you like. If no
event attribute is specified, the button is inactive.
Example 50.11. Paging Definition
<paging default-page-size="10"> <paging-button offset="first" label="|<" event="first"/> <paging-button offset="-1" label="<" event="prev"/> <paging-button offset="-3" event="prev3"/> <paging-button offset="-2" event="prev2"/> <paging-button offset="-1" event="prev"/> <paging-button offset="0"/> <paging-button offset="1" event="next"/> <paging-button offset="2" event="next2"/> <paging-button offset="3" event="next3"/> <paging-button offset="1" label=">" event="next"/> <paging-button offset="last" label=">|" event="last"/> </paging>
| Attributes of <paging /> | |
|---|---|
| Attribute | Description |
default-page-size |
Default page size as number or the keyword |
description |
Defines the description. |
id |
Defines the GUID of the model. |
page-sizes |
A comma separated list of either numbers or the keyword |
Valid inside <paging /> are: <paging-size-select />, <paging-button />
<paging /> is valid inside: <list-iterator />, <portal />, <datagrid />
| Attributes of <paging-button /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
event | |
id |
Defines the GUID of the model. |
label | |
offset | |
<paging-button /> is valid inside: <paging />
| Attributes of <paging-size-select /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
label | |
<paging-size-select /> is valid inside: <paging />
A part of a view that can refer to another domain type as the containing view does. Parts need to be displayed in a the section called “<subview />”. For a view with only one part this happens automatically, for more than one part, you have to create a the section called “<subview-list />” inside the view.
See Chapter 38, Working with layouts in OpenSAGA for examples.
| Attributes of <part /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <part /> are: <content />, <relation-chain />
<part /> is valid inside: <part-set />
( Additional names: state )
Displays the referenced PartImpl inside a the section called “<subview />”.
| Attributes of <part-reference /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
part-ref (required) |
Defines the part ID. |
Contains all PartImpl of a view.
| Attributes of <part-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <part-set /> is: <part />
<part-set /> is valid inside: <view />
This tag provides an element for hidden password typing.
| Attributes of <password /> | |
|---|---|
| Attribute | Description |
auto-change |
If set to |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
mode |
Sets a constant write mode for this widget. |
on-enter-command-ref |
Defines a return-key command reference, which will be addressed
by pressing the return-key inside of a |
property-ref (required) |
References the property read or written to by this widget. |
redisplay | |
required |
If set to |
size |
Defines the visible size |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
title | |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
update-min-chars |
Sets the minimum amount of characters needed to trigger an AJAX autocomplete process. Defaults to 3. |
Valid inside <password /> are: <on-update-refresh />, <sort-order-list />, <auto-complete-filter />, <disabled-if />, <read-only-if />, <style-set />
<password /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
A widget that outputs a constant plain-text value.
| Attributes of <plain-text /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
value |
Defines the text content internationalization key. |
Valid inside <plain-text /> is: <style-set />
<plain-text /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
Model for RenderProperty-element. Renders the contents of a property to the output.
| Attributes of <plain-text-property /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
Valid inside <plain-text-property /> is: <style-set />
<plain-text-property /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
( Additional names: a, h1, h2, h3, h4, h5, h6, b, em, p, ul, li, ol, dl, dt, dd, strong, hr, div, span, br )
Creates a HTML element with the model name.
| Attributes of <pre /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <pre /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
One column in a the section called “<datagrid />”.
| Attributes of <property-column /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
escape-data |
If set to |
filter-mode |
Defines the filter mode for the property. |
heading |
Defines the heading. |
id |
Defines the GUID of the model. |
info |
Sets the column info for this
The javascript |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
sortable |
Set this to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
target-domain-type-ref |
Defines the target domain type reference. |
transition-ref |
Sets the id of the transition invoked when clicking on this column. |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
Valid inside <property-column /> are: <cell-format-set />, <style-set />
<property-column /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <datagrid-column-list />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
A select widget that allows the editing of a property field of a domain type as radio buttons.
| Attributes of <radio-buttons /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
display-property-ref |
Specifies the domain type property to display (textual representation). |
empty-selection-allowed |
Specifies if the user is allowed to select nothing or - otherwise - he is forced to select an entry. Legal values are 'true' and 'false'. |
horizontal | |
id |
Defines the GUID of the model. |
initialization-required |
Defines the flag indicating if an initialization is required. |
mode |
Sets a constant write mode for this widget. |
object-relative |
Defines if the select field is object relative. |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
scoped-domain-object-list-ref |
Defines a reference to a cached domain object list. |
select-domain-type-ref |
Specifies the domain type of the selectable items. |
size |
Sets the vertical size of the select field to render. If set to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
value-property-ref |
Specifies the domain type property to be used as logical representation. |
Valid inside <radio-buttons /> are: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <on-update-refresh />, <relation-chain />, <sort-order-list />, <disabled-if />, <read-only-if />, <style-set />
<radio-buttons /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
Specialization of a filter specification model that sets writing models to read only if true.
| Attributes of <read-only-if /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <read-only-if /> are: <greater-than />, <is-property-modified />, <and />, <geo-within />, <matches />, <user-logged-in />, <validation-failed />, <complies-to />, <criterion />, <less-than-or-equal-to />, <has-current-element />, <is-undefined />, <has-changed />, <or />, <is-connected-to />, <can-access />, <ends-with />, <geo-contains />, <has-permission />, <contains-comparator />, <starts-with />, <not />, <equals />, <is-new />, <has-elements />, <dynamic-condition />, <true />, <less-than />, <in />, <include />, <in-transition />, <filter-pattern />, <has-type />, <greater-than-or-equal-to />, <is-super-user />, <false />, <is-defined />, <filter-pattern-set />
<read-only-if /> is valid inside: <external-excel-domain-type />, <row />, <filter-row />, <external-relational-domain-type />, <count />, <filter-specification-set />, <text-field />, <password />, <joined-domain-type />, <content-group />, <constant-domain-type />, <select-popup />, <checkbox />, <start-action-list />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <textarea />, <radio-buttons />, <radio-buttons />, <rich-text-field />, <locale-select />, <multi-connect />, <multi-connect />, <tree-connect />, <tree-connect />, <transition />, <list-iterator />, <case />, <wfs-domain-type />, <location-field />, <multi-connect />, <single-connect />, <multi-connect />, <single-connect />, <relation-reference />, <filter-row />, <hgroup />, <has-elements />, <filtered-list />, <attachment />, <agent-action />, <datagrid />, <start-action-list />, <action-list />, <radio-buttons />, <select-field />, <radio-buttons />, <select-field />, <request-context />, <cell-format />, <password />, <col />
The "remember me" checkbox for spring security.
| Attributes of <remember-me-checkbox /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <remember-me-checkbox /> is: <style-set />
<remember-me-checkbox /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
A widget that outputs a constant richtext value.
| Attributes of <rich-text /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
value |
Defines the text content internationalization key. |
Valid inside <rich-text /> is: <style-set />
<rich-text /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
This tag defines an HTML-editor.
Example 50.13. Rich Text Field Element
<rich-text-field id="itemDescription" property-ref="domain.item.description"/>
| Attributes of <rich-text-field /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
mode |
Sets a constant write mode for this widget. |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
rich-text-configuration |
Specifies the configuration to use. Optional. The requested configuration must have been registered in the richtextConfigurationRepository-bean. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
title | |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
Valid inside <rich-text-field /> are: <disabled-if />, <read-only-if />, <style-set />
<rich-text-field /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
Model for rich-text property element. Renders the contents of a richtext property.
| Attributes of <rich-text-property /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
Valid inside <rich-text-property /> is: <style-set />
<rich-text-property /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
Layout table grid row.
| Attributes of <row /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
span |
Defines the row span. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <row /> are: <column />, <disabled-if />, <read-only-if />, <visible-if />, <style-set />
<row /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <footer-row-list />, <a />, <header-row-list />, <grid />, <col />
This tag defines a drop down list. It can either be based on constant enumeration types or on domain relations.
Example 50.14. Select Field Element (Using an Enumeration Type)
<select-field id="select" property-ref="domain.workingstep.timeUnit_id" select-domain-type-ref="domain.enum_timeunit" value-property-ref="domain.enum_timeunit.id" display-property-ref="domain.enum_timeunit.unit" empty-selection-allowed="false"/>
| Attributes of <select-field /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
display-property-ref |
Specifies the domain type property to display (textual representation). |
empty-selection-allowed |
Specifies if the user is allowed to select nothing or - otherwise - he is forced to select an entry. Legal values are 'true' and 'false'. |
id |
Defines the GUID of the model. |
initialization-required |
Defines the flag indicating if an initialization is required. |
mode |
Sets a constant write mode for this widget. |
object-relative |
Defines if the select field is object relative. |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
scoped-domain-object-list-ref |
Defines a reference to a cached domain object list. |
select-domain-type-ref |
Specifies the domain type of the selectable items. |
size |
Sets the vertical size of the select field to render. If set to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
value-property-ref |
Specifies the domain type property to be used as logical representation. |
Valid inside <select-field /> are: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <on-update-refresh />, <relation-chain />, <sort-order-list />, <disabled-if />, <read-only-if />, <style-set />
<select-field /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
A widget to select a property value from a popup.
| Attributes of <select-popup /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
mode |
Sets a constant write mode for this widget. |
multi-select |
Defines the flag indicating if multiple selection is allowed. |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
transition-ref |
Defines the transition ID. |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
Valid inside <select-popup /> are: <disabled-if />, <read-only-if />, <style-set />
<select-popup /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
Connects the current target domain object to a single object of another domain type.
<single-connect
display-property-ref="example.d_domain_type.property" >
<relation-chain>
<relation-reference
relation-ref="example.r_domain_type.to.other_domain_type"/>
</relation-chain>
</single-connect>
| Attributes of <single-connect /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
display-property-ref |
References the property model that is displayed as representation for the domain object instance to be connected. Must be a property model of the domain type model referenced by the connect model. |
domain-type-ref |
Defines the domain type to be used in this connect field. |
icon |
Sets the icon to be used for every entry. |
id |
Defines the GUID of the model. |
mode |
Sets a constant write mode for this widget. |
required |
If set to |
scoped-domain-object-list-ref |
Defines a reference to a cached domain object list. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <single-connect /> are: <sort-order-list />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <on-update-refresh />, <relation-chain />, <disabled-if />, <read-only-if />, <style-set />
<single-connect /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
Defines a sitemap model for the portal. The sitemap shows the
portal.navigation.main nodes from NavigationComponent.
It has different styles (skins):
dotted, dot-lined and square bullets.
lined, normal lines and circular bullets.
listed, normal listing with arrows.
The default sitemap has a dotted style. Four level are possible.
With you are able to disabled the style.
| Attributes of <sitemap /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <sitemap /> is: <style-set />
<sitemap /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
( Additional names: a, h1, h2, h3, h4, h5, h6, b, em, p, ul, li, ol, dl, dt, dd, strong, hr, div, br, pre )
Creates a HTML element with the model name.
| Attributes of <span /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <span /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
( Additional names: part-reference )
Displays the referenced PartImpl inside a the section called “<subview />”.
| Attributes of <state /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
part-ref (required) |
Defines the part ID. |
<state /> is valid inside: <subview />
The stereotype Model. Creates a schematic view for editing or viewing a domain object.
| Attributes of <stereotype /> | |
|---|---|
| Attribute | Description |
cancel-transition-ref |
Defines the cancel transition reference. |
description |
Defines the description. |
domain-type-ref (required) |
Defines the domain type reference. |
id |
Defines the GUID of the model. |
save-transition-ref |
Defines the save transition reference. |
type |
Sets the type of the stereotype. |
<stereotype /> is valid inside: <view />
( Additional names: a, h1, h2, h3, h4, h5, h6, b, em, p, ul, li, ol, dl, dt, dd, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <strong /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <strong /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
Represents one content element style hint.
| Attributes of <style /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
element-id |
Sets the element-sub-id for which the styles are applied. An empty |
id |
Defines the GUID of the model. |
value (required) |
CSS Styles for this the section called “<style />” |
Valid inside <style /> is: text content
<style /> is valid inside: <style-set />
A set of content element style hints.
| Attributes of <style-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <style-set /> is: <style />
<style-set /> is valid inside: <wiki-text-property />, <label />, <row />, <filter-row />, <property-column />, <url-column />, <boolean-column />, <attachment-column />, <clear-filter-button />, <tab-set />, <remember-me-checkbox />, <login-button />, <clear-filter-button />, <login-button />, <button />, <button-column />, <debug-console />, <collapse-link />, <help-button />, <content />, <exception />, <button-column />, <plain-text />, <rich-text />, <verbatim />, <text-field />, <password />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <rich-text-property />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <multi-connect />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <radio-buttons />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />
A subview of a view that should either contain a the section called “<state />” or a nested the section called “<subview-list />”.
| Attributes of <subview /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
width |
Defines the width in logic columns. See Chapter 38, Working with layouts in OpenSAGA for explanation. |
Valid inside <subview /> are: <subview-list />, <state />
<subview /> is valid inside: <subview-list />
( Additional names: subview-list, subview-vgroup )
A list of subviews that are arranged either horizontally or vertically.
| Attributes of <subview-hgroup /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
horizontal |
Defines if this sub view model is horizontal. |
id |
Defines the GUID of the model. |
Valid inside <subview-hgroup /> is: <subview />
( Additional names: subview-hgroup, subview-vgroup )
A list of subviews that are arranged either horizontally or vertically.
| Attributes of <subview-list /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
horizontal |
Defines if this sub view model is horizontal. |
id |
Defines the GUID of the model. |
Valid inside <subview-list /> is: <subview />
( Additional names: subview-list, subview-hgroup )
A list of subviews that are arranged either horizontally or vertically.
| Attributes of <subview-vgroup /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
horizontal |
Defines if this sub view model is horizontal. |
id |
Defines the GUID of the model. |
Valid inside <subview-vgroup /> is: <subview />
<subview-vgroup /> is valid inside: <subview />, <view />
| Attributes of <tab /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
heading | |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <tab /> are: <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
<tab /> is valid inside: <tab-set />, <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
A tabset containing a number of tabs with tab-headers.
| Attributes of <tab-set /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <tab-set /> are: <tab />, <style-set />
<tab-set /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
This tag defines a single line text input element.
| Attributes of <text-field /> | |
|---|---|
| Attribute | Description |
auto-change |
If set to |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
mode |
Sets a constant write mode for this widget. |
on-enter-command-ref |
Defines a return-key command reference, which will be addressed
by pressing the return-key inside of a |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
size |
Defines the visible size |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
title | |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
update-min-chars |
Sets the minimum amount of characters needed to trigger an AJAX autocomplete process. Defaults to 3. |
Valid inside <text-field /> are: <on-update-refresh />, <sort-order-list />, <auto-complete-filter />, <disabled-if />, <read-only-if />, <style-set />
<text-field /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
This tag defines a multi-line text input element.
Example 50.16. Textarea Element
<textarea id="itemDescription" property-ref="domain.item.description"/>
| Attributes of <textarea /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
cols | |
description |
Defines the description. |
id |
Defines the GUID of the model. |
mode |
Sets a constant write mode for this widget. |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
rows | |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
title | |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
Valid inside <textarea /> are: <disabled-if />, <read-only-if />, <style-set />
<textarea /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
A toolbar containing the section called “<button />”s.
| Attributes of <toolbar /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <toolbar /> are: <clear-filter-button />, <login-button />, <button />, <button-column />, <debug-console />, <collapse-link />, <help-button />, <style-set />
<toolbar /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <datagrid />, <col />
A tree connect widget meant to connect a domain type to a tree domain type containing left and right columns filled following the preorder tree traversal algorithm.
| Attributes of <tree-connect /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
connectable-property-ref | |
description |
Defines the description. |
display-property-ref |
References the property model that is displayed as representation for the domain object instance to be connected. Must be a property model of the domain type model referenced by the connect model. |
domain-type-ref |
Defines the domain type to be used in this connect field. |
id |
Defines the GUID of the model. |
left-property-ref | |
min-select-depth | |
mode |
Sets a constant write mode for this widget. |
required |
If set to |
right-property-ref | |
scoped-domain-object-list-ref |
Defines a reference to a cached domain object list. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <tree-connect /> are: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <on-update-refresh />, <relation-chain />, <disabled-if />, <read-only-if />, <style-set />
<tree-connect /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
( Additional names: a, h1, h2, h3, h4, h5, h6, b, em, p, li, ol, dl, dt, dd, strong, hr, div, span, br, pre )
Creates a HTML element with the model name.
| Attributes of <ul /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <ul /> are: text content, <wiki-text-property />, <label />, <row />, <clear-filter-button />, <property-column />, <tab-set />, <remember-me-checkbox />, <login-button />, <button />, <content />, <exception />, <button-column />, <plain-text />, <verbatim />, <text-field />, <message-based-refresh />, <heading />, <rich-text-property />, <url-column />, <content-group />, <tab />, <select-popup />, <checkbox />, <error-message />, <debug-console />, <message />, <error-message-list />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <external-link />, <multi-connect />, <tree-connect />, <image />, <plain-text-property />, <list-iterator />, <boolean-column />, <column />, <location-field />, <single-connect />, <collapse-link />, <toolbar />, <filter-row />, <hgroup />, <help-button />, <rich-text />, <a />, <sitemap />, <attachment />, <message-list />, <attachment-column />, <datagrid />, <select-field />, <boolean-element />, <map />, <file-upload />, <grid />, <cms-content />, <password />, <col />, <style-set />
<ul /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
Column that displays URLs.
| Attributes of <url-column /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
escape-data |
If set to |
filter-mode |
Defines the filter mode for the property. |
heading |
Defines the heading. |
id |
Defines the GUID of the model. |
info |
Sets the column info for this
The javascript |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
sortable |
Set this to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
target-domain-type-ref |
Defines the target domain type reference. |
transition-ref |
Sets the id of the transition invoked when clicking on this column. |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
Valid inside <url-column /> are: <cell-format-set />, <style-set />
<url-column /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <datagrid-column-list />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
Renders child content directly as HTML.
| Attributes of <verbatim /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
Valid inside <verbatim /> are: text content, <style-set />
<verbatim /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <a />, <col />
( Additional names: hgroup )
Is a vertical or horizontal blueprint column group inside a part.
| Attributes of <vgroup /> | |
|---|---|
| Attribute | Description |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
width |
Sets the width in layout columns. |
Valid inside <vgroup /> are: <hgroup />, <col />, <disabled-if />, <read-only-if />, <visible-if />, <style-set />
<vgroup /> is valid inside: <content />, <content-group />, <tab />, <list-iterator />, <column />, <hgroup />, <a />, <col />
Defines a model for one view inside a web application. It must be referenced by a the section called “<view-state />” inside a process to be active.
| Attributes of <view /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
domain-context-path-mode |
Defines the ViewModelDomainContextPathMode to be used by this view. If no definition is given it defaults to ViewModelDomainContextPathMode#ALWAYS_VISIBLE. |
domain-type-ref |
Sets the domain type model referenced by this view. |
id |
Defines the GUID of the model. |
on-enter-command-ref |
Defines a return-key command reference, which will be addressed
by pressing the return-key inside of a |
target-scoped-domain-object-ref |
Defines the scoped domain object that is to be used as the target domain object for this view. |
template-resource |
Defines the layout template resource. |
title |
Defines the title. |
Valid inside <view /> are: <subview-list />, <part-set />, <stereotype />, <filter-specification-set />, <restriction-set />, <ui-component-setting-set />, <before-preprocessing />, <before-postprocessing />, <after-postprocessing />, <after-preprocessing />
Specialization of a filter specification model that sets writing models and to visible if true.
| Attributes of <visible-if /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <visible-if /> are: <greater-than />, <is-property-modified />, <and />, <geo-within />, <matches />, <user-logged-in />, <validation-failed />, <complies-to />, <criterion />, <less-than-or-equal-to />, <has-current-element />, <is-undefined />, <has-changed />, <or />, <is-connected-to />, <can-access />, <ends-with />, <geo-contains />, <has-permission />, <contains-comparator />, <starts-with />, <not />, <equals />, <is-new />, <has-elements />, <dynamic-condition />, <true />, <less-than />, <in />, <include />, <in-transition />, <filter-pattern />, <has-type />, <greater-than-or-equal-to />, <is-super-user />, <false />, <is-defined />, <filter-pattern-set />
<visible-if /> is valid inside: <external-excel-domain-type />, <row />, <filter-row />, <clear-filter-button />, <login-button />, <clear-filter-button />, <login-button />, <button />, <button-column />, <debug-console />, <collapse-link />, <help-button />, <external-relational-domain-type />, <count />, <button-column />, <filter-specification-set />, <joined-domain-type />, <content-group />, <item />, <cms-navigation-item />, <constant-domain-type />, <start-action-list />, <debug-console />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <radio-buttons />, <multi-connect />, <tree-connect />, <transition />, <list-iterator />, <case />, <wfs-domain-type />, <multi-connect />, <single-connect />, <relation-reference />, <collapse-link />, <cms-navigation-item />, <filter-row />, <hgroup />, <has-elements />, <help-button />, <filtered-list />, <agent-action />, <datagrid />, <start-action-list />, <action-list />, <radio-buttons />, <select-field />, <request-context />, <cell-format />, <col />
Renders a wiki-text typed property.
| Attributes of <wiki-text-property /> | |
|---|---|
| Attribute | Description |
attachment-domain-type-ref |
Defines the attachment domain type reference. |
attachment-image-property-ref |
Defines the attachment image property reference. |
attachment-label-property-ref |
Defines the attachment label property reference. |
class |
Defines a space separated list of classes that are written through to HTML. These classes can both be used to apply custom CSS styles to elements and as target for custom javascript. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref (required) |
References the property read or written to by this widget. |
required |
If set to |
style |
Defines CSS styles directly on a the widget. Defining styles this way is equivalent to defining a the section called “<style-set />” with a single the section called “<style />” without elementId. |
type |
Defines the data type for the given input field which only is necessary for self-referencing fields not containing text. |
Valid inside <wiki-text-property /> is: <style-set />
<wiki-text-property /> is valid inside: <formula-property-set />, <content />, <joined-property-set />, <content-group />, <enum-property-set />, <tab />, <domain-type-property-set />, <reference-property-set />, <list-iterator />, <column />, <a />, <col />
Table of Contents
This is the domain type that you will probably use most of the time. It consists of a set of different property sets (e.g. the section called “<domain-type-property-set />”) and a primary key (the section called “<primary-key />”)/>). Additionally you can specify restrictions (the section called “<restriction-set />”) and initialization data (the section called “<initialization-data />”).
<domain-type id="base.d_user" name="User" ...> <property-set> <domain-type-property-set> <domain-type-property id="base.d_user.guid" name="guid" type="PlainText" insert-property-value-provider="guidPropertyValueProvider" /> <domain-type-property id="base.d_user.login" name="login" type="PlainText" required="true"/> <domain-type-property id="base.d_user.password" name="password" type="Password" required="true"/> <domain-type-property id="base.d_user.active" name="active" type="Boolean" value-provider-bean="falsePropertyValueProvider"/> ... </domain-type-property-set> </property-set> <primary-key> <key property-ref="base.d_user.guid" /> </primary-key> </domain-type>
on-create
The on-create model is executed when a new domain object of the current domain
type is created.
on-insert
The on-insert model is executed when a new domain object of the current domain
type is inserted into the database (so when the domain object is saved the first time).
on-update
The on-update model is executed when a domain object of the current domain
type is updated. So when an existing domain object from the database is modified and saved.
on-delete
The on-delete model is executed when a domain object of the current domain
type is deleted.
Domain types inherits the on event models of its super type. When a domain type as well as its super type
has a on event model, then first the on event model of the super type is executed and then the one of the
current domain type. To overwrite the on event model of the super type, the overwrite-extended attribute
must be set true.
The on event models are also merged. Thereby the actions of the on-create, on-insert
and on-update are executed in a chronological order. That means that the actions of the old versions
of the domain type are executed before the actions of the new versions. The actions of the on-delete
are executed in an inversely order. First the actions of the new versions of the domain type are executed and then
the actions of the old ones.
![]() | Important |
|---|---|
Merging of on event models
When on event models are merged, the models
must have the same |
| Attributes of <domain-type /> | ||||
|---|---|---|---|---|
| Attribute | Description | |||
audit-trail-mode |
Defines the audit trail mode. | |||
audit-trail-relation-ref |
Defines the audit trail relation reference. | |||
cardinality |
Defines the domain object cardinality.
You can use the domain type cardinality to restrict the number of domain objects
that are created for a domain type. E.g. you may want to store a system specific
setting or a setting that is stored on a per user basis.
For now two cardinalities are possible: <domain-type id="system.domain.config" cardinality="user" ...> <property-set> <domain-type-property-set> <domain-type-property id="system.domain.config.colorScheme" name="colorScheme" type="PlainText" default-value="blue"/> ... </domain-type-property-set> </property-set> </domain-type> user cardinality.
To create such an object, you have to put it into a context, e.g. here we use the
session context (defined in portal.xml):
<portal ...> <session-context> <scoped-domain-object id="portal.config" name="portalConfig" domain-type-ref="system.domain.config"/> </session-context> ... </portal> system.domain.config.colorScheme).
| |||
data-handler-bean |
Defines the data handler bean reference. | |||
data-handler-class |
Defines the data handler class name. | |||
data-source-name |
Defines the name of the data source to be used by this domain type. | |||
delegate-bean-name |
Defines the name of the delegate bean of type Model. | |||
deletion-mode |
OpenSAGA supports different deletion modes for domain type models. Each deletion
mode specifies how data entries are deleted. The
| |||
description |
Defines the description. | |||
extends |
Defines the the domain type name that this domain type extends. | |||
id |
Defines the GUID of the model. | |||
immutable |
Defines the immutable flag. | |||
name |
Defines the name of the domain type. | |||
permission-filter-generator-bean |
Defines the permission filter generator bean reference. | |||
table-name |
Defines the database table name. | |||
Valid inside <domain-type /> are: <primary-key />, <restriction-set />, <initialization-data />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <on-create />, <on-insert />, <on-update />, <on-delete />, <property-set />
Defines a name/value pair that can be used to parameterize property models. An example is the attachment repository name used for Attachment property types. See PropertyTypeParameterNames for more information.
| Attributes of <property-type-parameter /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the name of the property type parameter. |
value |
Defines the value of the property type parameter. |
<property-type-parameter /> is valid inside: <property-type-parameter-set />
Defines a set of the section called “<property-type-parameter />”s.
| Attributes of <property-type-parameter-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <property-type-parameter-set /> is: <property-type-parameter />
<property-type-parameter-set /> is valid inside: <joined-property />, <domain-type-property />, <enum-property />, <formula-property />, <reference-property />
Reference properties (reference-property) are one of many ways to model joins. You can describe the join to another domain type
and "blend in" virtual properties that actually will be taken from a joined domain type. Since there are
many other ways to on the spot join data we usually do no recommend to use these properties for joins since
they always will be joined into any data selection.
| Attributes of <reference-property /> | |
|---|---|
| Attribute | Description |
audit-trail-relevance-mode |
Defines the audit trail relevance mode. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the name of the property. |
property-handling-bean-name |
Defines a bean that handles the property value. The specified bean has to implement
the interface |
property-ref |
Defines the referenced property. |
translation-required |
Defines that the property value has to be translated before it is displayed. The
default value is |
Valid inside <reference-property /> is: <property-type-parameter-set />
<reference-property /> is valid inside: <formula-property-set />, <joined-property-set />, <enum-property-set />, <domain-type-property-set />, <reference-property-set />
Defines a set of the section called “<reference-property />”s.
| Attributes of <reference-property-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
domain-type-ref |
Sets the domain type reference. |
id |
Defines the GUID of the model. |
Valid inside <reference-property-set /> are: <relation-chain />, <wiki-text-property />, <property-column />, <text-field />, <rich-text-property />, <url-column />, <select-popup />, <checkbox />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <joined-property />, <plain-text-property />, <boolean-column />, <location-field />, <domain-type-property />, <enum-property />, <attachment />, <attachment-column />, <select-field />, <boolean-element />, <formula-property />, <password />, <reference-property />
<reference-property-set /> is valid inside: <property-set />
Defines WFS domain type that based on the section called “<domain-type />”.
| Attributes of <wfs-domain-type /> | ||||
|---|---|---|---|---|
| Attribute | Description | |||
audit-trail-mode |
Defines the audit trail mode. | |||
audit-trail-relation-ref |
Defines the audit trail relation reference. | |||
cardinality |
Defines the domain object cardinality.
You can use the domain type cardinality to restrict the number of domain objects
that are created for a domain type. E.g. you may want to store a system specific
setting or a setting that is stored on a per user basis.
For now two cardinalities are possible: <domain-type id="system.domain.config" cardinality="user" ...> <property-set> <domain-type-property-set> <domain-type-property id="system.domain.config.colorScheme" name="colorScheme" type="PlainText" default-value="blue"/> ... </domain-type-property-set> </property-set> </domain-type> user cardinality.
To create such an object, you have to put it into a context, e.g. here we use the
session context (defined in portal.xml):
<portal ...> <session-context> <scoped-domain-object id="portal.config" name="portalConfig" domain-type-ref="system.domain.config"/> </session-context> ... </portal> system.domain.config.colorScheme).
| |||
data-handler-bean |
Defines the data handler bean reference. | |||
data-handler-class |
Defines the data handler class name. | |||
data-source-name |
Defines the name of the data source to be used by this domain type. | |||
delegate-bean-name |
Defines the name of the delegate bean of type Model. | |||
deletion-mode |
OpenSAGA supports different deletion modes for domain type models. Each deletion
mode specifies how data entries are deleted. The
| |||
description |
Defines the description. | |||
extends |
Defines the the domain type name that this domain type extends. | |||
id |
Defines the GUID of the model. | |||
immutable |
Defines the immutable flag. | |||
name |
Defines the name of the domain type. | |||
permission-filter-generator-bean |
Defines the permission filter generator bean reference. | |||
table-name |
Defines the database table name. | |||
Valid inside <wfs-domain-type /> are: <primary-key />, <restriction-set />, <initialization-data />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <on-create />, <on-insert />, <on-update />, <on-delete />, <property-set />
Table of Contents
Domain type properties (domain-type-property) are equivalent to physical
columns in database tables. Each such property has a distinct logical type and holds
a distinct value.
| Attributes of <domain-type-property /> | |
|---|---|
| Attribute | Description |
attachment-repository |
Defines the attachment repository used for an |
audit-trail-relevance-mode |
Defines the audit trail relevance mode. |
database-columnname |
Defines the database column name. |
default-value |
Defines a logical value with which the property will be initialized when a new object is created. See LogicalValueServiceImpl for more information. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
insert-property-value-provider |
Defines the property value provider that sets the property value when a new domain object is inserted into the database. |
length |
Defines the maximum length of the property. |
name |
Defines the name of the property. |
precision |
Defines the number of digits (including the decimal places) for a number property. |
property-handling-bean-name |
Defines a bean that handles the property value. The specified bean has to implement
the interface |
required |
Defines the required flag. |
scale |
Defines the number of decimal places for a number property. |
translation-required |
Defines that the property value has to be translated before it is displayed. The
default value is |
type |
Defines the fixed logical type of the property, (e.g. |
unique |
Defines the unique enabled flag. |
update-property-value-provider |
Defines the property value provider that sets the property value when a domain object is updated in the database. |
value-provider-bean |
Defines a Spring configured bean ID for a bean of type PropertyValueProvider.
which then is responsible for converting the |
Valid inside <domain-type-property /> are: <restriction-set />, <property-type-parameter-set />
<domain-type-property /> is valid inside: <formula-property-set />, <joined-property-set />, <enum-property-set />, <domain-type-property-set />, <reference-property-set />
Defines a set of the section called “<domain-type-property />”s.
| Attributes of <domain-type-property-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <domain-type-property-set /> are: <wiki-text-property />, <property-column />, <text-field />, <rich-text-property />, <url-column />, <select-popup />, <checkbox />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <joined-property />, <plain-text-property />, <boolean-column />, <location-field />, <domain-type-property />, <enum-property />, <attachment />, <attachment-column />, <select-field />, <boolean-element />, <formula-property />, <password />, <reference-property />
<domain-type-property-set /> is valid inside: <property-set />
Enumeration properties (enum properties for short, enum-property) are special properties for the very likely use case of
foreign key state data connected to a data type. They provide performance hints to the generator (e.g. we
will use the related data very often) and additionally provide some nice functionalities for users (e.g.
in text input fields users can enter fragmentary data for such enum fields - if the data is sufficient to
uniquely identify a given row the value will be set automatically).
Enumeration properties don't have a restriction set.
| Attributes of <enum-property /> | |
|---|---|
| Attribute | Description |
audit-trail-relevance-mode |
Defines the audit trail relevance mode. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the name of the property. |
property-handling-bean-name |
Defines a bean that handles the property value. The specified bean has to implement
the interface |
property-ref |
Defines the referenced property. |
translation-required |
Defines that the property value has to be translated before it is displayed. The
default value is |
Valid inside <enum-property /> are: <restriction-set />, <property-type-parameter-set />
<enum-property /> is valid inside: <formula-property-set />, <joined-property-set />, <enum-property-set />, <domain-type-property-set />, <reference-property-set />
Defines a set of EnumPropertyModels.
| Attributes of <enum-property-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
domain-type-ref |
Sets the domain type reference. |
id |
Defines the GUID of the model. |
required |
Defines the required flag. |
store-by-value |
Defines the "store-by-value" mode. |
strict |
Defines the "strict" mode. |
Valid inside <enum-property-set /> are: <wiki-text-property />, <property-column />, <text-field />, <rich-text-property />, <url-column />, <select-popup />, <checkbox />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <joined-property />, <plain-text-property />, <boolean-column />, <location-field />, <domain-type-property />, <enum-property />, <attachment />, <attachment-column />, <select-field />, <boolean-element />, <formula-property />, <password />, <reference-property />
<enum-property-set /> is valid inside: <property-set />
Formula properties (formula-property) are defined in a specific scripting language (the default is Groovy) and are calculated
whenever they are accessed. Additionally formula properties are stored in the database to allow efficient
searches. Please note that formula properties are persisted with the last value that was calculated before
storing - in some cases the database content will therefor not be correct (e.g. time-dependent values
like age will not always hold the correct age in the database).
| Attributes of <formula-property /> | |
|---|---|
| Attribute | Description |
audit-trail-relevance-mode |
Defines the audit trail relevance mode. |
database-columnname |
Defines the database column name. |
description |
Defines the description. |
formula |
Defines the formula that calculates the property value. In the formula you can access the
current domain object by using the |
id |
Defines the GUID of the model. |
language |
Defines the language of the formula. |
length |
Defines the length of the property. |
name |
Defines the name of the property. |
precision |
Defines the precision of the property. |
property-handling-bean-name |
Defines a bean that handles the property value. The specified bean has to implement
the interface |
scale |
Defines the scale of the property. |
translation-required |
Defines that the property value has to be translated before it is displayed. The
default value is |
type |
Defines the fixed logical type of the property, (e.g. |
Valid inside <formula-property /> are: <restriction-set />, <property-type-parameter-set />
<formula-property /> is valid inside: <formula-property-set />, <joined-property-set />, <enum-property-set />, <domain-type-property-set />, <reference-property-set />
Defines a set of FormulaPropertyModels.
| Attributes of <formula-property-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <formula-property-set /> are: <wiki-text-property />, <property-column />, <text-field />, <rich-text-property />, <url-column />, <select-popup />, <checkbox />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <joined-property />, <plain-text-property />, <boolean-column />, <location-field />, <domain-type-property />, <enum-property />, <attachment />, <attachment-column />, <select-field />, <boolean-element />, <formula-property />, <password />, <reference-property />
<formula-property-set /> is valid inside: <property-set />
Defines a set of property set that include:
a set of ReferencePropertySetModelImpl
a set of JoinedPropertySetModelImpl
| Attributes of <property-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <property-set /> are: <domain-type-property-set />, <enum-property-set />, <formula-property-set />, <reference-property-set />, <joined-property-set />
<property-set /> is valid inside: <session-context />, <external-excel-domain-type />, <external-relational-domain-type />, <input-interface />, <joined-domain-type />, <constant-domain-type />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <output-interface />, <conversation-context />, <wfs-domain-type />, <domain-context />, <request-context />, <process-context />
Implements a model describing a property type for a domain type property. The following
example illustrates how to do this:
[ <?xml version="1.0" encoding="UTF-8"?> <property-type id="quinscape.domain.integer-type" name="PositiveInteger" java-class="java.lang.Integer" sql-class="java.lang.Integer"> <restriction-set> <restriction id="positive-restriction" errorTag="validation.integer_not_positive" language="groovy"> value <= 0 </restriction> </restriction-set> <type-converter-set> <type-converter type-converter-bean-ref="integerTypeConverter" locale="en_US"/> <type-converter type-converter-bean-ref="integerTypeConverter" locale="de_DE"/> </type-converter-set> </property-type>
| Attributes of <property-type /> | |
|---|---|
| Attribute | Description |
default-input-field |
Defines the tag name of the default input field. |
default-output-field |
Defines the tag name of the default output field |
description |
Defines the description. |
id |
Defines the GUID of the model. |
java-type |
Defines the Java type. |
maximum-length |
Defines the maximum length. |
name |
Defines the model name. |
sql-type |
Defines the SQL type. |
Valid inside <property-type /> are: <restriction-set />, <type-converter-reference-set />
Implements TypeConverterReferenceModel.
| Attributes of <type-converter-reference /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
locale |
Defines the locale. |
type-converter-bean-ref |
Defines the type converter bean reference. |
<type-converter-reference /> is valid inside: <type-converter-reference-set />
Implements TypeConverterReferenceSetModel.
| Attributes of <type-converter-reference-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <type-converter-reference-set /> is: <type-converter-reference />
<type-converter-reference-set /> is valid inside: <property-type />
Table of Contents
Defines a reference to a key PropertyModel.
| Attributes of <key /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
foreign-key-column-name |
Defines the foreign key column name. |
generation-mode |
Defines the primary key generation mode. |
id |
Defines the GUID of the model. |
property-ref |
Defines the property reference. |
<key /> is valid inside: <primary-key />
The primary key of the domain type consists of a nonempty set of the section called “<key />”s that in combination result in a unique identifier.
| Attributes of <primary-key /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <primary-key /> is: <key />
<primary-key /> is valid inside: <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <wfs-domain-type />, <request-context />
Implements ContainedKeyPropertyReferenceModel.
| Attributes of <contained-key /> | |
|---|---|
| Attribute | Description |
contained-property-ref |
Defines the contained property reference. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref |
Defines the property reference. |
<contained-key /> is valid inside: <contained-primary-key />
Implements ContainedPrimaryKeyModel.
| Attributes of <contained-primary-key /> | |
|---|---|
| Attribute | Description |
contained-domain-type-ref |
Defines the contained domain type model ID. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <contained-primary-key /> is: <contained-key />
<contained-primary-key /> is valid inside: <contained-primary-key-set />
Implements ContainedPrimaryKeySetModel.
| Attributes of <contained-primary-key-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <contained-primary-key-set /> is: <contained-primary-key />
<contained-primary-key-set /> is valid inside: <external-relational-domain-type />
Table of Contents
Implements OnCreateModel. See the section called “<domain-type />” for a more detailed explanation.
| Attributes of <on-create /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
isolation |
Defines the isolation level for transaction isolation. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific isolation levels. |
overwrite-extended |
Defines if the model overwrites the model of the super type.
The default value is |
propagation |
Defines the transaction propagation mode for the action block. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific propagation levels. |
Valid inside <on-create /> are: <set-property-value />, <dequeue-report />, <webservice />, <transform />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <for-each />, <reset-translations />, <set-object />, <send-outgoing-emails />, <connect />, <remove-list />, <email />, <load-list />, <bind />, <disconnect />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <import />, <add-to-list />, <remove />, <switch />, <define-password />
<on-create /> is valid inside: <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <case />, <wfs-domain-type />, <request-context />
Implements OnDeleteModel. See the section called “<domain-type />” for a more detailed explanation.
| Attributes of <on-delete /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
isolation |
Defines the isolation level for transaction isolation. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific isolation levels. |
overwrite-extended |
Defines if the model overwrites the model of the super type.
The default value is |
propagation |
Defines the transaction propagation mode for the action block. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific propagation levels. |
Valid inside <on-delete /> are: <set-property-value />, <dequeue-report />, <webservice />, <transform />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <for-each />, <reset-translations />, <set-object />, <send-outgoing-emails />, <connect />, <remove-list />, <email />, <load-list />, <bind />, <disconnect />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <import />, <add-to-list />, <remove />, <switch />, <define-password />
<on-delete /> is valid inside: <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <case />, <wfs-domain-type />, <request-context />
Implements OnInsertModel. See the section called “<domain-type />” for a more detailed explanation.
| Attributes of <on-insert /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
isolation |
Defines the isolation level for transaction isolation. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific isolation levels. |
overwrite-extended |
Defines if the model overwrites the model of the super type.
The default value is |
propagation |
Defines the transaction propagation mode for the action block. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific propagation levels. |
Valid inside <on-insert /> are: <set-property-value />, <dequeue-report />, <webservice />, <transform />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <for-each />, <reset-translations />, <set-object />, <send-outgoing-emails />, <connect />, <remove-list />, <email />, <load-list />, <bind />, <disconnect />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <import />, <add-to-list />, <remove />, <switch />, <define-password />
<on-insert /> is valid inside: <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <case />, <wfs-domain-type />, <request-context />
Implements OnUpdateModel. See the section called “<domain-type />” for a more detailed explanation.
| Attributes of <on-update /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
isolation |
Defines the isolation level for transaction isolation. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific isolation levels. |
overwrite-extended |
Defines if the model overwrites the model of the super type.
The default value is |
propagation |
Defines the transaction propagation mode for the action block. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific propagation levels. |
Valid inside <on-update /> are: <set-property-value />, <dequeue-report />, <webservice />, <transform />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <for-each />, <reset-translations />, <set-object />, <send-outgoing-emails />, <connect />, <remove-list />, <email />, <load-list />, <bind />, <disconnect />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <import />, <add-to-list />, <remove />, <switch />, <define-password />
<on-update /> is valid inside: <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <case />, <wfs-domain-type />, <request-context />
Table of Contents
Each data set contains the property values for a single domain object in combination with a set of conditions, that check if the domain object is already present in the database. You can specify a name for the data set and set the language and country attributes that will be used for data conversion. The following table describes all attributes of a data set.
| Attributes of <data-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the name of the data set. |
Valid inside <data-set /> are: <insert-object />, <property-check />
<data-set /> is valid inside: <initialization-data />
Initialization data within domain types can be used to create domain objects that are
necessary for OpenSAGA to work (e.g. you always need an admin user).
Each domain type the section called “<domain-type />” can have one set of initialization data.
When the OpenSAGA server is started, the system will process all initialization data and check
if the required domain object already exists in the underlying database. If not, it is created.
The following example, taken from the User domain type model
(base/models/domain/types/user.xml), illustrates how the initialization
data can be used:
<initialization-data> <data-set name="AtLeastOneSuperUser" language="en" country="US"> <property-check> <insert-test property-ref="system.domain.user.superUser"/> </property-check> <insert-object> <insert-value for-property-ref="system.domain.user.login" is="admin"/> <insert-value for-property-ref="system.domain.user.password" is="a40546cc4fd6a12572828bb803380888ad1bfdab"/> <insert-value for-property-ref="system.domain.user.active" is="true"/> <insert-value for-property-ref="system.domain.user.nativeLocale" is="en_US"/> <insert-value for-property-ref="system.domain.user.profileLocale" is="en_US"/> <insert-value for-property-ref="system.domain.user.profileTimeZone" is="Europe/Berlin"/> <insert-value for-property-ref="system.domain.user.firstName" is="Big"/> <insert-value for-property-ref="system.domain.user.lastName" is="Boss"/> <insert-value for-property-ref="system.domain.user.superUser" is="true"/> </insert-object> </data-set> </initialization-data>
User domain object where the property
system.domain.user.superUser is true. If no such
User exists, it is created (with the property values provided
by the insert-object definition).
Each initialization-data definition contains a set of
the section called “<data-set />” definitions. This allows the creation of as many
domain objects as needed. For example, it might be necessary to create
a system user (used for system tasks) in addition to the admin user.
| Attributes of <initialization-data /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <initialization-data /> is: <data-set />
<initialization-data /> is valid inside: <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <wfs-domain-type />, <request-context />
The insert-object definition contains a set of insert-value definitions.
| Attributes of <insert-object /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <insert-object /> is: <insert-value />
<insert-object /> is valid inside: <data-set />
Each insert test contains a single condition that returns a boolean value.
| Attributes of <insert-test /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref |
Defines the ID of the property to test. |
<insert-test /> is valid inside: <property-check />
You have to specify an insert-value definition for each property that you
want to set within the new domain object. If you don't specify an insert value for a
property, the value of the property is null.
| Attributes of <insert-value /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
for-property-ref |
Defines the property ID of the property receiving the value. |
id |
Defines the GUID of the model. |
is |
Defines the formatted value to set. |
value-provider-bean |
Defines the bean name of the default value provider for this property. |
<insert-value /> is valid inside: <insert-object />
The property-check definition contains a set of insert-test
definitions. If all insert tests return the value true, a new domain
object is created in the database.
| Attributes of <property-check /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <property-check /> is: <insert-test />
<property-check /> is valid inside: <data-set />
Table of Contents
Defines a model that contains a list of ConstantValueModelImpls.
| Attributes of <constant-data /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <constant-data /> are: <constant />, <geo-polygon />, <geo-point />
<constant-data /> is valid inside: <constant-data-list />
Defines a list of the section called “<constant-data />”s that are used by the the section called “<constant-domain-type />”.
| Attributes of <constant-data-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <constant-data-list /> are: <constant-data />, <property-reference-list />
<constant-data-list /> is valid inside: <constant-domain-type />
Constant domain types are an extension of normal domain types. They contain constant data that
can not be changed in any way. Below you can find an example definition together with the
data source definition. The constant-data-list contains a property-reference-list
and a list of constant-data definitions. The property-reference-list specifies the order
of the properties and each constant-data definition has to
contain a constant definition that corresponds to the property defined in the property
reference list (they are mapped in the same order).
<constant-domain-type id="qs-issues.issue_state" name="IssueState" data-source-name="system-issue_state-data-source" ...> <property-set> <domain-type-property-set> <domain-type-property id="qs-issues.issue_state.nr" name="state" type="Integer" /> <domain-type-property id="qs-issues.issue_state.name" name="name" type="PlainText" translation-required="true" /> <domain-type-property id="qs-issues.issue_state.attachment" name="attachment" type="Attachment"/> </domain-type-property-set> </property-set> <primary-key> <key property-ref="qs-issues.issue_state.nr" /> </primary-key> <constant-data-list> <property-reference-list> <property-reference property-ref="qs-issues.issue_state.nr" /> <property-reference property-ref="qs-issues.issue_state.name" /> <property-reference property-ref="qs-issues.issue_state.attachment" /> </property-reference-list> <constant-data> <constant value="1"/> <constant value="Draft"/> <constant value="resource:/app/res/media/icons/gear_edit.png"/> </constant-data> <constant-data> <constant value="2"/> <constant value="Open"/> <constant value="resource:/app/res/media/icons/gear_information.png"/> </constant-data> ... </constant-data-list> </constant-domain-type>
data-source-name points to the data source definition that you can see
below. This data source doesn't have any additional configuration settings.
<stage name="global"> <data-source-set> <data-source name="system-issue_state-data-source" type="opensaga-constant"/> ... </data-source-set> </stage>
| Attributes of <constant-domain-type /> | ||||
|---|---|---|---|---|
| Attribute | Description | |||
audit-trail-mode |
Defines the audit trail mode. | |||
audit-trail-relation-ref |
Defines the audit trail relation reference. | |||
cardinality |
Defines the domain object cardinality.
You can use the domain type cardinality to restrict the number of domain objects
that are created for a domain type. E.g. you may want to store a system specific
setting or a setting that is stored on a per user basis.
For now two cardinalities are possible: <domain-type id="system.domain.config" cardinality="user" ...> <property-set> <domain-type-property-set> <domain-type-property id="system.domain.config.colorScheme" name="colorScheme" type="PlainText" default-value="blue"/> ... </domain-type-property-set> </property-set> </domain-type> user cardinality.
To create such an object, you have to put it into a context, e.g. here we use the
session context (defined in portal.xml):
<portal ...> <session-context> <scoped-domain-object id="portal.config" name="portalConfig" domain-type-ref="system.domain.config"/> </session-context> ... </portal> system.domain.config.colorScheme).
| |||
data-handler-bean |
Defines the data handler bean reference. | |||
data-handler-class |
Defines the data handler class name. | |||
data-source-name |
Defines the name of the data source to be used by this domain type. | |||
delegate-bean-name |
Defines the name of the delegate bean of type Model. | |||
deletion-mode |
OpenSAGA supports different deletion modes for domain type models. Each deletion
mode specifies how data entries are deleted. The
| |||
description |
Defines the description. | |||
extends |
Defines the the domain type name that this domain type extends. | |||
id |
Defines the GUID of the model. | |||
immutable |
Defines the immutable flag. | |||
name |
Defines the name of the domain type. | |||
permission-filter-generator-bean |
Defines the permission filter generator bean reference. | |||
table-name |
Defines the database table name. | |||
Valid inside <constant-domain-type /> are: <constant-data-list />, <primary-key />, <restriction-set />, <initialization-data />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <on-create />, <on-insert />, <on-update />, <on-delete />, <property-set />
Defines a property reference that references another property. In case of the constant domain type model it describes the order in which the constant data values are read. See the section called “<constant-domain-type />” for more information.
| Attributes of <property-reference /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref |
Defines the property reference. |
<property-reference /> is valid inside: <property-reference-list />
Defines a list of the section called “<property-reference />”s.
| Attributes of <property-reference-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <property-reference-list /> is: <property-reference />
<property-reference-list /> is valid inside: <constant-data-list />
Table of Contents
Defines an Excel configuration that provides parameters used by the Excel domain type model. See the section called “<external-excel-domain-type />” for more information.
| Attributes of <excel-configuration /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
skip-lines |
Defines the number of lines to skip. |
Valid inside <excel-configuration /> are: <output />, <mapping />, <input />
<excel-configuration /> is valid inside: <external-excel-domain-type />
You can use the external Excel domain type if you want to access data from an Excel file. All you
have to do is to provide a mapping between the Excel file columns and the domain type properties.
To skip a specific number of lines at the top of the document, you can use the attribute
skip-lines. If you only want to import some parts of the file, you can define
a filter specification that checks each row for validity.
<external-excel-domain-type id="pa.excel-import" name="ExcelImport" data-source-name="excel-import-data-source" ...> <property-set> <domain-type-property-set> <domain-type-property id="pa.excel-import.kunde" name="status" type="PlainText" /> <domain-type-property id="pa.excel-import.status" name="status" type="PlainText" /> ... </domain-type-property-set> </property-set> <primary-key ... /> <excel-configuration skip-lines="2"> <mapping> <property-mappings> <property-mapping source-ref="A" target-ref="pa.excel-import.kunde"/> <property-mapping source-ref="AG" target-ref="pa.excel-import.kommentar"/> ... </property-mappings> </mapping> </excel-configuration> <filter-specification ... /> </external-excel-domain-type>
data-source-name points to the data source definition that you can see
below. This data source specifies the Excel file that is read.
<stage name="global"> <data-source-set> <data-source name="excel-import-data-source" type="opensaga-external-excel"> <settings> <setting name="fileName" value="c:\\Import\\ExampleData.xls"/> </settings> </data-source> ... </data-source-set> </stage>
| Attributes of <external-excel-domain-type /> | ||||
|---|---|---|---|---|
| Attribute | Description | |||
audit-trail-mode |
Defines the audit trail mode. | |||
audit-trail-relation-ref |
Defines the audit trail relation reference. | |||
cardinality |
Defines the domain object cardinality.
You can use the domain type cardinality to restrict the number of domain objects
that are created for a domain type. E.g. you may want to store a system specific
setting or a setting that is stored on a per user basis.
For now two cardinalities are possible: <domain-type id="system.domain.config" cardinality="user" ...> <property-set> <domain-type-property-set> <domain-type-property id="system.domain.config.colorScheme" name="colorScheme" type="PlainText" default-value="blue"/> ... </domain-type-property-set> </property-set> </domain-type> user cardinality.
To create such an object, you have to put it into a context, e.g. here we use the
session context (defined in portal.xml):
<portal ...> <session-context> <scoped-domain-object id="portal.config" name="portalConfig" domain-type-ref="system.domain.config"/> </session-context> ... </portal> system.domain.config.colorScheme).
| |||
data-handler-bean |
Defines the data handler bean reference. | |||
data-handler-class |
Defines the data handler class name. | |||
data-source-name |
Defines the name of the data source to be used by this domain type. | |||
delegate-bean-name |
Defines the name of the delegate bean of type Model. | |||
deletion-mode |
OpenSAGA supports different deletion modes for domain type models. Each deletion
mode specifies how data entries are deleted. The
| |||
description |
Defines the description. | |||
extends |
Defines the the domain type name that this domain type extends. | |||
id |
Defines the GUID of the model. | |||
immutable |
Defines the immutable flag. | |||
name |
Defines the name of the domain type. | |||
permission-filter-generator-bean |
Defines the permission filter generator bean reference. | |||
table-name |
Defines the database table name. | |||
Valid inside <external-excel-domain-type /> are: <excel-configuration />, <primary-key />, <restriction-set />, <initialization-data />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <on-create />, <on-insert />, <on-update />, <on-delete />, <property-set />
Table of Contents
( Additional names: insert-statement )
Defines a SQL create statement that is used by the the section called “<external-relational-domain-type />”.
| Attributes of <create-statement /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <create-statement /> is: text content
Defines a set of database statement models that consists of:
| Attributes of <database-statement-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <database-statement-set /> are: <create-statement />, <update-statement />, <delete-statement />, <find-statement />
<database-statement-set /> is valid inside: <external-relational-domain-type />
Defines a SQL delete statement that is used by the the section called “<external-relational-domain-type />”.
| Attributes of <delete-statement /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <delete-statement /> is: text content
<delete-statement /> is valid inside: <database-statement-set />
With the external relation domain type you can access data from data bases that are not directly used by OpenSAGA itself. For example, if you want to display a list of customers and their orders from the database of your sales system, you just define a SQL statement that provides the data. The mapping between the result values and the properties is done by using aliases. See below for an example. Important: Only read access is possible at the moment.
<external-relational-domain-type id="pa.customer" name="Customer" data-source-name="customer-data-source" ... > <property-set> <domain-type-property-set> <domain-type-property id="pa.customer.id" name="id" type="Integer" /> <domain-type-property id="pa.customer.name" name="name" type="PlainText" /> <domain-type-property id="pa.customer.contact" name="contact" type="PlainText" /> </domain-type-property-set> </property-set> <primary-key> <key property-ref="pa.customer.id" /> </primary-key> <database-statement-set> <create-statement></create-statement> <update-statement></update-statement> <delete-statement></delete-statement> <find-statement>select lid as id, str_customer as name, str_contactperson as contact from customers </find-statement> </database-statement-set> </external-relational-domain-type>
id, name and contact are mapped to the
corresponding properties (Internal a org.springframework.jdbc.core.RowMapper is used).
The attribute data-source-name points to the data source definition that you can see
below. This data source specifies the database connection.
<stage name="global"> <data-source-set> <data-source name="customer-data-source" type="opensaga-external-relational"> <settings> <setting name="driverClassName" value="org.postgresql.Driver"/> <setting name="url" value="jdbc:postgresql://server:5432/testdb"/> <setting name="username" value="postgres"/> <setting name="password" value="test"/> </settings> </data-source> ... </data-source-set> </stage>
<find-statement>
select lid as id, customer_name as name from customer_table
where customer_nr >= ${nr}
</find-statement>
filter-pattern, like
shown in the example below. The attribute name defines the placeholder name and the
attribute constant the placeholder value. You can use property-ref to
set the placeholder to the value of the referenced property.
<datagrid ...> <datagrid-column-list ... /> <filter-specification> <filter-pattern-set> <filter-pattern name="nr" constant="1000"/> </filter-pattern-set> </filter-specification> </datagrid>
| Attributes of <external-relational-domain-type /> | ||||
|---|---|---|---|---|
| Attribute | Description | |||
audit-trail-mode |
Defines the audit trail mode. | |||
audit-trail-relation-ref |
Defines the audit trail relation reference. | |||
cardinality |
Defines the domain object cardinality.
You can use the domain type cardinality to restrict the number of domain objects
that are created for a domain type. E.g. you may want to store a system specific
setting or a setting that is stored on a per user basis.
For now two cardinalities are possible: <domain-type id="system.domain.config" cardinality="user" ...> <property-set> <domain-type-property-set> <domain-type-property id="system.domain.config.colorScheme" name="colorScheme" type="PlainText" default-value="blue"/> ... </domain-type-property-set> </property-set> </domain-type> user cardinality.
To create such an object, you have to put it into a context, e.g. here we use the
session context (defined in portal.xml):
<portal ...> <session-context> <scoped-domain-object id="portal.config" name="portalConfig" domain-type-ref="system.domain.config"/> </session-context> ... </portal> system.domain.config.colorScheme).
| |||
data-handler-bean |
Defines the data handler bean reference. | |||
data-handler-class |
Defines the data handler class name. | |||
data-source-name |
Defines the name of the data source to be used by this domain type. | |||
delegate-bean-name |
Defines the name of the delegate bean of type Model. | |||
deletion-mode |
OpenSAGA supports different deletion modes for domain type models. Each deletion
mode specifies how data entries are deleted. The
| |||
description |
Defines the description. | |||
extends |
Defines the the domain type name that this domain type extends. | |||
id |
Defines the GUID of the model. | |||
immutable |
Defines the immutable flag. | |||
name |
Defines the name of the domain type. | |||
permission-filter-generator-bean |
Defines the permission filter generator bean reference. | |||
table-name |
Defines the database table name. | |||
Valid inside <external-relational-domain-type /> are: <database-statement-set />, <contained-primary-key-set />, <primary-key />, <restriction-set />, <initialization-data />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <on-create />, <on-insert />, <on-update />, <on-delete />, <property-set />
( Additional names: select-statement )
Defines a SQL find statement that is used by the the section called “<external-relational-domain-type />”.
| Attributes of <find-statement /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
handles-paging |
Defines the flag indicating if the statement handles paging. |
handles-sorting |
Defines the flag indicating if the statement handles sorting. |
id |
Defines the GUID of the model. |
scripting-dialect |
Defines the scripting dialect. |
template-engine |
Defines the template engine. |
Valid inside <find-statement /> is: text content
( Additional names: create-statement )
Defines a SQL create statement that is used by the the section called “<external-relational-domain-type />”.
| Attributes of <insert-statement /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <insert-statement /> is: text content
<insert-statement /> is valid inside: <database-statement-set />
( Additional names: find-statement )
Defines a SQL find statement that is used by the the section called “<external-relational-domain-type />”.
| Attributes of <select-statement /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
handles-paging |
Defines the flag indicating if the statement handles paging. |
handles-sorting |
Defines the flag indicating if the statement handles sorting. |
id |
Defines the GUID of the model. |
scripting-dialect |
Defines the scripting dialect. |
template-engine |
Defines the template engine. |
Valid inside <select-statement /> is: text content
<select-statement /> is valid inside: <database-statement-set />
Defines a SQL update statement that is used by the the section called “<external-relational-domain-type />”.
| Attributes of <update-statement /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <update-statement /> is: text content
<update-statement /> is valid inside: <database-statement-set />
Table of Contents
Joined domain types are used to join (at least two) domain types together without the need of creating a database view.
<joined-domain-type ... > <property-set> <joined-property-set domain-type-ref="qs-issues.issue" name="issue"> <joined-property id="qs-issues.issue_cc_user.guid" name="guid" property-ref="qs-issues.issue.guid" /> <joined-property id="qs-issues.issue_cc_user.title" name="title" property-ref="qs-issues.issue.title" /> ... </joined-property-set> <joined-property-set domain-type-ref="qs-issues.cc" name="cc"> <joined-property id="qs-issues.issue_cc_user.entryChanged" name="entryChanged" property-ref="qs-issues.cc.entryChanged" /> ... </joined-property-set> <joined-property-set domain-type-ref="system.domain.user" name="user"> <joined-property id="qs-issues.issue_cc_user.login" name="login" property-ref="system.domain.user.login" /> ... </joined-property-set> </property-set> <relation-chain> <relation-reference relation-ref="qs-issues.issue.relation.cc"/> <relation-reference relation-ref="qs-issues.cc.relation.user"/> </relation-chain> <primary-key> <key property-ref="qs-issues.issue_cc_user.guid" /> </primary-key> </joined-domain-type>
| Attributes of <joined-domain-type /> | ||||
|---|---|---|---|---|
| Attribute | Description | |||
audit-trail-mode |
Defines the audit trail mode. | |||
audit-trail-relation-ref |
Defines the audit trail relation reference. | |||
cardinality |
Defines the domain object cardinality.
You can use the domain type cardinality to restrict the number of domain objects
that are created for a domain type. E.g. you may want to store a system specific
setting or a setting that is stored on a per user basis.
For now two cardinalities are possible: <domain-type id="system.domain.config" cardinality="user" ...> <property-set> <domain-type-property-set> <domain-type-property id="system.domain.config.colorScheme" name="colorScheme" type="PlainText" default-value="blue"/> ... </domain-type-property-set> </property-set> </domain-type> user cardinality.
To create such an object, you have to put it into a context, e.g. here we use the
session context (defined in portal.xml):
<portal ...> <session-context> <scoped-domain-object id="portal.config" name="portalConfig" domain-type-ref="system.domain.config"/> </session-context> ... </portal> system.domain.config.colorScheme).
| |||
data-handler-bean |
Defines the data handler bean reference. | |||
data-handler-class |
Defines the data handler class name. | |||
data-source-name |
Defines the name of the data source to be used by this domain type. | |||
delegate-bean-name |
Defines the name of the delegate bean of type Model. | |||
deletion-mode |
OpenSAGA supports different deletion modes for domain type models. Each deletion
mode specifies how data entries are deleted. The
| |||
description |
Defines the description. | |||
extends |
Defines the the domain type name that this domain type extends. | |||
id |
Defines the GUID of the model. | |||
immutable |
Defines the immutable flag. | |||
name |
Defines the name of the domain type. | |||
permission-filter-generator-bean |
Defines the permission filter generator bean reference. | |||
table-name |
Defines the database table name. | |||
Valid inside <joined-domain-type /> are: <relation-chain />, <primary-key />, <restriction-set />, <initialization-data />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <on-create />, <on-insert />, <on-update />, <on-delete />, <property-set />
Joined properties (joined-property) are special properties for joined domain types
(see the section called “<joined-domain-type />”) for a more detailed description). A joined domain type
is defined by a relation chain. Each domain type in this relation chain is part of the join.
| Attributes of <joined-property /> | |
|---|---|
| Attribute | Description |
audit-trail-relevance-mode |
Defines the audit trail relevance mode. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the name of the property. |
property-handling-bean-name |
Defines a bean that handles the property value. The specified bean has to implement
the interface |
property-ref |
Defines the referenced property. |
translation-required |
Defines that the property value has to be translated before it is displayed. The
default value is |
Valid inside <joined-property /> is: <property-type-parameter-set />
<joined-property /> is valid inside: <formula-property-set />, <joined-property-set />, <enum-property-set />, <domain-type-property-set />, <reference-property-set />
Implements JoinedPropertySetModel.
| Attributes of <joined-property-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
domain-type-ref |
Defines the domain type reference. |
id |
Defines the GUID of the model. |
Valid inside <joined-property-set /> are: <wiki-text-property />, <property-column />, <text-field />, <rich-text-property />, <url-column />, <select-popup />, <checkbox />, <textarea />, <radio-buttons />, <rich-text-field />, <locale-select />, <joined-property />, <plain-text-property />, <boolean-column />, <location-field />, <domain-type-property />, <enum-property />, <attachment />, <attachment-column />, <select-field />, <boolean-element />, <formula-property />, <password />, <reference-property />
<joined-property-set /> is valid inside: <property-set />
Table of Contents
Relations define a relationship between two domain types. All relations are specified in a single relations.xml file. If you specify an inverse relation ID, the relation is symmetric.
<relation-set id="portal.domain.relations" ...> <relation id="system.domain.user.relation.role" inverse-relation-id="system.domain.role.relation.user" name="relation between user and role" start-type-ref="system.domain.user" end-type-ref="system.domain.role" start-cardinality="0..*" end-cardinality="0..*"/> ... </relation-set>
1
You can connect exactly one domain object.
0..1
You can connect zero or one domain object.
0..*
You can connect zero or more domain objects.
1..*
You can connect one or more domain objects.
| Attributes of <relation /> | |
|---|---|
| Attribute | Description |
connection-handler-bean |
The connection handler bean (implementing the interface ConnectionHandler). [optional] |
connection-handler-class |
The connection handler class (implementing the interface ConnectionHandler). [optional] |
description |
Defines the description. |
end-cardinality |
Defines the end cardinality. |
end-type-ref |
The domain type model ID of the end domain type. |
id |
Defines the GUID of the model. |
inverse-relation-id |
Defines the inverse ID of the relation. OpenSAGA creates a relation model with the inverse ID automatically, this cuts down the amount of XML you have to write. [optional] |
join-table-name |
The name of the join table. If you don't specify this value, the name is automatically generated. [optional] |
name |
Defines the relation name. Can be used for a more detailed description of the relation. |
start-cardinality |
Defines the start cardinality. |
start-type-ref |
The domain type model ID of the start domain type. |
use-join-table |
Defines that a join table should be used (this is the default).
If you set this attribute to |
<relation /> is valid inside: <relation-set />
Implements RelationReferenceChainModel.
| Attributes of <relation-chain /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <relation-chain /> is: <relation-reference />
<relation-chain /> is valid inside: <part />, <relation-count />, <joined-domain-type />, <radio-buttons />, <multi-connect />, <tree-connect />, <transition />, <reference-property-set />, <list-iterator />, <multi-connect />, <single-connect />, <relation-chain-list />, <filtered-list />, <model-permission />, <datagrid />, <radio-buttons />, <select-field />
Implements RelationReferenceChainListModel.
| Attributes of <relation-chain-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <relation-chain-list /> is: <relation-chain />
<relation-chain-list /> is valid inside: <set-property-value />, <audit-trail />, <delete />, <disconnect />
Implements RelationReferenceModel.
| Attributes of <relation-reference /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
relation-ref |
Defines the relation id. |
Valid inside <relation-reference /> are: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />
<relation-reference /> is valid inside: <relation-chain />
Implements RelationSetModel.
| Attributes of <relation-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <relation-set /> is: <relation />
Table of Contents
Table of Contents
Defines a list of filters concatenated by a logical AND.
| Attributes of <and /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <and /> are: <greater-than />, <is-property-modified />, <and />, <geo-within />, <matches />, <user-logged-in />, <validation-failed />, <complies-to />, <criterion />, <less-than-or-equal-to />, <has-current-element />, <is-undefined />, <has-changed />, <or />, <is-connected-to />, <can-access />, <ends-with />, <geo-contains />, <has-permission />, <contains-comparator />, <starts-with />, <not />, <equals />, <is-new />, <has-elements />, <dynamic-condition />, <true />, <less-than />, <in />, <include />, <in-transition />, <filter-pattern />, <has-type />, <greater-than-or-equal-to />, <is-super-user />, <false />, <is-defined />
<and /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines a "can access" filter for the current user. Only one of the access permissions can be checked at a time.
| Attributes of <can-access /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
navigation-item-ref |
Defines the reference to the navigation item to check for access permissions. |
transition-ref |
Defines the reference to the transition to check for access permissions. |
view-state-ref |
Defines the reference to the view state to check for access permissions. |
<can-access /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Implements CompliesToFilterModel
| Attributes of <complies-to /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref |
Defines the reference to the property that is checked by this filter |
restriction-ref |
Defines the reference to the restriction that is used by this filter. |
scoped-domain-object-ref |
Defines the reference to the cached domain object that is checked by this filter. |
<complies-to /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
( Additional names: contains-comparator )
Defines an "contains" filter.
| Attributes of <contains /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
ignore-case |
If set to |
null-value-compare-mode | |
Valid inside <contains /> are: <count />, <constant />, <relation-count />, <size-of />, <current-property-value />, <geo-polygon />, <property />, <geo-point />
( Additional names: contains )
Defines an "contains" filter.
| Attributes of <contains-comparator /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
ignore-case |
If set to |
null-value-compare-mode | |
Valid inside <contains-comparator /> are: <count />, <constant />, <relation-count />, <size-of />, <current-property-value />, <geo-polygon />, <property />, <geo-point />
<contains-comparator /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Implements CriterionFilterModel.
| Attributes of <criterion /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <criterion /> is: text content
<criterion /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Implements DynamicConditionFilterModel.
| Attributes of <dynamic-condition /> | |
|---|---|
| Attribute | Description |
condition-bean |
Defines the condition bean to execute. The condition bean must implement DynamicCondition. |
condition-script |
Defines the script to execute |
condition-script-resource |
Defines the path to the script to execute. |
condition-scripting-dialect |
Defines the dialect of the script. |
condition-using-script-dialect-dir |
Defines whether the script resource path is relative to the script dialect directory or not. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
<dynamic-condition /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines a "ends with" filter.
| Attributes of <ends-with /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
ignore-case |
If set to |
null-value-compare-mode | |
Valid inside <ends-with /> are: <count />, <constant />, <relation-count />, <size-of />, <current-property-value />, <geo-polygon />, <property />, <geo-point />
<ends-with /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines an equals filter.
| Attributes of <equals /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
ignore-case |
If set to |
null-value-compare-mode | |
Valid inside <equals /> are: <count />, <constant />, <relation-count />, <size-of />, <current-property-value />, <geo-polygon />, <property />, <geo-point />
<equals /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines a logical FALSE.
| Attributes of <false /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
<false /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Implements FilterPatternModel.
| Attributes of <filter-pattern /> | |
|---|---|
| Attribute | Description |
constant |
Defines the constant value. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the pattern name. |
property-ref |
Defines the property reference. |
<filter-pattern /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <filter-pattern-set />, <disabled-if />, <condition />, <validate-if />
Implements FilterPatternSetModel.
| Attributes of <filter-pattern-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <filter-pattern-set /> is: <filter-pattern />
<filter-pattern-set /> is valid inside: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Implements FilterSpecificationModel.
| Attributes of <filter-specification /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <filter-specification /> are: <greater-than />, <is-property-modified />, <and />, <geo-within />, <matches />, <user-logged-in />, <validation-failed />, <complies-to />, <criterion />, <less-than-or-equal-to />, <has-current-element />, <is-undefined />, <has-changed />, <or />, <is-connected-to />, <can-access />, <ends-with />, <geo-contains />, <has-permission />, <contains-comparator />, <starts-with />, <not />, <equals />, <is-new />, <has-elements />, <dynamic-condition />, <true />, <less-than />, <in />, <include />, <in-transition />, <filter-pattern />, <has-type />, <greater-than-or-equal-to />, <is-super-user />, <false />, <is-defined />, <filter-pattern-set />
<filter-specification /> is valid inside: <external-excel-domain-type />, <external-relational-domain-type />, <count />, <filter-specification-set />, <joined-domain-type />, <constant-domain-type />, <start-action-list />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <radio-buttons />, <multi-connect />, <tree-connect />, <transition />, <list-iterator />, <case />, <wfs-domain-type />, <multi-connect />, <single-connect />, <relation-reference />, <has-elements />, <filtered-list />, <agent-action />, <datagrid />, <start-action-list />, <action-list />, <radio-buttons />, <select-field />, <request-context />, <cell-format />
If you have frequently used filter specifications, you should define
them in a filter specification set. You can define such a set within view,
process and portal models. To reference a filter defined in such a set, you
have to use the include command, see the section called “IncludeFilter”
for more information.
![]() | Important |
|---|---|
The search order for filter specifications is: view, process and portal. |
Example 63.1. Filter Specification Set
<filter-specification-set>
<filter-specification id="filter1">
...
</filter-specification>
...
</filter-specification-set>| Attributes of <filter-specification-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <filter-specification-set /> are: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />
<filter-specification-set /> is valid inside: <process />, <portal />, <view />
Implements FilteredListModel.
| Attributes of <filtered-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
domain-type-ref |
Defines the referenced domain type model. |
id |
Defines the GUID of the model. |
max-size |
Defines the max size of this list. |
scoped-domain-object-list-ref |
Defines the referenced cached domain object list. |
scoped-domain-object-ref |
Defines the referenced cached domain object. |
Valid inside <filtered-list /> are: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <sort-order-list />, <relation-chain />, <join-definition-set />, <virtual-properties />
<filtered-list /> is valid inside: <map-values />, <system-log />, <tag />, <delete />, <for-each />, <connect />, <email />, <load-list />
Defines a geometric "contains" filter.
| Attributes of <geo-contains /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
ignore-case |
If set to |
null-value-compare-mode | |
Valid inside <geo-contains /> are: <count />, <constant />, <relation-count />, <size-of />, <current-property-value />, <geo-polygon />, <property />, <geo-point />
<geo-contains /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines a geometric "within" filter.
| Attributes of <geo-within /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
ignore-case |
If set to |
null-value-compare-mode | |
Valid inside <geo-within /> are: <count />, <constant />, <relation-count />, <size-of />, <current-property-value />, <geo-polygon />, <property />, <geo-point />
<geo-within /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines a "greater than" filter.
| Attributes of <greater-than /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
ignore-case |
If set to |
null-value-compare-mode | |
Valid inside <greater-than /> are: <count />, <constant />, <relation-count />, <size-of />, <current-property-value />, <geo-polygon />, <property />, <geo-point />
<greater-than /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines a "greater than or equal to" filter.
| Attributes of <greater-than-or-equal-to /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
ignore-case |
If set to |
null-value-compare-mode | |
Valid inside <greater-than-or-equal-to /> are: <count />, <constant />, <relation-count />, <size-of />, <current-property-value />, <geo-polygon />, <property />, <geo-point />
<greater-than-or-equal-to /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
| Attributes of <has-changed /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
scoped-domain-object-ref |
Defines the reference to a cached domain object reference in the current runtime context. |
<has-changed /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines a filter model that checks if a scoped domain object list exists and has one or more remaining elements in the current iteration run.
| Attributes of <has-current-element /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
scoped-domain-object-list-ref |
Defines the referenced list. |
<has-current-element /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
The HasElementsFilter checks whether a list has elements. The list
can be either a scoped domain object or a loaded list from the database.
The HasElementsFilter can be used in following ways:
To check whether a scoped list has elements.
Example 63.2. HasElementsFilter: Checking a scoped list
<has-elements scoped-domain-object-list-ref="my.list" />
To check whether a list of loaded domain objects of the given domain type has elements.
Example 63.3. HasElementsFilter: Checking a scoped list
<has-elements domain-type-ref="domain.type.model" />
To check whether a list of loaded domain objects of the given domain model that satisfy the given filter specification has elements.
Example 63.4. HasElementsFilter: Checking a scoped list
<has-elements domain-type-ref="system.domain.user"> <filter-specification> <equals> <property-value property-ref="system.domain.user.login" /> <property-value property-ref="system.domain.proposed_user.login" /> </equals> </filter-specification> </has-elements>
| Attributes of <has-elements /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
domain-type-ref |
Defines the domain type reference. Loads a list of domain objects from the database with the defined domain type. This loaded list is checked by this filter.
|
id |
Defines the GUID of the model. |
scoped-domain-object-list-ref |
Defines a scoped list that is checked by this filter. |
Valid inside <has-elements /> are: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />
<has-elements /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines a "has permission" filter for the current user.
| Attributes of <has-permission /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
<has-permission /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines a filter model that checks if the target domain type is the same as the mentioned.
A ScopedDomainObjectListReferenceModel is variable.
The syntax of this Filter is
| Attributes of <has-type /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
domain-type-ref |
Defines the domain object. |
id |
Defines the GUID of the model. |
scoped-domain-object-ref |
Defines the referenced list. |
<has-type /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Implements the in filter model.
<in property-ref="..."> [<constant ...] [<property ...] [<property-value ...] [<scoped-domain-object-ref ...] [<scoped-domain-object-list-ref ...] </in>
id given by the
property-ref attribute exists in the amount of values.
The values can be set in different ways:
constant (see the section called “<constant />”)
property (see PropertyReferenceValueModelImpl)
property-value (see PropertyReferenceValueModelImpl)
scoped-domain-object-ref (see the section called “<scoped-domain-object-ref />”)
scoped-domain-object-list-ref (see the section called “<scoped-domain-object-list-ref />”)
Example:
<in property-ref="user.home.country"> <constant value="Australia"/> <constant value="Germany"/> <constant value="Melmac"/> <constant value="Cuba"/> <constant value="Moon"/> </in>
true if the users home is located e.g. on Melmac.
| Attributes of <in /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref |
Defines the reference to a property reference in the current runtime context. |
Valid inside <in /> are: <scoped-domain-object-list-ref />, <current-property-value />, <property />, <constant />, <geo-polygon />, <geo-point />, <scoped-domain-object-ref />
<in /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Implements InTransitionFilterModel.
| Attributes of <in-transition /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
transition-ref |
Defines the reference to a property in the current runtime context. |
<in-transition /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
The IncludeFilter provides the possibility to include a
FilterSpecification within another. The resulting filter will be
executed in the same way as if you would write the filter directly into the
FilterSpecification. This can be very useful, if you use one and
the same filter several times or you want to have a common filter that you
can extend with some more filter rules.
A FilterSpecification that should be included by other filters
has to be defined either in the PortalModel (see
the section called “Filter Specification Set”), in a ProcessModel
or in a ViewModel within a filter-specification-set.
![]() | Important |
|---|---|
The search order for filter specifications is: view, process and portal. |
Example 63.5. Defining a filter within a filter specification set
<filter-specification-set>
<filter-specification id="filter1">
...
</filter-specification>
</filter-specification-set>
The example below shows how you can include the FilterSpecification
that is defined above.
Example 63.6. Including a filter from a filter specification set
<filter-specification>
<include filter-specification-ref="filter1"/>
</filter-specification>
Because the IncludeFilter is like any other Filter, you can use it
within other filters like and, or and so on. So you
can extend the filter easily.
Example 63.7. Including and extending a filter specification
<filter-specification>
<and>
<include filter-specification-ref="filter1"/>
...
</and>
</filter-specification>
| Attributes of <include /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
filter-specification-ref |
Defines the reference to the |
id |
Defines the GUID of the model. |
<include /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Implements IsConnectedFilterModel.
| Attributes of <is-connected-to /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
object-ref | |
relation-ref | |
<is-connected-to /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
The IsDefinedFilter checks if a given value (see the section called “Values”),
a cached domain object or a cached domain object list is defined (that it is
not null). Therefore either a value (as child) or a scoped domain
object reference or a scoped domain object list reference (as attribute) must
be defined.
The following example shows how to check that a value of a property is not
null. The example check if the property with the id
local.name of the current object is not null.
Example 63.8. IsDefinedFilter: Checking a value
<is-defined>
<property-value property-ref="local.name"/>
</is-defined>
The next example shows how to check that a cached domain object is not
null. The example checks that the cached domain object with the id
p_example.obj is not null.
Example 63.9. IsDefinedFilter: Checking a cached domain object
<is-defined scoped-domain-object-ref="p_example.obj"/>
null. The example checks that the cached domain object list with
the id p_example.list is not null.
Example 63.10. IsDefinedFilter: Checking a cached domain object list
<is-defined scoped-domain-object-list-ref="p_example.list"/>
| Attributes of <is-defined /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
scoped-domain-object-list-ref |
Defines the reference to the list that is checked. |
scoped-domain-object-ref |
Defines the reference to the object that is checked. |
Valid inside <is-defined /> are: <count />, <constant />, <relation-count />, <size-of />, <current-property-value />, <geo-polygon />, <property />, <geo-point />
<is-defined /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
| Attributes of <is-new /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
scoped-domain-object-ref |
Defines the reference to a cached domain object reference in the current runtime context. |
<is-new /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Implements IsPropertyModifiedFilterModel.
| Attributes of <is-property-modified /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref |
Defines the reference to a property in the current runtime context. |
<is-property-modified /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Checks if the current user is a super user.
| Attributes of <is-super-user /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
<is-super-user /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
The IsUndefinedFilter checks if a given value (see the section called “Values”),
a cached domain object or a cached domain object list is undefined (that it is
null). Therefore either a value (as child) or a scoped domain object
reference or a scoped domain object list reference (as attribute) must be defined.
The following example shows how to check that a value of a property is
null. The example check if the property with the id
local.name of the current object is null.
Example 63.11. IsUndefinedFilter: Checking a value
<is-undefined>
<property-value property-ref="local.name"/>
</is-undefined>
The next example shows how to check that a cached domain object is
null. The example checks that the cached domain object with the
id p_example.obj points to null.
Example 63.12. IsUndefinedFilter: Checking a cached domain object
<is-undefined scoped-domain-object-ref="p_example.obj"/>
null. The example checks that the cached domain object list with
the id p_example.list points to null.
Example 63.13. IsUndefinedFilter: Checking a cached domain object list
<is-undefined scoped-domain-object-list-ref="p_example.list"/>
| Attributes of <is-undefined /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
scoped-domain-object-list-ref |
Defines the reference to the list that is checked. |
scoped-domain-object-ref |
Defines the reference to the object that is checked. |
Valid inside <is-undefined /> are: <count />, <constant />, <relation-count />, <size-of />, <current-property-value />, <geo-polygon />, <property />, <geo-point />
<is-undefined /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Implements JoinDefinitionModel.
| Attributes of <join-definition /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
filtered-list-property-ref |
Defines the filtered list property model reference. |
id |
Defines the GUID of the model. |
property-ref |
Defines the property model reference. |
<join-definition /> is valid inside: <join-definition-set />
Defines a set of join definition models.
| Attributes of <join-definition-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <join-definition-set /> is: <join-definition />
<join-definition-set /> is valid inside: <filtered-list />
Defines a "less than" filter.
| Attributes of <less-than /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
ignore-case |
If set to |
null-value-compare-mode | |
Valid inside <less-than /> are: <count />, <constant />, <relation-count />, <size-of />, <current-property-value />, <geo-polygon />, <property />, <geo-point />
<less-than /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines a "less than or equal to" filter.
| Attributes of <less-than-or-equal-to /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
ignore-case |
If set to |
null-value-compare-mode | |
Valid inside <less-than-or-equal-to /> are: <count />, <constant />, <relation-count />, <size-of />, <current-property-value />, <geo-polygon />, <property />, <geo-point />
<less-than-or-equal-to /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Implements MatchesFilterModel.
| Attributes of <matches /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
filter-expression-property-ref |
Defines the filter expression property reference. |
filter-expression-value |
Defines the filter expression value. |
id |
Defines the GUID of the model. |
ignore-case |
Defines the ignore case flag. |
property-ref |
Defines the reference to a property in the current runtime context. |
<matches /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines a logical NOT.
| Attributes of <not /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <not /> are: <greater-than />, <is-property-modified />, <and />, <geo-within />, <matches />, <user-logged-in />, <validation-failed />, <complies-to />, <criterion />, <less-than-or-equal-to />, <has-current-element />, <is-undefined />, <has-changed />, <or />, <is-connected-to />, <can-access />, <ends-with />, <geo-contains />, <has-permission />, <contains-comparator />, <starts-with />, <not />, <equals />, <is-new />, <has-elements />, <dynamic-condition />, <true />, <less-than />, <in />, <include />, <in-transition />, <filter-pattern />, <has-type />, <greater-than-or-equal-to />, <is-super-user />, <false />, <is-defined />, <greater-than />, <is-property-modified />, <and />, <geo-within />, <matches />, <user-logged-in />, <validation-failed />, <complies-to />, <criterion />, <less-than-or-equal-to />, <has-current-element />, <is-undefined />, <has-changed />, <or />, <is-connected-to />, <can-access />, <ends-with />, <geo-contains />, <has-permission />, <contains-comparator />, <starts-with />, <not />, <equals />, <is-new />, <has-elements />, <dynamic-condition />, <true />, <less-than />, <in />, <include />, <in-transition />, <filter-pattern />, <has-type />, <greater-than-or-equal-to />, <is-super-user />, <false />, <is-defined />
<not /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines a list of filters concatenated by a logical OR.
| Attributes of <or /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <or /> are: <greater-than />, <is-property-modified />, <and />, <geo-within />, <matches />, <user-logged-in />, <validation-failed />, <complies-to />, <criterion />, <less-than-or-equal-to />, <has-current-element />, <is-undefined />, <has-changed />, <or />, <is-connected-to />, <can-access />, <ends-with />, <geo-contains />, <has-permission />, <contains-comparator />, <starts-with />, <not />, <equals />, <is-new />, <has-elements />, <dynamic-condition />, <true />, <less-than />, <in />, <include />, <in-transition />, <filter-pattern />, <has-type />, <greater-than-or-equal-to />, <is-super-user />, <false />, <is-defined />
<or /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines the sort order of one column of a widget.
| Attributes of <sort-order /> | |
|---|---|
| Attribute | Description |
desc |
Sets the sort order to "descending". |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref |
Sets the ID of the property this sort order refers to. |
<sort-order /> is valid inside: <sort-order-list />
Defines a list of fields and orders to sort that data output of several widget types.
| Attributes of <sort-order-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <sort-order-list /> is: <sort-order />
<sort-order-list /> is valid inside: <text-field />, <password />, <radio-buttons />, <multi-connect />, <list-iterator />, <multi-connect />, <single-connect />, <filtered-list />, <datagrid />, <radio-buttons />, <select-field />, <password />
Defines a "starts with" filter.
| Attributes of <starts-with /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
ignore-case |
If set to |
null-value-compare-mode | |
Valid inside <starts-with /> are: <count />, <constant />, <relation-count />, <size-of />, <current-property-value />, <geo-polygon />, <property />, <geo-point />
<starts-with /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines a logical TRUE.
| Attributes of <true /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
<true /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Checks if the user is logged in (e.g. not anonymous).
| Attributes of <user-logged-in /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
<user-logged-in /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Defines a filter model that checks if the validation failed during the current request.
| Attributes of <validation-failed /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
<validation-failed /> is valid inside: <and />, <execute-if />, <auto-complete-filter />, <or />, <read-only-if />, <with-filter />, <not />, <not />, <filter-restriction />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <visible-if />, <disabled-if />, <condition />, <validate-if />
Table of Contents
Implements GisDefaultsModel
| Attributes of <defaults /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <defaults /> is: <srs />
<defaults /> is valid inside: <gis />
Implementation of DomainTypeBasedWFSModel.
| Attributes of <domain-type-based-wfs /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
domain-type-ref | |
id |
Defines the GUID of the model. |
name | |
<domain-type-based-wfs /> is valid inside: <service-registry />
Implements GisModel.
| Attributes of <gis /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <gis /> are: <defaults />, <service-registry />, <styles />
Implements LayerModel
| Attributes of <layer /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <layer /> is: text content
<layer /> is valid inside: <layer-list />
Implements LayerListModel.
| Attributes of <layer-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <layer-list /> is: <layer />
<layer-list /> is valid inside: <wfs-based-wms />, <wms />
Implementation of GisServiceRegistryReferenceModel.
| Attributes of <registry /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
registry-ref | |
<registry /> is valid inside: <service-registry />
| Attributes of <service-registry /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <service-registry /> is: <registry />
<service-registry /> is valid inside: <gis />
Implementation of GisServiceListModel.
| Attributes of <service-registry /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <service-registry /> are: <wfs />, <wfs-based-wms />, <domain-type-based-wfs />, <wms />
Implements SRSModel
| Attributes of <srs /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <srs /> is: text content
<srs /> is valid inside: <defaults />
Implementation of StyleModel.
| Attributes of <style /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name | |
sld | |
<style /> is valid inside: <styles />
Implements StyleRefenceModel.
| Attributes of <style-reference /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
style-ref | |
<style-reference /> is valid inside: <wfs-based-wms />, <wms />
Implementation of StyleListModel.
| Attributes of <styles /> | |
|---|---|
| Attribute | Description |
default-style-ref | |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <styles /> is: <style />
<styles /> is valid inside: <gis />
Implementation of Url
| Attributes of <url /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <url /> is: text content
<url /> is valid inside: <wfs-based-wms />, <wms />
Implements WFSModel.
| Attributes of <wfs /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name | |
<wfs /> is valid inside: <service-registry />
Implements WFSbasedWMSModel.
| Attributes of <wfs-based-wms /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
is-base-layer | |
is-transparent | |
name | |
srs | |
wfs-ref | |
Valid inside <wfs-based-wms /> are: <url />, <layer-list />, <style-reference />
<wfs-based-wms /> is valid inside: <service-registry />
Implements ExternalWMSModel.
| Attributes of <wms /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
is-base-layer | |
is-transparent | |
name | |
srs | |
Valid inside <wms /> are: <url />, <layer-list />, <style-reference />
<wms /> is valid inside: <service-registry />
Table of Contents
Defines a translation. Translations are structured according to the following criteria:
Tag (T)
Language (L)
Country (C)
Process (P)
View (V)
Translation
When a translation needs to be resolved by the Translator, the following search order is utilized:
T L C P V
T L C P null
T L C null null
T L null P V
T L null P null
T L null null null
T null null null null
| Attributes of <translation-definition /> | |
|---|---|
| Attribute | Description |
code |
Defines the code. |
country |
Defines the country. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
language |
Defines the language. |
process-id |
Defines the process ID. |
translation |
Defines the translation. |
view-id |
Defines the view ID. |
<translation-definition /> is valid inside: <translation-definitions />
Implements TranslationDefinitionsModel.
| Attributes of <translation-definitions /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <translation-definitions /> is: <translation-definition />
Implements TranslationDefinitionsReferenceModel.
| Attributes of <translation-definitions /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
translation-definitions-ref |
Defines the translation definitions reference. |
<translation-definitions /> is valid inside: <translations />
Defines a set of translation definitions. Translation definitions are specified in separate models (see the section called “<translation-definitions />”). The following example illustrates the use:
<translations id="...">
<translation-definitions translation-definitions-ref="..."/>
</translations>
| Attributes of <translations /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <translations /> is: <translation-definitions />
Table of Contents
Implements LayoutModel.
| Attributes of <layout /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <layout /> is: <skin />
Implements SkinSettingModel.
| Attributes of <setting /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
value |
Defines the variable value for the setting. |
variable |
Defines the variable name of the setting. |
<setting /> is valid inside: <skin />
Implements SkinModel.
| Attributes of <skin /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <skin /> is: <setting />
<skin /> is valid inside: <layout />
Table of Contents
Implements CmsNavigationItemModel.
| Attributes of <cms-navigation-item /> | |
|---|---|
| Attribute | Description |
anchor | |
cms-content-source |
Defines the name of the used content source. |
content-path |
Defines the content path. |
description |
Defines the description. |
external-target |
Defines the external target URL. |
generator-replace-mode |
Defines the flag indicating if the generator replace mode is set. |
id |
Defines the GUID of the model. |
label |
Defines the label for the navigation item. |
navigation-generator-bean |
Defines the navigation generator bean reference. |
navigation-import-mode |
Defines the import mode for a navigation model referenced by this item (see NavigationReferenceMode). |
navigation-import-ref |
References another navigation model that not necessarily must exist. |
process-start-state-ref |
Defines the reference to the process start state model initiating a new process. |
verbatim-label |
Defines the verbatim label for the navigation model item. |
Valid inside <cms-navigation-item /> are: <visible-if />, <item-list />
<cms-navigation-item /> is valid inside: <item-list />
Implements NavigationItemModel.
| Attributes of <item /> | |
|---|---|
| Attribute | Description |
anchor | |
description |
Defines the description. |
external-target |
Defines the external target URL. |
generator-replace-mode |
Defines the flag indicating if the generator replace mode is set. |
id |
Defines the GUID of the model. |
label |
Defines the label for the navigation item. |
navigation-generator-bean |
Defines the navigation generator bean reference. |
navigation-import-mode |
Defines the import mode for a navigation model referenced by this item (see NavigationReferenceMode). |
navigation-import-ref |
References another navigation model that not necessarily must exist. |
process-start-state-ref |
Defines the reference to the process start state model initiating a new process. |
verbatim-label |
Defines the verbatim label for the navigation model item. |
Valid inside <item /> are: <visible-if />, <item-list />
<item /> is valid inside: <item-list />
Implements NavigationItemListModel.
| Attributes of <item-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <item-list /> are: <item />, <cms-navigation-item />
<item-list /> is valid inside: <navigation />, <item />, <cms-navigation-item />, <cms-navigation-item />
Implements NavigationModel.
| Attributes of <navigation /> | |
|---|---|
| Attribute | Description |
default-item-ref |
Sets the default item reference. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <navigation /> is: <item-list />
Table of Contents
Implements ModelPermissionsSetModel for anonymous users.
| Attributes of <anonymous-model-permissions /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <anonymous-model-permissions /> is: <model-permission />
<anonymous-model-permissions /> is valid inside: <meta />
Implements AvailableProcessModel.
| Attributes of <available-process /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
process-ref |
Defines a reference to a ProcessModel. |
<available-process /> is valid inside: <available-processes-set />
Implements AvailableProcessesSetModel.
| Attributes of <available-processes-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <available-processes-set /> is: <available-process />
<available-processes-set /> is valid inside: <public-processes />
Implements ConfigurationModel.
| Attributes of <configuration /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <configuration /> is: <definition />
<configuration /> is valid inside: <process-reference />
Implements ConversationContextModel.
| Attributes of <conversation-context /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <conversation-context /> are: <start-action-list />, <action-list />, <scoped-domain-object />, <scoped-domain-object-list />, <property-set />
<conversation-context /> is valid inside: <portal />
Implements DefaultPropertyModel.
| Attributes of <default-property /> | |
|---|---|
| Attribute | Description |
database-columnname |
Defines the column name. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
id-suffix |
Defines the ID suffix. |
insert-property-value-provider |
Defines the insert property value provider reference. |
name |
Defines the property name. |
type |
Defines the property type. |
update-property-value-provider |
Defines the update property value provider reference. |
<default-property /> is valid inside: <default-property-set />
You can specify a default property set that contains a set of properties that are added to all domain type models.
Example 68.1. Default Property Set Definition
<domain-type-reference-set>
<default-property-set>
<default-property id-suffix="createdBy" name="createdBy"
type="PlainText"
insert-property-value-provider="currentUserPropertyValueProvider"/>
...
</default-property-set>
<domain-type-reference .../>
...
</domain-type-reference-set>
The example shows the definition of a createdBy property. You
have to specify the name and type just like you do
for a normal domain type property. Here we use the
currentUserPropertyValueProvider, so that the property is
initialized if a new domain object is inserted into the database.
The attribute id-suffix is used for the ID of the
generated property model. The ID is generated by using the ID of the domain
type, then adding a dot and the ID suffix. E.g. if you assume a domain type
with the ID example.company and the ID suffix
createdBy, the resulting ID would be
example.company.createdBy. You can use this generated ID like
any other property model ID.
| Attributes of <default-property-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <default-property-set /> is: <default-property />
<default-property-set /> is valid inside: <domain-type-reference-set />
Implements DefinitionModel.
| Attributes of <definition /> | |
|---|---|
| Attribute | Description |
attribute |
Defines the attribute. |
description |
Defines the description. |
for-ref |
Defines the referenced model ID. |
id |
Defines the GUID of the model. |
value |
Defines the value. |
<definition /> is valid inside: <configuration />
The domain context stores a number of properties if requested to do so.
| Attributes of <domain-context /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <domain-context /> are: <start-action-list />, <action-list />, <scoped-domain-object />, <scoped-domain-object-list />, <property-set />
<domain-context /> is valid inside: <portal />
Implements DomainTypeReferenceModel.
| Attributes of <domain-type-reference /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
domain-type-ref |
Defines the referenced domain type. |
id |
Defines the GUID of the model. |
<domain-type-reference /> is valid inside: <domain-type-reference-set />
The domain type reference set contains all domain types of the portal. For each
domain type a domain-type-reference element with the attribute
domain-type-ref has to be defined. This attribute refers to a
domain type model, see ???.
Example 68.2. Domain Type Reference Set Definition
<domain-type-reference-set>
<domain-type-reference domain-type-ref="system.domain.user"/>
...
<domain-type-reference domain-type-ref="system.domain.role"/>
</domain-type-reference-set>For information about the default property set see the section called “<default-property-set />”
| Attributes of <domain-type-reference-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <domain-type-reference-set /> are: <domain-type-reference />, <default-property-set />
<domain-type-reference-set /> is valid inside: <portal />
Implementation of the GisReferenceModel that handles the gis-Tag in the PortalModel.
| Attributes of <gis /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
gis-ref | |
id |
Defines the GUID of the model. |
<gis /> is valid inside: <portal />
Implements IdMappingModel.
| Attributes of <id-mapping /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
new-id |
Defines the new ID. |
original-id |
Defines the original ID. |
<id-mapping /> is valid inside: <id-mapping-set />
Implements IdMappingSetModel.
| Attributes of <id-mapping-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <id-mapping-set /> is: <id-mapping />
<id-mapping-set /> is valid inside: <process-reference />
Implements LocaleModel.
| Attributes of <locale /> | |
|---|---|
| Attribute | Description |
country-code |
Defines the country code. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
language-code |
Defines the language code. |
<locale /> is valid inside: <supported-locales />
The meta model contains meta information for vitally functionality of the portal, such as user authentication, permission management or logging.
Example 68.3. Meta Definition
<meta scoped-current-user-object-ref="portal.user.current" ... session-locale-ref="session.locale" > <anonymous-model-permissions> ... </anonymous-model-permissions> <user-model-permissions> ... </user-model-permissions> </meta>
In addition to the above attributes the model permissions for anonymous and logged on users are
defined in the meta model. The anonymous-model-permissions and
user-model-permissions each contain a list of model-permissions.
Example 68.4. Anonymous Model Permissions Definition
<anonymous-model-permissions>
<model-permission model-id-property-ref="system.domain.portal_view.guid">
<relation-chain>
<relation-reference
relation-ref="system.domain.role.relation.portal_view"/>
</relation-chain>
</model-permission>
...
</anonymous-model-permissions>
Each model-permission contains a relation-chain that describes the relations
that are necessary to reach the permission model by starting at the role domain type.
For example the following code block
Example 68.5. User Model Permissions Definition
<user-model-permissions>
<model-permission model-id-property-ref="system.domain.portal_view.guid">
<relation-chain>
<relation-reference
relation-ref="system.domain.role.relation.portal_view"/>
</relation-chain>
</model-permission>
...
</user-model-permissions>
describes that the view permissions (defined by the portal view domain type)
can be reached by starting at the role domain type and then following the relation
system.domain.role.relation.portal_view to the portal view domain type model.
The model-id-property-ref defines the domain type of the permission.
| Attributes of <meta /> | |
|---|---|
| Attribute | Description |
audit-trail-detail-domain-type-ref |
Defines the audit trail detail domain type reference. |
audit-trail-master-detail-relation-ref |
Defines the audit trail master detail relation reference. |
audit-trail-master-domain-type-ref |
Defines the audit trail master domain type reference |
default-email-address |
Defines the default email address. |
default-email-subject |
Defines the default email subject. |
default-process-start-state-ref |
Sets the default start state for this portal which is the start state that will be used when the user accesses the portal base URL. |
default-user-locale |
Defines the default user locale. |
default-user-timezone |
Defines the default user timezone. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
matches-filter-place-holder |
Defines the matches filter place holder |
matches-filter-wildcard-mode | |
permission-type-property-ref |
Defines the permission type property reference. |
role-domain-type-ref |
Defines the role domain type reference. |
role-name-property-ref |
Defines the property ID of the property representing the role name. |
role-permission-relation-ref |
Defines the role permission relation reference. |
scoped-current-user-object-ref |
Defines the domain object reference to use for the current user. |
session-locale-ref | |
stored-mail-domain-type-ref |
Defines the stored mail domain type reference. |
stored-mail-entry-timestamp-property-ref |
Defines the entry time stamp property reference of the stored mail domain type. |
stored-mail-exit-timestamp-property-ref |
Defines the exit time stamp property reference of the stored mail domain type. |
stored-mail-from-property-ref |
Defines the from property reference of the stored mail domain type. |
stored-mail-id-property-ref |
Defines the id property reference of the stored mail domain type. |
stored-mail-last-update-timestamp-property-ref |
Defines the last update time stamp property reference of the stored mail domain type. |
stored-mail-mail-service-name-property-ref |
Defines the mail service name property reference of the stored mail domain type. |
stored-mail-retry-count-property-ref |
Defines the retry count property reference of the stored mail domain type. |
stored-mail-status-property-ref |
Defines the status property reference of the stored mail domain type. |
stored-mail-to-property-ref |
Defines the to property reference of the stored mail domain type. |
system-logging-component-property-ref |
Defines the system logging component property reference. |
system-logging-domain-type-ref |
Defines the system logging domain type reference. |
system-logging-level-property-ref |
Defines the system logging level property reference. |
system-logging-login-property-ref |
Defines the system logging login property reference. |
system-logging-message-property-ref |
Defines the system logging message property reference. |
system-logging-timestamp-property-ref |
Defines the system logging timestamp property reference. |
translation-code-property-ref |
Defines the code property reference of the translation domain type. |
translation-country-property-ref |
Defines the country property reference of the translation domain type. |
translation-domain-type-ref |
Defines the translation domain type reference. |
translation-language-property-ref |
Defines the language property reference of the translation domain type. |
translation-process-id-property-ref |
Defines the process ID property reference of the translation domain type. |
translation-translation-property-ref |
Defines the translation property reference of the translation domain type. |
translation-view-id-property-ref |
Defines the view ID property reference of the translation domain type. |
use-join-table |
Whether a join table should be not (see RelationModel for reference). |
user-active-property-ref |
Defines the user active property reference. |
user-domain-type-ref |
Defines the user domain type reference. |
user-inverted-development-mode-property-ref | |
user-last-login-property-ref |
Defines the user last login property reference. |
user-login-property-ref |
Defines the user login property reference. |
user-native-locale-property-ref |
Defines the user native locale property reference. |
user-password-property-ref |
Defines the user password property reference. |
user-portaluser-property-ref |
Defines the property representing the system user portaluser property. |
user-profile-locale-property-ref |
Defines the user profile locale property reference. |
user-profile-timezone-property-ref |
Defines the user profile time zone property reference. |
user-role-relation-ref |
Defines the user role relation reference. |
user-superuser-property-ref |
Defines the property representing the system user superuser property. |
user-web-service-relation-ref |
Defines the user web service relation reference. |
web-service-name-property-ref |
Defines the web service name property reference. |
Valid inside <meta /> are: <user-model-permissions />, <anonymous-model-permissions />
<meta /> is valid inside: <portal />
Defines a model permission.
| Attributes of <model-permission /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
model-id-property-ref | |
Valid inside <model-permission /> is: <relation-chain />
<model-permission /> is valid inside: <anonymous-model-permissions />, <user-model-permissions />
Implements NavigationReferenceModel.
| Attributes of <navigation-reference /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
navigation-ref |
Defines a reference to a navigation model. |
<navigation-reference /> is valid inside: <navigation-reference-set />
The navigation reference set contains a set of references to navigation models. Check out ??? for more details.
Example 68.6. Navigation Reference Set Definition
<navigation-reference-set>
<navigation-reference navigation-ref="base.n_main"/>
<navigation-reference navigation-ref="base.n_support"/>
<navigation-reference navigation-ref="base.n_applications"/>
<navigation-reference navigation-ref="base.n_admin-applications"/>
</navigation-reference-set>| Attributes of <navigation-reference-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <navigation-reference-set /> is: <navigation-reference />
<navigation-reference-set /> is valid inside: <portal />
The portal model is the main model wherefrom all other model sets are referenced and initialized. It is subdivided in relevant parts as described in the following sections. The table below contains a list of all attributes that can be set on the portal model.
![]() | Warning |
|---|---|
Take care while changing these settings. |
Example 68.7. Portal Definition
<portal id="portal.base" home-process-start-state-ref="p_home.s_start" login-process-start-state-ref="p_login.s_start" logout-process-start-state-ref="p_logout.s_start" error-process-start-state-ref="p_error.s_start" access-denied-process-start-state-ref="p_access_denied.s_start" relation-set-ref="portal.domain.relations" translations-ref="portal.domain.translations" layout-ref="portal.layout" title-tag="PortalTitle" agents-ref="agents.list" stages-ref="system.stages" deletion-mode="logical" system-domain-type-ref="system.domain.virtual.info">
For information about the MetaModel see the section called “<meta />”.
For information about the Conversation Context Model see the section called “<conversation-context />”.
For information about the Session Context Model see the section called “<session-context />”.
For information about the Gis Model see the section called “<gis />”.
For information about the Navigation Reference Set see the section called “<navigation-reference-set />”.
For information about the supported locales see the section called “<supported-locales />”.
For information about The Domain Type Reference Set see the section called “<domain-type-reference-set />”.
For information about the process reference set see the section called “<process-reference-set />”.
For information about the web service reference set see WebServiceReferenceSetModelImpl.
For information about the REST services reference set see the section called “<rest-services-reference-set />”.
For information about paging see the section called “<paging />”
For information about filter specification set see the section called “<filter-specification-set />”.
For information about the UI Component Setting Set see the section called “<ui-component-setting-set />”.
For information about the action list set see the section called “<action-list-set />”.
For information about the start action list see the section called “<start-action-list />”.
| Attributes of <portal /> | |
|---|---|
| Attribute | Description |
access-denied-process-start-state-ref |
Defines the reference to the access denied process. The default value is "p_access_denied.s_start". |
agents-ref |
Defines the agents. The default value is "agents.list". |
allow-runtime-process-generation |
Defines the allow runtime process generation flag. Setting this to |
deletion-mode |
Defines the deletion mode for the current portal. The default value is "logical". You can specify a separate deletion mode for each the section called “<domain-type />” that overrides the deletion mode set for the portal. |
description |
Defines the description. |
error-process-start-state-ref |
Defines the error process start state to display if an error occurs. The default value is "p_error.s_start". |
home-process-start-state-ref |
Defines the home process start state to display if the first request is achieved. The default value is "p_home.s_start". |
id |
Defines the GUID of the model. |
layout-ref |
Defines the referenced layout model for the current portal. The default value is "portal.layout". |
login-process-start-state-ref |
Defines the login process start state to display if a login is required. The default value is "p_login.s_start". |
logout-process-start-state-ref |
Defines the logout process start state reference. The default value is "p_logout.s_start". |
portal-data-source-name |
Defines the portal data source name. |
relation-set-ref |
Defines a reference to the relation set. The default value is "portal.domain.relations". |
stages-ref |
Defines the stage set model. The default value is "system.stages". |
system-domain-type-ref |
Defines the ID of the system domain type model used for system settings. The default value is "system.domain.virtual.info". |
title-tag |
Defines the title tag. The default value is "PortalTitle". |
transaction-isolation-level |
Defines the transaction isolation level. |
transaction-propagation-behavior |
Defines the transaction propagation behavior. |
translations-ref |
Defines a reference to the translations. The default value is "portal.domain.translations". |
Valid inside <portal /> are: <restriction-set />, <filter-specification-set />, <ui-component-setting-set />, <navigation-reference-set />, <domain-context />, <session-context />, <supported-locales />, <property-type-reference-set />, <domain-type-reference-set />, <process-reference-set />, <meta />, <gis />, <paging />, <conversation-context />, <rest-services-reference-set />, <start-action-list />, <action-list-set />, <public-processes />, <error-message-mapping-set />
Implements a ProcessReferenceModel.
| Attributes of <process-reference /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
process-ref |
Defines the process model ID. |
template-process-ref |
Defines the template process model ID. |
Valid inside <process-reference /> are: <id-mapping-set />, <configuration />
<process-reference /> is valid inside: <process-reference-set />
The process reference set contains all processes that can be used in the portal. For each process
a process-reference element with the attribute process-ref has to be defined.
This attribute refers to a process model.
Example 68.8. Process Set Definition
<process-reference-set>
<process-reference process-ref="portal.p_login"/>
...
<process-reference process-ref="portal.p_monitoring"/>
</process-reference-set>OpenSAGA can also duplicate processes by copying them and replacing a selected set of IDs with new IDs.
![]() | Note |
|---|---|
Internally all old IDs are replaced with new IDs. Random IDs are created to do that. But usually you need a set of IDs with known IDs in order to integrate the copy into your overall system (by e.g. referencing a new start state ID). Therefor you usually will need to define a limited set of IDs manually. |
process-reference tag already explained in but need to enhance it
with the specific ID mappings that you need to control. The following example shows how to do this.
Let us assume that a process with the ID test.p_foo exists in your project. For some reason you want to copy the
process (probably to modify it with some other means). Your goal is to create a new process test.p_bar that can be started
via the navigation by adressing a start state with the new ID p_bar.s_bar (which overwrites the old start state ID p_foo.s_foo).
This can be done easily by the following code:
Example 68.9. Duplicating a Process
<process-reference process-ref="test.p_bar" template-process-ref="test.p_foo"> <id-mapping-set> <id-mapping original-id="p_foo.s_foo" new-id="p_bar.s_bar"/> </id-mapping-set> </process-reference>
| Attributes of <process-reference-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <process-reference-set /> is: <process-reference />
<process-reference-set /> is valid inside: <portal />
Implements PropertyTypeReferenceModel.
| Attributes of <property-type-reference /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-type-ref |
Defines the referenced property type. |
<property-type-reference /> is valid inside: <property-type-reference-set />
Implements PropertyTypeReferenceSetModel.
| Attributes of <property-type-reference-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <property-type-reference-set /> is: <property-type-reference />
<property-type-reference-set /> is valid inside: <portal />
Implements PublicPortalProcessSetModel.
| Attributes of <public-processes /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <public-processes /> is: <available-processes-set />
<public-processes /> is valid inside: <portal />
Implements SessionContextModel.
| Attributes of <session-context /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <session-context /> are: <start-action-list />, <action-list />, <scoped-domain-object />, <scoped-domain-object-list />, <property-set />
<session-context /> is valid inside: <portal />
You can specify a list of actions that is executed right after the portal startup is complete.
Example 68.10. Start Action List
<start-action-list>
<system-log message="Executed Start-Action" />
</start-action-list>| Attributes of <start-action-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
isolation |
Defines the isolation level for transaction isolation. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific isolation levels. |
propagation |
Defines the transaction propagation mode for the action block. Uses the names defined in Springs DefaultTransactionDefinition class to identify the specific propagation levels. |
Valid inside <start-action-list /> are: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <set-property-value />, <dequeue-report />, <webservice />, <transform />, <publish-message />, <iterate-list />, <try />, <aggregate />, <set-active-navigation />, <map-values />, <reset-validation-status />, <reset-cache />, <new />, <system-log />, <audit-trail />, <validation-error />, <execute />, <tag />, <if />, <enqueue-report />, <create-message />, <delete />, <for-each />, <reset-translations />, <set-object />, <send-outgoing-emails />, <connect />, <remove-list />, <email />, <load-list />, <bind />, <disconnect />, <delete-by />, <store />, <call />, <tweet />, <logout />, <next-element />, <validate />, <ignore-validation-results />, <import />, <add-to-list />, <remove />, <switch />, <define-password />
<start-action-list /> is valid inside: <session-context />, <after-preprocessing />, <try />, <before-preprocessing />, <for-each />, <on-update-refresh />, <transition />, <conversation-context />, <action-list-set />, <case />, <domain-context />, <portal />, <agent-action />, <before-postprocessing />, <after-postprocessing />, <process-context />
The set of locales that are supported by the portal can be specified here.
For each locale a locale element with the attributes
language-code and country-code has to be defined.
The values of these attributes correspond to the language and country
properties of the java.util.Locale Java class. The default
locale can be configured by the attribute default-locale-ref.
Example 68.11. Supported Locales Definition
<supported-locales default-locale-ref="balvi.locale.de_DE"> <locale id="balvi.locale.en_US" language-code="en" country-code="US"/> <locale id="balvi.locale.de_DE" language-code="de" country-code="DE"/> </supported-locales>
| Attributes of <supported-locales /> | |
|---|---|
| Attribute | Description |
default-locale-ref |
Defines a reference to the default locale. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <supported-locales /> is: <locale />
<supported-locales /> is valid inside: <portal />
Implements ModelPermissionsSetModel for authorized users.
| Attributes of <user-model-permissions /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <user-model-permissions /> is: <model-permission />
<user-model-permissions /> is valid inside: <meta />
Table of Contents
Implements AfterPostprocessingPhaseModel.
| Attributes of <after-postprocessing /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <after-postprocessing /> are: <start-action-list />, <action-list />
<after-postprocessing /> is valid inside: <view />
Implements AfterPreprocessingPhaseModel.
| Attributes of <after-preprocessing /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <after-preprocessing /> are: <start-action-list />, <action-list />
<after-preprocessing /> is valid inside: <view />
Implements a state that simulates a "back to some other state" functionality. These kinds of states should be used for navigation endpoints that return to a somewhat variable start point (because e.g. there are paths of different length to the current view state).
Each of the optional attributes causes the domain context path to be analyzed for a specific point. If that point if found, the process will return to that point. Otherwise defaulting rules might apply.
| Attributes of <back-state /> | |
|---|---|
| Attribute | Description |
auto-validating |
Defines whether the current process state model is auto-validating. Auto-validating process state models will return to the source process state model if a validation error is discovered. |
back-to-first-view-without-domain-type-ref |
Defines if this back state returns to the first view without domain type model. |
back-to-last-view-with-domain-type-ref |
Defines the ID of a domain type model. The back state returns to the last view with the given domain type model. If none is found, the most recent view without any domain type model will be targeted. |
back-to-last-view-without-domain-type-ref |
Defines if this back state returns to the last view without a specific domain type model. |
back-to-parent-of-first-view-with-domain-type-ref |
Defines the ID of a domain type model. Returns to the first view with the given domain type model. If none is found, the oldest view without any domain type model will be targeted. |
back-to-parent-of-last-view-with-domain-type-ref |
Defines the ID of a domain type model. Returns to the parent of the last view with that domain type model. If no view with the given domain type model is found, the most recent view without any domain type model will be targeted. |
back-to-view-state-in-domain-context-path-ref |
Defines the ID of a view model. The back state returns to the last instance of the given view model contained in the domain context path. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <back-state /> are: <request-context />, <transition-list />
<back-state /> is valid inside: <process-state-set />
Implements BeforePostprocessingPhaseModel.
| Attributes of <before-postprocessing /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <before-postprocessing /> are: <start-action-list />, <action-list />
<before-postprocessing /> is valid inside: <view />
Implements BeforePreprocessingPhaseModel.
| Attributes of <before-preprocessing /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <before-preprocessing /> are: <start-action-list />, <action-list />
<before-preprocessing /> is valid inside: <view />
Generates a confirmation dialog. The confirmation handling (i.e. if the confirmation
is shown as a popup window or a normal view) can be configured in the file "opensaga-confirm.js"
with the parameter "opensaga.jsConfirm". If you set this parameter to true you
get a popup window, if you set it to false you get a normal view.
In order to model a confirmation you need to annotate a transition with this model. The following example illustrates this approach:
<transition id="some.transition.id" name="transitionName" target-state-ref="some.target.state.id">
<action-list>
...
</action-list>
<confirmation confirmation-text="someConfirmationText" ok-button-text="someButtonText" />
</transition>
Whenever the transition is fired by some event source the confirmation dialog will intercept the transition execute. Only after confirming the confirmation dialog the transition really is executed. Otherwise it is aborted.
| Attributes of <confirmation /> | |
|---|---|
| Attribute | Description |
cancel-button-text | |
confirmation-text (required) | |
confirmation-title | |
description |
Defines the description. |
id |
Defines the GUID of the model. |
ok-button-text | |
Valid inside <confirmation /> is: <confirmation-property-list />
<confirmation /> is valid inside: <transition />
A reference for a confirmation message including a label for it.
| Attributes of <confirmation-property /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
label (required) | |
property-ref (required) | |
<confirmation-property /> is valid inside: <confirmation-property-list />
Contains a list of ConfirmationPropertyReferenceModels.
| Attributes of <confirmation-property-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
domain-type-ref (required) | |
id |
Defines the GUID of the model. |
Valid inside <confirmation-property-list /> is: <confirmation-property />
<confirmation-property-list /> is valid inside: <confirmation />
Implements DecisionStateModel.
| Attributes of <decision-state /> | |
|---|---|
| Attribute | Description |
auto-validating |
Defines whether the current process state model is auto-validating. Auto-validating process state models will return to the source process state model if a validation error is discovered. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <decision-state /> are: <request-context />, <transition-list />
<decision-state /> is valid inside: <process-state-set />
Implements ProcessEndStateModel.
| Attributes of <end-state /> | |
|---|---|
| Attribute | Description |
auto-validating |
Defines whether the current process state model is auto-validating. Auto-validating process state models will return to the source process state model if a validation error is discovered. |
close-window |
Defines if the process window should be closed. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
reload-parent |
Defines if the parent window should be reloaded when this process ends. |
Valid inside <end-state /> is: <request-context />
<end-state /> is valid inside: <process-state-set />
Defines an input model.
| Attributes of <input /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <input /> are: <property-mappings />, <object-mappings />
<input /> is valid inside: <interface />, <map-values />, <excel-configuration />, <import />
Implements InputInterfaceContextModel.
| Attributes of <input-interface /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <input-interface /> is: <property-set />
<input-interface /> is valid inside: <start-state />, <subprocess-start-state />
Implements InterfaceModel.
| Attributes of <interface /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <interface /> are: <input />, <output />
<interface /> is valid inside: <transition />
Defines property mappings via the section called “<property-mapping />” and objects via the section called “<object-mappings />”.
| Attributes of <mapping /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <mapping /> are: <property-mappings />, <object-mappings />
<mapping /> is valid inside: <map-values />, <excel-configuration />, <import />
Implements ScopedDomainObjectMappingModel.
| Attributes of <object-mapping /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
source-ref |
Defines the source domain object ID. |
target-ref |
Defines the target domain object ID. |
<object-mapping /> is valid inside: <object-mappings />
Implements ObjectMappingsModel.
| Attributes of <object-mappings /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <object-mappings /> is: <object-mapping />
<object-mappings /> is valid inside: <output />, <output />, <mapping />, <input />, <input />
Defines an output model.
| Attributes of <output /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <output /> are: <property-mappings />, <object-mappings />
<output /> is valid inside: <interface />, <map-values />, <excel-configuration />, <import />
Implements OutputInterfaceContextModel.
| Attributes of <output-interface /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <output-interface /> is: <property-set />
<output-interface /> is valid inside: <start-state />, <subprocess-start-state />
Implements ParameterModel.
| Attributes of <parameter /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the model name. |
property-ref |
Defines the property reference. |
scoped-domain-object-list-ref |
Defines the scoped domain object list reference. |
scoped-domain-object-ref |
Defines the scoped domain object reference. |
value |
Defines the value. |
value-type |
Defines the value type. |
<parameter /> is valid inside: <parameter-set />
Implements ParameterSetModel.
| Attributes of <parameter-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <parameter-set /> is: <parameter />
<parameter-set /> is valid inside: <execute />, <email />
Implements ProcessModel.
| Attributes of <process /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <process /> are: <restriction-set />, <filter-specification-set />, <ui-component-setting-set />, <action-list-set />, <process-state-set />, <process-context />
Implements ProcessContextModel.
| Attributes of <process-context /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <process-context /> are: <start-action-list />, <action-list />, <scoped-domain-object />, <scoped-domain-object-list />, <property-set />
<process-context /> is valid inside: <process />
Implements ProcessStateSetModel.
| Attributes of <process-state-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <process-state-set /> are: <start-state />, <back-state />, <end-state />, <subprocess-start-state />, <view-state />, <decision-state />
<process-state-set /> is valid inside: <process />
Implements PropertyMappingModel.
| Attributes of <property-mapping /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
source-ref |
Defines the source property model ID. |
target-ref |
Defines the target property model ID. |
value |
Defines the value for the target property. |
<property-mapping /> is valid inside: <property-mappings />
Implements PropertyMappingsModel.
| Attributes of <property-mappings /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <property-mappings /> is: <property-mapping />
<property-mappings /> is valid inside: <output />, <output />, <mapping />, <input />, <new-object />, <input />
Implements RequestContextModel.
| Attributes of <request-context /> | ||||
|---|---|---|---|---|
| Attribute | Description | |||
audit-trail-mode |
Defines the audit trail mode. | |||
audit-trail-relation-ref |
Defines the audit trail relation reference. | |||
cardinality |
Defines the domain object cardinality.
You can use the domain type cardinality to restrict the number of domain objects
that are created for a domain type. E.g. you may want to store a system specific
setting or a setting that is stored on a per user basis.
For now two cardinalities are possible: <domain-type id="system.domain.config" cardinality="user" ...> <property-set> <domain-type-property-set> <domain-type-property id="system.domain.config.colorScheme" name="colorScheme" type="PlainText" default-value="blue"/> ... </domain-type-property-set> </property-set> </domain-type> user cardinality.
To create such an object, you have to put it into a context, e.g. here we use the
session context (defined in portal.xml):
<portal ...> <session-context> <scoped-domain-object id="portal.config" name="portalConfig" domain-type-ref="system.domain.config"/> </session-context> ... </portal> system.domain.config.colorScheme).
| |||
data-handler-bean |
Defines the data handler bean reference. | |||
data-handler-class |
Defines the data handler class name. | |||
data-source-name |
Defines the name of the data source to be used by this domain type. | |||
delegate-bean-name |
Defines the name of the delegate bean of type Model. | |||
deletion-mode |
OpenSAGA supports different deletion modes for domain type models. Each deletion
mode specifies how data entries are deleted. The
| |||
description |
Defines the description. | |||
extends |
Defines the the domain type name that this domain type extends. | |||
id |
Defines the GUID of the model. | |||
immutable |
Defines the immutable flag. | |||
name |
Defines the name of the domain type. | |||
permission-filter-generator-bean |
Defines the permission filter generator bean reference. | |||
table-name |
Defines the database table name. | |||
Valid inside <request-context /> are: <primary-key />, <restriction-set />, <initialization-data />, <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <on-create />, <on-insert />, <on-update />, <on-delete />, <property-set />
<request-context /> is valid inside: <start-state />, <back-state />, <end-state />, <subprocess-start-state />, <view-state />, <decision-state />
Implements ProcessStartStateModel.
| Attributes of <start-state /> | |
|---|---|
| Attribute | Description |
auto-validating |
Defines whether the current process state model is auto-validating. Auto-validating process state models will return to the source process state model if a validation error is discovered. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <start-state /> are: <input-interface />, <output-interface />, <request-context />, <transition-list />
<start-state /> is valid inside: <process-state-set />
Implements ProcessStartStateModel.
| Attributes of <subprocess-start-state /> | |
|---|---|
| Attribute | Description |
auto-validating |
Defines whether the current process state model is auto-validating. Auto-validating process state models will return to the source process state model if a validation error is discovered. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <subprocess-start-state /> are: <input-interface />, <output-interface />, <request-context />, <transition-list />
<subprocess-start-state /> is valid inside: <process-state-set />
Implements TransitionModel.
| Attributes of <transition /> | |
|---|---|
| Attribute | Description |
auto-validating |
Defines whether the current transition model is auto-validating. Auto-validating transitions will return to the source process state model if a validation error is discovered. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
ignore-view-restrictions |
Allows to ignore view restrictions. |
name | |
relation-ref | |
target-state-ref |
Sets the target process state model reference of the transition. |
Valid inside <transition /> are: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />, <start-action-list />, <action-list />, <relation-chain />, <interface />, <confirmation />
<transition /> is valid inside: <transition-list />
Implements TransitionListModel.
| Attributes of <transition-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <transition-list /> is: <transition />
<transition-list /> is valid inside: <start-state />, <back-state />, <subprocess-start-state />, <view-state />, <decision-state />
A view state inside a process. When the view state is entered, the user is presented the view built from the corresponding ViewModel to show data or receive data changes from the user.
| Attributes of <view-state /> | |
|---|---|
| Attribute | Description |
auto-validating |
Defines whether the current process state model is auto-validating. Auto-validating process state models will return to the source process state model if a validation error is discovered. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
view-ref |
Defines the referenced view model ID. |
Valid inside <view-state /> are: <request-context />, <transition-list />
<view-state /> is valid inside: <process-state-set />
Implements VirtualPropertiesModel.
| Attributes of <virtual-properties /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
expose-original-ids-of-domain-type-ref |
Defines whether all original IDs can be referenced from the given domain object. |
exposed-id-prefix |
Defines the prefix for exposed IDs. |
id |
Defines the GUID of the model. |
Valid inside <virtual-properties /> is: <virtual-property />
<virtual-properties /> is valid inside: <scoped-domain-object-list />, <filtered-list />, <scoped-domain-object />
Implements VirtualPropertyModel.
| Attributes of <virtual-property /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref |
Defines the target property model ID. |
<virtual-property /> is valid inside: <virtual-properties />
Table of Contents
Implements ErrorMessageMappingModel.
| Attributes of <error-message-mapping /> | |
|---|---|
| Attribute | Description |
content-element-ref | |
description |
Defines the description. |
id |
Defines the GUID of the model. |
source-tag | |
target-tag | |
<error-message-mapping /> is valid inside: <error-message-mapping-set />
Implements ErrorMessageMappingSetModel
See also:
ErrorMessageMappingModel
| Attributes of <error-message-mapping-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <error-message-mapping-set /> is: <error-message-mapping />
<error-message-mapping-set /> is valid inside: <portal />
Defines the "filter-restriction" FilterSpecificationModel that
uses a filter to describe a restriction. It returns true
if the restriction is satisfied.
| Attributes of <filter-restriction /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <filter-restriction /> are: <greater-than />, <is-property-modified />, <and />, <geo-within />, <matches />, <user-logged-in />, <validation-failed />, <complies-to />, <criterion />, <less-than-or-equal-to />, <has-current-element />, <is-undefined />, <has-changed />, <or />, <is-connected-to />, <can-access />, <ends-with />, <geo-contains />, <has-permission />, <contains-comparator />, <starts-with />, <not />, <equals />, <is-new />, <has-elements />, <dynamic-condition />, <true />, <less-than />, <in />, <include />, <in-transition />, <filter-pattern />, <has-type />, <greater-than-or-equal-to />, <is-super-user />, <false />, <is-defined />, <filter-pattern-set />
<filter-restriction /> is valid inside: <external-excel-domain-type />, <external-relational-domain-type />, <count />, <filter-specification-set />, <joined-domain-type />, <constant-domain-type />, <start-action-list />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <radio-buttons />, <restriction />, <multi-connect />, <tree-connect />, <transition />, <list-iterator />, <case />, <wfs-domain-type />, <multi-connect />, <single-connect />, <relation-reference />, <has-elements />, <filtered-list />, <agent-action />, <datagrid />, <start-action-list />, <action-list />, <radio-buttons />, <select-field />, <request-context />, <cell-format />
Manages a restriction with error tag.
![]() | Note |
|---|---|
Using |
<domain-type-property ...> <restriction-set> <restriction error-tag="validation.length_has_to_be_smaller_than_six"> value == null || value.length() < 6 </restriction> ... </restriction-set> </domain-type-property>
<domain-type>
<restriction-set>
<restriction error-tag="validation.abc_is_not_null">
self.abc == null
</restriction>
...
</restriction-set>
</domain-type>
<restriction-set>
<restriction error-tag="validation.abc_is_not_null"
restriction-bean-name="maximumTextLengthRestrictionValidator"/>
...
</restriction-set>
| Attributes of <restriction /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
error-tag |
The error tag that is used if the restriction is invalid. |
id |
Defines the GUID of the model. |
language |
The scripting language that the restriction is written in. If you don't specify a language, the default scripting language Groovy is used. |
required |
Defines the required flag. |
restriction-bean-name |
The bean that validates the restriction. Has to implement the interface RestrictionValidator. |
restriction-ref |
Defines a restriction reference. |
severity |
Defines the restriction severity. |
type |
Defines the restriction type. |
Valid inside <restriction /> are: text content, <validate-if />, <filter-restriction />
<restriction /> is valid inside: <restriction-set />
The restriction set contains a set of restrictions. Each restriction defines a Boolean
expression that results in a Boolean value (which can either be true or false).
The restriction is valid if the result is true. You can specify the restriction in
any scripting language that is supported by OpenSAGA or you can implement your own restriction
validator in JAVA.
See the section called “<restriction />” for more information and some example restrictions.
| Attributes of <restriction-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <restriction-set /> is: <restriction />
<restriction-set /> is valid inside: <external-excel-domain-type />, <process />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <property-type />, <wfs-domain-type />, <domain-type-property />, <enum-property />, <validate />, <portal />, <view />, <request-context />, <formula-property />
Defines a "validate-if" FilterSpecificationModel that determines if a restriction should be validated.
| Attributes of <validate-if /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <validate-if /> are: <greater-than />, <is-property-modified />, <and />, <geo-within />, <matches />, <user-logged-in />, <validation-failed />, <complies-to />, <criterion />, <less-than-or-equal-to />, <has-current-element />, <is-undefined />, <has-changed />, <or />, <is-connected-to />, <can-access />, <ends-with />, <geo-contains />, <has-permission />, <contains-comparator />, <starts-with />, <not />, <equals />, <is-new />, <has-elements />, <dynamic-condition />, <true />, <less-than />, <in />, <include />, <in-transition />, <filter-pattern />, <has-type />, <greater-than-or-equal-to />, <is-super-user />, <false />, <is-defined />, <filter-pattern-set />
<validate-if /> is valid inside: <external-excel-domain-type />, <external-relational-domain-type />, <count />, <filter-specification-set />, <joined-domain-type />, <constant-domain-type />, <start-action-list />, <external-excel-domain-type />, <external-relational-domain-type />, <joined-domain-type />, <constant-domain-type />, <domain-type />, <wfs-domain-type />, <request-context />, <radio-buttons />, <restriction />, <multi-connect />, <tree-connect />, <transition />, <list-iterator />, <case />, <wfs-domain-type />, <multi-connect />, <single-connect />, <relation-reference />, <has-elements />, <filtered-list />, <agent-action />, <datagrid />, <start-action-list />, <action-list />, <radio-buttons />, <select-field />, <request-context />, <cell-format />
Table of Contents
Implements ScopedDomainObjectModel.
| Attributes of <scoped-domain-object /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
domain-type-ref |
Defines a reference to a domain type model. |
id |
Defines the GUID of the model. |
name |
Defines the name for the cached object. |
Valid inside <scoped-domain-object /> is: <virtual-properties />
<scoped-domain-object /> is valid inside: <session-context />, <conversation-context />, <domain-context />, <process-context />
Implements ScopedDomainObjectListModel.
| Attributes of <scoped-domain-object-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
domain-type-ref | |
id |
Defines the GUID of the model. |
Valid inside <scoped-domain-object-list /> is: <virtual-properties />
<scoped-domain-object-list /> is valid inside: <session-context />, <conversation-context />, <domain-context />, <process-context />
Implements ScopedDomainObjectListReferenceModel.
| Attributes of <scoped-domain-object-list-ref /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
list-ref |
Defines the list. |
property-ref |
Defines the property. |
<scoped-domain-object-list-ref /> is valid inside: <in />
| Attributes of <scoped-domain-object-ref /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
object-ref (required) |
Defines the object. |
property-ref (required) |
Defines the property. |
<scoped-domain-object-ref /> is valid inside: <in />
Table of Contents
Implements the RestServiceModel.
| Attributes of <rest-service /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
script |
Defines the script to execute |
script-resource |
Defines the path to the script to execute. |
scripting-dialect |
Defines the dialect of the script. |
url |
Defines the url for this rest service. |
using-script-dialect-dir |
Defines whether the script resource path is relative to the script dialect directory or not. |
<rest-service /> is valid inside: <rest-services />
Implements the RestServicesModel.
| Attributes of <rest-services /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <rest-services /> is: <rest-service />
Implements the RestServicesReferenceModel.
| Attributes of <rest-services-reference /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
rest-services-ref |
Defines the rest services model ID. |
<rest-services-reference /> is valid inside: <rest-services-reference-set />
The REST service reference set contains references to all REST services that
can be used in the portal. For each REST service a
rest-services-reference element with the attribute
rest-service-ref has to be defined. This attribute refers to a
REST service model, see Chapter 25, REST Services.
Example 72.1. REST Service Reference Set Definition
<rest-services-reference-set>
<rest-services-reference rest-services-ref="portal.r_test"/>
...
</rest-services-reference-set>| Attributes of <rest-services-reference-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <rest-services-reference-set /> is: <rest-services-reference />
<rest-services-reference-set /> is valid inside: <portal />
Table of Contents
Implements AttachmentConfigurationModel.
| Attributes of <attachment-configuration /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
path |
Returns path to the attachment base directory. |
<attachment-configuration /> is valid inside: <attachment-configuration-set />
Implements AttachmentConfigurationSetModel.
| Attributes of <attachment-configuration-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <attachment-configuration-set /> is: <attachment-configuration />
<attachment-configuration-set /> is valid inside: <stage />
Implements ContentSourceModel.
| Attributes of <content-source /> | |
|---|---|
| Attribute | Description |
base-content-url |
Defines the base content url. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the name of this content source. |
site-map-path |
Defines the sitemap path. |
type |
Defines the type of this content source. |
<content-source /> is valid inside: <content-source-set />
Implements ContentSourceSetModel.
| Attributes of <content-source-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <content-source-set /> is: <content-source />
<content-source-set /> is valid inside: <stage />
Each data source has a name and a type. The name is referenced by
the domain type that uses the data source. The type attribute specifies the data source type.
See the section called “Data Source Types” for a list of supported types.
The data source configuration is specified by using a settings
set that contains setting definitions. Each setting consists of
a parameter name (name attribute) and a parameter value (
value attribute). If you want to use encrypted values, you have
to specify a decryption-bean-name that refers to a configured
decryption bean. See for more information.
This section describes how to choose the correct database schema export mode
for Hibernate. The mode is set by the configuration parameter
hibernate.hbm2ddl.auto. The valid values are:
create, create-drop, update and
validate. If this parameter is not set, Hibernate does not
export the schema, i.e. no database tables are created or validated. Missing
tables and/or missing/mismatching column types are only detected at runtime.
Hibernate creates a new database schema. All tables included in this schema are dropped (if they existed before) and created again. On every OpenSAGA startup you start with a new database. Tables not included in the Hibernate schema are ignored.
![]() | Caution |
|---|---|
Never use this mode in a production environment. You will probably loose all your data. He who laughs last has a backup. |
In addition to the create mode, all tables that were created
by Hibernate are dropped if the SessionFactory is closed.
![]() | Caution |
|---|---|
This mode is even more critical than the |
This is the preferred mode for development. If you add new domain types or domain type properties, the database is updated accordingly. If you delete domain types or domain type properties, the corresponding tables/columns are not deleted from the database.
![]() | Important |
|---|---|
If you change the type of domain type properties, the corresponding database column is not changed. This can lead to strange errors or confusion. To prevent this from happening, you have to make sure that the database table is changed in the same way that you have changed the property (either by modifying/deleting the database columns or by deleting the whole table). |
| Attributes of <data-source /> | |
|---|---|
| Attribute | Description |
data-source-bean-name |
Defines the data source bean name. |
database-type |
Defines the database type. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the data source name. |
time-zone |
Defines the data source time zone. |
type |
Defines the data source type. |
Valid inside <data-source /> is: <settings />
<data-source /> is valid inside: <data-source-set />
Implements DataSourceSetModel.
| Attributes of <data-source-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <data-source-set /> is: <data-source />
<data-source-set /> is valid inside: <stage />
Implements LoggingConfigurationModel.
| Attributes of <logging-configuration /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
location | |
Valid inside <logging-configuration /> is: text content
<logging-configuration /> is valid inside: <stage />
Implements MailServiceConfigurationModel.
| Attributes of <mail-service-configuration /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the mail service configuration name. |
strategy-bean-ref |
Defines the strategy bean reference. |
type |
Defines the mail service configuration type. |
Valid inside <mail-service-configuration /> is: <settings />
<mail-service-configuration /> is valid inside: <mail-service-configuration-set />
Implements MailServiceConfigurationSetModel.
| Attributes of <mail-service-configuration-set /> | |
|---|---|
| Attribute | Description |
default-mail-service |
Sets the default mail service. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <mail-service-configuration-set /> is: <mail-service-configuration />
<mail-service-configuration-set /> is valid inside: <stage />
It is possible to use a proxy for all outgoing http connections of OpenSAGA. Therefore you have just to define a proxy configuration model within the stage model (see the section called “<stage />”) with the data of the proxy. The following example shows how to configure a proxy.
Example 73.1. Configure a proxy for OpenSAGA
<stage name="dev-example"> ... <proxy-configuration> <settings> <setting name="host" value="proxy.myserver.de" /> <setting name="port" value="8000" /> <setting name="user" value="Foo" /> <setting name="password" value="Bar" /> </settings> </proxy-configuration> ... </stage>
System.setProperty("http.proxyHost", proxyConfigurationModel.getHost());
System.setProperty("http.proxyPort", proxyConfigurationModel.getPort());
System.setProperty("http.proxyUser", proxyConfigurationModel.getUser());
System.setProperty("http.proxyPassword", proxyConfigurationModel.getPassword());
| Attributes of <proxy-configuration /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <proxy-configuration /> is: <settings />
<proxy-configuration /> is valid inside: <stage />
Implements SecurityConfigurationModel.
| Attributes of <security-configuration /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
user-details-service-bean-name |
Defines the user details service bean name. |
<security-configuration /> is valid inside: <stage />
The stages model contains a set of stage definitions. The stages that are
used by the portal can either be defined by the startup parameter
OPENSAGA_STAGES or by using the configuration file
opensaga-project.cfg. See the section called “Configuring the deployment stage for the server”
for more information.
Example 73.2. A single stage definition
<stage name="dev-example"> <data-source-set> <data-source name="portaldb" type="opensaga-hibernate"> <settings> <setting name="driverClassName" value="org.postgresql.Driver"/> ... <setting name="password" value="iGro1tWHHIXupoiW57hsIg==" decryption-bean-name="aesDecrypter"/> <setting name="bean.dataBaseNamingStrategy" value="postgres"/> ... <setting name="hibernate.dialect" value="org.hibernatespatial.postgis.PostgisDialect"/> ... <setting name="c3p0.initialPoolSize" value="3"/> ... </settings> </data-source> </data-source-set> </stage>
The stage name (in this example dev-example) is defined by the
attribute name.
![]() | Note |
|---|---|
Some technical details: the stage models of all selected stages are merged in
the usual way. To get a list of all specified stage models you can use the
|
Each stage definition contains a set of data sources. For example the
portaldb data source that is the default one for all domain
types. Above you can find an example of a data source definition (
Example 16.18, “A single stage definition”). Each data source has a name
and a type. The name is referenced by the domain
type that uses the data source. The type attribute specifies the
data source type. See the section called “Data Source Types” for a list of
supported types.
For more information see the section called “<data-source />”.
For information see the section called “<proxy-configuration />”
| Attributes of <stage /> | |
|---|---|
| Attribute | Description |
debug-console | |
description |
Defines the description. |
development-mode |
Defines the development mode. |
disable-js-on-server-side | |
i18n-disabled |
Defines the flag indicating if the translations (I18N) are disabled. |
id |
Defines the GUID of the model. |
name |
Defines the model name. |
page-delay |
Sets the page delay. |
Valid inside <stage /> are: <data-source-set />, <mail-service-configuration-set />, <logging-configuration />, <attachment-configuration-set />, <content-source-set />, <proxy-configuration />, <security-configuration />
<stage /> is valid inside: <stages />
The stages model contains a set of stage definitions. The stages that are
used by the portal can either be defined by the startup parameter
OPENSAGA_STAGES or by using the configuration file
opensaga-project.cfg. See the section called “Configuring the deployment stage for the server”
for more information.
| Attributes of <stages /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <stages /> is: <stage />
Table of Contents
The following expression defines a constant value:
<constant value="true"/>
Values are logical values (Chapter 7, Defining Logical Values For Properties). The following
attributes are supported for constant.
| Attributes of <constant /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
value |
Defines the constant value. |
value-provider-bean |
Defines a Spring configured bean ID for a bean of Type
|
<constant /> is valid inside: <greater-than />, <geo-within />, <parameters />, <less-than-or-equal-to />, <is-undefined />, <ends-with />, <geo-contains />, <contains-comparator />, <case />, <starts-with />, <equals />, <constant-data />, <less-than />, <in />, <greater-than-or-equal-to />, <is-defined />
Implements CountValueModel.
| Attributes of <count /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
domain-type-ref (required) |
Defines the domain type model reference. |
id |
Defines the GUID of the model. |
Valid inside <count /> are: <execute-if />, <auto-complete-filter />, <read-only-if />, <with-filter />, <filter-restriction />, <filter-specification />, <visible-if />, <disabled-if />, <condition />, <validate-if />
<count /> is valid inside: <greater-than />, <geo-within />, <parameters />, <less-than-or-equal-to />, <is-undefined />, <ends-with />, <geo-contains />, <contains-comparator />, <starts-with />, <equals />, <less-than />, <greater-than-or-equal-to />, <is-defined />
Implements CurrentPropertyReferenceValueModel.
| Attributes of <current-property-value /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref |
Defines the reference to a property in the current runtime context. |
<current-property-value /> is valid inside: <greater-than />, <geo-within />, <parameters />, <less-than-or-equal-to />, <is-undefined />, <ends-with />, <geo-contains />, <contains-comparator />, <case />, <starts-with />, <equals />, <less-than />, <in />, <greater-than-or-equal-to />, <is-defined />
Implements GeoPointValueModel.
| Attributes of <geo-point /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
value-provider-bean |
Defines a Spring configured bean ID for a bean of Type
|
<geo-point /> is valid inside: <greater-than />, <geo-within />, <parameters />, <less-than-or-equal-to />, <is-undefined />, <ends-with />, <geo-contains />, <contains-comparator />, <case />, <starts-with />, <equals />, <constant-data />, <less-than />, <in />, <greater-than-or-equal-to />, <is-defined />
Implements GeoPolygonValueModel.
| Attributes of <geo-polygon /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
value-provider-bean |
Defines a Spring configured bean ID for a bean of Type
|
<geo-polygon /> is valid inside: <greater-than />, <geo-within />, <parameters />, <less-than-or-equal-to />, <is-undefined />, <ends-with />, <geo-contains />, <contains-comparator />, <case />, <starts-with />, <equals />, <constant-data />, <less-than />, <in />, <greater-than-or-equal-to />, <is-defined />
Implements ParameterListModel.
| Attributes of <parameters /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <parameters /> are: <count />, <constant />, <relation-count />, <size-of />, <current-property-value />, <geo-polygon />, <property />, <geo-point />
<parameters /> is valid inside: <system-log />
( Additional names: property-value )
Implements PropertyReferenceValueModel.
| Attributes of <property /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref |
Defines the reference to a property in the current runtime context. |
( Additional names: property )
Implements PropertyReferenceValueModel.
| Attributes of <property-value /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
property-ref |
Defines the reference to a property in the current runtime context. |
<property-value /> is valid inside: <greater-than />, <geo-within />, <parameters />, <less-than-or-equal-to />, <is-undefined />, <ends-with />, <geo-contains />, <contains-comparator />, <case />, <starts-with />, <equals />, <less-than />, <in />, <greater-than-or-equal-to />, <is-defined />
Implements RelationCountValueModel.
| Attributes of <relation-count /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
relation-ref |
Defines the reference to another relation |
scoped-domain-object-ref |
Defines the scoped domain object reference. |
Valid inside <relation-count /> is: <relation-chain />
<relation-count /> is valid inside: <greater-than />, <geo-within />, <parameters />, <less-than-or-equal-to />, <is-undefined />, <ends-with />, <geo-contains />, <contains-comparator />, <starts-with />, <equals />, <less-than />, <greater-than-or-equal-to />, <is-defined />
Implements SizeOfValueModel.
| Attributes of <size-of /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
scoped-domain-object-list-ref |
Defines the ID of the referenced cached domain object list. |
<size-of /> is valid inside: <greater-than />, <geo-within />, <parameters />, <less-than-or-equal-to />, <is-undefined />, <ends-with />, <geo-contains />, <contains-comparator />, <starts-with />, <equals />, <less-than />, <greater-than-or-equal-to />, <is-defined />
Table of Contents
Implements NextTransformerModel.
| Attributes of <next-transformer /> | |
|---|---|
| Attribute | Description |
condition |
Defines the condition. |
condition-bean |
Defines the condition bean. |
condition-script |
Defines the condition script. |
condition-scripting-dialect |
Defines the condition scripting dialect. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
transformer-ref |
Defines the transformer reference |
<next-transformer /> is valid inside: <transformer />
Implements TransformerModel.
| Attributes of <transformer /> | |
|---|---|
| Attribute | Description |
condition |
Defines the condition. |
condition-bean |
Defines the condition bean. |
condition-script |
Defines the condition script. |
condition-scripting-dialect |
Defines the condition scripting dialect. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
stop-condition |
Defines the stop condition. |
stop-condition-bean |
Defines the stop condition bean. |
stop-condition-script |
Defines the stop condition script. |
stop-condition-scripting-dialect |
Defines the condition scripting dialect. |
transformation |
Defines the transformation ressource |
transformation-bean |
Defines the transformation bean |
transformation-script |
Defines the transformation script |
transformation-scripting-dialect |
Defines the transformation scripting dialect. |
Valid inside <transformer /> is: <next-transformer />
<transformer /> is valid inside: <transformer-list />
Implements TransformerListModel.
| Attributes of <transformer-list /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
type |
Defines the type of the transformations. |
Valid inside <transformer-list /> is: <transformer />
<transformer-list /> is valid inside: <transform />
Implements SettingModel.
| Attributes of <setting /> | |
|---|---|
| Attribute | Description |
bean-ref |
Defines the beanReference. |
decryption-bean-name |
Defines the decription bean name. |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the model name. |
value |
Defines the value. |
<setting /> is valid inside: <settings />
Defines a set of setting models.
| Attributes of <settings /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <settings /> is: <setting />
<settings /> is valid inside: <proxy-configuration />, <data-source />, <mail-service-configuration />
Implements UiComponentSettingModel.
| Attributes of <ui-component-setting /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
name |
Defines the name. |
value |
Defines the value. |
<ui-component-setting /> is valid inside: <ui-component-setting-set />
This set contains settings for UI components. Each setting consists of a
name and value.
Example 77.1. UI Component Setting Set
<ui-component-setting-set>
<ui-component-setting name="domaincontextpath.display" value="true"/>
<ui-component-setting name="domaincontextpath.length" value="5"/>
...
</ui-component-setting-set>| Attributes of <ui-component-setting-set /> | |
|---|---|
| Attribute | Description |
description |
Defines the description. |
id |
Defines the GUID of the model. |
Valid inside <ui-component-setting-set /> is: <ui-component-setting />
<ui-component-setting-set /> is valid inside: <process />, <portal />, <view />