/** * Returns true if the Object equals to the corresponding CmsResourceInfo, that means a resource info * with the same resource and cause. * * @return true if the resource info is equal to a notification cause or resource info with the same resource and cause * * @param o the object to check for equality * * @see org.opencms.notification.CmsNotificationCause#equals(java.lang.Object) */ @Override public boolean equals(Object o) { if (!(o instanceof CmsExtendedNotificationCause) && !(o instanceof CmsNotificationCause)) { return false; } return hashCode() == o.hashCode(); }
result.append(row); result.append("\"><td width=\"100%\">"); String resourcePath = notificationCause.getResource().getRootPath(); String siteRoot = OpenCms.getSiteManager().getSiteRoot(resourcePath); resourcePath = resourcePath.substring(siteRoot.length()); if ((notificationCause.getResource().getDateReleased() < System.currentTimeMillis()) && (notificationCause.getResource().getDateExpired() > System.currentTimeMillis())) { result.append(siteRoot); result.append("</td><td><div style=\"white-space:nowrap;padding-left:10px;padding-right:10px;\">"); if (notificationCause.getCause() == CmsExtendedNotificationCause.RESOURCE_EXPIRES) { result.append(m_messages.key(Messages.GUI_EXPIRES_AT_1, new Object[] {notificationCause.getDate()})); result.append("</div></td>"); appendConfirmLink(result, notificationCause); appendModifyLink(result, notificationCause); } else if (notificationCause.getCause() == CmsExtendedNotificationCause.RESOURCE_RELEASE) { result.append(m_messages.key(Messages.GUI_RELEASE_AT_1, new Object[] {notificationCause.getDate()})); result.append("</div></td>"); appendConfirmLink(result, notificationCause); appendModifyLink(result, notificationCause); } else if (notificationCause.getCause() == CmsExtendedNotificationCause.RESOURCE_UPDATE_REQUIRED) { result.append(m_messages.key(Messages.GUI_UPDATE_REQUIRED_1, new Object[] {notificationCause.getDate()})); result.append("</div></td>"); appendConfirmLink(result, notificationCause); result.append(m_messages.key( Messages.GUI_UNCHANGED_SINCE_1, new Object[] {new Integer(CmsDateUtil.getDaysPassedSince(notificationCause.getDate()))}));
buf.append("<td>"); try { String resourcePath = notificationCause.getResource().getRootPath(); String siteRoot = OpenCms.getSiteManager().getSiteRoot(resourcePath); resourcePath = resourcePath.substring(siteRoot.length()); wpStartUri.append(m_responsible.getId()); wpStartUri.append("&cause="); wpStartUri.append(notificationCause.getCause()); wpStartUri.append("&resource="); wpStartUri.append(resourcePath);
while (notificationCauses.hasNext()) { CmsExtendedNotificationCause notificationCause = (CmsExtendedNotificationCause)notificationCauses.next(); if (notificationCause.getCause() == CmsExtendedNotificationCause.RESOURCE_OUTDATED) { outdatedResources.add(notificationCause); } else if (notificationCause.getDate().before(tomorrow.getTime())) { resourcesNextDay.add(notificationCause); } else {
try { buf.append("[<a href=\""); String resourcePath = notificationCause.getResource().getRootPath(); String siteRoot = OpenCms.getSiteManager().getSiteRoot(resourcePath); resourcePath = resourcePath.substring(siteRoot.length());
m_resources.add(new CmsExtendedNotificationCause( resource, CmsExtendedNotificationCause.RESOURCE_UPDATE_REQUIRED, while (resources.hasNext()) { resource = (CmsResource)resources.next(); m_resources.add(new CmsExtendedNotificationCause( resource, CmsExtendedNotificationCause.RESOURCE_OUTDATED, while (resources.hasNext()) { resource = (CmsResource)resources.next(); m_resources.add(new CmsExtendedNotificationCause( resource, CmsExtendedNotificationCause.RESOURCE_EXPIRES, while (resources.hasNext()) { resource = (CmsResource)resources.next(); m_resources.add(new CmsExtendedNotificationCause( resource, CmsExtendedNotificationCause.RESOURCE_RELEASE,
result.append(row); result.append("\"><td width=\"100%\">"); String resourcePath = notificationCause.getResource().getRootPath(); String siteRoot = OpenCms.getSiteManager().getSiteRoot(resourcePath); resourcePath = resourcePath.substring(siteRoot.length()); if ((notificationCause.getResource().getDateReleased() < System.currentTimeMillis()) && (notificationCause.getResource().getDateExpired() > System.currentTimeMillis())) { result.append(siteRoot); result.append("</td><td><div style=\"white-space:nowrap;padding-left:10px;padding-right:10px;\">"); if (notificationCause.getCause() == CmsExtendedNotificationCause.RESOURCE_EXPIRES) { result.append(m_messages.key(Messages.GUI_EXPIRES_AT_1, new Object[] {notificationCause.getDate()})); result.append("</div></td>"); appendConfirmLink(result, notificationCause); appendModifyLink(result, notificationCause); } else if (notificationCause.getCause() == CmsExtendedNotificationCause.RESOURCE_RELEASE) { result.append(m_messages.key(Messages.GUI_RELEASE_AT_1, new Object[] {notificationCause.getDate()})); result.append("</div></td>"); appendConfirmLink(result, notificationCause); appendModifyLink(result, notificationCause); } else if (notificationCause.getCause() == CmsExtendedNotificationCause.RESOURCE_UPDATE_REQUIRED) { result.append(m_messages.key(Messages.GUI_UPDATE_REQUIRED_1, new Object[] {notificationCause.getDate()})); result.append("</div></td>"); appendConfirmLink(result, notificationCause); } else { result.append(m_messages.key(Messages.GUI_UNCHANGED_SINCE_1, new Object[] {new Integer( CmsDateUtil.getDaysPassedSince(notificationCause.getDate()))}));
buf.append("<td>"); try { String resourcePath = notificationCause.getResource().getRootPath(); String siteRoot = OpenCms.getSiteManager().getSiteRoot(resourcePath); resourcePath = resourcePath.substring(siteRoot.length()); wpStartUri.append(m_responsible.getId()); wpStartUri.append("&cause="); wpStartUri.append(notificationCause.getCause()); wpStartUri.append("&resource="); wpStartUri.append(resourcePath);
while (notificationCauses.hasNext()) { CmsExtendedNotificationCause notificationCause = notificationCauses.next(); if (notificationCause.getCause() == CmsExtendedNotificationCause.RESOURCE_OUTDATED) { outdatedResources.add(notificationCause); } else if (notificationCause.getDate().before(tomorrow.getTime())) { resourcesNextDay.add(notificationCause); } else {
if (existsEditor(notificationCause.getResource())) { try { String resourcePath = notificationCause.getResource().getRootPath(); String siteRoot = OpenCms.getSiteManager().getSiteRoot(resourcePath); resourcePath = resourcePath.substring(siteRoot.length());
if (intervalBefore.getTime().after(now.getTime())) { m_resources.add( new CmsExtendedNotificationCause( resource, CmsExtendedNotificationCause.RESOURCE_UPDATE_REQUIRED, resource = resources.next(); m_resources.add( new CmsExtendedNotificationCause( resource, CmsExtendedNotificationCause.RESOURCE_OUTDATED, resource = resources.next(); m_resources.add( new CmsExtendedNotificationCause( resource, CmsExtendedNotificationCause.RESOURCE_EXPIRES, resource = resources.next(); m_resources.add( new CmsExtendedNotificationCause( resource, CmsExtendedNotificationCause.RESOURCE_RELEASE,
if (existsEditor(notificationCause.getResource())) { try { String resourcePath = notificationCause.getResource().getRootPath(); String siteRoot = OpenCms.getSiteManager().getSiteRoot(resourcePath); resourcePath = resourcePath.substring(siteRoot.length());
/** * Returns true if the Object equals to the corresponding CmsResourceInfo, that means a resource info * with the same resource and cause. * * @return true if the resource info is equal to a notification cause or resource info with the same resource and cause * * @param o the object to check for equality * * @see org.opencms.notification.CmsNotificationCause#equals(java.lang.Object) */ @Override public boolean equals(Object o) { if (!(o instanceof CmsExtendedNotificationCause) && !(o instanceof CmsNotificationCause)) { return false; } return hashCode() == o.hashCode(); }
try { buf.append("[<a href=\""); String resourcePath = notificationCause.getResource().getRootPath(); String siteRoot = OpenCms.getSiteManager().getSiteRoot(resourcePath); resourcePath = resourcePath.substring(siteRoot.length());
while (notificationCandidates.hasNext()) { CmsExtendedNotificationCause resourceInfo = notificationCandidates.next(); CmsResource resource = resourceInfo.getResource();
while (notificationCandidates.hasNext()) { CmsExtendedNotificationCause resourceInfo = (CmsExtendedNotificationCause)notificationCandidates.next(); CmsResource resource = resourceInfo.getResource();