@Override
  public String getScopeDescriptiveName(ThemeDisplay themeDisplay) throws PortalException {

    if (getGroupId() == themeDisplay.getScopeGroupId()) {
      return StringUtil.appendParentheticalSuffix(
          themeDisplay.translate("current-site"),
          HtmlUtil.escape(getDescriptiveName(themeDisplay.getLocale())));
    } else if (isLayout() && (getClassPK() == themeDisplay.getPlid())) {
      return StringUtil.appendParentheticalSuffix(
          themeDisplay.translate("current-page"),
          HtmlUtil.escape(getDescriptiveName(themeDisplay.getLocale())));
    } else if (isLayoutPrototype()) {
      return themeDisplay.translate("default");
    } else {
      return HtmlUtil.escape(getDescriptiveName(themeDisplay.getLocale()));
    }
  }
 @Override
 public String getUnambiguousName(String name, Locale locale) {
   try {
     return StringUtil.appendParentheticalSuffix(name, getDescriptiveName(locale));
   } catch (Exception e) {
     return name;
   }
 }
  protected String getCategoryName(
      String uuid, long groupId, long parentCategoryId, String name, long vocabularyId, int count)
      throws Exception {

    AssetCategory category =
        AssetCategoryUtil.fetchByG_P_N_V_First(groupId, parentCategoryId, name, vocabularyId, null);

    if ((category == null) || (Validator.isNotNull(uuid) && uuid.equals(category.getUuid()))) {

      return name;
    }

    name = StringUtil.appendParentheticalSuffix(name, count);

    return getCategoryName(uuid, groupId, parentCategoryId, name, vocabularyId, ++count);
  }