org.opencms.notification
Class CmsNotificationCause

java.lang.Object
  extended by org.opencms.notification.CmsNotificationCause
All Implemented Interfaces:
java.io.Serializable

public class CmsNotificationCause
extends java.lang.Object
implements java.io.Serializable

Objects of this class are serialized in the additional infos of a user to store, which resources were already confirmed by the user. This class is the counterpart to CmsExtendedNotificationCause, to be used for serialization in the AdditionalInfos of a CmsUser, and therefore only contains the essential information

Author:
Jan Baudisch
See Also:
Serialized Form

Constructor Summary
CmsNotificationCause(CmsUUID resource, int cause)
          Creates a new CmsNotificationResourceInfo.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true if the Object equals to the corresponding CmsNotificationCause, that means a notification cause with the same resource and cause.
 int getCause()
          Returns the cause.
 CmsUUID getResourceId()
          Returns the resource.
 int hashCode()
           
 void setCause(int cause)
          Sets the cause.
 void setResourceId(CmsUUID resourceId)
          Sets the resource.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsNotificationCause

public CmsNotificationCause(CmsUUID resource,
                            int cause)
Creates a new CmsNotificationResourceInfo.

Parameters:
resource - the specific resource
cause - that the resource occures in the notification
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

equals

public boolean equals(java.lang.Object o)
Returns true if the Object equals to the corresponding CmsNotificationCause, that means a notification cause with the same resource and cause.

Overrides:
equals in class java.lang.Object
Parameters:
o - the object to check for equality
Returns:
true if the resource info is equal to a notification cause or resource info with the same resource and cause
See Also:
CmsExtendedNotificationCause.equals(java.lang.Object)

getCause

public int getCause()
Returns the cause.

Returns:
the cause

getResourceId

public CmsUUID getResourceId()
Returns the resource.

Returns:
the resource

setCause

public void setCause(int cause)
Sets the cause.

Parameters:
cause - the cause to set

setResourceId

public void setResourceId(CmsUUID resourceId)
Sets the resource.

Parameters:
resourceId - the resource to set