[exo-jcr-commits] exo-jcr SVN: r2134 - in jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server: bean/response and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Mar 25 10:37:45 EDT 2010
Author: areshetnyak
Date: 2010-03-25 10:37:44 -0400 (Thu, 25 Mar 2010)
New Revision: 2134
Modified:
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/bean/response/DetailedInfo.java
Log:
EXOJCR-549 : The implementation backup/restore whole repository in HTTPBackupAgent.
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java 2010-03-25 14:32:04 UTC (rev 2133)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java 2010-03-25 14:37:44 UTC (rev 2134)
@@ -931,9 +931,9 @@
return Response.ok(info).cacheControl(noCache).build();
}
- BackupChainLog completed = null;
+ RepositoryBackupChainLog completed = null;
- for (BackupChainLog chainLog : backupManager.getBackupsLogs())
+ for (RepositoryBackupChainLog chainLog : backupManager.getRepositoryBackupsLogs())
if (id.equals(chainLog.getBackupId()))
completed = chainLog;
@@ -943,15 +943,15 @@
return Response.ok(info).cacheControl(noCache).build();
}
- return Response.status(Response.Status.NOT_FOUND).entity("No current or completed backup with 'id' " + id)
+ return Response.status(Response.Status.NOT_FOUND).entity("No current or completed repository backup with 'id' " + id)
.type(MediaType.TEXT_PLAIN).cacheControl(noCache).build();
}
catch (Throwable e)
{
- log.error("Can not get information about current or completed backup with 'id' " + id, e);
+ log.error("Can not get information about current or completed repository backup with 'id' " + id, e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
- "Can not get information about current or completed backup with 'id' " + id + " : " + e.getMessage()).type(
+ "Can not get information about current or completed repository backup with 'id' " + id + " : " + e.getMessage()).type(
MediaType.TEXT_PLAIN).cacheControl(noCache).build();
}
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/bean/response/DetailedInfo.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/bean/response/DetailedInfo.java 2010-03-25 14:32:04 UTC (rev 2133)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/bean/response/DetailedInfo.java 2010-03-25 14:37:44 UTC (rev 2134)
@@ -92,6 +92,20 @@
super(type, chainLog);
this.backupConfig = new BackupConfigBean(chainLog.getBackupConfig());
}
+
+ /**
+ * DetailedInfo constructor.
+ *
+ * @param type
+ * int, the type of detailed info (current or completed)
+ * @param chainLog
+ * RepositoryBackupChainLog
+ */
+ public DetailedInfo(int type, RepositoryBackupChainLog chainLog)
+ {
+ super(type, chainLog);
+ this.backupConfig = new BackupConfigBean(chainLog.getBackupConfig());
+ }
/**
* DetailedInfo constructor.
More information about the exo-jcr-commits
mailing list