diff options
Diffstat (limited to 'server/sonar-web/src/main/webapp/WEB-INF/app/models/property.rb')
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/app/models/property.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/models/property.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/models/property.rb index 64a54f49eac..a66e0e452d5 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/models/property.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/models/property.rb @@ -137,6 +137,15 @@ class Property < ActiveRecord::Base java_definition && (java_definition.multi_values? || !java_definition.fields.blank?) end + def to_xml(xml=Builder::XmlMarkup.new(:indent => 0)) + xml.property do + xml.key(prop_key) + xml.value { xml.cdata!(value.to_s) } + Property.string_to_array_value(value.to_s).each { |v| xml.values { xml.cdata!(v) } } if multi_values? + end + xml + end + def java_definition @java_definition ||= Property.property_def(key) end |