com.poemspace.dm4
Class PoemSpacePlugin

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.core.osgi.PluginActivator
      extended by com.poemspace.dm4.PoemSpacePlugin
All Implemented Interfaces:
PluginContext, org.osgi.framework.BundleActivator

public class PoemSpacePlugin
extends PluginActivator


Field Summary
private  AccessControlService acService
           
private static String CAMPAIGN
           
private static String COUNT
           
private  CriteriaCache criteria
           
private static String EXCLUDE
           
private static String INCLUDE
           
private  boolean isInitialized
           
private static Logger log
           
private  de.deepamehta.plugins.mail.service.MailService mailService
           
static Comparator<Topic> VALUE_COMPARATOR
           
 
Fields inherited from class de.deepamehta.core.osgi.PluginActivator
bundle, dms
 
Constructor Summary
PoemSpacePlugin()
           
 
Method Summary
private  void checkACLsOfMigration()
           
private  void checkACLsOfObject(DeepaMehtaObject instance)
           
private  void checkACLsOfTopics(String typeUri)
           
private  void configureIfReady()
           
 Topic createCriteria(String name, ClientState cookie)
           
private  Association createOrUpdateRecipient(String typeUri, long campaignId, long recipientId, ClientState clientState)
           
 Association exclude(long campaignId, long recipientId, ClientState cookie)
           
 List<Topic> getCriteriaTypes()
           
private  Map<String,Set<RelatedTopic>> getCriterionMap(Topic topic)
          Returns all criteria aggregations of a topic.
private  Set<Topic> getCriterionRecipients(Set<RelatedTopic> criterionList, Set<String> searchTypeUris)
          Returns parent aggregates of each criterion.
private  Set<String> getSearchTypeUris()
           
 Association include(long campaignId, long recipientId, ClientState cookie)
           
 void init()
          Initialize.
 List<Topic> queryCampaignRecipients(long campaignId, ClientState cookie)
           
private  List<Topic> queryCampaignRecipients(Topic campaign)
           
 List<Topic> reloadCriteriaCache()
           
 de.deepamehta.plugins.mail.StatusReport sendCampaignMail(long mailId, ClientState cookie)
          Sends a campaign mail.
 void serviceArrived(PluginService service)
           
 void serviceGone(PluginService service)
           
 Topic startCampaign(long mailId, ClientState cookie)
          Starts and returns a new campaign from a mail.
 
Methods inherited from class de.deepamehta.core.osgi.PluginActivator
getBundleContext, postInstall, publishDirectory, setCoreService, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CAMPAIGN

private static final String CAMPAIGN
See Also:
Constant Field Values

COUNT

private static final String COUNT
See Also:
Constant Field Values

EXCLUDE

private static final String EXCLUDE
See Also:
Constant Field Values

INCLUDE

private static final String INCLUDE
See Also:
Constant Field Values

log

private static Logger log

acService

private AccessControlService acService

criteria

private CriteriaCache criteria

mailService

private de.deepamehta.plugins.mail.service.MailService mailService

isInitialized

private boolean isInitialized

VALUE_COMPARATOR

public static final Comparator<Topic> VALUE_COMPARATOR
Constructor Detail

PoemSpacePlugin

public PoemSpacePlugin()
Method Detail

getCriteriaTypes

public List<Topic> getCriteriaTypes()

reloadCriteriaCache

public List<Topic> reloadCriteriaCache()

createCriteria

public Topic createCriteria(String name,
                            @HeaderParam(value="Cookie")
                            ClientState cookie)

include

public Association include(long campaignId,
                           long recipientId,
                           @HeaderParam(value="Cookie")
                           ClientState cookie)

exclude

public Association exclude(long campaignId,
                           long recipientId,
                           @HeaderParam(value="Cookie")
                           ClientState cookie)

queryCampaignRecipients

public List<Topic> queryCampaignRecipients(long campaignId,
                                           @HeaderParam(value="Cookie")
                                           ClientState cookie)

startCampaign

public Topic startCampaign(long mailId,
                           @HeaderParam(value="Cookie")
                           ClientState cookie)
Starts and returns a new campaign from a mail.

Parameters:
mailId -
cookie -
Returns:
Campaign associated with the starting mail.

sendCampaignMail

public de.deepamehta.plugins.mail.StatusReport sendCampaignMail(long mailId,
                                                                @HeaderParam(value="Cookie")
                                                                ClientState cookie)
Sends a campaign mail.

Parameters:
mailId -
cookie -
Returns:
Sent mail topic.

init

public void init()
Initialize.

Specified by:
init in interface PluginContext
Overrides:
init in class PluginActivator

serviceArrived

public void serviceArrived(PluginService service)
Specified by:
serviceArrived in interface PluginContext
Overrides:
serviceArrived in class PluginActivator

configureIfReady

private void configureIfReady()

serviceGone

public void serviceGone(PluginService service)
Specified by:
serviceGone in interface PluginContext
Overrides:
serviceGone in class PluginActivator

checkACLsOfMigration

private void checkACLsOfMigration()

checkACLsOfTopics

private void checkACLsOfTopics(String typeUri)

checkACLsOfObject

private void checkACLsOfObject(DeepaMehtaObject instance)

queryCampaignRecipients

private List<Topic> queryCampaignRecipients(Topic campaign)

getSearchTypeUris

private Set<String> getSearchTypeUris()

getCriterionRecipients

private Set<Topic> getCriterionRecipients(Set<RelatedTopic> criterionList,
                                          Set<String> searchTypeUris)
Returns parent aggregates of each criterion.

Parameters:
criterionList - criterion topics
searchTypeUris - topic type URIs of possible recipients
Returns:

getCriterionMap

private Map<String,Set<RelatedTopic>> getCriterionMap(Topic topic)
Returns all criteria aggregations of a topic.

Parameters:
topic -
Returns:
criterion map of all aggregated criteria sub type instances

createOrUpdateRecipient

private Association createOrUpdateRecipient(String typeUri,
                                            long campaignId,
                                            long recipientId,
                                            ClientState clientState)


Copyright © 2013. All Rights Reserved.