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 following items are added.
  • SCA property annotation import
  • A field that represents the property
  • Accessor methods

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:
org.osoa.sca.annotations.Property;
private String greeting;

@Property(name = "greeting")
public void setGreeting(String greeting) 
{
		this.greeting = greeting;
}

public String getGreeting() 
{
		return greeting;
}
To reference the property invoke the accessor methods. For example:
resp.setHelloResponse(getGreeting() + " " + name + "! "
+ "The current time is " + time + ".");