Management of UDDI node value sets
You can use the UDDI registry administrative interface to inspect and manage the runtime configuration of a UDDI application. You can manage the information about a UDDI node and its activation state, update properties and policies, set publish tier limits, register UDDI publishers, and control value set support.
Value sets are represented in a UDDI registry as value set tModel entities, with a keyedReference UDDI type with the value categorization. Such value sets are backed with a set of valid values. For user-defined value sets, this data is loaded into the UDDI registry using UddiNode MBean operations, although it is more convenient to do this using the User defined value set tool.
- getValueSets
- getValueSetDetail
- getValueSetProperty
- updateValueSet
- updateValueSets
- loadValueSet
- changeValueSetTModelKey
- unloadValueSet
- isExistingValueSet
In the samples for WebSphere® Application Server, the ManageValueSetsSample class in the UDDI registry samples demonstrates these operations.
- getValueSets
- Returns a collection of ValueSetStatus
objects.
- Invoke the getValueSets operation:
List valueSets = uddiNode.getValueSets();
- Cast each element to ValueSetStatus and output contents:
for (Iterator iter = valueSets.iterator(); iter.hasNext();) { ValueSetStatus valueSetStatus = (ValueSetStatus) iter.next(); System.out.println(valueSetStatus); }
- Invoke the getValueSets operation:
- getValueSetDetail
- Returns a ValueSetStatus object for the given value set tModel
key.
- Invoke the getValueSetDetail operation:
uddiNode.getValueSetDetail("uddi:uddi.org:ubr:categorization:naics:2002");
- Retrieve and display the details:
String name = valueSetStatus.getName(); String displayName = valueSetStatus.getDisplayName(); boolean supported = valueSetStatus.isSupported(); System.out.println("name: " + name); System.out.println("display name: " + displayName); System.out.println("supported: " + supported);
- Display the value set properties:
List properties = valueSetStatus.getProperties(); for (Iterator iter = properties.iterator(); iter.hasNext();) { ValueSetProperty property = (ValueSetProperty) iter.next(); System.out.println(property); }
- Invoke the getValueSetDetail operation:
- getValueSetProperty
- Returns a property of a value set as a ValueSetProperty object.
This operation is mainly for the administrative console to render
properties of a value set as a row in a table. For example, one such
property is the keyedReference property, which indicates whether the
value set is checked.
- Invoke the getValueSetProperty operation:
uddiNode.getValueSetProperty("uddi:uddi.org:ubr:categorization:naics:2002", ValueSetPropertyConstants.VS_CHECKED);
- Read and display the boolean value of the property:
boolean checked = valueSetProperty.getBooleanValue(); System.out.println("checked: " + checked);
- Invoke the getValueSetProperty operation:
- updateValueSet
- Updates the value set status. Only the supported attribute can
be updated. All other setter methods are used by the UDDI application.
- Create a ValueSetStatus object specifying the tModel key and the
updated supported value:
ValueSetStatus updatedStatus = new ValueSetStatus(); updatedStatus.setTModelKey("uddi:uddi.org:ubr:categorization:naics:2002"); updatedStatus.setSupported(true);
- Invoke the updateValueSet operation:
uddiNode.updateValueSet(updatedStatus);
- Create a ValueSetStatus object specifying the tModel key and the
updated supported value:
- updateValueSets
- Updates the
value set status for multiple value sets. Similarly
to the updateValueSet operation, only the supported attribute is updated.
- Populate the list with updated ValueSetStatus objects:
List valueSets = new ArrayList(); ValueSetStatus valueSetStatus = new ValueSetStatus(); valueSetStatus.setTModelKey("uddi:uddi.org:ubr:categorization:naics:2002"); valueSetStatus.setSupported(false); valueSets.add(valueSetStatus); valueSetStatus = new ValueSetStatus(); valueSetStatus.setTModelKey("uddi:uddi.org:ubr:categorizationgroup:wgs84"); valueSetStatus.setSupported(false); valueSets.add(valueSetStatus); valueSetStatus = new ValueSetStatus(); valueSetStatus.setTModelKey("uddi:uddi.org:ubr:identifier:iso6523:icd"); valueSetStatus.setSupported(false); valueSets.add(valueSetStatus);
- Invoke the updateValueSets operation:
uddiNode.updateValueSets(valueSets);
- Populate the list with updated ValueSetStatus objects:
- loadValueSet
- Loads values
for a value set from a UDDI registry Version 3 or
Version 2 taxonomy data file on the local file system. Note: There is also a loadValueSet operation that takes a ValueSetData object, but this is only for use by the user-defined value set tool.
- Invoke
the loadValueSet operation:
uddiNode.loadValueSet("C:/valuesets/myvalueset.txt", "uddi:cell:node:server:myValueSet");
uddiNode.loadValueSet("/valuesets/myvalueset.txt", "uddi:cell:node:server:myValueSet");
- Invoke
the loadValueSet operation:
- changeValueSetTModelKey
- Allocate any value set values that are allocated to one value
set tModel to a new value set tModel.
- Invoke the changeValueSetTModelKey
operation, specifying old and
new tModel keys:
uddiNode.changeValueSetTModelKey( "uddi:cell:node:server:myValueSet", "uddi:cell:node:server:myNewValueSet");
- Invoke the changeValueSetTModelKey
operation, specifying old and
new tModel keys:
- unloadValueSet
- Unloads values for a value set with the given tModel key.
- Invoke
the unloadValueSet operation:
uddiNode.unloadValueSet("uddi:myValueSet");
- Invoke
the unloadValueSet operation:
- isExistingValueSet
- Determines
whether value set data exists for the given tModel
key.
- Invoke the isExistingValueSet operation and display the
result:
boolean exists = uddiNode.isExistingValueSet( "uddi:uddi.org:ubr:categorization:naics:2002"); System.out.println("NAICS 2002 is a value set: " + exists);
- Invoke the isExistingValueSet operation and display the
result: