|
Jive API (3.0.13) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.community.impl.activity.DefaultContentActivityEventHandlingStrategy
public class DefaultContentActivityEventHandlingStrategy
Base implementation of ActivityEventHandlingStrategy to simplify the implementation of
such strategies for future content types. Subclasses may override this to accomodate their particular quirks.
| Field Summary | |
|---|---|
protected Map<ContentEvent.ModificationType,Activity.Type> |
eventToTypeMapping
|
| Constructor Summary | |
|---|---|
DefaultContentActivityEventHandlingStrategy()
|
|
| Method Summary | |
|---|---|
EntityDescriptor |
getActivityActor(BaseJiveEvent event)
Only ContentEvent events are supported. |
EntityDescriptor |
getActivityTargetContainer(BaseJiveEvent event)
Only ContentEvent events are supported. |
EntityDescriptor |
getActivityTargetObject(BaseJiveEvent event)
Only ContentEvent events are supported. |
Activity.Type |
getActivityTypeFrom(BaseJiveEvent event)
Only ContentEvent events are supported. |
boolean |
isActivityRecordable(BaseJiveEvent event)
Only ContentEvent events are supported, and for payloads which are JiveContentObjects. |
protected JiveContainer |
loadContainer(int objectType,
long objectID)
|
protected JiveObject |
loadObject(int objectType,
long objectID)
|
boolean |
shouldDeleteActivities(BaseJiveEvent event)
Only ContentEvent events are supported. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<ContentEvent.ModificationType,Activity.Type> eventToTypeMapping
| Constructor Detail |
|---|
public DefaultContentActivityEventHandlingStrategy()
| Method Detail |
|---|
public boolean isActivityRecordable(BaseJiveEvent event)
ContentEvent events are supported, and for payloads which are JiveContentObjects.
On create, modify, view, and version added events, the activity is by default recordable if
the content object is in PUBLISHED status.
For delete, rate, moderate, and move, the activity is by default recordable.
Other events are not supported.
isActivityRecordable in interface ActivityEventHandlingStrategyevent - the content event
public Activity.Type getActivityTypeFrom(BaseJiveEvent event)
ContentEvent events are supported.
Maps content event types to an activity type.
getActivityTypeFrom in interface ActivityEventHandlingStrategyevent - event the content event
public EntityDescriptor getActivityTargetObject(BaseJiveEvent event)
ContentEvent events are supported.
By default, the method identifies the event payload as the target of an activity.
getActivityTargetObject in interface ActivityEventHandlingStrategyevent - event the content event
public EntityDescriptor getActivityTargetContainer(BaseJiveEvent event)
ContentEvent events are supported.
If the event payload is a ContainerAwareEntityDescriptor, the method
returns the descriptor for that container; if it isn't, the method tries to determine whether or not the object
is a JiveContentObject, and if it is, it tries to load that object's container
and return its descriptor. Otherwise no container is returned.
getActivityTargetContainer in interface ActivityEventHandlingStrategyevent - event the content event
public EntityDescriptor getActivityActor(BaseJiveEvent event)
ContentEvent events are supported.
For rate, modify, and view content events, by default the activity actor returned is the one from the event.
Otherwise, the method determines whether or not the event payload is a JiveContentObject;
if it is, the author of the object is returned.
getActivityActor in interface ActivityEventHandlingStrategyevent - event the content event
protected JiveObject loadObject(int objectType,
long objectID)
protected JiveContainer loadContainer(int objectType,
long objectID)
public boolean shouldDeleteActivities(BaseJiveEvent event)
ContentEvent events are supported.
Returns true if the event type is deleted, or if the event type is moderate, and the
the object payload is a JiveContentObject which is not visible
due to moderation status.
shouldDeleteActivities in interface ActivityEventHandlingStrategyevent - event the content event
|
Jive Product Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||