id = info.getBackupId();
}
// Getting default RepositoryEntry
RepositoryEntry defREntry;
{
MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
ContainerRequestUserRole creq =
new ContainerRequestUserRole("GET", new URI(HTTP_BACKUP_AGENT_PATH
+ HTTPBackupAgent.Constants.OperationType.GET_DEFAULT_REPOSITORY_CONFIG), new URI(""), null,
new InputHeadersMap(headers));
ByteArrayContainerResponseWriter responseWriter = new ByteArrayContainerResponseWriter();
ContainerResponse cres = new ContainerResponse(responseWriter);
handler.handleRequest(creq, cres);
assertEquals(200, cres.getStatus());
defREntry = (RepositoryEntry) getObject(RepositoryEntry.class, responseWriter.getBody());
}
// Getting default WorkspaceEntry
WorkspaceEntry defWEntry;
{
MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
ContainerRequestUserRole creq =
new ContainerRequestUserRole("GET", new URI(HTTP_BACKUP_AGENT_PATH
+ HTTPBackupAgent.Constants.OperationType.GET_DEFAULT_WORKSPACE_CONFIG), new URI(""), null,
new InputHeadersMap(headers));
ByteArrayContainerResponseWriter responseWriter = new ByteArrayContainerResponseWriter();
ContainerResponse cres = new ContainerResponse(responseWriter);
handler.handleRequest(creq, cres);
assertEquals(200, cres.getStatus());
defWEntry = (WorkspaceEntry) getObject(WorkspaceEntry.class, responseWriter.getBody());
}
ArrayList<WorkspaceEntry> wsEntries = new ArrayList<WorkspaceEntry>();
wsEntries.add(makeWorkspaceEntry(defWEntry, "db6backup", "ws", "jdbcjcr27"));
wsEntries.add(makeWorkspaceEntry(defWEntry, "db6backup", "ws2", "jdbcjcr27"));
RepositoryEntry rEntry = makeRepositoryEntry(defREntry, "db6backup", wsEntries);
// Check the repository /db6backup.
try
{
repositoryService.getRepository("db6backup");