本文整理汇总了Java中org.alfresco.service.cmr.replication.ReplicationDefinition.isSchedulingEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java ReplicationDefinition.isSchedulingEnabled方法的具体用法?Java ReplicationDefinition.isSchedulingEnabled怎么用?Java ReplicationDefinition.isSchedulingEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.alfresco.service.cmr.replication.ReplicationDefinition
的用法示例。
在下文中一共展示了ReplicationDefinition.isSchedulingEnabled方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: saveReplicationDefinition
import org.alfresco.service.cmr.replication.ReplicationDefinition; //导入方法依赖的package包/类
public void saveReplicationDefinition(
ReplicationDefinition replicationDefinition) {
// Save the replication definition
replicationDefinitionPersister.saveReplicationDefinition(replicationDefinition);
// If required, now also save the schedule for it
if(replicationDefinition.isSchedulingEnabled())
{
scheduledPersistedActionService.saveSchedule(
((ReplicationDefinitionImpl)replicationDefinition).getSchedule()
);
}
}
示例2: deleteReplicationDefinition
import org.alfresco.service.cmr.replication.ReplicationDefinition; //导入方法依赖的package包/类
public void deleteReplicationDefinition(
ReplicationDefinition replicationDefinition) {
if(replicationDefinition.isSchedulingEnabled())
{
scheduledPersistedActionService.deleteSchedule(
((ReplicationDefinitionImpl)replicationDefinition).getSchedule()
);
}
replicationDefinitionPersister.deleteReplicationDefinition(replicationDefinition);
}
示例3: disableScheduling
import org.alfresco.service.cmr.replication.ReplicationDefinition; //导入方法依赖的package包/类
public void disableScheduling(ReplicationDefinition replicationDefinition) {
ReplicationDefinitionImpl definition = (ReplicationDefinitionImpl)replicationDefinition;
if(replicationDefinition.isSchedulingEnabled())
{
scheduledPersistedActionService.deleteSchedule(
definition.getSchedule()
);
}
definition.setSchedule(null);
}
示例4: enableScheduling
import org.alfresco.service.cmr.replication.ReplicationDefinition; //导入方法依赖的package包/类
public void enableScheduling(ReplicationDefinition replicationDefinition) {
if(!replicationDefinition.isSchedulingEnabled())
{
ScheduledPersistedAction schedule =
scheduledPersistedActionService.createSchedule(replicationDefinition);
((ReplicationDefinitionImpl)replicationDefinition).setSchedule(schedule);
}
}
示例5: buildDetails
import org.alfresco.service.cmr.replication.ReplicationDefinition; //导入方法依赖的package包/类
/**
* Build a model containing the full, detailed definition for the given
* Replication Definition.
*/
protected Map<String, Object> buildDetails(ReplicationDefinition rd) {
Map<String, Object> rdm = new HashMap<String,Object>();
// Set the core details
rdm.put(DEFINITION_NAME, rd.getReplicationName());
rdm.put(DEFINITION_DESCRIPTION, rd.getDescription());
rdm.put(DEFINITION_ENABLED, rd.isEnabled());
rdm.put(DEFINITION_TARGET_NAME, rd.getTargetName());
// Set the scheduling details
rdm.put(DEFINITION_SCHEDULE_ENABLED, rd.isSchedulingEnabled());
if(rd.isSchedulingEnabled())
{
rdm.put(DEFINITION_SCHEDULE_START, ISO8601DateFormat.format(rd.getScheduleStart()));
rdm.put(DEFINITION_SCHEDULE_COUNT, rd.getScheduleIntervalCount());
if(rd.getScheduleIntervalPeriod() != null) {
rdm.put(DEFINITION_SCHEDULE_PERIOD, rd.getScheduleIntervalPeriod().toString());
} else {
rdm.put(DEFINITION_SCHEDULE_PERIOD, null);
}
}
// Set the details of the previous run
// These will be null'd out later if replication is in progress
rdm.put(DEFINITION_FAILURE_MESSAGE, rd.getExecutionFailureMessage());
rdm.put(DEFINITION_TRANSFER_LOCAL_REPORT, rd.getLocalTransferReport());
rdm.put(DEFINITION_TRANSFER_REMOTE_REPORT, rd.getRemoteTransferReport());
// Do the status
// Includes start+end times, and running action details
setStatus(rd, rdm);
// Only include the payload entries that still exist
// Otherwise the freemarker layer gets upset about deleted nodes
List<NodeRef> payload = new ArrayList<NodeRef>();
for(NodeRef node : rd.getPayload()) {
if(nodeService.exists(node))
payload.add(node);
}
rdm.put(DEFINITION_PAYLOAD, payload);
// Save in the usual way
Map<String, Object> model = new HashMap<String,Object>();
model.put(MODEL_DATA_ITEM, rdm);
return model;
}