code: public void undelete(CmsDbContext dbc, CmsResource resource) throws CmsException {
  
          if (!resource.getState().isDeleted()) {
              throw new CmsVfsException(
                  Messages.get().container(
                      Messages.ERR_UNDELETE_FOR_RESOURCE_DELETED_1,
                      dbc.removeSiteRoot(resource.getRootPath())));
          }
  
          // set the state to changed
          resource.setState(CmsResourceState.STATE_CHANGED);
          // perform the changes
          updateState(dbc, resource, false);
          // log it
          log(
              dbc,
              new CmsLogEntry(
                  dbc,
                  resource.getStructureId(),
                  CmsLogEntryType.RESOURCE_UNDELETED,
                  new String[] {resource.getRootPath()}),
              false);
          // clear the cache
          m_monitor.clearResourceCache();
  
          // fire change event
          Map<String, Object> data = new HashMap<String, Object>(2);
          data.put(I_CmsEventListener.KEY_RESOURCE, resource);
          data.put(I_CmsEventListener.KEY_CHANGE, new Integer(CHANGED_RESOURCE));
          OpenCms.fireCmsEvent(new CmsEvent(I_CmsEventListener.EVENT_RESOURCE_MODIFIED, data));
      }
docs: Undelete the resource.<p>
  
  @param dbc the current database context
  @param resource the name of the resource to apply this operation to
  
  @throws CmsException if something goes wrong
  
  @see CmsObject#undeleteResource(String, boolean)
  @see I_CmsResourceType#undelete(CmsObject, CmsSecurityManager, CmsResource, boolean)