long modifiedFs = new Long(tok.nextToken()).longValue(); CmsSynchronizeList sync = new CmsSynchronizeList(resName, tranResName, modifiedVfs, modifiedFs); syncList.put(translate(resName), sync);
long modifiedFs = new Long(tok.nextToken()).longValue(); CmsSynchronizeList sync = new CmsSynchronizeList(resName, tranResName, modifiedVfs, modifiedFs); syncList.put(translate(resName), sync);
/** * Updates the synchronization lists if a resource is not used during the * synchronization process.<p> * * @param res the resource whose entry must be updated */ private void skipResource(CmsResource res) { // add the file to the new sync list... String resname = m_cms.getSitePath(res); CmsSynchronizeList syncList = m_syncList.get(translate(resname)); m_newSyncList.put(translate(resname), syncList); // .. and remove it from the old one m_syncList.remove(translate(resname)); // update the report m_report.print(org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_SUCCESSION_1, String.valueOf(m_count++)), I_CmsReport.FORMAT_NOTE); m_report.print(Messages.get().container(Messages.RPT_SKIPPING_0), I_CmsReport.FORMAT_NOTE); m_report.println( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_ARGUMENT_1, resname)); }
/** * Updates the synchronization lists if a resource is not used during the * synchronization process.<p> * * @param res the resource whose entry must be updated */ private void skipResource(CmsResource res) { // add the file to the new sync list... String resname = m_cms.getSitePath(res); CmsSynchronizeList syncList = (CmsSynchronizeList)m_syncList.get(translate(resname)); m_newSyncList.put(translate(resname), syncList); // .. and remove it from the old one m_syncList.remove(translate(resname)); // update the report m_report.print(org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_SUCCESSION_1, String.valueOf(m_count++)), I_CmsReport.FORMAT_NOTE); m_report.print(Messages.get().container(Messages.RPT_SKIPPING_0), I_CmsReport.FORMAT_NOTE); m_report.println(org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_ARGUMENT_1, resname)); }
CmsSynchronizeList sync = m_syncList.get(translate(resourcename)); File fsFile = getFileInRfs(sync.getResName()); translate(resourcename), res.getDateLastModified(), fsFile.lastModified()); m_newSyncList.put(translate(resourcename), syncList); m_syncList.remove(translate(resourcename)); vfsFile = null;
CmsSynchronizeList sync = (CmsSynchronizeList)m_syncList.get(translate(resourcename)); File fsFile = getFileInRfs(sync.getResName()); translate(resourcename), res.getDateLastModified(), fsFile.lastModified()); m_newSyncList.put(translate(resourcename), syncList); m_syncList.remove(translate(resourcename)); vfsFile = null;
CmsSynchronizeList sync = (CmsSynchronizeList)m_syncList.get(translate(m_cms.getSitePath(res))); translate(resourcename), res.getDateLastModified(), fsFile.lastModified()); m_newSyncList.put(translate(resourcename), syncList); m_syncList.remove(translate(resourcename)); m_report.println( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0),
CmsSynchronizeList sync = m_syncList.get(translate(m_cms.getSitePath(res))); translate(resourcename), res.getDateLastModified(), fsFile.lastModified()); m_newSyncList.put(translate(resourcename), syncList); m_syncList.remove(translate(resourcename)); m_report.println( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0),
/** * Deletes a resource in the VFS and updates the synchronisation lists.<p> * * @param res The resource to be deleted * * @throws CmsException if something goes wrong */ private void deleteFromVfs(CmsResource res) throws CmsException { String resourcename = m_cms.getSitePath(res); m_report.print(org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_SUCCESSION_1, String.valueOf(m_count++)), I_CmsReport.FORMAT_NOTE); if (res.isFile()) { m_report.print(Messages.get().container(Messages.RPT_DEL_FILE_0), I_CmsReport.FORMAT_NOTE); } else { m_report.print(Messages.get().container(Messages.RPT_DEL_FOLDER_0), I_CmsReport.FORMAT_NOTE); } m_report.print(org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_ARGUMENT_1, resourcename)); m_report.print(org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0)); // lock the file in the VFS, so that it can be updated m_cms.lockResource(resourcename); m_cms.deleteResource(resourcename, CmsResource.DELETE_PRESERVE_SIBLINGS); // Remove it from the sync list m_syncList.remove(translate(resourcename)); m_report.println( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0), I_CmsReport.FORMAT_OK); }
m_cms.deleteResource(resourcename, CmsResource.DELETE_PRESERVE_SIBLINGS); m_syncList.remove(translate(resourcename));