code: protected void saveData() throws CmsException {
  
          CmsObject cms = m_context.getCms();
          for (CmsResource resource : m_context.getResources()) {
              CmsLockActionRecord actionRecord = null;
              try {
                  actionRecord = CmsLockUtil.ensureLock(m_context.getCms(), resource);
  
                  String secureValue = (String)m_secureField.getValue();
                  String exportValue = (String)m_exportField.getValue();
                  String exportname = m_exportNameField.getValue();
                  CmsProperty secureProp = new CmsProperty(CmsPropertyDefinition.PROPERTY_SECURE, secureValue, null);
                  CmsProperty exportProp = new CmsProperty(CmsPropertyDefinition.PROPERTY_EXPORT, exportValue, null);
                  CmsProperty exportNameProp = new CmsProperty(
                      CmsPropertyDefinition.PROPERTY_EXPORTNAME,
                      exportname,
                      null);
                  boolean internal = m_internalField.getValue().booleanValue();
  
                  cms.writePropertyObjects(resource, Arrays.asList(secureProp, exportProp, exportNameProp));
                  resource.setInternal(internal);
                  cms.writeResource(resource);
              } finally {
                  if ((actionRecord != null) && (actionRecord.getChange() == LockChange.locked)) {
                      try {
                          cms.unlockResource(resource);
                      } catch (CmsLockException e) {
                          LOG.warn(e.getLocalizedMessage(), e);
                      }
                  }
              }
          }
      }
docs: Touches the selected files.<p>
  
  @throws CmsException if something goes wrong