Skip to content
Draft
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
@@ -0,0 +1,106 @@
package com.dotcms.rest.api.v1.publishing;

import com.dotcms.annotations.Nullable;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import org.immutables.value.Value;

/**
* Result view for a single bundle retry operation.
* Contains success/failure status and details about the retry attempt.
*
* @author hassandotcms
* @since Feb 2026
*/
@Value.Style(typeImmutable = "*", typeAbstract = "Abstract*")
@Value.Immutable
@JsonSerialize(as = RetryBundleResultView.class)
@JsonDeserialize(as = RetryBundleResultView.class)
@Schema(description = "Result of a single bundle retry operation")
public interface AbstractRetryBundleResultView {

/**
* The bundle identifier that was processed.
*
* @return Bundle ID
*/
@Schema(
description = "Bundle identifier that was processed",
example = "01HQXYZ123456789ABCDEFGHIJ",
requiredMode = Schema.RequiredMode.REQUIRED
)
String bundleId();

/**
* Whether the retry operation was successful.
*
* @return true if bundle was successfully re-queued
*/
@Schema(
description = "Whether the retry operation was successful",
example = "true",
requiredMode = Schema.RequiredMode.REQUIRED
)
boolean success();

/**
* Human-readable message describing the result.
*
* @return Result message
*/
@Schema(
description = "Human-readable message describing the result",
example = "Bundle successfully re-queued for publishing",
requiredMode = Schema.RequiredMode.REQUIRED
)
String message();

/**
* Whether force push was applied (null if retry failed).
*
* @return Force push flag or null
*/
@Schema(
description = "Whether force push was applied to this bundle",
example = "true"
)
@Nullable
Boolean forcePush();

/**
* The publishing operation type: PUBLISH or UNPUBLISH (null if retry failed).
*
* @return Operation type or null
*/
@Schema(
description = "Publishing operation type",
example = "PUBLISH"
)
@Nullable
String operation();

/**
* The delivery strategy used for this retry.
*
* @return Delivery strategy name
*/
@Schema(
description = "Delivery strategy used: ALL_ENDPOINTS or FAILED_ENDPOINTS",
example = "FAILED_ENDPOINTS",
requiredMode = Schema.RequiredMode.REQUIRED
)
String deliveryStrategy();

/**
* Number of assets in the bundle (null if retry failed).
*
* @return Asset count or null
*/
@Schema(
description = "Number of assets in the bundle",
example = "47"
)
@Nullable
Integer assetCount();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package com.dotcms.rest.api.v1.publishing;

import com.dotcms.publishing.PublisherConfig.DeliveryStrategy;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import org.immutables.value.Value;

import java.util.List;

/**
* Form for retrying failed or successful bundles.
* Supports bulk operations where multiple bundles can be retried in a single request.
*
* @author hassandotcms
* @since Feb 2026
*/
@Value.Style(typeImmutable = "*", typeAbstract = "Abstract*")
@Value.Immutable
@JsonSerialize(as = RetryBundlesForm.class)
@JsonDeserialize(as = RetryBundlesForm.class)
@Schema(description = "Request body for retrying publishing bundles")
public interface AbstractRetryBundlesForm {

/**
* List of bundle identifiers to retry.
*
* @return List of bundle IDs
*/
@Schema(
description = "List of bundle identifiers to retry",
example = "[\"bundle-123\", \"bundle-456\"]",
requiredMode = Schema.RequiredMode.REQUIRED
)
List<String> bundleIds();

/**
* Force push flag to override push history.
* When true, the bundle will be re-published even if it was previously successful.
* Note: For bundles with SUCCESS or SUCCESS_WITH_WARNINGS status, this is automatically set to true.
*
* @return Force push flag (default: false)
*/
@Schema(
description = "Force push to override existing content at endpoints. " +
"Automatically true for SUCCESS/SUCCESS_WITH_WARNINGS bundles.",
example = "false"
)
@Value.Default
default boolean forcePush() {
return false;
}

/**
* Delivery strategy determining which endpoints receive the retry.
*
* @return Delivery strategy (default: ALL_ENDPOINTS)
*/
@Schema(
description = "Which endpoints to retry: ALL_ENDPOINTS sends to all, " +
"FAILED_ENDPOINTS sends only to previously failed endpoints",
example = "FAILED_ENDPOINTS"
)
@Value.Default
default DeliveryStrategy deliveryStrategy() {
return DeliveryStrategy.ALL_ENDPOINTS;
}
}
Loading
Loading