protected void checkIsValidModeFor(final boolean tenantRunning, final AvailableWhenTenantIsPaused annotation, final long tenantId, final Object apiImpl, final Method method, final String apiInterfaceName) { // On running tenant, annotation must not be present, or present without ONLY flag: boolean okOnRunningTenant = isMethodAvailableOnRunningTenant(tenantRunning, annotation); // On paused tenant, annotation must be present (without consideration on ONLY flag): boolean okOnPausedTenant = isMethodAvailableOnPausedTenant(tenantRunning, annotation); if (!(okOnRunningTenant || okOnPausedTenant)) { if (tenantRunning) { methodCannotBeCalledOnRunningTenant(apiImpl, apiInterfaceName, method, tenantId); } else { methodCannotBeCalledOnPausedTenant(apiImpl, apiInterfaceName, method, tenantId); } } }
protected void checkIsValidModeFor(final boolean tenantRunning, final AvailableWhenTenantIsPaused annotation, final long tenantId, final Object apiImpl, final Method method, final String apiInterfaceName) { // On running tenant, annotation must not be present, or present without ONLY flag: boolean okOnRunningTenant = isMethodAvailableOnRunningTenant(tenantRunning, annotation); // On paused tenant, annotation must be present (without consideration on ONLY flag): boolean okOnPausedTenant = isMethodAvailableOnPausedTenant(tenantRunning, annotation); if (!(okOnRunningTenant || okOnPausedTenant)) { if (tenantRunning) { methodCannotBeCalledOnRunningTenant(apiImpl, apiInterfaceName, method, tenantId); } else { methodCannotBeCalledOnPausedTenant(apiImpl, apiInterfaceName, method, tenantId); } } }