Package com._1c.g5.v8.dt.compare.merge
Class PostponedFileOperation
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.merge.PostponedFileOperation
-
public class PostponedFileOperation extends Object
Descriptor of the postponed file operation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
PostponedFileOperation.IContentStreamProvider
An interface to be implemented by clients that wish to override default file content getting method.static class
PostponedFileOperation.OperationType
-
Constructor Summary
Constructors Constructor Description PostponedFileOperation(Path targetPath, PostponedFileOperation.OperationType operationType, PostponedFileOperation.IContentStreamProvider contentStreamProvider)
Creates an instance of the descriptor for 2-argument non-delete operations.PostponedFileOperation(Path sourcePath, Path targetPath, PostponedFileOperation.OperationType operationType)
Creates an instance of the descriptor for 2-argument operations.PostponedFileOperation(Path sourcePath, Path targetPath, Path oldTargetPath, PostponedFileOperation.OperationType operationType)
Creates an instance of the descriptor for 3-argument operations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
getContentStream(IMergeSession mergeSession)
Gets the content stream.Path
getOldTargetPath()
Gets the old target path.PostponedFileOperation.OperationType
getOperationType()
Gets the operation type.Path
getSourcePath()
Gets the source path.Path
getTargetPath()
Gets the path to the target file.
-
-
-
Constructor Detail
-
PostponedFileOperation
public PostponedFileOperation(Path sourcePath, Path targetPath, PostponedFileOperation.OperationType operationType)
Creates an instance of the descriptor for 2-argument operations.- Parameters:
sourcePath
- Path to the source file.targetPath
- Path to the target file.operationType
- The type of the postponed operation.
-
PostponedFileOperation
public PostponedFileOperation(Path sourcePath, Path targetPath, Path oldTargetPath, PostponedFileOperation.OperationType operationType)
Creates an instance of the descriptor for 3-argument operations.- Parameters:
sourcePath
- Path to the source file.targetPath
- Path to the target file.oldTargetPath
- Path to the old target file.operationType
- The type of the postponed operation.
-
PostponedFileOperation
public PostponedFileOperation(Path targetPath, PostponedFileOperation.OperationType operationType, PostponedFileOperation.IContentStreamProvider contentStreamProvider)
Creates an instance of the descriptor for 2-argument non-delete operations.- Parameters:
targetPath
- Path to the target file.operationType
- The type of the postponed operation, can bePostponedFileOperation.OperationType.ADD_NEW
,PostponedFileOperation.OperationType.REPLACE_CONTENT
orPostponedFileOperation.OperationType.REPLACE_FILE
.contentStreamProvider
- the content stream provider, cannot benull
.
-
-
Method Detail
-
getContentStream
public InputStream getContentStream(IMergeSession mergeSession)
Gets the content stream. Must not be called if operation type isPostponedFileOperation.OperationType.DELETE
.- Parameters:
mergeSession
- the merge session, cannot benull
.- Returns:
- the content stream, cannot be
null
.
-
getOldTargetPath
public Path getOldTargetPath()
Gets the old target path.- Returns:
- The path to the old target.
-
getOperationType
public PostponedFileOperation.OperationType getOperationType()
Gets the operation type.- Returns:
- The operation type.
-
getSourcePath
public Path getSourcePath()
Gets the source path.- Returns:
- The path to the source folder.
-
getTargetPath
public Path getTargetPath()
Gets the path to the target file.- Returns:
- The path to the target folder.
-
-