Search in sources :

Example 1 with ITenantManagementAction

use of org.apereo.portal.tenants.ITenantManagementAction in project uPortal by Jasig.

the class TenantManagerController method doListenerAction.

/** @since 4.3 */
@ActionMapping(params = "action=doListenerAction")
public void doListenerAction(ActionRequest req, ActionResponse res, @RequestParam("fname") String fname, final PortletSession session) {
    final ITenantManagementAction action = tenantService.getAction(fname);
    final ITenant tenant = (ITenant) session.getAttribute(CURRENT_TENANT_SESSION_ATTRIBUTE);
    if (tenant == null) {
        throw new IllegalStateException("No current tenant");
    }
    TenantOperationResponse response = action.invoke(tenant);
    forwardToReportScreen(req, res, action.getMessageCode(), Collections.singletonList(response));
}
Also used : ITenant(org.apereo.portal.tenants.ITenant) TenantOperationResponse(org.apereo.portal.tenants.TenantOperationResponse) ITenantManagementAction(org.apereo.portal.tenants.ITenantManagementAction) ActionMapping(org.springframework.web.portlet.bind.annotation.ActionMapping)

Aggregations

ITenant (org.apereo.portal.tenants.ITenant)1 ITenantManagementAction (org.apereo.portal.tenants.ITenantManagementAction)1 TenantOperationResponse (org.apereo.portal.tenants.TenantOperationResponse)1 ActionMapping (org.springframework.web.portlet.bind.annotation.ActionMapping)1