Class CommitEditor
- All Implemented Interfaces:
 ISVNEditor
public class CommitEditor extends JNIObject implements ISVNEditor
- Since:
 - 1.9
 
- 
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.subversion.javahl.ISVNEditor
ISVNEditor.GetNodeKindCallback, ISVNEditor.ProvideBaseCallback, ISVNEditor.ProvidePropsCallback - 
Field Summary
Fields Modifier and Type Field Description protected RemoteSessionsessionStores a reference to the session that created this editor. - 
Constructor Summary
Constructors Modifier Constructor Description protectedCommitEditor(long cppAddr, RemoteSession session)This constructor is called from the factory to get an instance. - 
Method Summary
Modifier and Type Method Description voidabort()Signal that the edit transmission was not successful.voidaddAbsent(String relativePath, NodeKind kind, long replacesRevision)Create an "absent" node of kindkindatrelativePath.voidaddDirectory(String relativePath, Iterable<String> children, Map<String,byte[]> properties, long replacesRevision)Create a new directory atrelativePath.voidaddFile(String relativePath, Checksum checksum, InputStream contents, Map<String,byte[]> properties, long replacesRevision)Create a new file atrelativePath.voidaddSymlink(String relativePath, String target, Map<String,byte[]> properties, long replacesRevision)Note: Not implemented.voidalterDirectory(String relativePath, long revision, Iterable<String> children, Map<String,byte[]> properties)Alter the properties of the directory atrelativePath.voidalterFile(String relativePath, long revision, Checksum checksum, InputStream contents, Map<String,byte[]> properties)Alter the contents and/or the properties of the file atrelativePathwithrevisionas its expected revision.voidalterSymlink(String relativePath, long revision, String target, Map<String,byte[]> properties)Note: Not implemented.voidcomplete()Signal that the edit has been completed successfully.voidcopy(String sourceRelativePath, long sourceRevision, String destinationRelativePath, long replacesRevision)Move the node atsourceRelativePathtodestinationRelativePath.voiddelete(String relativePath, long revision)Delete the existing node atrelativePath, expected to be identical to revisionrevisionof that path.voiddispose()Release the native peer (should not depend on finalize), and abort the edit if it has not been completed yet.voidfinalize()voidmove(String sourceRelativePath, long sourceRevision, String destinationRelativePath, long replacesRevision)Move the node atsourceRelativePathtodestinationRelativePath. 
- 
Field Details
- 
session
Stores a reference to the session that created this editor. 
 - 
 - 
Constructor Details
- 
CommitEditor
This constructor is called from the factory to get an instance. 
 - 
 - 
Method Details
- 
dispose
public void dispose()Description copied from interface:ISVNEditorRelease the native peer (should not depend on finalize), and abort the edit if it has not been completed yet.- Specified by:
 disposein interfaceISVNEditor
 - 
addDirectory
public void addDirectory(String relativePath, Iterable<String> children, Map<String,byte[]> properties, long replacesRevision) throws ClientExceptionDescription copied from interface:ISVNEditorCreate a new directory atrelativePath. The immediate parent ofrelativePathis expected to exist.For descriptions of
propertiesandreplacesRevision, see #addFile().A complete listing of the immediate children of
relativePaththat will be added subsequently is given inchildren.childrenis a collection of const strings, each giving the basename of an immediate child. It is an error to passnullforchildren; use an empty collection to indicate that the new directory will have no children.- Specified by:
 addDirectoryin interfaceISVNEditor- Throws:
 ClientException
 - 
addFile
public void addFile(String relativePath, Checksum checksum, InputStream contents, Map<String,byte[]> properties, long replacesRevision) throws ClientExceptionDescription copied from interface:ISVNEditorCreate a new file atrelativePath. The immediate parent ofrelativePathis expected to exist.The file's contents are specified in
contentswhich has a checksum matchingchecksum. Both values must be non-null.Set the properties of the new file to
properties. If no properties are being set on the new file,propertiesmust be empty. It is an error to passnullforproperties.If this add is expected to replace a previously existing file, symlink or directory at
relativePath, the revision number of the node to be replaced must be given inreplacesRevision. Otherwise,replacesRevisionmust be Revision.SVN_INVALID_REVNUM.Note: It is not allowed to call a "delete" followed by an "add" on the same path. Instead, an "add" with
replacesRevisionset accordingly must be used.Note: The
contentsstream's lifetime must not extend beyond the scope of this function. An implementation must close the stream after consuming its contents.- Specified by:
 addFilein interfaceISVNEditor- Throws:
 ClientException
 - 
addSymlink
public void addSymlink(String relativePath, String target, Map<String,byte[]> properties, long replacesRevision) throws ClientExceptionNote: Not implemented.- Specified by:
 addSymlinkin interfaceISVNEditor- Throws:
 ClientException
 - 
addAbsent
public void addAbsent(String relativePath, NodeKind kind, long replacesRevision) throws ClientExceptionDescription copied from interface:ISVNEditorCreate an "absent" node of kindkindatrelativePath. The immediate parent ofrelativePathis expected to exist. For a description ofreplacesRevision, see #addFile().- Specified by:
 addAbsentin interfaceISVNEditor- Throws:
 ClientException
 - 
alterDirectory
public void alterDirectory(String relativePath, long revision, Iterable<String> children, Map<String,byte[]> properties) throws ClientExceptionDescription copied from interface:ISVNEditorAlter the properties of the directory atrelativePath.revisionspecifies the revision at which the receiver should expect to find this node. That is,relativePathat the start of the whole edit andrelativePathatrevisionmust lie within the same node-rev (aka location history segment). This information may be used to catch an attempt to alter and out-of-date directory. If the directory does not have a corresponding revision in the repository (e.g. it has not yet been committed), thenrevisionshould be Revision.SVN_INVALID_REVNUM.If any changes to the set of children will be made in the future of the edit drive, then
childrenmust specify the resulting set of children. See #addDirectory() for the format ofchildren. If not changes will be made, then NULL may be specified.For a description of
properties, see #addFile(). If no changes to the properties will be made (ie. only future changes to the set of children), thenpropertiesmay benull.- Specified by:
 alterDirectoryin interfaceISVNEditor- Throws:
 ClientException
 - 
alterFile
public void alterFile(String relativePath, long revision, Checksum checksum, InputStream contents, Map<String,byte[]> properties) throws ClientExceptionDescription copied from interface:ISVNEditorAlter the contents and/or the properties of the file atrelativePathwithrevisionas its expected revision. See #alterDirectory() for more information aboutrevision.If
contentsis non-null, then the stream will be copied to the file, and its checksum must matchchecksum(which must also be non-null). Ifcontentsisnull, thenchecksummust also benull, and no change will be applied to the file's contents.If
propertiesis non-null, then the properties will be applied.For a description of
checksumandcontents, see #addFile().This function allows
propertiesto benull, but the parameter is otherwise described by #addFile().Note: The
contentsstream's lifetime must not extend beyond the scope of this function. An implementation must close the stream after consuming its contents.- Specified by:
 alterFilein interfaceISVNEditor- Throws:
 ClientException
 - 
alterSymlink
public void alterSymlink(String relativePath, long revision, String target, Map<String,byte[]> properties) throws ClientExceptionNote: Not implemented.- Specified by:
 alterSymlinkin interfaceISVNEditor- Throws:
 ClientException
 - 
delete
Description copied from interface:ISVNEditorDelete the existing node atrelativePath, expected to be identical to revisionrevisionof that path.- Specified by:
 deletein interfaceISVNEditor- Throws:
 ClientException
 - 
copy
public void copy(String sourceRelativePath, long sourceRevision, String destinationRelativePath, long replacesRevision) throws ClientExceptionDescription copied from interface:ISVNEditorMove the node atsourceRelativePathtodestinationRelativePath.For a description of
replacesRevision, see #addFile().Note: See the general instructions on paths for this API. Sice the
sourceRelativePathargument must generally be able to reference any node in the repository, the implication is that the editor's root must be the repository root.- Specified by:
 copyin interfaceISVNEditor- Throws:
 ClientException
 - 
move
public void move(String sourceRelativePath, long sourceRevision, String destinationRelativePath, long replacesRevision) throws ClientExceptionDescription copied from interface:ISVNEditorMove the node atsourceRelativePathtodestinationRelativePath.sourceRevisionspecifies the revision at which the receiver should expect to find this node. That is,sourceRelativePathat the start of the whole edit andsourceRelativePathatsourceRevisionmust lie within the same node-rev (aka history-segment). This is just like the #delete().For a description of
replacesRevision, see #addFile().- Specified by:
 movein interfaceISVNEditor- Throws:
 ClientException
 - 
complete
Description copied from interface:ISVNEditorSignal that the edit has been completed successfully. After this method is called, the editor is considered closed.- Specified by:
 completein interfaceISVNEditor- Throws:
 ClientException
 - 
abort
Description copied from interface:ISVNEditorSignal that the edit transmission was not successful. After this method is called, the editor is considered closed.- Specified by:
 abortin interfaceISVNEditor- Throws:
 ClientException
 - 
finalize
 
 -