public abstract class ConfigFileData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_CONFIG_DELIM_END |
static java.lang.String |
DEFAULT_CONFIG_DELIM_START |
static long |
MAX_FILE_SIZE |
Constructor and Description |
---|
ConfigFileData()
Constructor for COnfigFIleData
|
Modifier and Type | Method and Description |
---|---|
ConfigInfo |
extractInfo() |
abstract long |
getContentSize() |
abstract java.io.InputStream |
getContentStream() |
java.lang.String |
getGroup() |
java.lang.String |
getMacroEnd() |
java.lang.String |
getMacroStart() |
java.lang.String |
getOwner() |
java.lang.String |
getPath() |
java.lang.String |
getPermissions() |
java.lang.String |
getRevNumber() |
java.lang.String |
getSelinuxCtx() |
ConfigFileType |
getType() |
boolean |
isBinary() |
boolean |
isFile() |
protected java.util.Map |
makeValidationMap()
Basically returns a map equating ConfigFileForm's form fieldnames
to values from config file data..
|
boolean |
matchesRevision(ConfigRevision cRevision) |
abstract void |
processRevisedContentFrom(ConfigRevision rev)
Basically Extension point to update the relevant in this data file
with the content provided in the revision param.
|
void |
setGroup(java.lang.String groupIn) |
void |
setMacroEnd(java.lang.String macroEndDelimiter) |
void |
setMacroStart(java.lang.String macroStartDelimiter) |
void |
setOwner(java.lang.String ownerName) |
void |
setPath(java.lang.String filePath) |
void |
setPermissions(java.lang.String perms) |
void |
setRevNumber(java.lang.String revNumberIn) |
void |
setSelinuxCtx(java.lang.String context) |
void |
setType(ConfigFileType fileType) |
java.lang.String |
toString() |
void |
validate(boolean onCreate)
Entry point to validate the contents of this form..
|
protected abstract void |
validateContents(ValidatorResult result,
boolean onCreate) |
void |
validatePath()
Validates the path explicatily ensuring it follows Linux/Unix path
conventions.
|
protected ValidatorError |
validateSELinux() |
public static final java.lang.String DEFAULT_CONFIG_DELIM_START
public static final java.lang.String DEFAULT_CONFIG_DELIM_END
public static final long MAX_FILE_SIZE
public java.lang.String getPath()
public void setPath(java.lang.String filePath)
filePath
- the path to setpublic java.lang.String getOwner()
public void setOwner(java.lang.String ownerName)
ownerName
- the owner to setpublic java.lang.String getGroup()
public void setGroup(java.lang.String groupIn)
groupIn
- the group to setpublic java.lang.String getPermissions()
public void setPermissions(java.lang.String perms)
perms
- the permissions to setpublic java.lang.String getSelinuxCtx()
public void setSelinuxCtx(java.lang.String context)
context
- the SELinux context to setpublic java.lang.String getMacroStart()
public void setMacroStart(java.lang.String macroStartDelimiter)
macroStartDelimiter
- the macroStart to setpublic java.lang.String getMacroEnd()
public void setMacroEnd(java.lang.String macroEndDelimiter)
macroEndDelimiter
- the macroEnd to setpublic boolean isBinary()
public ConfigFileType getType()
public void setType(ConfigFileType fileType)
fileType
- the type to setpublic ConfigInfo extractInfo()
protected ValidatorError validateSELinux()
protected abstract void validateContents(ValidatorResult result, boolean onCreate)
public abstract java.io.InputStream getContentStream()
public abstract long getContentSize()
public boolean isFile()
public void validate(boolean onCreate) throws ValidatorException
onCreate
- true if we're creating a config-file, false if we're only updatingValidatorException
- if there are any validation errors.public void validatePath() throws ValidatorException
ValidatorException
- if there are any validation errors.protected java.util.Map makeValidationMap()
public abstract void processRevisedContentFrom(ConfigRevision rev)
rev
- the revision to copy stuff from..public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevNumber()
public void setRevNumber(java.lang.String revNumberIn)
revNumberIn
- The revNumber to set.public boolean matchesRevision(ConfigRevision cRevision)
cRevision
- config revision