The following classes provide helper methods that assist you when working with data and links.

REST Utilities

RestUtils allows you to, for example, validate input or get a handle on another resource. This Nucleus component, which can be accessed statically using the getRestUtils method, also provides you with a way of storing and retrieving data for a request. This can be helpful when you load an object in a root resource that is required by a sub-resource. The object can be retrieved using RestUtils in the sub-resource. For example, the /orders/{old} endpoint may want to store the order object so that the /commerceitems/{cId} endpoint can retrieve the stored order object for the request, rather than load the order object to get every commerce item.

Use the RestUtils.addRestRequestData (String pKey, Object pValue) method or the RestUtils.getRestRequestData (String pkey) method to store or retrieve data.

For additional information on these methods, refer to the ATG Platform API Reference.

Link Utilities

The LinkUtils Nucleus component can be accessed statically and provides helper methods that allow you to build links or other URIs for a resource. LinkUtils is also used by the framework when performing actions related to link generation.


Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices