/** * A publish job has been permanently removed from the history.<p> * * @param publishJob the removed publish job */ protected void publishJobRemoved(CmsPublishJobInfoBean publishJob) { // a publish job has been removed m_listeners.fireRemove(new CmsPublishJobFinished(publishJob)); }
/** * Returns the publish history list with already publish jobs, filtered by the given user.<p> * * @param user the user to filter the jobs with * * @return a list of {@link CmsPublishJobFinished} objects */ public List<CmsPublishJobFinished> getPublishHistory(CmsUser user) { List<CmsPublishJobFinished> result = new ArrayList<CmsPublishJobFinished>(); Iterator<CmsPublishJobFinished> it = getPublishHistory().iterator(); while (it.hasNext()) { CmsPublishJobFinished publishJob = it.next(); if (publishJob.getUserId().equals(user.getId())) { result.add(publishJob); } } return result; }
while (iter.hasNext()) { CmsPublishJobFinished publishJob = (CmsPublishJobFinished)iter.next(); CmsListItem item = getList().newItem(new Long(publishJob.getStartTime()).toString()); Map state = getState(publishJob); item.set(LIST_COLUMN_PROJECT, publishJob.getProjectName()); item.set(LIST_COLUMN_STARTTIME, new Date(publishJob.getStartTime())); item.set(LIST_COLUMN_ENDTIME, new Date(publishJob.getFinishTime())); item.set(LIST_COLUMN_STATE, state.get(LIST_COLUMN_STATE)); item.set(LIST_COLUMN_RESCOUNT, new Integer(publishJob.getSize())); item.set(LIST_COLUMN_ID, publishJob.getPublishHistoryId()); item.set(LIST_COLUMN_USER, publishJob.getUserName(getCms())); item.set(LIST_COLUMN_WARNINGS, state.get(LIST_COLUMN_WARNINGS)); item.set(LIST_COLUMN_ERRORS, state.get(LIST_COLUMN_ERRORS));
/** * Returns the content of the publish report assigned to the given publish job.<p> * * @param publishJob the published job * @return the content of the assigned publish report * * @throws CmsException if something goes wrong */ protected byte[] getReportContents(CmsPublishJobFinished publishJob) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(); try { return m_driverManager.readPublishReportContents(dbc, publishJob.getPublishHistoryId()); } finally { dbc.clear(); } }
new CmsUUID(m_jobId)); params[0] = publishJob.getProjectName(); params[1] = publishJob.getUserName(getCms()); params[2] = Messages.get().getBundle(getLocale()).getDateTime(publishJob.getStartTime());
/** * Returns the content of the publish report assigned to the given publish job.<p> * * @param publishJob the published job * @return the content of the assigned publish report * * @throws CmsException if something goes wrong */ protected byte[] getReportContents(CmsPublishJobFinished publishJob) throws CmsException { byte[] result = null; CmsDbContext dbc = m_dbContextFactory.getDbContext(); try { result = m_driverManager.readPublishReportContents(dbc, publishJob.getPublishHistoryId()); } catch (CmsException e) { dbc.rollback(); LOG.error(e.getLocalizedMessage(), e); throw e; } finally { dbc.clear(); } return result; }
while (itFinishedJobs.hasNext()) { CmsPublishJobFinished finishedJob = itFinishedJobs.next(); if (finishedJob.getPublishHistoryId().equals(publishHistoryId)) { return finishedJob;
/** * A publish job has been permanently removed from the history.<p> * * @param publishJob the removed publish job */ protected void publishJobRemoved(CmsPublishJobInfoBean publishJob) { // a publish job has been removed m_listeners.fireRemove(new CmsPublishJobFinished(publishJob)); }
/** * Returns the publish history list with already publish jobs, filtered by the given user.<p> * * @param user the user to filter the jobs with * * @return a list of {@link CmsPublishJobFinished} objects */ public List getPublishHistory(CmsUser user) { List result = new ArrayList(); Iterator it = getPublishHistory().iterator(); while (it.hasNext()) { CmsPublishJobFinished publishJob = (CmsPublishJobFinished)it.next(); if (publishJob.getUserId().equals(user.getId())) { result.add(publishJob); } } return result; }
while (itFinishedJobs.hasNext()) { CmsPublishJobFinished finishedJob = (CmsPublishJobFinished)itFinishedJobs.next(); if (finishedJob.getPublishHistoryId().equals(publishHistoryId)) { return finishedJob;
/** * Returns an unmodifiable list representation of this list.<p> * * @return a list of {@link CmsPublishJobFinished} objects */ protected List asList() { List cachedPublishJobs = OpenCms.getMemoryMonitor().getAllCachedPublishJobsInHistory(); List result = new ArrayList(cachedPublishJobs.size()); Iterator it = cachedPublishJobs.iterator(); while (it.hasNext()) { CmsPublishJobInfoBean publishJob = (CmsPublishJobInfoBean)it.next(); result.add(new CmsPublishJobFinished(publishJob)); } return Collections.unmodifiableList(result); }
/** * Returns an unmodifiable list representation of this list.<p> * * @return a list of {@link CmsPublishJobFinished} objects */ protected List<CmsPublishJobFinished> asList() { List<CmsPublishJobInfoBean> cachedPublishJobs = OpenCms.getMemoryMonitor().getAllCachedPublishJobsInHistory(); List<CmsPublishJobFinished> result = new ArrayList<CmsPublishJobFinished>(cachedPublishJobs.size()); Iterator<CmsPublishJobInfoBean> it = cachedPublishJobs.iterator(); while (it.hasNext()) { CmsPublishJobInfoBean publishJob = it.next(); result.add(new CmsPublishJobFinished(publishJob)); } return Collections.unmodifiableList(result); }