code: public void actionChangeSecureExport() throws JspException {
  
          // save initialized instance of this class in request attribute for included sub-elements
          getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this);
  
          String filename = getParamResource();
  
          try {
              // lock resource if auto lock is enabled
              checkLock(getParamResource());
  
              // write the properties
              writeProperty(CmsPropertyDefinition.PROPERTY_EXPORT, getParamExport());
              writeProperty(CmsPropertyDefinition.PROPERTY_EXPORTNAME, getParamExportname());
              writeProperty(CmsPropertyDefinition.PROPERTY_SECURE, getParamSecure());
  
              // change the flag of the resource so that it is internal
              CmsResource resource = getCms().readResource(filename, CmsResourceFilter.IGNORE_EXPIRATION);
              if (resource.isInternal() && !Boolean.valueOf(getParamIntern()).booleanValue()) {
                  getCms().chflags(filename, resource.getFlags() & (~CmsResource.FLAG_INTERNAL));
              } else if (!resource.isInternal() && Boolean.valueOf(getParamIntern()).booleanValue()) {
                  getCms().chflags(filename, resource.getFlags() | CmsResource.FLAG_INTERNAL);
              }
  
              actionCloseDialog();
          } catch (Throwable e) {
              // error during change of secure settings, show error dialog
              includeErrorpage(this, e);
          }
  
      }
docs: Performs the Security and Export Change.<p>
  
  @throws JspException if including a JSP sub element is not successful