mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
59048: ALF-13291 - Transfer target is still displayed in replication job despite of target was deleted build fix. fix incomplete. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@62081 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -263,4 +263,16 @@ public class ReplicationDefinitionImpl extends ActionImpl implements Replication
|
|||||||
public boolean isSchedulingEnabled() {
|
public boolean isSchedulingEnabled() {
|
||||||
return (schedule != null);
|
return (schedule != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean targetExists = false;
|
||||||
|
|
||||||
|
public boolean isTargetExists()
|
||||||
|
{
|
||||||
|
return targetExists;
|
||||||
|
}
|
||||||
|
public void setTargetExists(boolean targetExists)
|
||||||
|
{
|
||||||
|
this.targetExists = targetExists;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -96,22 +96,20 @@ public class ReplicationServiceImpl implements ReplicationService, ReplicationDe
|
|||||||
* org.alfresco.service.cmr.replication.ReplicationService#loadReplicationDefinition
|
* org.alfresco.service.cmr.replication.ReplicationService#loadReplicationDefinition
|
||||||
* (org.alfresco.service.namespace.QName)
|
* (org.alfresco.service.namespace.QName)
|
||||||
*/
|
*/
|
||||||
public ReplicationDefinition loadReplicationDefinition(String replicationDefinitionName) {
|
@SuppressWarnings("deprecation")
|
||||||
|
public ReplicationDefinition loadReplicationDefinition(String replicationDefinitionName) {
|
||||||
ReplicationDefinitionImpl rd = (ReplicationDefinitionImpl)
|
ReplicationDefinitionImpl rd = (ReplicationDefinitionImpl)
|
||||||
replicationDefinitionPersister.loadReplicationDefinition(replicationDefinitionName);
|
replicationDefinitionPersister.loadReplicationDefinition(replicationDefinitionName);
|
||||||
|
|
||||||
if(rd != null)
|
if(rd != null)
|
||||||
{
|
{
|
||||||
// check here whether the target still exists and blank if not
|
|
||||||
// TODO we should rework relationship between action and target
|
// TODO we should rework relationship between action and target
|
||||||
|
|
||||||
String targetName = rd.getTargetName();
|
String targetName = rd.getTargetName();
|
||||||
if(targetName != null)
|
if(targetName != null)
|
||||||
{
|
{
|
||||||
if(!getTransferService().targetExists(targetName))
|
// Decorate RD with targetExists
|
||||||
{
|
rd.setTargetExists(getTransferService().targetExists(targetName));
|
||||||
rd.setTargetName(null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rd.setSchedule(
|
rd.setSchedule(
|
||||||
|
@@ -122,5 +122,11 @@ public interface ReplicationDefinition extends CancellableAction, SchedulableAct
|
|||||||
*/
|
*/
|
||||||
boolean isSchedulingEnabled();
|
boolean isSchedulingEnabled();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Does the target exist?
|
||||||
|
* @return true it does
|
||||||
|
*/
|
||||||
|
boolean isTargetExists();
|
||||||
|
|
||||||
// TODO Replication options, such as permissions and rules
|
// TODO Replication options, such as permissions and rules
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user