com.silverpeas.subscribe.service
Class AbstractSubscription

java.lang.Object
  extended by com.silverpeas.subscribe.service.AbstractSubscription
All Implemented Interfaces:
Subscription
Direct Known Subclasses:
ComponentSubscription, NodeSubscription, PKSubscription

public abstract class AbstractSubscription
extends Object
implements Subscription

User: Yohann Chastagnier Date: 19/02/13


Constructor Summary
protected AbstractSubscription(SubscriptionSubscriber subscriber, SubscriptionResource resource, String creatorId)
          Constructor which use by default SubscriptionMethod.SELF_CREATION and null creation date.
protected AbstractSubscription(SubscriptionSubscriber subscriber, SubscriptionResource resource, SubscriptionMethod subscriptionMethod, String creatorId, Date creationDate)
          The more complete constructor.
 
Method Summary
 boolean equals(Object o)
           
 Date getCreationDate()
           
 String getCreatorId()
           
 SubscriptionResource getResource()
           
 SubscriptionSubscriber getSubscriber()
           
 SubscriptionMethod getSubscriptionMethod()
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSubscription

protected AbstractSubscription(SubscriptionSubscriber subscriber,
                               SubscriptionResource resource,
                               String creatorId)
Constructor which use by default SubscriptionMethod.SELF_CREATION and null creation date.

Parameters:
subscriber - id and type of the subscriber
resource - id, type and pk of the resource aimed by the subscription
creatorId - the user id that has handled the subscription

AbstractSubscription

protected AbstractSubscription(SubscriptionSubscriber subscriber,
                               SubscriptionResource resource,
                               SubscriptionMethod subscriptionMethod,
                               String creatorId,
                               Date creationDate)
The more complete constructor.

Parameters:
subscriber - id and type of the subscriber
resource - id, type and pk of the resource aimed by the subscription
subscriptionMethod - the way the subscriber has subscribed (for now, himself or forced)
creatorId - the user id that has handled the subscription
creationDate - date of the subscription creation (date when saved)
Method Detail

getSubscriber

public SubscriptionSubscriber getSubscriber()
Specified by:
getSubscriber in interface Subscription

getResource

public SubscriptionResource getResource()
Specified by:
getResource in interface Subscription

getSubscriptionMethod

public SubscriptionMethod getSubscriptionMethod()
Specified by:
getSubscriptionMethod in interface Subscription

getCreatorId

public String getCreatorId()
Specified by:
getCreatorId in interface Subscription

getCreationDate

public Date getCreationDate()
Specified by:
getCreationDate in interface Subscription

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2016 Silverpeas. All Rights Reserved.