BrightSide Workbench Full Report + Source Code
org.turro.plugin.command.TimelinePlugin Class Referenceabstract
Inheritance diagram for org.turro.plugin.command.TimelinePlugin:
Collaboration diagram for org.turro.plugin.command.TimelinePlugin:

Public Member Functions

String getName ()
 
boolean stopPropagating ()
 
void execute ()
 
String getName ()
 
boolean stopsPropagating ()
 
void setParams (Object params)
 
Object execute (Context context)
 
- Public Member Functions inherited from org.turro.action.DefaultPlugin
void setContext (Map< String, Object > params, Map< String, Object > results)
 
Object getParam (String key)
 
boolean itsMe (String name)
 
Object addResult (String key, Object value)
 

Static Public Member Functions

static String getTimelineFor (IContact contact)
 
static String generateXML (Collection result)
 
static String getTimelineFor (Application app, IContact contact)
 
static String generateXML (Application app, Collection< TimelineEvent > result)
 

Protected Member Functions

abstract void executePlugin ()
 
void addToResult (Object data)
 
abstract void executePlugin (Context context) throws Exception
 

Protected Attributes

IContact contact
 
Collection< TimelineEventresult
 
- Protected Attributes inherited from org.turro.action.DefaultPlugin
Map< String, Object > params
 
Map< String, Object > results
 

Detailed Description

Member Function Documentation

◆ addToResult()

void org.turro.plugin.command.TimelinePlugin.addToResult ( Object  data)
protected

Definition at line 69 of file elephant-plugins/src/main/java/org/turro/plugin/command/TimelinePlugin.java.

69  {
70  if(result == null) {
71  result = new TreeSet<TimelineEvent>();
72  }
73  if(data instanceof TimelineEvent) {
74  result.add((TimelineEvent) data);
75  }
76  }

◆ execute() [1/2]

void org.turro.plugin.command.TimelinePlugin.execute ( )

Reimplemented from org.turro.action.DefaultPlugin.

Definition at line 48 of file elephant/src/main/java/org/turro/plugin/command/TimelinePlugin.java.

Here is the call graph for this function:

◆ execute() [2/2]

Object org.turro.plugin.command.TimelinePlugin.execute ( Context  context)

Definition at line 55 of file elephant-plugins/src/main/java/org/turro/plugin/command/TimelinePlugin.java.

55  {
56 // if(getName().equals(context.get(CommandFactory.COMMAND_PARS))) {
57 // setParams(context.get(CommandFactory.DATA));
58 // result = (Collection<TimelineEvent>) context.get(CommandFactory.RESULT);
59 // executePlugin(context);
60 // context.put(CommandFactory.RESULT, result);
61 // if(stopsPropagating()) {
62 // return PROCESSING_COMPLETE;
63 // }
64 // }
65 // return CONTINUE_PROCESSING;
66  return null;
67  };

◆ executePlugin() [1/2]

abstract void org.turro.plugin.command.TimelinePlugin.executePlugin ( )
abstractprotected

Reimplemented in org.turro.dossier.command.IssueTimeline.

Here is the caller graph for this function:

◆ executePlugin() [2/2]

abstract void org.turro.plugin.command.TimelinePlugin.executePlugin ( Context  context) throws Exception
abstractprotected

◆ generateXML() [1/2]

static String org.turro.plugin.command.TimelinePlugin.generateXML ( Application  app,
Collection< TimelineEvent result 
)
static

Definition at line 89 of file elephant-plugins/src/main/java/org/turro/plugin/command/TimelinePlugin.java.

89  {
90  StringBuilder sb = new StringBuilder("<data>\n");
91  for(TimelineEvent tle : result) {
92  sb.append(tle.getEvent(app));
93  }
94  sb.append("\n</data>");
95  return sb.toString();
96  }

◆ generateXML() [2/2]

static String org.turro.plugin.command.TimelinePlugin.generateXML ( Collection  result)
static

Definition at line 62 of file elephant/src/main/java/org/turro/plugin/command/TimelinePlugin.java.

62  {
63  StringBuilder sb = new StringBuilder("<data>\n");
64  for(TimelineEvent tle : (Collection<TimelineEvent>) result) {
65  sb.append(tle.getEvent());
66  }
67  sb.append("\n</data>");
68  return sb.toString();
69  }
Here is the caller graph for this function:

◆ getName() [1/2]

String org.turro.plugin.command.TimelinePlugin.getName ( )

Reimplemented from org.turro.action.DefaultPlugin.

Definition at line 38 of file elephant-plugins/src/main/java/org/turro/plugin/command/TimelinePlugin.java.

38  {
39  return "Timeline";
40  }

◆ getName() [2/2]

String org.turro.plugin.command.TimelinePlugin.getName ( )

Reimplemented from org.turro.action.DefaultPlugin.

Definition at line 38 of file elephant/src/main/java/org/turro/plugin/command/TimelinePlugin.java.

38  {
39  return "Timeline";
40  }

◆ getTimelineFor() [1/2]

static String org.turro.plugin.command.TimelinePlugin.getTimelineFor ( Application  app,
IContact  contact 
)
static

Definition at line 80 of file elephant-plugins/src/main/java/org/turro/plugin/command/TimelinePlugin.java.

80  {
81 // Collection<TimelineEvent> list = (Collection<TimelineEvent>) CommandFactory
82 // .executePlugins(app, contact, "Timeline");
83 // if(list != null) {
84 // return generateXML(app, list);
85 // }
86  return null;
87  }

◆ getTimelineFor() [2/2]

static String org.turro.plugin.command.TimelinePlugin.getTimelineFor ( IContact  contact)
static

Definition at line 55 of file elephant/src/main/java/org/turro/plugin/command/TimelinePlugin.java.

55  {
56  Map<String, Object> args = new HashMap<>();
57  args.put("contact", contact);
58  args = Plugins.execute("Timeline", args);
59  return generateXML(args.values());
60  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setParams()

void org.turro.plugin.command.TimelinePlugin.setParams ( Object  params)

Implements org.turro.plugin.command.IPlugin.

Definition at line 48 of file elephant-plugins/src/main/java/org/turro/plugin/command/TimelinePlugin.java.

48  {
49  if(params instanceof IContact) {
50  contact = (IContact) params;
51  }
52  }
Map< String, Object > params

◆ stopPropagating()

boolean org.turro.plugin.command.TimelinePlugin.stopPropagating ( )

Reimplemented from org.turro.action.DefaultPlugin.

Definition at line 43 of file elephant/src/main/java/org/turro/plugin/command/TimelinePlugin.java.

43  {
44  return false;
45  }

◆ stopsPropagating()

boolean org.turro.plugin.command.TimelinePlugin.stopsPropagating ( )

Implements org.turro.plugin.command.IPlugin.

Definition at line 43 of file elephant-plugins/src/main/java/org/turro/plugin/command/TimelinePlugin.java.

43  {
44  return false;
45  }

Member Data Documentation

◆ contact

IContact org.turro.plugin.command.TimelinePlugin.contact
protected

◆ result

Collection< TimelineEvent > org.turro.plugin.command.TimelinePlugin.result
protected

The documentation for this class was generated from the following file: