Class ReplicationModelBuilder


  • public class ReplicationModelBuilder
    extends Object
    Builds up models from ReplicationDefinitions, either in summary or detail form.
    Since:
    3.4
    Author:
    Nick Burch
    • Constructor Detail

      • ReplicationModelBuilder

        public ReplicationModelBuilder​(org.alfresco.service.cmr.repository.NodeService nodeService,
                                       org.alfresco.service.cmr.replication.ReplicationService replicationService,
                                       org.alfresco.service.cmr.action.ActionTrackingService actionTrackingService)
    • Method Detail

      • buildSimpleList

        protected Map<String,​Object> buildSimpleList​(List<org.alfresco.service.cmr.replication.ReplicationDefinition> replicationDefinitions,
                                                           Comparator<Map<String,​Object>> sorter)
        Build a model containing a list of simple definitions for the given list of Replication Definitions.
      • buildDetails

        protected Map<String,​Object> buildDetails​(org.alfresco.service.cmr.replication.ReplicationDefinition rd)
        Build a model containing the full, detailed definition for the given Replication Definition.
      • setStatus

        protected void setStatus​(org.alfresco.service.cmr.replication.ReplicationDefinition replicationDefinition,
                                 Map<String,​Object> model)
        Figures out the status that's one of: New|Running|CancelRequested|Completed|Failed|Cancelled by merging data from the action tracking service. Will also set the start and end dates, from either the replication definition or action tracking data, depending on the status.
      • setStatus

        protected void setStatus​(org.alfresco.service.cmr.replication.ReplicationDefinition replicationDefinition,
                                 org.alfresco.service.cmr.action.ExecutionDetails details,
                                 Map<String,​Object> model)
        Figures out the status that's one of: New|Running|CancelRequested|Completed|Failed|Cancelled by merging data from the action tracking service. Will also set the start and end dates, from either the replication definition or action tracking data, depending on the status.