Class TransformCommand
java.lang.Object
com.linecorp.centraldogma.server.command.RepositoryCommand<CommitResult>
com.linecorp.centraldogma.server.command.TransformCommand
- All Implemented Interfaces:
Command<CommitResult>
,NormalizableCommit
public final class TransformCommand
extends RepositoryCommand<CommitResult>
implements NormalizableCommit
A
Command
that transforms the content at the base revision with
the specified ContentTransformer
and pushed the result of transformation.
You can find the result of transformation from CommitResult.changes()
.
Note that this command is not serialized and deserialized.-
Method Summary
Modifier and TypeMethodDescriptionasIs
(CommitResult commitResult) Returns a newPushAsIsCommand
which is converted usingCommitResult
for replicating to other replicas.final Author
author()
Returns the author who initiated the command.Returns the baseRevision
.detail()
Returns the human-readable detail of the commit.markup()
static TransformCommand
of
(Long timestamp, Author author, String projectName, String repositoryName, Revision baseRevision, String summary, String detail, Markup markup, ContentTransformer<?> transformer) Creates a new instance.summary()
Returns the human-readable summary of the commit.final long
Returns the time when performing the command, in milliseconds.final String
toString()
Returns theContentTransformer
which is used for transforming the content.final CommandType
type()
Returns theCommandType
of the command.Methods inherited from class com.linecorp.centraldogma.server.command.RepositoryCommand
equals, executionPath, hashCode, projectName, repositoryName
-
Method Details
-
of
public static TransformCommand of(@Nullable Long timestamp, @Nullable Author author, String projectName, String repositoryName, Revision baseRevision, String summary, String detail, Markup markup, ContentTransformer<?> transformer) Creates a new instance. -
baseRevision
Returns the baseRevision
. -
summary
Returns the human-readable summary of the commit. -
detail
Returns the human-readable detail of the commit. -
markup
-
transformer
Returns theContentTransformer
which is used for transforming the content. -
asIs
Description copied from interface:NormalizableCommit
Returns a newPushAsIsCommand
which is converted usingCommitResult
for replicating to other replicas.- Specified by:
asIs
in interfaceNormalizableCommit
-
type
Description copied from interface:Command
Returns theCommandType
of the command. -
timestamp
public final long timestamp()Description copied from interface:Command
Returns the time when performing the command, in milliseconds. -
author
Description copied from interface:Command
Returns the author who initiated the command. -
toString
-