Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

These actions provide support to allow selections to be transferred between Weave and other systems.

This bundle provides the server side API and the client side components to use it, as well as a database transfer implementation.

The included database transfer implementation support transferring selection via database tables.

The database transfer implementation will write, at least, a userid and key value to an administrator specified table, where, by default, the userid column will be named 'userid' but the key column must be specified in the config.
The configuration requires at least a 'datasource', 'table' and 'column'. 'usercolumn' can be used to change the userid column name.

id's can be altered when being send/retrieved from the other system by using the 'get' and 'put' tags, which take one of 'lpad', 'rpad' or 'trim' setting to alter their behaviour.

  • trim='true' will strip leading/training spaced from the keys.
  • lpad='[width]' will left pad the id's with [width] spaces.
  • rpad='[width]' will right pad the id's with [width] spaces.

The 'get' option is performed after retrieving the id's from the other system, and the 'put' option is performed before sending the id's to the other system.

The database transfer implementation also requires a list of the entities that it can transfer, which can optionally specify a different column than the default key by setting the 'key' attribute.
Also, it can specify a list of additional values that can should be sent to the other system along with the userid and key value by adding a 'value' tag with the name of the column and the value to set.

You can also specify when the transfer table should be cleared, by setting the 'cleanwhen' value to 'before', 'after' or 'both' which correspond to clearing the table before sending to the other system, after getting from the other system or both. The default is never.

Additionally, all of the settings can be set at the top level, where they'll provide defaults, or can be set within each entity where they'll overwrite the defaults.

ID

com.cohga.selection.Get
com.cohga.selection.Put

Sub-tags

Name

type

cardinality

description

system

String

1..1

The id of the provider to use

Example

<?xml version="1.0" encoding="UTF-8"?>

<config xmlns="urn:com.cohga.server.config#1.0"
	xmlns:externaldb="urn:com.cohga.selection.transfer.db#1.0"
	xmlns:client="urn:com.cohga.html.client#1.0">

	<externaldb:transfer id="pathway">
		<name>Pathway</name>
		<datasource>datasource.pathway</datasource>
		<table>PTH_GIST</table>
		<column>GISREF</column>
		<put lpad="15"/>
		<get trim="true"/>
		<clearwhen>both</clearwhen>
		<entity id="property">
			<key>PRUPIX</key>
		</entity>
	</externaldb:transfer>

	<externaldb:transfer id="hansen">
		<name>Hansen</name>
		<datasource>datasource.hansen</datasource>
		<table>HANSEN</table>
		<column>COMPKEY</column>
		<key>COMPKEY</key>
		<clearwhen>before</clearwhen>
		<entity id="council_buildings">
			<value name="COMPTYPE">BLDG</value>
		</entity>
		<entity id="council_carparks">
			<value name="COMPTYPE">CARP</value>
		</entity>
	</externaldb:transfer>

	<client:config id="test">
		...
		<item action="com.cohga.selection.Get" system="pathway">
			<tooltip title="Pathway" text="Get from Pathway"/>
		</item>
		...
	</client:config>

</config>
  • No labels