Blogs

Showing 0 results.

Forums

« Back to CDR API

ApiCompanyScope versus CompanyScope

Combination View Flat View Tree View
Threads [ Previous | Next ]
We recently installed the pre-FCS of CTX 1.1. With that install we noticed a new file ApiCompanyScope.java. It looks to be the same as CompanyScope. Are there any recommendations or guidence regarding these files?

For enums that are exposed by the API, we define API-specific definitions that are independent of the back-end representation in the database. We do this primarily to guarantee backward compatibility. In this case, ApiCompanyScope is the enum exposed in the API but CompanyScope is what we use in the back-end. Suppose we add another value to CompanyScope called "XYZ" in an upcoming release. We don't want to unknowingly expose this in the WSDL for any clients that are operating in backward compatibility mode. By having a separate ApiCompanyScope, we have tight control over what we expose, and furthermore, we can define any necessary adaptation logic. This also implies we can have separate ApiCompanyScope definitions for each release.

In short, for now CompanyScope and ApiCompany scope have the same values. But if they diverge at all on the back-end, we won't automatically break any backward compatibility.

Collateral


No files available