Package org.opencms.notification
Class CmsExtendedNotificationCause
java.lang.Object
org.opencms.notification.CmsExtendedNotificationCause
- All Implemented Interfaces:
Comparable<CmsExtendedNotificationCause>
public class CmsExtendedNotificationCause
extends Object
implements Comparable<CmsExtendedNotificationCause>
Class to encapsulate a resource and the cause of its notification.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The notification is sent because the resource will expire soon.static final int
The notification is sent because the resource will get outdated.static final int
The notification is sent because the resource will be released soon.static final int
constant indicating the cause of the notification for a resource. -
Constructor Summary
ConstructorDescriptionCmsExtendedNotificationCause
(CmsResource resource, int cause, Date date) Creates a new CmsNotificationResourceInfo. -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
Returns true if the Object equals to the corresponding CmsResourceInfo, that means a resource info with the same resource and cause.int
getCause()
Returns the cause.getDate()
Returns the date.Returns the resource.int
hashCode()
void
setCause
(int cause) Sets the cause.void
Sets the date.void
setResource
(CmsResource resource) Sets the resource.
-
Field Details
-
RESOURCE_EXPIRES
The notification is sent because the resource will expire soon.- See Also:
-
RESOURCE_OUTDATED
The notification is sent because the resource will get outdated.- See Also:
-
RESOURCE_UPDATE_REQUIRED
constant indicating the cause of the notification for a resource.- See Also:
-
RESOURCE_RELEASE
The notification is sent because the resource will be released soon.- See Also:
-
-
Constructor Details
-
CmsExtendedNotificationCause
Creates a new CmsNotificationResourceInfo.- Parameters:
resource
- the specific resourcecause
- that the resource occures in the notificationdate
- when the event will happen
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<CmsExtendedNotificationCause>
- See Also:
-
equals
Returns true if the Object equals to the corresponding CmsResourceInfo, that means a resource info with the same resource and cause. -
hashCode
-
getCause
Returns the cause.- Returns:
- the cause
-
getDate
Returns the date.- Returns:
- the date
-
getResource
Returns the resource.- Returns:
- the resource
-
setCause
Sets the cause.- Parameters:
cause
- the cause to set
-
setDate
Sets the date.- Parameters:
date
- the date to set
-
setResource
Sets the resource.- Parameters:
resource
- the resource to set
-