IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Adapter Toolkit > Implementing code from the IBM WebSphere Adapter Toolkit > Enterprise metadata discovery general interfaces and implementation for application adapters > Enterprise metadata discovery implementation samples

Property group sample

Use the property group APIs to create property groups required for an enterprise metadata discovery implementation.

To enable validation of specific properties, extend the WBISingleValuedPropertyImpl or WBIMultiValuedPropertyImpl and then implement the vetableChange() method. Any validation can be performed in this code. In case of failures, PropertyVetoException must be thrown.

You must implement a propertyChange() method, if one property needs to support another property type. For more details, check the EIS Simulator Adapter code samples for the ServiceTypeSingleProperty.

To enable the function of both vetoableChange and propertyChange, the instance of the property should be added to the propertyChangeListener list. In the EISSConnectionFactoryMetadataSelection class in the EIS Simulator Adapter code sample, the operations property supports the serviceType property.

		WBIMultiValuedPropertyImpl operationProp = new WBIMultiValuedPropertyImpl
("Operations", String.class); 
			operationProp.setDisplayName("Operations"); 
			operationProp.setDescription("Operations");  
			operationProp.setRequired(true);
			String[] operations=null;
			if(serviceType.equals(MetadataConfigurationType.INBOUND_SERVICE.toString())){
				operations = new String[3];
				operations[0] ="Create";
				operations[1] ="Update";
				operations[2] ="Delete"; 
 	}else{
				if(artifactType.equals(MetadataConfigurationType.GENERATED_DATA_BINDING.toString
())){// is WPS
					operations = operationsWPS;
				}else{
					operations = operationsNonWPS;
				}			
			} 			operationProp.setValidValues(operations);
			for(int idx=0;idx.operations.length;idx++){
				operationProp.addValue(operations[idx]);
			} 			pg.addProperty(operationProp);

			//Copy the applied properties to the new instance 			if (getAppliedSelectionProperties() != null)
				EMDUtil.copyValues(getAppliedSelectionProperties(), pg);
		
		} catch (MetadataException e) {
			throw new RuntimeException(e.getMessage());
		} 		return pg;}

Enterprise metadata discovery implementation samples