boolean copyPages = copyParams.get("copy_pages").equals("on");
boolean copyVirtualLinks = copyParams.get("copy_virtual_links").equals("on");
boolean copyHostVariables = copyParams.get("copy_host_variables").equals("on");
Host source = hostAPI.find(copyFromHostId, user, false);
HostCopyOptions hostCopyOptions = null;
if (copyAll)
hostCopyOptions = new HostCopyOptions(copyAll);
else
hostCopyOptions = new HostCopyOptions(copyTemplatesContainers, copyFolders, copyFiles, copyPages, copyContentOnPages, copyContentOnHost,
copyVirtualLinks, copyHostVariables);
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("sourceHostId", source.getIdentifier());
parameters.put("destinationHostId", contentlet.getIdentifier());