protected int addFile(File file) {
        // at the moment we assume all files are read only. To overwrite a file
        // we use FILE_MODIFY
        if (super.contains(file.getName())) {
            return DataGridTags.FILE_ADD_ERROR_EXIST_READ_ONLY;
        }

        // check storage space first
        if (storageList_.size() <= 0) {
            return DataGridTags.FILE_ADD_ERROR_STORAGE_FULL;
        }

        Storage tempStorage = null;
        int msg = DataGridTags.FILE_ADD_ERROR_STORAGE_FULL;

        for (int i = 0; i < storageList_.size(); i++) {
            tempStorage = (Storage) storageList_.get(i);
            if (tempStorage.getAvailableSpace() >= file.getSize()) {
                tempStorage.addFile(file);
                msg = DataGridTags.FILE_ADD_SUCCESSFUL;
                break;
            }
        }

        return msg;
    }