public static V1RegistrationData toV1RegistrationData(RegistrationData registrationData)
{
if (registrationData != null)
{
V1RegistrationData result = WSRP1TypeFactory.createRegistrationData(registrationData.getConsumerName(), registrationData.isMethodGetSupported());
result.setConsumerAgent(registrationData.getConsumerAgent());
List<V1Property> properties = WSRPUtils.transform(registrationData.getRegistrationProperties(), PROPERTY);
if (properties != null)
{
result.getRegistrationProperties().addAll(properties);
}
List<String> modes = registrationData.getConsumerModes();
if (ParameterValidation.existsAndIsNotEmpty(modes))
{
result.getConsumerModes().addAll(modes);
}
List<String> consumerUserScopes = registrationData.getConsumerUserScopes();
if (ParameterValidation.existsAndIsNotEmpty(consumerUserScopes))
{
result.getConsumerUserScopes().addAll(consumerUserScopes);
}
List<String> windowStates = registrationData.getConsumerWindowStates();
if (ParameterValidation.existsAndIsNotEmpty(windowStates))
{
result.getConsumerWindowStates().addAll(windowStates);
}
List<V1Extension> extensions = WSRPUtils.transform(registrationData.getExtensions(), EXTENSION);
if (extensions != null)
{
result.getExtensions().addAll(extensions);
}
return result;
}
else