So to achieve the above scenario, we need to follow the below procedure.
1. Implement SchemaExtensions.
https://docs.tibco.com/pub/ebx/5.9.10/doc/html/en/Java_API/com/orchestranetworks/schema/SchemaExtensions.html
2. Now in the method "defineExtensions" we need to utilize the API
setServicePermissionRuleOnNode with help of the context variable which is there in the argument of the method defineExtensions.
https://docs.tibco.com/pub/ebx/6.0.3/doc/html/en/Java_API/com/orchestranetworks/schema/SchemaExtensionsContext.html#setServicePermissionRuleOnNode-com.orchestranetworks.schema.Path-com.orchestranetworks.service.ServiceKey-com.orchestranetworks.userservice.permission.ServicePermissionRule-
3. Nowhere the API mentioned in step 2 has three arguments,
a.
Path aPathInSchema: Here we can specify the path of the table on which we need to achieve the mentioned scenario.
b.
ServiceKey aServiceKey: Here we can have, permission-based upon the scenario, the possible value are:
ALWAYS_DISABLED,
ALWAYS_ENABLED and
ENABLED_FOR_EXECUTION_ONLY https://docs.tibco.com/pub/ebx/5.9.10/doc/html/en/Java_API/com/orchestranetworks/userservice/permission/ServicePermissionRule.html
c.
ServicePermissionRule<? extends
EntitySelection> aRule: For this, we need to define the rule, as we need to make this scenario based upon the role and not for all the profiles.
For subPoint c, we again need to implement class ServicePermissionRule<TableViewEntitySelection>, and here inside the method getPermission we need to return the permission-based upon the profile either enable or disable.
Please find the attached sample code files with names: PermissionExtension.java and ServiceRuleImplementations.java