Class InfobaseTemplateManifest
- java.lang.Object
-
- com._1c.g5.v8.dt.platform.services.core.infobases.templates.InfobaseTemplateManifest
-
public class InfobaseTemplateManifest extends Object
Infobase template manifest properties instance. Can be used to parse manifest file to properties instance or write manifest properties instance to manifest file.Instances consist of headers key value map and named sections, that also are represented as key value map.
Infobase template manifest file is
*.mft
text file. Example of infobase template manifest file:Vendor=1C Company Name=ManagedApplicationDemo Version=1.0.18.5 AppVersion=8.3 [Config1] Catalog=Managed application demo/Managed application demo 1.0 Source=1Cv8.cf [Config2] Catalog=Managed application demo/Managed application demo 1.0 (demo) Source=1Cv8.dt
The example above will be parsed into manifest instance with headers map with keys
Vendor
,Name
,Version
andAppVersion
, and two named sections with namesConfig1
andConfig2
and both with map with keysCatalog
andSource
.- See Also:
IPlatformFileExtensions.MFT
-
-
Field Summary
Fields Modifier and Type Field Description static String
CATALOG_DELIMITER
Catalog path delimiter.static String
CONFIGURAION_LOCATION
Relative path to the Configuration*.cf
,*.cfu
or*.dt
file.static String
INFOBASE_DEFAULT_LOCATION
Default location of the infobase to create for this applied solution.static Charset
MANIFEST_ENCODING
static String
RUNTIME_VERSION
Version of 1C:Enterprise Rutnime that was used to create this solution delivery.static String
SOLUTION_CATALOG
Applied solution catalog path.static String
SOLUTION_NAME
Name of the applied solution.static String
SOLUTION_VENDOR
Vendor of the applied solution.static String
SOLUTION_VERSION
Version of the applied solution.
-
Constructor Summary
Constructors Constructor Description InfobaseTemplateManifest()
Constructor ofInfobaseTemplateManifest
.InfobaseTemplateManifest(Map<String,String> headers, Map<String,Map<String,String>> sections)
Constructor ofInfobaseTemplateManifest
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getHeader(String headerKey)
Returns header value by the given key.Map<String,String>
getHeaders()
Returns headers map.Map<String,String>
getSection(String sectionKey)
Returns section key value map by the given section name.Map<String,Map<String,String>>
getSections()
Returns all named sections map.static InfobaseTemplateManifest
parseManifest(InputStream manifest)
Parse manifest content input stream to the manfiest properties.void
writeManifest(OutputStream manifest)
Write manifest instance into the output stream.
-
-
-
Field Detail
-
MANIFEST_ENCODING
public static final Charset MANIFEST_ENCODING
-
SOLUTION_NAME
public static final String SOLUTION_NAME
Name of the applied solution.- See Also:
- Constant Field Values
-
SOLUTION_VENDOR
public static final String SOLUTION_VENDOR
Vendor of the applied solution.- See Also:
- Constant Field Values
-
SOLUTION_VERSION
public static final String SOLUTION_VERSION
Version of the applied solution.- See Also:
- Constant Field Values
-
RUNTIME_VERSION
public static final String RUNTIME_VERSION
Version of 1C:Enterprise Rutnime that was used to create this solution delivery.- See Also:
- Constant Field Values
-
CONFIGURAION_LOCATION
public static final String CONFIGURAION_LOCATION
Relative path to the Configuration*.cf
,*.cfu
or*.dt
file.- See Also:
- Constant Field Values
-
SOLUTION_CATALOG
public static final String SOLUTION_CATALOG
Applied solution catalog path.- See Also:
- Constant Field Values
-
INFOBASE_DEFAULT_LOCATION
public static final String INFOBASE_DEFAULT_LOCATION
Default location of the infobase to create for this applied solution.- See Also:
- Constant Field Values
-
CATALOG_DELIMITER
public static final String CATALOG_DELIMITER
Catalog path delimiter.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InfobaseTemplateManifest
public InfobaseTemplateManifest(Map<String,String> headers, Map<String,Map<String,String>> sections)
Constructor ofInfobaseTemplateManifest
.- Parameters:
headers
- the headers key value map, cannot benull
sections
- the sections named key value maps, cannot benull
-
InfobaseTemplateManifest
public InfobaseTemplateManifest()
Constructor ofInfobaseTemplateManifest
.
-
-
Method Detail
-
parseManifest
public static InfobaseTemplateManifest parseManifest(InputStream manifest) throws IOException
Parse manifest content input stream to the manfiest properties.- Parameters:
manifest
- the manifest input stream to parse, cannot benull
- Returns:
- the parsed manifest proeprties, never
null
- Throws:
IOException
- if parse I/O error occurred
-
writeManifest
public void writeManifest(OutputStream manifest) throws IOException
Write manifest instance into the output stream.- Parameters:
manifest
- the manifest output stream to parse, cannot benull
- Throws:
IOException
- if write I/O error occurred
-
getHeaders
public Map<String,String> getHeaders()
Returns headers map.- Returns:
- headers map, never
null
-
getHeader
public String getHeader(String headerKey)
Returns header value by the given key. Can returnnull
.- Parameters:
headerKey
- the header key, cannot benull
- Returns:
- a header value by the given key or
null
if none
-
getSections
public Map<String,Map<String,String>> getSections()
Returns all named sections map.- Returns:
- all named sections map, never
null
-
-