Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public Priority getPriority() {
* the result if called multiple times.
*/
@Nullable
public String getStaticSummary() {
public String getSummary() {
if (!response.getInfo().getUserMetadata().hasSummary()) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static final class Builder {
ActivityIdConflictPolicy.ACTIVITY_ID_CONFLICT_POLICY_UNSPECIFIED;
private @Nullable RetryOptions retryOptions;
private @Nullable SearchAttributes typedSearchAttributes;
private @Nullable String staticSummary;
private @Nullable String summary;
private @Nullable String staticDetails;
private @Nullable Priority priority;
private @Nullable Duration startDelay;
Expand All @@ -63,7 +63,7 @@ private Builder(StartActivityOptions options) {
this.idConflictPolicy = options.idConflictPolicy;
this.retryOptions = options.retryOptions;
this.typedSearchAttributes = options.typedSearchAttributes;
this.staticSummary = options.staticSummary;
this.summary = options.summary;
this.staticDetails = options.staticDetails;
this.priority = options.priority;
this.startDelay = options.startDelay;
Expand Down Expand Up @@ -148,8 +148,8 @@ public Builder setTypedSearchAttributes(SearchAttributes typedSearchAttributes)
}

/** Short static summary for UI display; encoded as a payload in UserMetadata. */
public Builder setStaticSummary(String staticSummary) {
this.staticSummary = staticSummary;
public Builder setSummary(String summary) {
this.summary = summary;
return this;
}

Expand Down Expand Up @@ -200,7 +200,7 @@ public StartActivityOptions build() {
private final ActivityIdConflictPolicy idConflictPolicy;
private final @Nullable RetryOptions retryOptions;
private final @Nullable SearchAttributes typedSearchAttributes;
private final @Nullable String staticSummary;
private final @Nullable String summary;
private final @Nullable String staticDetails;
private final @Nullable Priority priority;
private final @Nullable Duration startDelay;
Expand All @@ -216,7 +216,7 @@ private StartActivityOptions(Builder builder) {
this.idConflictPolicy = builder.idConflictPolicy;
this.retryOptions = builder.retryOptions;
this.typedSearchAttributes = builder.typedSearchAttributes;
this.staticSummary = builder.staticSummary;
this.summary = builder.summary;
this.staticDetails = builder.staticDetails;
this.priority = builder.priority;
this.startDelay = builder.startDelay;
Expand Down Expand Up @@ -273,8 +273,8 @@ public SearchAttributes getTypedSearchAttributes() {
}

@Nullable
public String getStaticSummary() {
return staticSummary;
public String getSummary() {
return summary;
}

@Nullable
Expand Down Expand Up @@ -307,7 +307,7 @@ public boolean equals(Object o) {
&& idConflictPolicy == that.idConflictPolicy
&& Objects.equals(retryOptions, that.retryOptions)
&& Objects.equals(typedSearchAttributes, that.typedSearchAttributes)
&& Objects.equals(staticSummary, that.staticSummary)
&& Objects.equals(summary, that.summary)
&& Objects.equals(staticDetails, that.staticDetails)
&& Objects.equals(priority, that.priority)
&& Objects.equals(startDelay, that.startDelay);
Expand All @@ -326,7 +326,7 @@ public int hashCode() {
idConflictPolicy,
retryOptions,
typedSearchAttributes,
staticSummary,
summary,
staticDetails,
priority,
startDelay);
Expand Down Expand Up @@ -356,7 +356,7 @@ public String toString() {
+ ", typedSearchAttributes="
+ typedSearchAttributes
+ ", staticSummary='"
+ staticSummary
+ summary
+ "', staticDetails='"
+ staticDetails
+ "', priority="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ public StartActivityOutput startActivity(StartActivityInput input) {
request.setSearchAttributes(
SearchAttributesUtil.encodeTyped(options.getTypedSearchAttributes()));
}
if (options.getStaticSummary() != null || options.getStaticDetails() != null) {
if (options.getSummary() != null || options.getStaticDetails() != null) {
UserMetadata userMetadata =
makeUserMetaData(options.getStaticSummary(), options.getStaticDetails(), dc);
makeUserMetaData(options.getSummary(), options.getStaticDetails(), dc);
if (userMetadata != null) {
request.setUserMetadata(userMetadata);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void testToBuilderPreservesAllFields() {
.setIdReusePolicy(ActivityIdReusePolicy.ACTIVITY_ID_REUSE_POLICY_REJECT_DUPLICATE)
.setIdConflictPolicy(ActivityIdConflictPolicy.ACTIVITY_ID_CONFLICT_POLICY_FAIL)
.setRetryOptions(retry)
.setStaticSummary("summary")
.setSummary("summary")
.setStaticDetails("details")
.setPriority(priority)
.setStartDelay(Duration.ofSeconds(7))
Expand All @@ -107,7 +107,7 @@ public void testToBuilderPreservesAllFields() {
ActivityIdReusePolicy.ACTIVITY_ID_REUSE_POLICY_REJECT_DUPLICATE, copy.getIdReusePolicy());
assertEquals(
ActivityIdConflictPolicy.ACTIVITY_ID_CONFLICT_POLICY_FAIL, copy.getIdConflictPolicy());
assertEquals("summary", copy.getStaticSummary());
assertEquals("summary", copy.getSummary());
assertEquals("details", copy.getStaticDetails());
assertEquals(priority, copy.getPriority());
assertEquals(Duration.ofSeconds(7), copy.getStartDelay());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import io.temporal.client.*;
import io.temporal.common.RetryOptions;
import io.temporal.common.interceptors.ActivityClientCallsInterceptor;
import io.temporal.common.interceptors.ActivityClientCallsInterceptor.*;
import io.temporal.common.interceptors.ActivityClientCallsInterceptorBase;
import io.temporal.common.interceptors.ActivityClientInterceptorBase;
import io.temporal.failure.ApplicationFailure;
Expand Down Expand Up @@ -417,7 +416,7 @@ public void testDescribeUserMetadataIsAccurate() {
.setId(uniqueId())
.setTaskQueue(testWorkflowRule.getTaskQueue())
.setScheduleToCloseTimeout(Duration.ofMinutes(5))
.setStaticSummary("Test summary")
.setSummary("Test summary")
.setStaticDetails("Test details\nLine 2")
.build();

Expand All @@ -426,7 +425,7 @@ public void testDescribeUserMetadataIsAccurate() {
handle.getResult();

ActivityExecutionDescription desc = handle.describe();
assertEquals("Test summary", desc.getStaticSummary());
assertEquals("Test summary", desc.getSummary());
assertEquals("Test details\nLine 2", desc.getStaticDetails());
}

Expand Down
Loading