org.alfresco.repo.replication
Class ReplicationServiceImpl

java.lang.Object
  extended by org.alfresco.repo.replication.ReplicationServiceImpl
All Implemented Interfaces:
ReplicationDefinitionPersister, ReplicationService

public class ReplicationServiceImpl
extends java.lang.Object
implements ReplicationService, ReplicationDefinitionPersister


Constructor Summary
ReplicationServiceImpl()
           
 
Method Summary
 ReplicationDefinition createReplicationDefinition(java.lang.String replicationDefinitionName, java.lang.String description)
          Creates a new ReplicationDefinition and sets the replication name and description to the specified values.
 void deleteReplicationDefinition(ReplicationDefinition replicationDefinition)
          This method removes the previously serializes ReplicationDefinition from the repository.
 void disableScheduling(ReplicationDefinition replicationDefinition)
          Turns off scheduling for the specified replication
 void enableScheduling(ReplicationDefinition replicationDefinition)
          Turns on scheduling for the specified replication.
 boolean isEnabled()
          Is the replication service enabled?
 ReplicationDefinition loadReplicationDefinition(java.lang.String replicationDefinitionName)
          This method retrieves a ReplicationDefinition that has been stored in the repository using the save() method.
 java.util.List loadReplicationDefinitions()
          This method retrieves the ReplicationDefinitions that have been stored in the repository using the save() method.
 java.util.List loadReplicationDefinitions(java.lang.String target)
          This method retrieves the stored ReplicationDefinitions that have been registered for the specified transfer target name.
 void renameReplicationDefinition(java.lang.String oldReplicationName, java.lang.String newReplicationName)
          This method renames a ReplicationDefinition that has been stored in the repository using the save() method.
 void replicate(ReplicationDefinition replicationDefinition)
          Runs the specified replication.
 void saveReplicationDefinition(ReplicationDefinition replicationDefinition)
          This method serializes the ReplicationDefinition and stores it in the repository.
 void setActionService(ActionService actionService)
          Injects the ActionService bean.
 void setReplicationDefinitionPersister(ReplicationDefinitionPersisterImpl replicationDefinitionPersister)
          Injects the ReplicationDefinitionPersister bean.
 void setReplicationParams(ReplicationParams replicationParams)
          Sets Replication Parameters
 void setScheduledPersistedActionService(ScheduledPersistedActionService scheduledPersistedActionService)
          Injects the Scheduled Persisted Action Service bean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicationServiceImpl

public ReplicationServiceImpl()
Method Detail

setReplicationDefinitionPersister

public void setReplicationDefinitionPersister(ReplicationDefinitionPersisterImpl replicationDefinitionPersister)
Injects the ReplicationDefinitionPersister bean.

Parameters:
replicationDefinitionPersister -

setActionService

public void setActionService(ActionService actionService)
Injects the ActionService bean.

Parameters:
actionService -

setScheduledPersistedActionService

public void setScheduledPersistedActionService(ScheduledPersistedActionService scheduledPersistedActionService)
Injects the Scheduled Persisted Action Service bean

Parameters:
scheduledPersistedActionService -

createReplicationDefinition

public ReplicationDefinition createReplicationDefinition(java.lang.String replicationDefinitionName,
                                                         java.lang.String description)
Description copied from interface: ReplicationService
Creates a new ReplicationDefinition and sets the replication name and description to the specified values.

Specified by:
createReplicationDefinition in interface ReplicationService
Parameters:
replicationDefinitionName - A unique identifier used to specify the created ReplicationDefinition
description - A description of the replication
Returns:
the created ReplicationDefinition

loadReplicationDefinition

public ReplicationDefinition loadReplicationDefinition(java.lang.String replicationDefinitionName)
Description copied from interface: ReplicationDefinitionPersister
This method retrieves a ReplicationDefinition that has been stored in the repository using the save() method. If no ReplicationDefinition exists in the repository with the specified replication name then this method returns null.

Specified by:
loadReplicationDefinition in interface ReplicationDefinitionPersister
Parameters:
replicationDefinitionName - The unique identifier used to specify the ReplicationDefinition to retrieve.
Returns:
The specified ReplicationDefinition or null.

loadReplicationDefinitions

public java.util.List loadReplicationDefinitions()
Description copied from interface: ReplicationDefinitionPersister
This method retrieves the ReplicationDefinitions that have been stored in the repository using the save() method.

If there are no such ReplicationDefinitions, an empty list is returned.

Specified by:
loadReplicationDefinitions in interface ReplicationDefinitionPersister
Returns:
The ReplicationDefinitions.

loadReplicationDefinitions

public java.util.List loadReplicationDefinitions(java.lang.String target)
Description copied from interface: ReplicationDefinitionPersister
This method retrieves the stored ReplicationDefinitions that have been registered for the specified transfer target name.

If there are no such rendering ReplicationDefinitions, an empty list is returned.

Specified by:
loadReplicationDefinitions in interface ReplicationDefinitionPersister
Parameters:
target - the name of a target.
Returns:
The ReplicationDefinitions.
See Also:
ReplicationDefinitionPersister.saveReplicationDefinition(ReplicationDefinition)

renameReplicationDefinition

public void renameReplicationDefinition(java.lang.String oldReplicationName,
                                        java.lang.String newReplicationName)
Description copied from interface: ReplicationDefinitionPersister
This method renames a ReplicationDefinition that has been stored in the repository using the save() method. If no ReplicationDefinition exists in the repository with the specified replication name, then nothing happens.

Specified by:
renameReplicationDefinition in interface ReplicationDefinitionPersister
Parameters:
oldReplicationName - The unique identifier used to specify the ReplicationDefinition to rename.
newReplicationName - The unique identifier used to specify the new ReplicationDefinition name.

saveReplicationDefinition

public void saveReplicationDefinition(ReplicationDefinition replicationDefinition)
Description copied from interface: ReplicationDefinitionPersister
This method serializes the ReplicationDefinition and stores it in the repository. ReplicationDefinitions saved in this way may be retrieved using the load() method.

Specified by:
saveReplicationDefinition in interface ReplicationDefinitionPersister
Parameters:
replicationDefinition - The ReplicationDefinition to be persisted.

deleteReplicationDefinition

public void deleteReplicationDefinition(ReplicationDefinition replicationDefinition)
Description copied from interface: ReplicationDefinitionPersister
This method removes the previously serializes ReplicationDefinition from the repository. The ReplicationDefinition will then no longer be available using the load methods.

Specified by:
deleteReplicationDefinition in interface ReplicationDefinitionPersister
Parameters:
replicationDefinition - The ReplicationDefinition to be deleted.

replicate

public void replicate(ReplicationDefinition replicationDefinition)
Description copied from interface: ReplicationService
Runs the specified replication.

Specified by:
replicate in interface ReplicationService
Parameters:
replicationDefinition - The replication to run

disableScheduling

public void disableScheduling(ReplicationDefinition replicationDefinition)
Description copied from interface: ReplicationService
Turns off scheduling for the specified replication

Specified by:
disableScheduling in interface ReplicationService

enableScheduling

public void enableScheduling(ReplicationDefinition replicationDefinition)
Description copied from interface: ReplicationService
Turns on scheduling for the specified replication. You can then set the scheduling details on the definition.

Specified by:
enableScheduling in interface ReplicationService

isEnabled

public boolean isEnabled()
Description copied from interface: ReplicationService
Is the replication service enabled?

Specified by:
isEnabled in interface ReplicationService

setReplicationParams

public void setReplicationParams(ReplicationParams replicationParams)
Sets Replication Parameters

Parameters:
replicationParams - replication parameters


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.