/** * Constructs a new export.<p> * * @param cms the cms context * @param report the report * * @throws CmsRoleViolationException if the current user has not the required role */ public CmsExport(CmsObject cms, I_CmsReport report) throws CmsRoleViolationException { m_cms = cms; m_report = report; // check if the user has the required permissions OpenCms.getRoleManager().checkRole(getCms(), CmsRole.DATABASE_MANAGER); }
/** * Constructs a new export.<p> * * @param cms the cms context * @param report the report * * @throws CmsRoleViolationException if the current user has not the required role */ public CmsExport(CmsObject cms, I_CmsReport report) throws CmsRoleViolationException { m_cms = cms; m_report = report; // check if the user has the required permissions OpenCms.getRoleManager().checkRole(getCms(), CmsRole.DATABASE_MANAGER); }
CmsFile file = getCms().readFile(fileName, CmsResourceFilter.IGNORE_EXPIRATION); if (!file.getState().isDeleted() && !CmsWorkplace.isTemporaryFile(file)) { if (checkExportResource(fileName)) {
CmsFile file = getCms().readFile(fileName, CmsResourceFilter.IGNORE_EXPIRATION); if (!file.getState().isDeleted() && !CmsWorkplace.isTemporaryFile(file)) { if (checkExportResource(fileName)) {
List<CmsProject> allProjects = OpenCms.getOrgUnitManager().getAllManageableProjects(getCms(), "", true); for (int i = 0; i < allProjects.size(); i++) { CmsProject project = allProjects.get(i);
List<CmsProject> allProjects = OpenCms.getOrgUnitManager().getAllManageableProjects(getCms(), "", true); for (int i = 0; i < allProjects.size(); i++) { CmsProject project = allProjects.get(i);
String source = trimResourceName(getCms().getSitePath(file)); I_CmsReport report = getReport(); m_exportCount++; org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_ARGUMENT_1, getCms().getSitePath(file))); report.print(org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0));
List<CmsUser> allUsers = OpenCms.getOrgUnitManager().getUsers(getCms(), orgunit.getName(), false); for (int i = 0, l = allUsers.size(); i < l; i++) { CmsUser user = allUsers.get(i);
/** * Checks if a resource is belongs to the correct project for exporting.<p> * * @param res the resource to check * * @return <code>true</code>, if the resource can be exported, false otherwise */ protected boolean isInExportableProject(CmsResource res) { boolean retValue = true; // the "only modified in current project flag" is checked if (m_parameters.isInProject()) { // resource state is new or changed if ((res.getState() == CmsResource.STATE_CHANGED) || (res.getState() == CmsResource.STATE_NEW)) { // the resource belongs not to the current project, so it must not be exported if (!res.getProjectLastModified().equals(getCms().getRequestContext().getCurrentProject().getUuid())) { retValue = false; } } else { // state is unchanged, so do not export it retValue = false; } } return retValue; }
List<CmsGroup> allGroups = OpenCms.getOrgUnitManager().getGroups(getCms(), orgunit.getName(), false); for (int i = 0, l = allGroups.size(); i < l; i++) { CmsGroup group = allGroups.get(i);
List<CmsGroup> allGroups = OpenCms.getOrgUnitManager().getGroups(getCms(), orgunit.getName(), false); for (int i = 0, l = allGroups.size(); i < l; i++) { CmsGroup group = allGroups.get(i);
/** * Checks if a resource is belongs to the correct project for exporting.<p> * * @param res the resource to check * * @return <code>true</code>, if the resource can be exported, false otherwise */ protected boolean isInExportableProject(CmsResource res) { boolean retValue = true; // the "only modified in current project flag" is checked if (m_parameters.isInProject()) { // resource state is new or changed if ((res.getState() == CmsResource.STATE_CHANGED) || (res.getState() == CmsResource.STATE_NEW)) { // the resource belongs not to the current project, so it must not be exported if (!res.getProjectLastModified().equals(getCms().getRequestContext().currentProject().getUuid())) { retValue = false; } } else { // state is unchanged, so do not export it retValue = false; } } return retValue; }
parentgroup = ""; } else { parentgroup = getCms().getParent(group.getName()).getName();
parentgroup = ""; } else { parentgroup = getCms().getParent(group.getName()).getName();
info.addElement(CmsImportExportManager.N_CREATOR).addText(getCms().getRequestContext().currentUser().getName()); info.addElement(CmsImportExportManager.N_OC_VERSION).addText(OpenCms.getSystemInfo().getVersionNumber()); info.addElement(CmsImportExportManager.N_DATE).addText(CmsDateUtil.getHeaderDate(System.currentTimeMillis())); info.addElement(CmsImportExportManager.N_INFO_PROJECT).addText( getCms().getRequestContext().currentProject().getName()); info.addElement(CmsImportExportManager.N_VERSION).addText(CmsImportExportManager.EXPORT_VERSION);
if (!exportMode.equals(ExportMode.REDUCED)) { info.addElement(CmsImportExportManager.N_CREATOR).addText( getCms().getRequestContext().getCurrentUser().getName()); info.addElement(CmsImportExportManager.N_OC_VERSION).addText(OpenCms.getSystemInfo().getVersionNumber()); info.addElement(CmsImportExportManager.N_DATE).addText( getCms().getRequestContext().getCurrentProject().getName()); info.addElement(CmsImportExportManager.N_VERSION).addText(CmsImportExportManager.EXPORT_VERSION);
getCms(), orgunit.getName()).iterator(); while (it.hasNext()) {
getCms(), orgunit.getName()).iterator(); while (it.hasNext()) {