Class ProjectManifest


  • public class ProjectManifest
    extends Object
    Project manifest.

    Each 1C:Enterprise Development Tools project has manifest file which describes its metadata. This meta information is stored in file {Project_Location}/DT-INF/PROJECT.PMF.

    Project manifest grammar:

     Manifest-Version       ::= manifest version (##.##)
     Runtime-Version        ::= 1C:Enterprise runtime version (##.##.##)
     Store-Version          ::= EDT resource store version (##.##.##)
     Product-Version        ::= EDT product version used for project creation (##.##.##)
     Require-Configuration  ::= comma separated list of required configurations
     Base-Project           ::= base project (for external object projects only) or null
     

    Example:

      Manifest-Version : 1.0
      Runtime-Version : 8.3.8
      Store-Version : 1.0.0
      Product-Version : 1.3.0
      Require-Configuration : BSP
     
    Restriction:
    This class is not intended to be subclassed by clients.
    • Field Detail

      • MANIFEST_ENCODING

        public static final Charset MANIFEST_ENCODING
      • DT_PROJECT_MANIFEST_FILE

        public static final String DT_PROJECT_MANIFEST_FILE
        Project manifest file name.
        See Also:
        Constant Field Values
      • DT_PROJECT_MANIFEST

        public static final String DT_PROJECT_MANIFEST
        Project manifest file relative project path.
        See Also:
        Constant Field Values
      • MANIFEST_VERSION

        public static final String MANIFEST_VERSION
        Project manifest header to specify the project manifest version.
        See Also:
        Constant Field Values
      • RUNTIME_VERSION

        public static final String RUNTIME_VERSION
        Project manifest header to specify the 1c:Enterprise runtime version.
        See Also:
        Constant Field Values
      • STORE_VERSION

        @Deprecated
        public static final String STORE_VERSION
        Deprecated.
        Since 1.10
        Project manifest header to specify the EDT resource store version.
        See Also:
        Constant Field Values
      • PRODUCT_VERSION

        @Deprecated
        public static final String PRODUCT_VERSION
        Deprecated.
        Since 1.10
        Project manifest header to specify the EDT version being used to create the project.
        See Also:
        Constant Field Values
      • REQUIRE_CONFIGURATION

        public static final String REQUIRE_CONFIGURATION
        Project manifest header to specify the project dependencies.
        See Also:
        Constant Field Values
      • BASE_PROJECT

        public static final String BASE_PROJECT
        Project manifest header to specify the base project.
        See Also:
        Constant Field Values
    • Method Detail

      • parseProjectManifest

        public static Map<String,​String> parseProjectManifest​(InputStream manifest)
                                                             throws IOException,
                                                                    ProjectManifestException
        Parses a project manifest and puts the header/value pairs into the returned Map. Only the main section of the manifest is parsed (up to the first blank line). All other sections are ignored. If a header is duplicated then only the last value is stored in the map.

        The supplied input stream is consumed by this method and will be closed.

        An order of the header/value pairs in the returned Map is equal to the original order from an input stream for a project manifest.

        Parameters:
        manifest - an input stream for a project manifest.
        headers - a map used to put the header/value pairs from the bundle manifest (may be null).
        Returns:
        the map with the header/value pairs from the bundle manifest
        Throws:
        ProjectManifestException - if the manifest has an invalid syntax
        IOException - if an error occurs while reading the manifest
      • writeProjectManifest

        @Deprecated
        public static void writeProjectManifest​(OutputStream manifest,
                                                Map<String,​String> headers)
                                         throws IOException
        Writes given header/value pairs into the given output stream.

        The supplied output stream is consumed by this method and will be closed.

        Parameters:
        manifest - an output stream for a project manifest (cannot be null).
        headers - a map used to put the header/value pairs from the bundle manifest (cannot be null).
        Throws:
        IOException - if an error occurs while writing the manifest
      • writeProjectManifest

        public static void writeProjectManifest​(OutputStream manifest,
                                                Map<String,​String> headers,
                                                String lineSeparator)
                                         throws IOException
        Writes given header/value pairs into the given output stream.

        The supplied output stream is consumed by this method and will be closed.

        Parameters:
        manifest - an output stream for a project manifest (cannot be null).
        headers - a map used to put the header/value pairs from the bundle manifest (cannot be null).
        lineSeparator - the line separator to use (cannot be null).
        Throws:
        IOException - if an error occurs while writing the manifest
        Since:
        10.2.0