Accessing a Property
When you generate a Java or Spring component implementation after adding a property to the component, TIBCO Business Studio adds properties and methods to the component's abstract implementation class:
The TIBCO ActiveMatrix platform injects the property object into the component implementation.
For example, if you add a property named
greeting of type
String to a component, the following code is added:
To reference the property invoke the accessor methods. For example:
org.osoa.sca.annotations.Property;
private String greeting;
@Property(name = "greeting")
public void setGreeting(String greeting)
{
this.greeting = greeting;
}
public String getGreeting()
{
return greeting;
}
resp.setHelloResponse(getGreeting() + " " + name + "! "
+ "The current time is " + time + ".");
Copyright © Cloud Software Group, Inc. All rights reserved.