- java.lang.Object
-
- util.program.AbstractPluginProgramFormating
-
- Direct Known Subclasses:
LocalPluginProgramFormating
public abstract class AbstractPluginProgramFormating extends java.lang.Object
A class for a program configuration setting. This is the super class of global and local program configurations.- Since:
- 2.5.1
- Author:
- René Mach
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
mContentValue
protected java.lang.String
mEncodingValue
protected java.lang.String
mId
protected java.lang.String
mName
protected java.lang.String
mTitleValue
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractPluginProgramFormating(java.lang.String id, java.lang.String name, java.lang.String titleValue, java.lang.String contentValue, java.lang.String encodingValue)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getContentValue()
Gets the value for the content formatingjava.lang.String
getEncodingValue()
Gets the value for the formatingjava.lang.String
getId()
java.lang.String
getName()
Gets the name of this configurationjava.lang.String
getTitleValue()
Gets the value for title formatingabstract boolean
isValid()
Gets if the configuration is valid.protected abstract void
loadData(java.io.ObjectInputStream in)
static AbstractPluginProgramFormating
readData(java.io.ObjectInputStream in)
Creates an instance of this class from an ObjectInputStream.void
setContentValue(java.lang.String value)
Sets the content formating valuevoid
setEncodingValue(java.lang.String value)
Sets the encoding value of this configurationvoid
setId(java.lang.String id)
void
setName(java.lang.String value)
Sets the name of this configurationvoid
setTitleValue(java.lang.String value)
Sets the title formating valueprotected abstract void
storeData(java.io.ObjectOutputStream out)
java.lang.String
toString()
void
writeData(java.io.ObjectOutputStream out)
Saves the information about the program configuration values in an ObjectOutputStream.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the name of this configuration- Returns:
- The name of this configuration
-
getTitleValue
public java.lang.String getTitleValue()
Gets the value for title formating- Returns:
- The value for title formating
-
getContentValue
public java.lang.String getContentValue()
Gets the value for the content formating- Returns:
- The value for the content formating
-
getEncodingValue
public java.lang.String getEncodingValue()
Gets the value for the formating- Returns:
- The value for the formating
-
setName
public void setName(java.lang.String value)
Sets the name of this configuration- Parameters:
value
- The new name
-
setTitleValue
public void setTitleValue(java.lang.String value)
Sets the title formating value- Parameters:
value
- The new title value
-
setContentValue
public void setContentValue(java.lang.String value)
Sets the content formating value- Parameters:
value
- The new content value
-
setEncodingValue
public void setEncodingValue(java.lang.String value)
Sets the encoding value of this configuration- Parameters:
value
- The new encoding
-
setId
public void setId(java.lang.String id)
-
readData
public static final AbstractPluginProgramFormating readData(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
Creates an instance of this class from an ObjectInputStream.- Parameters:
in
- The stream to read the values for the instance.- Returns:
- The created instance or
null
if the instance could not be created. - Throws:
java.io.IOException
- Thrown if something goes wrong;java.lang.ClassNotFoundException
- Thrown if something goes wrong;
-
writeData
public final void writeData(java.io.ObjectOutputStream out) throws java.io.IOException
Saves the information about the program configuration values in an ObjectOutputStream.- Parameters:
out
- The stream to write the data to.- Throws:
java.io.IOException
- Thrown if something goes wrong.
-
storeData
protected abstract void storeData(java.io.ObjectOutputStream out) throws java.io.IOException
- Throws:
java.io.IOException
-
loadData
protected abstract void loadData(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
isValid
public abstract boolean isValid()
Gets if the configuration is valid.- Returns:
- If the configuration is valid
-
getId
public java.lang.String getId()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-