code: def download(self, FILENAME=None):
          
          resultFilename = None
          url = self.__url+'/services'                
          result = Util.retrieveJsonResponseFromServer(url)
          dataItems = result['data']
          for item in dataItems:
              plugin = Plugin(item)        
              result = plugin.getParameterByValue("fr.cnes.sitools.resources.order.DirectOrderResource")            
              if result == None:
                  continue
              else:
                  urlParameter = plugin.getParameterByType('PARAMETER_ATTACHMENT')
                  urlPlugin = urlParameter.getValue()
                  encodingParameter = plugin.getParameterByName('archiveType')
                  encodingPlugin = encodingParameter.getValue()
                  query = self.getQueries()
                  query.setBaseUrl(self.__url + urlPlugin)
                  url = query.getUrl()                
                  (filename, header) = Util.urlretrieve('%s' % url, FILENAME)
                  if FILENAME == None:
                      os.rename(filename, filename + "." + encodingPlugin)
                      resultFilename = filename + "." + encodingPlugin
                  else:
                      os.rename(FILENAME, FILENAME + "." + encodingPlugin)
                      resultFilename = FILENAME + "." + encodingPlugin
                  break
          return resultFilename
docs: Downloads the files related to the query.