class UserAuthorityServiceImpl extends HibernateDaoImpl implements UserDetailsService, ExternalUserService,
        UserAuthorityPersistenceService, Diagnostic {

    @Override
    public Map<DiagnosticAttribute, DiagnosticCallback> getDiagnosticData() {
        return new DiagnosticAttributeBuilder()
                .addDiagnosticAttribute(DiagnosticAttributeBuilder.TOTAL_USERS_COUNT, new DiagnosticCallback<Integer>() {
                    @Override
                    public Integer getDiagnosticAttributeValue() {
                        return getUsersCountExceptExcluded(ExecutionContextImpl.getRuntimeExecutionContext(), null, false);
                    }
                })
                .addDiagnosticAttribute(DiagnosticAttributeBuilder.TOTAL_ENABLED_USERS_COUNT, new DiagnosticCallback<Integer>() {
                    @Override
                    public Integer getDiagnosticAttributeValue() {
                        return getUsersCountExceptExcluded(ExecutionContextImpl.getRuntimeExecutionContext(), null, true);
                    }
                })
                .addDiagnosticAttribute(DiagnosticAttributeBuilder.TOTAL_ROLES_COUNT, new DiagnosticCallback<Integer>() {
                    @Override
                    public Integer getDiagnosticAttributeValue() {
                        return getTotalRolesCount(ExecutionContextImpl.getRuntimeExecutionContext());
                    }
                }).build();
    }

}