Package com.cosylab.vdct.plugins
Class NameConfigExample
- java.lang.Object
-
- com.cosylab.vdct.plugins.NameConfigExample
-
- All Implemented Interfaces:
NameConfigPlugin,Plugin
public class NameConfigExample extends 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:<?xml version="1.0" encoding="UTF-8"?> <name pattern="VDCT_.*" default="VDCT_Name1" description="Must start with VDCT_"/> Default and description parameters are optional.- Author:
- ssah
-
-
Field Summary
Fields Modifier and Type Field Description static StringVDCT_NAME_CONFIG_FILEstatic StringVDCT_NAME_CONFIG_FILE_ENV
-
Constructor Summary
Constructors Constructor Description NameConfigExample()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcheckValidity(String name)If name is valid, the function returns null, otherwise it returns a String with the description of the error.voiddestroy()Insert the method's description here.StringgetAuthor()Insert the method's description here.StringgetDefaultName()Returns the default name.StringgetDescription()Insert the method's description here.StringgetName()Insert the method's description here.StringgetNameDescription()Returns the description of the valid names.StringgetVersion()Insert the method's description here.voidinit(Properties properties, PluginContext context)Insert the method's description here.booleanisRunning()Returns true if the plugin has not been stopped since the last start.voidstart()Insert the method's description here.voidstop()Insert the method's description here.
-
-
-
Field Detail
-
VDCT_NAME_CONFIG_FILE
public static final String VDCT_NAME_CONFIG_FILE
- See Also:
- Constant Field Values
-
VDCT_NAME_CONFIG_FILE_ENV
public static final String VDCT_NAME_CONFIG_FILE_ENV
- See Also:
- Constant Field Values
-
-
Method Detail
-
checkValidity
public String checkValidity(String name)
Description copied from interface:NameConfigPluginIf name is valid, the function returns null, otherwise it returns a String with the description of the error.- Specified by:
checkValidityin interfaceNameConfigPlugin- Parameters:
name- name- Returns:
- something
-
getDefaultName
public String getDefaultName()
Returns the default name.- Specified by:
getDefaultNamein interfaceNameConfigPlugin- Returns:
- something
-
getNameDescription
public String getNameDescription()
Description copied from interface:NameConfigPluginReturns the description of the valid names. Can be null.- Specified by:
getNameDescriptionin interfaceNameConfigPlugin- Returns:
- something
-
isRunning
public boolean isRunning()
Description copied from interface:NameConfigPluginReturns true if the plugin has not been stopped since the last start.- Specified by:
isRunningin interfaceNameConfigPlugin- Returns:
- something
-
destroy
public void destroy()
Description copied from interface:PluginInsert the method's description here. Creation date: (6.12.2001 22:04:45)
-
getAuthor
public String getAuthor()
Description copied from interface:PluginInsert the method's description here. Creation date: (6.12.2001 22:10:35)
-
getDescription
public String getDescription()
Description copied from interface:PluginInsert the method's description here. Creation date: (6.12.2001 22:09:48)- Specified by:
getDescriptionin interfacePlugin- Returns:
- java.lang.String
-
getName
public String getName()
Description copied from interface:PluginInsert the method's description here. Creation date: (6.12.2001 22:04:45)
-
getVersion
public String getVersion()
Description copied from interface:PluginInsert the method's description here. Creation date: (6.12.2001 22:10:05)- Specified by:
getVersionin interfacePlugin- Returns:
- java.lang.String
-
init
public void init(Properties properties, PluginContext context)
Description copied from interface:PluginInsert the method's description here. Creation date: (6.12.2001 22:04:45)
-
start
public void start()
Description copied from interface:PluginInsert the method's description here. Creation date: (6.12.2001 22:04:45)
-
-