org.imixs.workflow.plugins
Class AbstractPlugin

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

public abstract class AbstractPlugin
extends java.lang.Object
implements Plugin

This abstract class implements different helper methods used by subclasses

Version:
1.1
Author:
Ralph Soika
See Also:
WorkflowManager

Field Summary
 WorkflowContext ctx
           
 
Fields inherited from interface org.imixs.workflow.Plugin
PLUGIN_ERROR, PLUGIN_OK, PLUGIN_WARNING
 
Constructor Summary
AbstractPlugin()
           
 
Method Summary
 java.lang.String formatItemValues(java.lang.String sFeldname, java.lang.Object aItem, java.lang.String sDelimeter, java.lang.String sFormat)
          this method formate a string object depending of an attribute type
static java.lang.String getAbbreviateName(java.lang.String aName)
          returns the abbreviate name of a hierarchical name.
static java.lang.String getCommonName(java.lang.String aName)
          returns the common name component (CN=) of a hierarchical name.
 void init(WorkflowContext actx)
          The init Methode is usesd to initialize the plugin.
 java.lang.String replaceDynamicValues(java.lang.String aString, 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 WorkflowContext ctx
Constructor Detail

AbstractPlugin

public AbstractPlugin()
Method Detail

init

public void init(WorkflowContext actx)
          throws java.lang.Exception
Description copied from interface: Plugin
The init Methode is usesd to initialize the plugin.

Specified by:
init in interface Plugin
Parameters:
actx - defines the context in which the plugin runs a Plugin can use this context to get information about the enviroment
Throws:
java.lang.Exception

replaceDynamicValues

public java.lang.String replaceDynamicValues(java.lang.String aString,
                                             ItemCollection documentContext)
                                      throws java.lang.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:
java.lang.Exception

formatItemValues

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

Throws:
java.lang.Exception

getCommonName

public static java.lang.String getCommonName(java.lang.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 java.lang.String getAbbreviateName(java.lang.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-2010 Imixs Software Solutions GmbH. All Rights Reserved.