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 String
VDCT_NAME_CONFIG_FILE
static String
VDCT_NAME_CONFIG_FILE_ENV
-
Constructor Summary
Constructors Constructor Description NameConfigExample()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
checkValidity(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.String
getAuthor()
Insert the method's description here.String
getDefaultName()
Returns the default name.String
getDescription()
Insert the method's description here.String
getName()
Insert the method's description here.String
getNameDescription()
Returns the description of the valid names.String
getVersion()
Insert the method's description here.void
init(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.
-
-
-
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:NameConfigPlugin
If name is valid, the function returns null, otherwise it returns a String with the description of the error.- Specified by:
checkValidity
in interfaceNameConfigPlugin
- Parameters:
name
- name- Returns:
- something
-
getDefaultName
public String getDefaultName()
Returns the default name.- Specified by:
getDefaultName
in interfaceNameConfigPlugin
- Returns:
- something
-
getNameDescription
public String getNameDescription()
Description copied from interface:NameConfigPlugin
Returns the description of the valid names. Can be null.- Specified by:
getNameDescription
in interfaceNameConfigPlugin
- Returns:
- something
-
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 interfaceNameConfigPlugin
- Returns:
- something
-
destroy
public void destroy()
Description copied from interface:Plugin
Insert the method's description here. Creation date: (6.12.2001 22:04:45)
-
getAuthor
public String getAuthor()
Description copied from interface:Plugin
Insert the method's description here. Creation date: (6.12.2001 22:10:35)
-
getDescription
public 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 interfacePlugin
- Returns:
- java.lang.String
-
getName
public String getName()
Description copied from interface:Plugin
Insert the method's description here. Creation date: (6.12.2001 22:04:45)
-
getVersion
public 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 interfacePlugin
- Returns:
- java.lang.String
-
init
public void init(Properties properties, PluginContext context)
Description copied from interface:Plugin
Insert the method's description here. Creation date: (6.12.2001 22:04:45)
-
start
public void start()
Description copied from interface:Plugin
Insert the method's description here. Creation date: (6.12.2001 22:04:45)
-
-