Package com._1c.g5.v8.dt.core.platform
Class ProjectManifest
- java.lang.Object
-
- com._1c.g5.v8.dt.core.platform.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 Summary
Fields Modifier and Type Field Description static String
BASE_PROJECT
Project manifest header to specify the base project.static String
DT_INF_FOLDER
Project manifest folder name.static String
DT_PROJECT_MANIFEST
Project manifest file relative project path.static String
DT_PROJECT_MANIFEST_FILE
Project manifest file name.static Charset
MANIFEST_ENCODING
static String
MANIFEST_VERSION
Project manifest header to specify the project manifest version.static String
PRODUCT_VERSION
Deprecated.Since 1.10static String
REQUIRE_CONFIGURATION
Project manifest header to specify the project dependencies.static String
RUNTIME_VERSION
Project manifest header to specify the 1c:Enterprise runtime version.static String
STORE_VERSION
Deprecated.Since 1.10
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Map<String,String>
parseProjectManifest(InputStream manifest)
Parses a project manifest and puts the header/value pairs into the returned Map.static void
writeProjectManifest(OutputStream manifest, Map<String,String> headers)
Deprecated.static void
writeProjectManifest(OutputStream manifest, Map<String,String> headers, String lineSeparator)
Writes given header/value pairs into the given output stream.
-
-
-
Field Detail
-
MANIFEST_ENCODING
public static final Charset MANIFEST_ENCODING
-
DT_INF_FOLDER
public static final String DT_INF_FOLDER
Project manifest folder name.- See Also:
- Constant Field Values
-
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.10Project 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.10Project 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 benull
).- Returns:
- the map with the header/value pairs from the bundle manifest
- Throws:
ProjectManifestException
- if the manifest has an invalid syntaxIOException
- if an error occurs while reading the manifest
-
writeProjectManifest
@Deprecated public static void writeProjectManifest(OutputStream manifest, Map<String,String> headers) throws IOException
Deprecated.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 benull
).headers
- a map used to put the header/value pairs from the bundle manifest (cannot benull
).- 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 benull
).headers
- a map used to put the header/value pairs from the bundle manifest (cannot benull
).lineSeparator
- the line separator to use (cannot benull
).- Throws:
IOException
- if an error occurs while writing the manifest- Since:
- 10.2.0
-
-