public static ResourceList toV2ResourceList(V1ResourceList v1ResourceList)
{
if (v1ResourceList != null)
{
List<Resource> resources = WSRPUtils.transform(v1ResourceList.getResources(), RESOURCE);
ResourceList result = WSRPTypeFactory.createResourceList(resources);
List<Extension> extensions = WSRPUtils.transform(v1ResourceList.getExtensions(), EXTENSION);
if (extensions != null)
{
result.getExtensions().addAll(extensions);
}
return result;
}
else