Package tigase.io
Class SSLContextContainer.HardenedModeVHostItemExtension
- java.lang.Object
-
- tigase.vhosts.VHostItemExtension<T>
-
- tigase.vhosts.AbstractVHostItemExtension<SSLContextContainer.HardenedModeVHostItemExtension>
-
- tigase.io.SSLContextContainer.HardenedModeVHostItemExtension
-
- All Implemented Interfaces:
VHostItemExtensionBackwardCompatible<SSLContextContainer.HardenedModeVHostItemExtension>,VHostItemExtensionIfc<SSLContextContainer.HardenedModeVHostItemExtension>
- Enclosing class:
- SSLContextContainer
public static class SSLContextContainer.HardenedModeVHostItemExtension extends AbstractVHostItemExtension<SSLContextContainer.HardenedModeVHostItemExtension> implements VHostItemExtensionBackwardCompatible<SSLContextContainer.HardenedModeVHostItemExtension>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringID
-
Constructor Summary
Constructors Constructor Description HardenedModeVHostItemExtension()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCommandFields(java.lang.String prefix, Packet packet, boolean forDefault)Method adds custom extension fields to the ad-hoc form which will be sent to the user for filling with data required to create or update the VHost details.java.lang.StringgetId()Unique identifier of the extension.SSLContextContainer.HARDENED_MODEgetMode()voidinitFromCommand(java.lang.String prefix, Packet packet)Method initializes instance of a class with values provided by the user using ad-hoc command.voidinitFromData(java.util.Map<java.lang.String,java.lang.Object> data)voidinitFromElement(Element item)Method initializes instances of a class with values from the element which contains configuration loaded from the database.SSLContextContainer.HardenedModeVHostItemExtensionmergeWithDefaults(SSLContextContainer.HardenedModeVHostItemExtension defaults)Abstract method required to be implemented for merging values stored in this instance with default settings stored in the default virtual host item (global or default settings of the installation).static SSLContextContainer.HARDENED_MODEparseHardenedModeFromString(java.lang.String modeString)java.lang.StringtoDebugString()Returns a string containing all information about the instance of the extension useful for debugging.ElementtoElement()Method serializes data stored by this instance to element which will be then stored in the database.-
Methods inherited from class tigase.vhosts.AbstractVHostItemExtension
addBooleanFieldWithDefaultToCommand
-
Methods inherited from class tigase.vhosts.VHostItemExtension
toString
-
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
parseHardenedModeFromString
public static SSLContextContainer.HARDENED_MODE parseHardenedModeFromString(java.lang.String modeString)
-
getId
public java.lang.String getId()
Description copied from interface:VHostItemExtensionIfcUnique identifier of the extension. It has to be a valid XML element name!- Specified by:
getIdin interfaceVHostItemExtensionIfc<SSLContextContainer.HardenedModeVHostItemExtension>
-
initFromElement
public void initFromElement(Element item)
Description copied from interface:VHostItemExtensionIfcMethod initializes instances of a class with values from the element which contains configuration loaded from the database. see VHostItemExtensionIfc::toElement()- Specified by:
initFromElementin interfaceVHostItemExtensionIfc<SSLContextContainer.HardenedModeVHostItemExtension>- Parameters:
item- - provided element with data
-
initFromCommand
public void initFromCommand(java.lang.String prefix, Packet packet) throws java.lang.IllegalArgumentExceptionDescription copied from interface:VHostItemExtensionIfcMethod initializes instance of a class with values provided by the user using ad-hoc command.- Specified by:
initFromCommandin interfaceVHostItemExtensionIfc<SSLContextContainer.HardenedModeVHostItemExtension>- Parameters:
prefix- - prefix for data for fields added by this extensionpacket- - stanza with submitted ad-hoc command form- Throws:
java.lang.IllegalArgumentException
-
getMode
public SSLContextContainer.HARDENED_MODE getMode()
-
toDebugString
public java.lang.String toDebugString()
Description copied from interface:VHostItemExtensionIfcReturns a string containing all information about the instance of the extension useful for debugging.- Specified by:
toDebugStringin interfaceVHostItemExtensionIfc<SSLContextContainer.HardenedModeVHostItemExtension>
-
toElement
public Element toElement()
Description copied from interface:VHostItemExtensionIfcMethod serializes data stored by this instance to element which will be then stored in the database. Element name should be equal to the extension id.- Specified by:
toElementin interfaceVHostItemExtensionIfc<SSLContextContainer.HardenedModeVHostItemExtension>
-
addCommandFields
public void addCommandFields(java.lang.String prefix, Packet packet, boolean forDefault)Description copied from interface:VHostItemExtensionIfcMethod adds custom extension fields to the ad-hoc form which will be sent to the user for filling with data required to create or update the VHost details.- Specified by:
addCommandFieldsin interfaceVHostItemExtensionIfc<SSLContextContainer.HardenedModeVHostItemExtension>- Parameters:
prefix- - prefix which should be used by each added fieldpacket- - packet which will be sent to the userforDefault- - if true, we are preparing form for "default" configuration used by default by all vhosts.
-
initFromData
public void initFromData(java.util.Map<java.lang.String,java.lang.Object> data)
- Specified by:
initFromDatain interfaceVHostItemExtensionBackwardCompatible<SSLContextContainer.HardenedModeVHostItemExtension>
-
mergeWithDefaults
public SSLContextContainer.HardenedModeVHostItemExtension mergeWithDefaults(SSLContextContainer.HardenedModeVHostItemExtension defaults)
Description copied from class:VHostItemExtensionAbstract method required to be implemented for merging values stored in this instance with default settings stored in the default virtual host item (global or default settings of the installation).- Specified by:
mergeWithDefaultsin classVHostItemExtension<SSLContextContainer.HardenedModeVHostItemExtension>- Parameters:
defaults- - instance of the extension with default values- Returns:
- instance of the extension containing merged values
-
-