/** * Provides a String which contains pairs of targetID=delegateID separated by a semicolon. * @param validatorMetaData a Map with the currently configured validators. * @return a String. */ private String getDelegatesAsString(Map validatorMetaData) { StringBuffer buffer = new StringBuffer(); Iterator iterator = validatorMetaData.keySet().iterator(); while (iterator.hasNext()) { ValidatorMetaData vmd = (ValidatorMetaData) iterator.next(); String targetID = vmd.getValidatorUniqueName(); String delegateID = getDelegateUniqueName(vmd); if (delegateID == null) { continue; } // Write out pairs targetID=delegateID buffer.append(targetID); buffer.append(ConfigurationConstants.DELEGATES_SEPARATOR); buffer.append(delegateID); buffer.append(ConfigurationConstants.ELEMENT_SEPARATOR); } return buffer.toString(); }
/** * Provides the delegate validator descriptor of the validator delegate configured * for the given delegating validator in the context of this configuration. * @param vmd the delegating validator's meta data. Must not be null. * @return a ValidatorDelegateDescriptor for the given delegating validator. */ public ValidatorDelegateDescriptor getDelegateDescriptor(ValidatorMetaData vmd) throws InvocationTargetException { String targetID = vmd.getValidatorUniqueName(); String delegateID = getDelegateUniqueName(vmd); ValidatorDelegateDescriptor descriptor = ValidatorDelegatesRegistry.getInstance().getDescriptor(targetID, delegateID); return descriptor; } }