replication
БесплатноБез исполняемых скриптовНе проверенPublish, deactivate, and delete AEM content programmatically via the Cloud Service Replication API (com.day.cq.replication). Covers single-path and bulk…
от adobe★ 342 звезды на GitHubОб этом скилле
AEM Cloud Service Replication API
Programmatic content publishing and unpublishing using the official AEM Replication API.
When to Use This Skill
Use the Replication API for programmatic content distribution:
- Custom OSGi services that publish content
- Workflow process steps requiring activation
- Automated publishing pipelines
- Integration with external systems
- Bulk operations (with proper constraints)
For UI-based publishing, use Manage Publication or Quick Publish instead.
Official API Documentation
Key Classes:
com.day.cq.replication.Replicator- Main replication servicecom.day.cq.replication.ReplicationOptions- Configuration optionscom.day.cq.replication.ReplicationStatus- Publication statuscom.day.cq.replication.ReplicationActionType- Action types (ACTIVATE, DEACTIVATE, DELETE, TEST)
Basic Replication: Single Path
Example: Activate a Page
import com.day.cq.replication.Replicator;
import com.day.cq.replication.ReplicationActionType;
import com.day.cq.replication.ReplicationException;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import javax.jcr.Session;
@Component(service = ContentPublisher.class)
public class ContentPublisher {
@Reference
private Replicator replicator;
/**
* Activate a single page to Publish tier
*/
public void publishPage(Session session, String pagePath)
throws ReplicationException {
replicator.replicate(
session,
ReplicationActionType.ACTIVATE,
pagePath
);
}
/**
* Deactivate a page from Publish tier
*/
public void unpublishPage(Session session, String pagePath)
throws ReplicationException {
replicator.replicate(
session,
ReplicationActionType.DEACTIVATE,
pagePath
);
}
/**
* Delete content from Publish tier
*/
public void deleteFromPublish(Session session, String path)
throws ReplicationException {
replicator.replicate(
session,
ReplicationActionType.DELETE,
path
);
}
}
Bulk Replication: Multiple Paths
CONSTRAINTS (per official Javadoc):
- Recommended limit: 100 paths per call for a transactional guarantee
- Above 100 paths: the system automatically splits into multiple non-transactional chunks — no extra options needed
- Payload size: 10 MB maximum (excluding binaries)
Note:
ReplicationOptions.setUseAtomicCalls()is@Deprecatedand marked "no longer required" in the Cloud Service Javadoc. Do not call it; the system handles auto-bucketing automatically.
Example: Bulk Activation
public class BulkPublisher {
@Reference
private Replicator replicator;
/**
* Publish multiple pages.
* ≤100 paths → replicated atomically (transactional guarantee).
* >100 paths → system automatically splits into non-transactional chunks.
*/
public void publishMultiplePages(Session session, String[] pagePaths)
throws ReplicationException {
replicator.replicate(
session,
ReplicationActionType.ACTIVATE,
pagePaths,
null // No options needed; system handles auto-bucketing above 100 paths
);
}
}
Best Practice: For large hierarchical content trees, use the Tree Activation workflow step instead of custom code.
Publishing to Preview Tier
The Preview tier requires explicit agent filtering.
Example: Publish to Preview
import com.day.cq.replication.Agent;
import com.day.cq.replication.AgentFilter;
public class PreviewPublisher {
@Reference
private Replicator replicator;
/**
* Publish to Preview tier only
*/
public void publishToPreview(Session session, String pagePath)
throws ReplicationException {
ReplicationOptions options = new ReplicationOptions();
// Filter to target Preview agent only
options.setFilter(new AgentFilter() {
@Override
public boolean isIncluded(Agent agent) {
return "preview".equals(agent.getId());
}
});
replicator.replicate(
session,
ReplicationActionType.ACTIVATE,
pagePath,
options
);
}
/**
* Publish to BOTH Preview and Publish tiers
*/
public void publishToBothTiers(Session session, String pagePath)
throws
Установить replication в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл replication?
Publish, deactivate, and delete AEM content programmatically via the Cloud Service Replication API (com.day.cq.replication). Covers single-path and bulk activation, preview-tier targeting with AgentFilter, synchronous/async options, ReplicationStatus checks, permission validation, workflow process steps, and replication event handling. Use when the user needs to publish pages, activate or deactivate content, check replication status, build workflow steps that replicate content, listen to replication events, query batch publication state, or work with Replicator, ReplicationOptions, or ReplicationStatusProvider in AEM Cloud Service.
Как установить скилл replication?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл replication запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic