CmsExtendedNotificationCause
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.opencms.notification.CmsExtendedNotificationCause (Showing top 18 results out of 315)

origin: org.opencms/opencms-core

/**
 *
 * @see java.lang.Comparable#compareTo(java.lang.Object)
 */
public int compareTo(CmsExtendedNotificationCause o) {
  return getDate().compareTo(o.getDate());
}
origin: org.opencms/opencms-core

/**
 * 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();
}
origin: org.opencms/opencms-core

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()))}));
origin: org.opencms/opencms-solr

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);
origin: org.opencms/opencms-solr

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 {
origin: org.opencms/opencms-solr

try {
  buf.append("[<a href=\"");
  String resourcePath = notificationCause.getResource().getRootPath();
  String siteRoot = OpenCms.getSiteManager().getSiteRoot(resourcePath);
  resourcePath = resourcePath.substring(siteRoot.length());
origin: org.opencms/opencms-solr

        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,
origin: org.opencms/opencms-solr

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()))}));
origin: org.opencms/opencms-core

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);
origin: org.opencms/opencms-core

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 {
origin: org.opencms/opencms-core

if (existsEditor(notificationCause.getResource())) {
  try {
    String resourcePath = notificationCause.getResource().getRootPath();
    String siteRoot = OpenCms.getSiteManager().getSiteRoot(resourcePath);
    resourcePath = resourcePath.substring(siteRoot.length());
origin: org.opencms/opencms-core

    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,
origin: org.opencms/opencms-solr

if (existsEditor(notificationCause.getResource())) {
  try {
    String resourcePath = notificationCause.getResource().getRootPath();
    String siteRoot = OpenCms.getSiteManager().getSiteRoot(resourcePath);
    resourcePath = resourcePath.substring(siteRoot.length());
origin: org.opencms/opencms-solr

/**
 * 
 * @see java.lang.Comparable#compareTo(java.lang.Object)
 */
public int compareTo(Object o) {
  if (o instanceof CmsExtendedNotificationCause) {
    return getDate().compareTo(((CmsExtendedNotificationCause)o).getDate());
  } else {
    return -1;
  }
}
origin: org.opencms/opencms-solr

/**
 * 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();
}
origin: org.opencms/opencms-core

try {
  buf.append("[<a href=\"");
  String resourcePath = notificationCause.getResource().getRootPath();
  String siteRoot = OpenCms.getSiteManager().getSiteRoot(resourcePath);
  resourcePath = resourcePath.substring(siteRoot.length());
origin: org.opencms/opencms-core

while (notificationCandidates.hasNext()) {
  CmsExtendedNotificationCause resourceInfo = notificationCandidates.next();
  CmsResource resource = resourceInfo.getResource();
origin: org.opencms/opencms-solr

while (notificationCandidates.hasNext()) {
  CmsExtendedNotificationCause resourceInfo = (CmsExtendedNotificationCause)notificationCandidates.next();
  CmsResource resource = resourceInfo.getResource();
org.opencms.notificationCmsExtendedNotificationCause

Javadoc

Class to encapsulate a resource and the cause of its notification.

Most used methods

  • <init>
    Creates a new CmsNotificationResourceInfo.
  • getCause
    Returns the cause.
  • getDate
    Returns the date.
  • getResource
    Returns the resource.
  • hashCode

Popular in Java

  • Making http requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • findViewById (Activity)
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JTextField (javax.swing)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)