com.cosylab.vdct.plugins
Class NameConfigExample

java.lang.Object
  extended by com.cosylab.vdct.plugins.NameConfigExample
All Implemented Interfaces:
NameConfigPlugin, Plugin

public class NameConfigExample
extends java.lang.Object
implements NameConfigPlugin

This NameConfigPlugin example checks the record names using a pattern loaded from an xml file. The file name is defined by VDCT_NAME_CONFIG_FILE filename located in user home directory (or in VDCT_CONFIG_DIR dir). Use VDCT_NAME_CONFIG_FILE_ENV environment variable to override this default setting. An example of XML file: Default and description parameters are optional.

Author:
ssah

Field Summary
static java.lang.String VDCT_NAME_CONFIG_FILE
           
static java.lang.String VDCT_NAME_CONFIG_FILE_ENV
           
 
Constructor Summary
NameConfigExample()
           
 
Method Summary
 java.lang.String checkValidity(java.lang.String name)
          If name is valid, the function returns null, otherwise it returns a String with the description of the error.
 void destroy()
          Insert the method's description here.
 java.lang.String getAuthor()
          Insert the method's description here.
 java.lang.String getDefaultName()
          Returns the default name.
 java.lang.String getDescription()
          Insert the method's description here.
 java.lang.String getName()
          Insert the method's description here.
 java.lang.String getNameDescription()
          Returns the description of the valid names.
 java.lang.String getVersion()
          Insert the method's description here.
 void init(java.util.Properties properties, PluginContext context)
          Insert the method's description here.
 boolean isRunning()
          Returns true if the plugin has not been stopped since the last start.
 void start()
          Insert the method's description here.
 void stop()
          Insert the method's description here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VDCT_NAME_CONFIG_FILE

public static final java.lang.String VDCT_NAME_CONFIG_FILE
See Also:
Constant Field Values

VDCT_NAME_CONFIG_FILE_ENV

public static final java.lang.String VDCT_NAME_CONFIG_FILE_ENV
See Also:
Constant Field Values
Constructor Detail

NameConfigExample

public NameConfigExample()
Method Detail

checkValidity

public java.lang.String checkValidity(java.lang.String name)
Description copied from interface: NameConfigPlugin
If name is valid, the function returns null, otherwise it returns a String with the description of the error.

Specified by:
checkValidity in interface NameConfigPlugin

getDefaultName

public java.lang.String getDefaultName()
Returns the default name.

Specified by:
getDefaultName in interface NameConfigPlugin

getNameDescription

public java.lang.String getNameDescription()
Description copied from interface: NameConfigPlugin
Returns the description of the valid names. Can be null.

Specified by:
getNameDescription in interface NameConfigPlugin

isRunning

public boolean isRunning()
Description copied from interface: NameConfigPlugin
Returns true if the plugin has not been stopped since the last start.

Specified by:
isRunning in interface NameConfigPlugin

destroy

public void destroy()
Description copied from interface: Plugin
Insert the method's description here. Creation date: (6.12.2001 22:04:45)

Specified by:
destroy in interface Plugin

getAuthor

public java.lang.String getAuthor()
Description copied from interface: Plugin
Insert the method's description here. Creation date: (6.12.2001 22:10:35)

Specified by:
getAuthor in interface Plugin
Returns:
java.lang.String

getDescription

public java.lang.String getDescription()
Description copied from interface: Plugin
Insert the method's description here. Creation date: (6.12.2001 22:09:48)

Specified by:
getDescription in interface Plugin
Returns:
java.lang.String

getName

public java.lang.String getName()
Description copied from interface: Plugin
Insert the method's description here. Creation date: (6.12.2001 22:04:45)

Specified by:
getName in interface Plugin
Returns:

getVersion

public java.lang.String getVersion()
Description copied from interface: Plugin
Insert the method's description here. Creation date: (6.12.2001 22:10:05)

Specified by:
getVersion in interface Plugin
Returns:
java.lang.String

init

public void init(java.util.Properties properties,
                 PluginContext context)
Description copied from interface: Plugin
Insert the method's description here. Creation date: (6.12.2001 22:04:45)

Specified by:
init in interface Plugin

start

public void start()
Description copied from interface: Plugin
Insert the method's description here. Creation date: (6.12.2001 22:04:45)

Specified by:
start in interface Plugin

stop

public void stop()
Description copied from interface: Plugin
Insert the method's description here. Creation date: (6.12.2001 22:04:45)

Specified by:
stop in interface Plugin