Class ReplicationModelBuilder
- java.lang.Object
-
- org.alfresco.repo.web.scripts.replication.ReplicationModelBuilder
-
public class ReplicationModelBuilder extends java.lang.ObjectBuilds up models from ReplicationDefinitions, either in summary or detail form.- Since:
- 3.4
- Author:
- Nick Burch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReplicationModelBuilder.SimpleSorterByLastRunSorts simple definitions by their last run time.static classReplicationModelBuilder.SimpleSorterByNameSorts simple definitions by their namestatic classReplicationModelBuilder.SimpleSorterByStatusSorts simple definitions by their status
-
Field Summary
Fields Modifier and Type Field Description protected org.alfresco.service.cmr.action.ActionTrackingServiceactionTrackingServiceprotected static java.lang.StringDEFINITION_DESCRIPTIONprotected static java.lang.StringDEFINITION_ENABLEDprotected static java.lang.StringDEFINITION_ENDED_ATprotected static java.lang.StringDEFINITION_FAILURE_MESSAGEprotected static java.lang.StringDEFINITION_NAMEprotected static java.lang.StringDEFINITION_PAYLOADprotected static java.lang.StringDEFINITION_RUNNING_ACTION_IDprotected static java.lang.StringDEFINITION_SCHEDULE_COUNTprotected static java.lang.StringDEFINITION_SCHEDULE_ENABLEDprotected static java.lang.StringDEFINITION_SCHEDULE_PERIODprotected static java.lang.StringDEFINITION_SCHEDULE_STARTprotected static java.lang.StringDEFINITION_STARTED_ATprotected static java.lang.StringDEFINITION_STATUSprotected static java.lang.StringDEFINITION_TARGET_NAMEprotected static java.lang.StringDEFINITION_TRANSFER_LOCAL_REPORTprotected static java.lang.StringDEFINITION_TRANSFER_REMOTE_REPORTprotected static java.lang.StringMODEL_DATA_ITEMprotected static java.lang.StringMODEL_DATA_LISTprotected org.alfresco.service.cmr.repository.NodeServicenodeServiceprotected org.alfresco.service.cmr.replication.ReplicationServicereplicationService
-
Constructor Summary
Constructors Constructor Description ReplicationModelBuilder(org.alfresco.service.cmr.repository.NodeService nodeService, org.alfresco.service.cmr.replication.ReplicationService replicationService, org.alfresco.service.cmr.action.ActionTrackingService actionTrackingService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,java.lang.Object>buildDetails(org.alfresco.service.cmr.replication.ReplicationDefinition rd)Build a model containing the full, detailed definition for the given Replication Definition.protected java.util.Map<java.lang.String,java.lang.Object>buildSimpleList(java.util.List<org.alfresco.service.cmr.replication.ReplicationDefinition> replicationDefinitions, java.util.Comparator<java.util.Map<java.lang.String,java.lang.Object>> sorter)Build a model containing a list of simple definitions for the given list of Replication Definitions.protected voidsetStatus(org.alfresco.service.cmr.replication.ReplicationDefinition replicationDefinition, java.util.Map<java.lang.String,java.lang.Object> model)Figures out the status that's one of: New|Running|CancelRequested|Completed|Failed|Cancelled by merging data from the action tracking service.protected voidsetStatus(org.alfresco.service.cmr.replication.ReplicationDefinition replicationDefinition, org.alfresco.service.cmr.action.ExecutionDetails details, java.util.Map<java.lang.String,java.lang.Object> model)Figures out the status that's one of: New|Running|CancelRequested|Completed|Failed|Cancelled by merging data from the action tracking service.
-
-
-
Field Detail
-
MODEL_DATA_ITEM
protected static final java.lang.String MODEL_DATA_ITEM
- See Also:
- Constant Field Values
-
MODEL_DATA_LIST
protected static final java.lang.String MODEL_DATA_LIST
- See Also:
- Constant Field Values
-
DEFINITION_NAME
protected static final java.lang.String DEFINITION_NAME
- See Also:
- Constant Field Values
-
DEFINITION_DESCRIPTION
protected static final java.lang.String DEFINITION_DESCRIPTION
- See Also:
- Constant Field Values
-
DEFINITION_STATUS
protected static final java.lang.String DEFINITION_STATUS
- See Also:
- Constant Field Values
-
DEFINITION_STARTED_AT
protected static final java.lang.String DEFINITION_STARTED_AT
- See Also:
- Constant Field Values
-
DEFINITION_ENDED_AT
protected static final java.lang.String DEFINITION_ENDED_AT
- See Also:
- Constant Field Values
-
DEFINITION_FAILURE_MESSAGE
protected static final java.lang.String DEFINITION_FAILURE_MESSAGE
- See Also:
- Constant Field Values
-
DEFINITION_RUNNING_ACTION_ID
protected static final java.lang.String DEFINITION_RUNNING_ACTION_ID
- See Also:
- Constant Field Values
-
DEFINITION_PAYLOAD
protected static final java.lang.String DEFINITION_PAYLOAD
- See Also:
- Constant Field Values
-
DEFINITION_TRANSFER_LOCAL_REPORT
protected static final java.lang.String DEFINITION_TRANSFER_LOCAL_REPORT
- See Also:
- Constant Field Values
-
DEFINITION_TRANSFER_REMOTE_REPORT
protected static final java.lang.String DEFINITION_TRANSFER_REMOTE_REPORT
- See Also:
- Constant Field Values
-
DEFINITION_ENABLED
protected static final java.lang.String DEFINITION_ENABLED
- See Also:
- Constant Field Values
-
DEFINITION_TARGET_NAME
protected static final java.lang.String DEFINITION_TARGET_NAME
- See Also:
- Constant Field Values
-
DEFINITION_SCHEDULE_ENABLED
protected static final java.lang.String DEFINITION_SCHEDULE_ENABLED
- See Also:
- Constant Field Values
-
DEFINITION_SCHEDULE_START
protected static final java.lang.String DEFINITION_SCHEDULE_START
- See Also:
- Constant Field Values
-
DEFINITION_SCHEDULE_PERIOD
protected static final java.lang.String DEFINITION_SCHEDULE_PERIOD
- See Also:
- Constant Field Values
-
DEFINITION_SCHEDULE_COUNT
protected static final java.lang.String DEFINITION_SCHEDULE_COUNT
- See Also:
- Constant Field Values
-
nodeService
protected org.alfresco.service.cmr.repository.NodeService nodeService
-
replicationService
protected org.alfresco.service.cmr.replication.ReplicationService replicationService
-
actionTrackingService
protected org.alfresco.service.cmr.action.ActionTrackingService actionTrackingService
-
-
Method Detail
-
buildSimpleList
protected java.util.Map<java.lang.String,java.lang.Object> buildSimpleList(java.util.List<org.alfresco.service.cmr.replication.ReplicationDefinition> replicationDefinitions, java.util.Comparator<java.util.Map<java.lang.String,java.lang.Object>> sorter)Build a model containing a list of simple definitions for the given list of Replication Definitions.
-
buildDetails
protected java.util.Map<java.lang.String,java.lang.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, java.util.Map<java.lang.String,java.lang.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, java.util.Map<java.lang.String,java.lang.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.
-
-