Hi Laksman,
Please find the code segment in-line.

On Thu, Sep 11, 2014 at 2:40 PM, Lakshman Udayakantha <lakshm...@wso2.com>
wrote:

> Hi,
>
> I’m implementing below method in *ApplicationManagementService.java* in
> *org.wso2.carbon.appfactory.application.mgt* to delete all the
> applications related to a tenant in APP Factory
>
> public void deleteAllApplicationsOfTenant(String domainName){
>
        RealmService realmService = Util.getRealmService();
        TenantManager tenantManager = realmService.getTenantManager();
        try {
            Tenant tenant =
tenantManager.getTenant(tenantManager.getTenantId(domainName));
            String adminName = tenant.getAdminName();
        } catch (UserStoreException e) {
            e.printStackTrace();
        }

> }
>
> there is a method in same class to delete an application
>
> public boolean deleteApplication(Application application, String
> userName, String domainName) throws AppFactoryException {
>
> }
>
> we need userName to delete the application here. we need to get the tenant
> admin as a user. how do we get the tenant admin user?
>
> Thanks
>
> --
> Lakshman Udayakantha
> Software Engineer, WSO2
> Mobile: *0711241005*
>
> *lakshm...@wso2.com <lakshm...@wso2.com>*
>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 


*Asanka DissanayakeSoftware Engineer*
*WSO2 Inc. - lean . enterprise . middleware |  wso2.com <http://wso2.com/>*

*email: asan...@wso2.com <ruch...@wso2.com>,   blog:
cyberwaadiya.blogspot.com
<http://cyberwaadiya.blogspot.com>, asankastechtalks.wordpress.com
<http://asankastechtalks.wordpress.com>  mobile: +94 71 8373821*
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to