code: private void touch(CmsObject cms, CmsResource resource) {
  
          if (resource.getState().isUnchanged()) {
              try {
                  CmsLock lock = cms.getLock(resource);
                  if (lock.isUnlocked() || !lock.isOwnedBy(cms.getRequestContext().getCurrentUser())) {
                      cms.lockResourceTemporary(resource);
                      long now = System.currentTimeMillis();
                      resource.setDateLastModified(now);
                      cms.writeResource(resource);
                      if (lock.isUnlocked()) {
                          cms.unlockResource(resource);
                      }
                  }
              } catch (CmsException e) {
                  LOG.warn("Could not touch resource after alias modification: " + resource.getRootPath(), e);
              }
          }
      }
docs: Tries to to touch a resource by setting its last modification date, but only if its state is 'unchanged'.<p>
  
  @param cms the current CMS context
  @param resource the resource which should be 'touched'.