use of org.alfresco.filesys.repo.rules.operations.RenameFileOperation in project alfresco-repository by Alfresco.
the class ScenarioRenameShuffle method createInstance.
@Override
public ScenarioInstance createInstance(final EvaluatorContext ctx, Operation operation) {
/**
* This scenario is triggered by a rename of a file matching
* the pattern
*/
if (operation instanceof RenameFileOperation) {
RenameFileOperation r = (RenameFileOperation) operation;
Matcher m = pattern.matcher(r.getTo());
if (m.matches()) {
if (logger.isDebugEnabled()) {
logger.debug("New Scenario Rename Shuffle Instance strPattern:" + pattern);
}
ScenarioRenameShuffleInstance instance = new ScenarioRenameShuffleInstance();
instance.setTimeout(timeout);
instance.setRanking(ranking);
return instance;
}
}
// No not interested.
return null;
}
Aggregations