org.exoplatform.social.extras.feedmash
Class AbstractFeedmashJob

java.lang.Object
  extended by org.exoplatform.social.extras.feedmash.AbstractFeedmashJob
All Implemented Interfaces:
org.quartz.Job
Direct Known Subclasses:
HudsonFeedConsumer, JiraFeedConsumer

public abstract class AbstractFeedmashJob
extends Object
implements org.quartz.Job


Field Summary
protected  String feedLastCheck
           
protected  String feedUrl
           
protected static String LAST_CHECKED
           
protected  String password
           
protected  String pluginName
           
protected  String portalContainer
           
protected  Integer rampup
           
protected  String targetActivityStream
           
protected  String username
           
 
Constructor Summary
AbstractFeedmashJob()
           
 
Method Summary
protected abstract  boolean accept(com.sun.syndication.feed.synd.SyndEntryImpl entry)
           
protected  boolean alreadyChecked(Date date)
           
 void beforeJobExecute(org.quartz.JobDataMap dataMap)
           
 void execute(org.quartz.JobExecutionContext context)
          Feedmash job.
protected  org.exoplatform.social.core.identity.model.Identity getAppIdentity(Application app)
           
protected
<T> T
getExoComponent(Class<T> type)
           
protected  org.exoplatform.social.core.identity.model.Identity getIdentity(String targetUser)
           
protected  Object getState(String key)
           
protected  String getStateKey(String key)
           
protected  String getStringParam(org.quartz.JobDataMap dataMap, String name, String defaultValue)
           
protected abstract  void handle(com.sun.syndication.feed.synd.SyndEntryImpl entry)
           
protected  void publishActivity(String message, org.exoplatform.social.core.identity.model.Identity from, org.exoplatform.social.core.identity.model.Identity to)
          Publish an activity
protected  void saveState(String key, Object state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAST_CHECKED

protected static final String LAST_CHECKED
See Also:
Constant Field Values

targetActivityStream

protected String targetActivityStream

portalContainer

protected String portalContainer

feedUrl

protected String feedUrl

rampup

protected Integer rampup

pluginName

protected String pluginName

feedLastCheck

protected String feedLastCheck

username

protected String username

password

protected String password
Constructor Detail

AbstractFeedmashJob

public AbstractFeedmashJob()
Method Detail

execute

public void execute(org.quartz.JobExecutionContext context)
             throws org.quartz.JobExecutionException
Feedmash job. Provides support for fetching the job. Lets subclasses filter and process the matching entries.

Specified by:
execute in interface org.quartz.Job
Throws:
org.quartz.JobExecutionException

handle

protected abstract void handle(com.sun.syndication.feed.synd.SyndEntryImpl entry)

accept

protected abstract boolean accept(com.sun.syndication.feed.synd.SyndEntryImpl entry)

beforeJobExecute

public void beforeJobExecute(org.quartz.JobDataMap dataMap)

getState

protected Object getState(String key)

saveState

protected void saveState(String key,
                         Object state)

getStateKey

protected String getStateKey(String key)

alreadyChecked

protected boolean alreadyChecked(Date date)

getExoComponent

protected <T> T getExoComponent(Class<T> type)

publishActivity

protected void publishActivity(String message,
                               org.exoplatform.social.core.identity.model.Identity from,
                               org.exoplatform.social.core.identity.model.Identity to)
                        throws Exception
Publish an activity

Parameters:
message - body of the activity
from - owner of the activity
to - target of the activity
Throws:
Exception

getIdentity

protected org.exoplatform.social.core.identity.model.Identity getIdentity(String targetUser)

getStringParam

protected String getStringParam(org.quartz.JobDataMap dataMap,
                                String name,
                                String defaultValue)

getAppIdentity

protected org.exoplatform.social.core.identity.model.Identity getAppIdentity(Application app)
                                                                      throws Exception
Throws:
Exception


Copyright © 2013 eXo Platform SAS. All Rights Reserved.