private void createIndex_Resource(ResourceDetail resource) {
    SilverTrace.info(
        "resourceManager",
        "resourceManagerBmEJB.createIndex_Resource()",
        "root.MSG_GEN_ENTER_METHOD",
        "resource = " + resource.toString());
    FullIndexEntry indexEntry = null;

    if (resource != null) {
      // Index the Reservation
      indexEntry = new FullIndexEntry(resource.getInstanceId(), "Resource", resource.getId());
      indexEntry.setTitle(resource.getName());
      indexEntry.setPreView(resource.getDescription());
      if (resource.getUpdateDate() != null) indexEntry.setCreationDate(resource.getUpdateDate());
      else indexEntry.setCreationDate(resource.getCreationDate());
      indexEntry.setCreationUser(resource.getCreaterId());

      String categoryId = resource.getCategoryId();
      if (StringUtil.isDefined(categoryId)) {
        CategoryDetail category = getCategory(categoryId);
        if (category != null) {
          String xmlFormName = category.getForm();
          if (StringUtil.isDefined(xmlFormName)) {
            // indéxation du contenu du formulaire XML
            String xmlFormShortName =
                xmlFormName.substring(xmlFormName.indexOf("/") + 1, xmlFormName.indexOf("."));
            PublicationTemplate pubTemplate;
            try {
              pubTemplate =
                  PublicationTemplateManager.getInstance()
                      .getPublicationTemplate(resource.getInstanceId() + ":" + xmlFormShortName);
              RecordSet set = pubTemplate.getRecordSet();
              set.indexRecord(resource.getId(), xmlFormName, indexEntry);
            } catch (Exception e) {
              throw new ResourcesManagerRuntimeException(
                  "ResourceManagerBmEJB.createIndex_Resource()",
                  SilverpeasRuntimeException.ERROR,
                  "resourcesManager.EX_CREATE_INDEX_FAILED",
                  e);
            }
          }
        }
      }

      IndexEngineProxy.addIndexEntry(indexEntry);
    }
  }