+ " in repository \"" + repositoryEntry.getName() + "\"." + " The related configuration cannot be found.");
}
WorkspaceInitializerEntry wieOriginal = systemWorkspaceEntry.getInitializer();
//getting backup chail log to system workspace.
BackupChainLog systemBackupChainLog = new BackupChainLog(workspacesMapping.get(systemWorkspaceEntry.getName()));
WorkspaceInitializerEntry wiEntry = getWorkspaceInitializerEntry(systemBackupChainLog);
// set initializer
systemWorkspaceEntry.setInitializer(wiEntry);
ArrayList<WorkspaceEntry> newEntries = new ArrayList<WorkspaceEntry>();
newEntries.add(systemWorkspaceEntry);
repositoryEntry.setWorkspaceEntries(newEntries);
String currennWorkspaceName = repositoryEntry.getSystemWorkspaceName();
boolean restored = true;
try
{
repositoryService.createRepository(repositoryEntry);
//set original initializer to created workspace.
RepositoryImpl defRep = (RepositoryImpl)repositoryService.getRepository(repositoryEntry.getName());
WorkspaceContainerFacade wcf = defRep.getWorkspaceContainer(systemWorkspaceEntry.getName());
WorkspaceEntry createdWorkspaceEntry = (WorkspaceEntry)wcf.getComponent(WorkspaceEntry.class);
createdWorkspaceEntry.setInitializer(wieOriginal);
// save configuration to persistence (file or persister)
repositoryService.getConfig().retain();
for (WorkspaceEntry wsEntry : originalWorkspaceEntrys)
{
if (!(wsEntry.getName().equals(repositoryEntry.getSystemWorkspaceName())))
{
currennWorkspaceName = wsEntry.getName();
backupManager.restore(new BackupChainLog(workspacesMapping.get(wsEntry.getName())),
repositoryEntry.getName(), wsEntry, false);
}
}
}
catch (InvalidItemStateException e)