This section explains how to work with components using the Java client library for the Legacy REST Web Services.
Getting Component Data
The getComponent()
method of the RestComponentHelper
class returns a data stream that contains a representation of a component.
The following code sample returns the Configuration component:
RestResult result = RestComponentHelper.getComponent("/atg/dynamo/Configuration", null, mSession)
Getting and Setting Property Values
The getPropertyValue()
method of the RestComponentHelper
class returns a data stream that contains the value of the specified property.
The following code sample gets the value of the property httpPort
from the Configuration component.
RestResult result = RestComponentHelper.getPropertyValue("/atg/dynamo/ Configuration", "httpPort", params, session)
Use the RestComponentHelper.setPropertyValue()
method to set property values on Nucleus components. The following code sample sets the value of the Configuration component property httpPort
to 8580.
RestResult result = RestComponentHelper.setPropertyValue("/atg/dynamo/ Configuration", "httpPort", "8580", params, session)