[izpack-devel] Implementation for conditions in izpack
Klaus.Bartz at coi.de
Thu Nov 9 15:15:02 CET 2006
welcome in the IzPack team.
I hope we can have some good discussion about IzPack in the
I think conditions can be a good thing. Hope it do not
interfere with the stuff Fabrice has announced some time ago.
The right branch for it is trunk, not 3.9 I think. Do you agree?
I am enquiring about the implementation.
Hope it is baseline at IzPanel level and will therefore also work
with custom panels without impl anything.
May be I can it also use (and impl) for custom actions.
Will be nice if a DTD exist in %IZ_HOME%\src\dtd.
Also an adapted docu :-)
But first things first...
>From: izpack-devel-bounces at lists.berlios.de
>[mailto:izpack-devel-bounces at lists.berlios.de]On Behalf Of Dennis Reil
>Sent: Thursday, November 09, 2006 8:49 AM
>To: izpack-devel at lists.berlios.de
>Subject: [izpack-devel] Implementation for conditions in izpack
>As mentioned, some time ago, I implemented an extension which adds the
>possibility of defining conditions for the izpack installer. These
>conditions can be used e.g. to only show panels for which
>met. Conditions can be currently defined based on pack selections,
>variables and Java field values. The boolean conditions and,
>or, xor and
>not are also possible to create more complex conditions.
>These conditions can be used to specify which panel are shown, which
>packs can be installed and which variables should be set. I also
>extended UserInputPanel so that conditions could be used to show fields
>on a panel.
>Conditions are currently defined in a resource file. An example
>conditions.xml could look like:
><?xml version="1.0" ?>
> <condition type="variable" id="notwarfilesetup">
> <condition type="packselection" id="demoprojectsselected">
> <panelcondition panelid="jvmpanel"
> <panelcondition panelid="projects.settings"
> conditionid="demoprojectsselected" />
> <packcondition packid="pack.appserver.tomcat"
> conditionid="notwarfilesetup" />
>This spec has two conditions, one based on a variable value
>(notwarfilesetup) and one based on a pack selection. Based on this
>conditions two panelconditions and one packcondition is defined. This
>means, that jvmpanel is only shown if notwarfilesetup validates true
>which means, that the variable with name izpack.setuptype has to be
>standard. The pack (pack.appserver.tomcat) will only be available for
>installation if condition notwarfilesetup validates true.
>If you find this useful, I would create the appropriate patches to
>integrate it in izpack. New types of conditions can easily be added by
>subclassing an abstract condition base class. As the rules engine loads
>conditions by reflections, a new type can easily be used in the spec
>For sure, there are many more places in izpack, where conditions can be
>useful (e.g. pack definition, executables, parsables).
>Do you find this useful?
>izpack-devel mailing list
>izpack-devel at lists.berlios.de
More information about the izpack-devel