<pre>
Use this operation to restore config from file on Repeater Instances in bulk.
</pre>
550175
public static br_restoreconfig[] restoreconfig(nitro_service client, br_restoreconfig[] resources) throws Exception
	{
		if(resources == null)
			throw new Exception("Null resource array");
		
		
		if(resources.length == 1)
			return ((br_restoreconfig[]) resources[0].perform_operation(client, "restoreconfig"));
		
		return ((br_restoreconfig[]) perform_operation_bulk_request(client, resources, "restoreconfig"));
	}
1198938
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		techsupport_responses result = (techsupport_responses) service.get_payload_formatter().string_to_resource(techsupport_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.techsupport_response_array);
		}
		techsupport[] result_techsupport = new techsupport[result.techsupport_response_array.length];
		
		for(int i = 0; i < result.techsupport_response_array.length; i++)
		{
			result_techsupport[i] = result.techsupport_response_array[i].techsupport[0];
		}
		
		return result_techsupport;
	}
325231
public void restoreFromFile(File file) throws IOException
    {
        byte[] rawData = new byte[(int) file.length()];
        ByteBuffer bufData = null;
        FileInputStream fis = null;
        DataInputStream dis = null;
        try {
            fis = new FileInputStream(file);
            dis = new DataInputStream(fis);
            dis.readFully(rawData);
            bufData = ByteBuffer.wrap(rawData);
            restoreFromBuffer(bufData);
        }
        finally {
            if (dis != null) {
                dis.close();
            }
            if (fis != null) {
                fis.close();
            }
        }
    }
125791
public void resetFromFile(String configFile) throws IOException
    {
        IStringBuffer isb = new IStringBuffer();
        String line = null;
        BufferedReader reader = new BufferedReader(new FileReader(configFile));
        while ( (line = reader.readLine()) != null ) {
            line = line.trim();
            if (line.equals("")) continue;
            if (line.charAt(0) == '#') continue;
            
            isb.append(line).append('\n');
            line = null;    //let gc do its work
        }
        
        globalConfig = new JSONObject(isb.toString());
        
        //let gc do its work
        isb = null;
        reader.close();
        reader = null;
    }
212129
private void restoreBackupIncremental() {

        try {
            if (fa.isStreamElement(fileName + ".backup")) {
                RAShadowFile.restoreFile(fileName + ".backup",
                                         fileName + ".data");
            } else {
/*
                // this is to ensure file has been written fully but it is not necessary
                // as semantics dictate that if a backup does not exist, the file
                // was never changed or was fully written to
                if (FileUtil.exists(cacheFileName)) {
                    int flags = DataFileCache.getFlags(cacheFileName);

                    if (!BitMap.isSet(flags, DataFileCache.FLAG_ISSAVED)) {
                        FileUtil.delete(cacheFileName);
                    }
                }
*/
            }

            deleteBackup();
        } catch (IOException e) {
            throw Error.error(ErrorCode.FILE_IO_ERROR, fileName + ".backup");
        }
    }
793627
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		br_restoreconfig_responses result = (br_restoreconfig_responses) service.get_payload_formatter().string_to_resource(br_restoreconfig_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.br_restoreconfig_response_array);
		}
		br_restoreconfig[] result_br_restoreconfig = new br_restoreconfig[result.br_restoreconfig_response_array.length];
		
		for(int i = 0; i < result.br_restoreconfig_response_array.length; i++)
		{
			result_br_restoreconfig[i] = result.br_restoreconfig_response_array[i].br_restoreconfig[0];
		}
		
		return result_br_restoreconfig;
	}
157971
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		xen_panwvpx_image_responses result = (xen_panwvpx_image_responses) service.get_payload_formatter().string_to_resource(xen_panwvpx_image_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.xen_panwvpx_image_response_array);
		}
		xen_panwvpx_image[] result_xen_panwvpx_image = new xen_panwvpx_image[result.xen_panwvpx_image_response_array.length];
		
		for(int i = 0; i < result.xen_panwvpx_image_response_array.length; i++)
		{
			result_xen_panwvpx_image[i] = result.xen_panwvpx_image_response_array[i].xen_panwvpx_image[0];
		}
		
		return result_xen_panwvpx_image;
	}
996043
protected void localRelease()
    {
        if (_repeater)
            DataAccessProviderStack.removeDataAccessProvider(pageContext);

        super.localRelease();
        _state.clear();

        _defaultSelections = null;
        _formatters = null;
        _match = null;
        _saveBody = null;
        _nullable = false;
        _nullableOptionText = null;
        _optionList = null;

        _repIdx = 0;
        _repeater = false;
        _repCurItem = null;
        _repCurStage = RepeatingStages.BEFORE;
        _dynamicOptions = null;
        _formatterError = false;
        _optRb = null;

        _order = DEFAULT_ORDER;
    }
896600
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		ns_conf_download_policy_responses result = (ns_conf_download_policy_responses) service.get_payload_formatter().string_to_resource(ns_conf_download_policy_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.ns_conf_download_policy_response_array);
		}
		ns_conf_download_policy[] result_ns_conf_download_policy = new ns_conf_download_policy[result.ns_conf_download_policy_response_array.length];
		
		for(int i = 0; i < result.ns_conf_download_policy_response_array.length; i++)
		{
			result_ns_conf_download_policy[i] = result.ns_conf_download_policy_response_array[i].ns_conf_download_policy[0];
		}
		
		return result_ns_conf_download_policy;
	}
797097
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		mps_network_config_responses result = (mps_network_config_responses) service.get_payload_formatter().string_to_resource(mps_network_config_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.mps_network_config_response_array);
		}
		mps_network_config[] result_mps_network_config = new mps_network_config[result.mps_network_config_response_array.length];
		
		for(int i = 0; i < result.mps_network_config_response_array.length; i++)
		{
			result_mps_network_config[i] = result.mps_network_config_response_array[i].mps_network_config[0];
		}
		
		return result_mps_network_config;
	}
438094
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		version_matrix_file_responses result = (version_matrix_file_responses) service.get_payload_formatter().string_to_resource(version_matrix_file_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.version_matrix_file_response_array);
		}
		version_matrix_file[] result_version_matrix_file = new version_matrix_file[result.version_matrix_file_response_array.length];
		
		for(int i = 0; i < result.version_matrix_file_response_array.length; i++)
		{
			result_version_matrix_file[i] = result.version_matrix_file_response_array[i].version_matrix_file[0];
		}
		
		return result_version_matrix_file;
	}
916541
public synchronized void restore(File persistFile, List<File> contentDirs) {
        try {
            FileInputStream fileStream = new FileInputStream(persistFile);
            ObjectInputStream oStream = new ObjectInputStream(fileStream);
            log.info("Restoring changed list from backup: {}", persistFile.getAbsolutePath());
            synchronized (this) {
                LinkedHashMap<String, ChangedFile> fileListFromDisk =
                    (LinkedHashMap<String, ChangedFile>) oStream.readObject();

                //remove files in change list that are not in the content dir list.
                if (contentDirs != null && !contentDirs.isEmpty()) {

                    Iterator<Entry<String, ChangedFile>> entries =
                        fileListFromDisk.entrySet().iterator();
                    while (entries.hasNext()) {
                        Entry<String, ChangedFile> entry = entries.next();
                        ChangedFile file = entry.getValue();
                        boolean watched = false;
                        for (File contentDir : contentDirs) {
                            if (file.getFile()
                                    .getAbsolutePath()
                                    .startsWith(contentDir.getAbsolutePath()) &&
                                !this.fileExclusionManager.isExcluded(file.getFile())) {
                                watched = true;
                                break;
                            }
                        }

                        if (!watched) {
                            entries.remove();
                        }
                    }
                }

                this.fileList = fileListFromDisk;
            }
            oStream.close();
        } catch (Exception e) {
            throw new RuntimeException("Unable to restore File Changed List:" +
                                       e.getMessage(), e);
        }
    }
460183
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		br_disable_responses result = (br_disable_responses) service.get_payload_formatter().string_to_resource(br_disable_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.br_disable_response_array);
		}
		br_disable[] result_br_disable = new br_disable[result.br_disable_response_array.length];
		
		for(int i = 0; i < result.br_disable_response_array.length; i++)
		{
			result_br_disable[i] = result.br_disable_response_array[i].br_disable[0];
		}
		
		return result_br_disable;
	}
359485
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		xen_sf_storagecentervpx_image_responses result = (xen_sf_storagecentervpx_image_responses) service.get_payload_formatter().string_to_resource(xen_sf_storagecentervpx_image_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.xen_sf_storagecentervpx_image_response_array);
		}
		xen_sf_storagecentervpx_image[] result_xen_sf_storagecentervpx_image = new xen_sf_storagecentervpx_image[result.xen_sf_storagecentervpx_image_response_array.length];
		
		for(int i = 0; i < result.xen_sf_storagecentervpx_image_response_array.length; i++)
		{
			result_xen_sf_storagecentervpx_image[i] = result.xen_sf_storagecentervpx_image_response_array[i].xen_sf_storagecentervpx_image[0];
		}
		
		return result_xen_sf_storagecentervpx_image;
	}
211179
public void restoreFile(File destination) throws IOException {
        String nameAsStored = readUTF();
        long lengthAtStoreTime = readLong();
        File storedFile = new File(getAuxiliaryDirectory(),nameAsStored);
        FileUtils.copyFile(storedFile, destination, lengthAtStoreTime);
    }
462818
protected void doRestore(File backupFile) throws BackupException
   {
      if (!PrivilegedFileHelper.exists(backupFile))
      {
         LOG.warn("Nothing to restore for quotas");
         return;
      }

      ZipObjectReader in = null;
      try
      {
         in = new ZipObjectReader(PrivilegedFileHelper.zipInputStream(backupFile));
         quotaPersister.restoreWorkspaceData(rName, wsName, in);
      }
      catch (IOException e)
      {
         throw new BackupException(e);
      }
      finally
      {
         if (in != null)
         {
            try
            {
               in.close();
            }
            catch (IOException e)
            {
               LOG.error("Can't close input stream", e);
            }
         }
      }

      repairDataSize();
   }
1332663
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		xen_hotfix_responses result = (xen_hotfix_responses) service.get_payload_formatter().string_to_resource(xen_hotfix_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.xen_hotfix_response_array);
		}
		xen_hotfix[] result_xen_hotfix = new xen_hotfix[result.xen_hotfix_response_array.length];
		
		for(int i = 0; i < result.xen_hotfix_response_array.length; i++)
		{
			result_xen_hotfix[i] = result.xen_hotfix_response_array[i].xen_hotfix[0];
		}
		
		return result_xen_hotfix;
	}