AgileApps Support Wiki Pre Release

tenantContext Object

From AgileApps Support Wiki
Revision as of 19:22, 7 October 2010 by imported>Aeric
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


The tenantContext object is used to access and manage data that has been shared by another tenant, using Tenant Data Sharing Policies.

Once a data sharing policy has been set up, you specify the sharing tenant's ID to get a tenantContext. You then use that object as a parameter in one of the Java APIs for Tenant Data Sharing.

Learn more: TenantContext javadocs

Syntax
<syntaxhighlight lang="java" enclose="div">

try {

   TenantContext tenantContext = new TenantContext(String tenantId);

} catch Exception(e) {

   // An exception is thrown if the specified tenant has not defined
   // a tenant data sharing policy that gives you access.

} </syntaxhighlight>