Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 
ElementRequiredDescription
nameYesThe name of the parameterresource. This will be the resource endpoint name of the view instance.
plural-nameNoThe plural name of the resource.
service-classNoThe JAX-RS annotated resource service class.
id-propertyNoThe resource identifier.
provider-classNo The Ambari ResourceProvider resource class.
resource-classNo The JavaBean resource class.
Code Block
<resource>
  <name>calculator</name>
  <service-class>org.apache.ambari.view.proxy.CalculatorResource</service-class>
</resource>

See the Calculator View Example to see a REST service endpoint view implementation. 

Code Block
<resource>
  <name>city</name>
  <plural-name>cities</plural-name>
  <id-property>id</id-property>
  <resource-class>org.apache.ambari.view.weather.CityResource</resource-class>
  <provider-class>org.apache.ambari.view.weather.CityResourceProvider</provider-class>
  <service-class>org.apache.ambari.view.weather.CityService</service-class>
</resource>

See the Weather View Example to see an Ambari -Managed ResourceProvider view implementation..

...