Package net.sf.basedb.util.extensions
Class AboutBean
- java.lang.Object
-
- net.sf.basedb.util.extensions.AboutBean
-
- All Implemented Interfaces:
About
,ExtendedAbout
public class AboutBean extends Object implements About, ExtendedAbout
An implementation of theAbout
interface, which complements all getter methods with setter methods.- Version:
- 2.7
- Author:
- nicklas
- Last modified
- $Date:2008-03-20 12:15:25 +0100 (Thu, 20 Mar 2008) $
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,String>
attributes
private String
contact
private String
copyright
private String
description
private String
email
private String
maxBaseVersion
private String
minBaseVersion
private String
name
private String
url
private String
version
-
Fields inherited from interface net.sf.basedb.core.plugin.About
MAX_INFORMATION_LENGTH
-
-
Constructor Summary
Constructors Constructor Description AboutBean()
Create a new empty about instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copy(About from, boolean overwrite)
Copy information from antoherAbout
object to this one.String
getAttribute(String name)
Get extra informationCollection<String>
getAttributeNames()
Get all extra attribute names.String
getContact()
Contact information to get more information about the plugin.String
getCopyright()
A copyright notice.String
getDescription()
A description of the plugin and what it does.String
getEmail()
An email adress to get more information about the plugin.String
getMaxBaseVersion()
Get the maximum BASE version were to plug-in no longer is expected to work.String
getMinBaseVersion()
Get the minimum BASE version that the plug-in requires.String
getName()
The name of the plugin.String
getUrl()
An URL to get more information about the plugin.String
getVersion()
The version of the plugin software.void
setAttribute(String name, String value)
Set an attribute for the given name.void
setContact(String contact)
void
setCopyright(String copyright)
void
setDescription(String description)
void
setEmail(String email)
void
setMaxBaseVersion(String version)
void
setMinBaseVersion(String version)
void
setName(String name)
void
setUrl(String url)
void
setVersion(String version)
-
-
-
Field Detail
-
name
private String name
-
description
private String description
-
version
private String version
-
minBaseVersion
private String minBaseVersion
-
maxBaseVersion
private String maxBaseVersion
-
copyright
private String copyright
-
contact
private String contact
-
email
private String email
-
url
private String url
-
-
Method Detail
-
getContact
public String getContact()
Description copied from interface:About
Contact information to get more information about the plugin. May return null.- Specified by:
getContact
in interfaceAbout
-
setContact
public void setContact(String contact)
-
getCopyright
public String getCopyright()
Description copied from interface:About
A copyright notice. May return null.- Specified by:
getCopyright
in interfaceAbout
-
setCopyright
public void setCopyright(String copyright)
-
getDescription
public String getDescription()
Description copied from interface:About
A description of the plugin and what it does. May return null.- Specified by:
getDescription
in interfaceAbout
-
setDescription
public void setDescription(String description)
-
getEmail
public String getEmail()
Description copied from interface:About
An email adress to get more information about the plugin. May return null.
-
setEmail
public void setEmail(String email)
-
getName
public String getName()
Description copied from interface:About
The name of the plugin. Mustn't return null.
-
setName
public void setName(String name)
-
getUrl
public String getUrl()
Description copied from interface:About
An URL to get more information about the plugin. May return null.
-
setUrl
public void setUrl(String url)
-
getVersion
public String getVersion()
Description copied from interface:About
The version of the plugin software. May return null.- Specified by:
getVersion
in interfaceAbout
-
setVersion
public void setVersion(String version)
-
getMinBaseVersion
public String getMinBaseVersion()
Description copied from interface:About
Get the minimum BASE version that the plug-in requires. The returned value should be 2 or 3 numbers separated by a dot (eg. 3.0, 3.1.2, etc). A null return value indicates that the plug-in works with all BASE versions.- Specified by:
getMinBaseVersion
in interfaceAbout
- Returns:
- A string or null
-
setMinBaseVersion
public void setMinBaseVersion(String version)
-
getMaxBaseVersion
public String getMaxBaseVersion()
Description copied from interface:About
Get the maximum BASE version were to plug-in no longer is expected to work. The returned value should be 2 or 3 numbers separated by a dot (eg. 3.0, 3.1.2, etc). A null return value indicates that the plug-in works with all BASE versions.- Specified by:
getMaxBaseVersion
in interfaceAbout
- Returns:
- A string or null
-
setMaxBaseVersion
public void setMaxBaseVersion(String version)
-
getAttribute
public String getAttribute(String name)
Description copied from interface:ExtendedAbout
Get extra information- Specified by:
getAttribute
in interfaceExtendedAbout
- Parameters:
name
- The name of the extra information- Returns:
- A value or null if no information is present
-
getAttributeNames
public Collection<String> getAttributeNames()
Description copied from interface:ExtendedAbout
Get all extra attribute names.- Specified by:
getAttributeNames
in interfaceExtendedAbout
- Returns:
- A collection which may be null or empty
-
setAttribute
public void setAttribute(String name, String value)
Set an attribute for the given name.- Since:
- 3.3
-
copy
public void copy(About from, boolean overwrite)
Copy information from antoherAbout
object to this one.- Parameters:
from
- The object to copy fromoverwrite
- TRUE copy all values, FALSE to only copy if the existing value is null
-
-