How do I programmatically activate pages to only certain replication agents?

Answer, Resolution

You can create a ReplicationOptions [2] object with an AgentFilter [2]:

       ReplicationOptions opts = new ReplicationOptions();
       opts.setFilter(new AgentFilter(){
           public boolean isIncluded(final Agent agent) {
               return "expectedAgentId".equals(agent.getId());

then use the Replicator"s [3] replicate method:

    * Triggers a new replication with supplied options.
    * @param session user session
    * @param type The type of replication
    * @param path The path specified the content to be replicated
    * @param options Additional replication options
    * @throws ReplicationException if an error occurs
   void replicate(Session session, ReplicationActionType type, String path,
                  ReplicationOptions options)

Applies to





Other Related Articles:

이 작업에는 Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License의 라이센스가 부여되었습니다.  Twitter™ 및 Facebook 게시물은 Creative Commons 약관을 적용받지 않습니다.

법적 고지 사항   |   온라인 개인 정보 보호 정책