Interface IInfobasePublicationStore
-
public interface IInfobasePublicationStore
Stores and loads infobase publications. Publications settings are located in the publication store file. By default, it is filedefault.vrd
in the directory of the virtual application.IInfobasePublicationStore
allows to create publication store file with publication content, to load or to edit existing publication configurations store files.
-
-
Field Summary
Fields Modifier and Type Field Description static String
STORE_DEFAULT_NAME
The default name, using by 1C:Enterprise runtime as infobase publication store file name.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
delete(Path storeLocation)
Deletes the publication store file by the given path.InfobasePublication
load(Path storeLocation)
Reads infobase publication store file to the instance ofInfobasePublication
.void
store(InfobasePublication publication)
Creates a publication configuration file fromInfobasePublication
instance.org.eclipse.core.runtime.IStatus
validate(InfobasePublication publication)
Validates the given publication instance and returns validation status.
-
-
-
Field Detail
-
STORE_DEFAULT_NAME
static final String STORE_DEFAULT_NAME
The default name, using by 1C:Enterprise runtime as infobase publication store file name.Value is
default.vrd
.- See Also:
- Constant Field Values
-
-
Method Detail
-
store
void store(InfobasePublication publication) throws WebServerAccessException
Creates a publication configuration file fromInfobasePublication
instance.Infobase publication instance contains all information such as name, infobase location, pool settings, etc. Publication will be serialized as configuration file in XML format.
The publication instance must contain at least:
- Name
- Infobase connection
- Location
- Parameters:
publication
- the infobase publication to serialize to the configuration file, cannot benull
- Throws:
WebServerAccessException
- if storing fails with some reason; reasons include:- Incorrect publication format
- I/O errors
-
load
InfobasePublication load(Path storeLocation) throws WebServerAccessException
Reads infobase publication store file to the instance ofInfobasePublication
.Publication instance will be
validated
after loading.- Parameters:
storeLocation
- a path to the infobase publication store file, cannot benull
- Returns:
- a loaded instance of infobase publication, never
null
- Throws:
WebServerAccessException
- if configuration file parse errors occurred
-
delete
boolean delete(Path storeLocation) throws WebServerAccessException
Deletes the publication store file by the given path. Returns whether the specified publication store was actually deleted.- Parameters:
storeLocation
- a path to the infobase publication store file, cannot benull
- Returns:
- whether specified publication store was actually deleted
- Throws:
WebServerAccessException
- if delete fails with some reason, e.g. access denied
-
validate
org.eclipse.core.runtime.IStatus validate(InfobasePublication publication)
Validates the given publication instance and returns validation status. Validates publication fields content, syntax, target infobase existence, etc.Returned status will always be a multi-status with children.
- Parameters:
publication
- the publication to validate, cannot benull
- Returns:
- validation status with errors and warnings or
OK
status if publication content is correct, always will be a multi-status
-
-