<commit_before>import AbstractService from './AbstractService';
import SearchParameters from '../domain/SearchParameters';
import RestApiService from './RestApiService';
import * as Utils from '../utils';

class FormDefinitionService extends AbstractService {

  getApiPath() {
    return '/form-definitions';
  }

  getNiceLabel(entity) {
    if (!entity) {
      return '';
    }
    return `${entity.name} (${entity.code})`;
  }

  getGroupPermission() {
    return 'FORMDEFINITION';
  }

  /**
   * Returns default searchParameters for current entity type
   *
   * @return {object} searchParameters
   */
  getDefaultSearchParameters() {
    return super.getDefaultSearchParameters().setName(SearchParameters.NAME_QUICK).clearSort().setSort('created', 'desc');
  }
<commit_msg>[#1744] added entity type to nice label in form definition service<commit_after>import AbstractService from './AbstractService';
import SearchParameters from '../domain/SearchParameters';
import RestApiService from './RestApiService';
import * as Utils from '../utils';

class FormDefinitionService extends AbstractService {

  getApiPath() {
    return '/form-definitions';
  }

  getNiceLabel(entity) {
    if (!entity) {
      return '';
    }
    return `${entity.name} (${entity.code}) - ${Utils.Ui.getSimpleJavaType(entity.type)}`;
  }

  getGroupPermission() {
    return 'FORMDEFINITION';
  }

  /**
   * Returns default searchParameters for current entity type
   *
   * @return {object} searchParameters
   */
  getDefaultSearchParameters() {
    return super.getDefaultSearchParameters().setName(SearchParameters.NAME_QUICK).clearSort().setSort('created', 'desc');
  }

{'fraction_non_alphanumeric': 0.13116726835138387, 'fraction_numerical': 0.0024067388688327317, 'mean_word_length': 4.148606811145511, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4825414', 'n_tokens_mistral': 464, 'n_tokens_neox': 452, 'n_words': 107}