org.imixs.workflow.plugins
Class AbstractPlugin

java.lang.Object
  extended by org.imixs.workflow.plugins.AbstractPlugin
All Implemented Interfaces:
org.imixs.workflow.Plugin
Direct Known Subclasses:
AbstractPlugin, ApplicationPlugin, HistoryPlugin, LogPlugin, LucenePlugin, ResultPlugin

public abstract class AbstractPlugin
extends Object
implements org.imixs.workflow.Plugin

This abstract class implements different helper methods used by subclasses

Version:
1.1
Author:
Ralph Soika
See Also:
WorkflowManager

Field Summary
 org.imixs.workflow.WorkflowContext ctx
           
 
Fields inherited from interface org.imixs.workflow.Plugin
PLUGIN_ERROR, PLUGIN_OK, PLUGIN_WARNING
 
Constructor Summary
AbstractPlugin()
           
 
Method Summary
 String formatItemValues(String sFeldname, Object aItem, String sDelimeter, String sFormat)
          this method formate a string object depending of an attribute type
static String getAbbreviateName(String aName)
          returns the abbreviate name of a hierarchical name.
static String getCommonName(String aName)
          returns the common name component (CN=) of a hierarchical name.
 void init(org.imixs.workflow.WorkflowContext actx)
           
 String replaceDynamicValues(String aString, org.imixs.workflow.ItemCollection documentContext)
          this method replaces a string with place holders defines a field of a workitem wich will be replaced by its value inside a field tag it is possible to provide an additional format string to be used to format a object value. example: ...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.imixs.workflow.Plugin
close, run
 

Field Detail

ctx

public org.imixs.workflow.WorkflowContext ctx
Constructor Detail

AbstractPlugin

public AbstractPlugin()
Method Detail

init

public void init(org.imixs.workflow.WorkflowContext actx)
          throws Exception
Specified by:
init in interface org.imixs.workflow.Plugin
Throws:
Exception

replaceDynamicValues

public String replaceDynamicValues(String aString,
                                   org.imixs.workflow.ItemCollection documentContext)
                            throws Exception
this method replaces a string with place holders

defines a field of a workitem wich will be replaced by its value

inside a field tag it is possible to provide an additional format string to be used to format a object value. example: ...datStart[mm:ss]..... this will format a date object with the format mm:ss

Throws:
Exception

formatItemValues

public String formatItemValues(String sFeldname,
                               Object aItem,
                               String sDelimeter,
                               String sFormat)
                        throws Exception
this method formate a string object depending of an attribute type

Throws:
Exception

getCommonName

public static String getCommonName(String aName)
returns the common name component (CN=) of a hierarchical name.

Parameters:
aName - (e.g "CN=Ralph Soika/O=IMIXS")
Returns:
("Ralph Soika")

getAbbreviateName

public static String getAbbreviateName(String aName)
returns the abbreviate name of a hierarchical name.

Parameters:
aName - (e.g "CN=Ralph Soika/O=IMIXS")
Returns:
("Ralph Soika/IMIXS")


Copyright © 2006-2011 Imixs Software Solutions GmbH. All Rights Reserved.