code: public void saveDescriptor(DefaultLocalExtension extension) throws ParserConfigurationException,
          TransformerException, IOException
      {
          File file = extension.getDescriptorFile();
  
          if (file == null) {
              file = getNewDescriptorFile(extension.getId());
              extension.setDescriptorFile(file);
          }
  
          FileOutputStream fos = new FileOutputStream(file);
  
          try {
              this.extensionSerializer.saveExtensionDescriptor(extension, fos);
          } finally {
              fos.close();
          }
      }
docs: *
  Update the extension descriptor in the filesystem repository.
  
  @param extension the local extension descriptor to save
  @throws ParserConfigurationException error when trying to save the descriptor
  @throws TransformerException error when trying to save the descriptor
  @throws IOException error when trying to save the descriptor