Class 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 and AppVersion, and two named sections with names Config1 and Config2 and both with map with keys Catalog and Source.

    See Also:
    IPlatformFileExtensions.MFT
    • Field Detail

      • MANIFEST_ENCODING

        public static final Charset MANIFEST_ENCODING
      • 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
      • 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
    • 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 be null
        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 be null
        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 return null.
        Parameters:
        headerKey - the header key, cannot be null
        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
      • getSection

        public Map<String,​String> getSection​(String sectionKey)
        Returns section key value map by the given section name. Can return null.
        Parameters:
        sectionKey - the section name, cannot be null
        Returns:
        a section key value map by the given section name or null if none