Interface IInfobaseReferenceStore
-
public interface IInfobaseReferenceStore
1C:Enterprise infobase references file-based persistence store. 1C:Enterprise stores infobase references as tree section structure with infobases and groups. All sections are stored in single file as plain list.IInfobaseReferenceStore
provides API to save and load infobase reference sections list in the same format as 1C:Enterprise does.Cliens may use
IInfobaseManager
to get and save infobase references in default 1C:Enteprise locations.- See Also:
IInfobaseManager
-
-
Field Summary
Fields Modifier and Type Field Description static String
STORE_FILE_NAME
File name of the infobase references store, used by 1C:Enterprise.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Pair<List<Section>,org.eclipse.core.runtime.IStatus>
load(Path location, Path... externalLocations)
Loads all persisted infobase references sections from the provided file storelocation
and the provided external infobase referenceslocations
.void
save(List<Section> sections, Path location)
Saves infobase reference sections in the provided filelocation
.
-
-
-
Field Detail
-
STORE_FILE_NAME
static final String STORE_FILE_NAME
File name of the infobase references store, used by 1C:Enterprise. Value is "ibases.v8i".- See Also:
- Constant Field Values
-
-
Method Detail
-
load
Pair<List<Section>,org.eclipse.core.runtime.IStatus> load(Path location, Path... externalLocations) throws IOException
Loads all persisted infobase references sections from the provided file storelocation
and the provided external infobase referenceslocations
. Builds and returns a single section tree with stored sections content. Locations, that are not a regular files will be ignored.Returns a pair:
- The list of top-level sections of the tree section structure content.
- The status of loading with store section content errors. May be multi-status with warnings of the stored
infobase references content, such as illegal headers or
OK
status if there are no errors.
- Parameters:
location
- the location of infobase references store file, cannot benull
externalLocations
- the locations of external infobase references store files, may be empty, cannot benull
- Returns:
- a pair of the list of loaded infobase references sections and the loading status, never
null
- Throws:
IOException
- if an I/O load error occurred
-
save
void save(List<Section> sections, Path location) throws IOException
Saves infobase reference sections in the provided filelocation
. The providedsections
are indended to be top-level sections with tree section structure content.If the provided store
location
file does not exist, it will be created with all necessary parent directories.- Parameters:
sections
- the list of infobase references sections to save, cannot benull
location
- the location of infobase references store file, cannot benull
- Throws:
IOException
- if an I/O save error occurred
-
-