|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FileHeaderTransformer
Contract to transform a file header to FileHeader in both way :
| Field Summary | |
|---|---|
static String |
DEFAULT_PROCESS_END_TAG
default process end tag |
static String |
DEFAULT_PROCESS_START_TAG
default process start tag |
static String |
DEFAULT_SECTION_DELIMITER
default section delimiter |
static char |
LINE_SEPARATOR
|
static String |
ROLE_NAME
Plexus component role |
| Method Summary | |
|---|---|
String |
addHeader(String header,
String content)
Adds the header. |
String |
boxComment(String header,
boolean withTags)
Box the given header in a comment. |
String |
boxProcessTag(String header)
Box the given header between process tags. |
String |
getCommentEndTag()
|
String |
getCommentLinePrefix()
|
String |
getCommentStartTag()
|
String[] |
getDefaultAcceptedExtensions()
Get the default accepted extensions for this transformer. |
String |
getDescription()
|
String |
getName()
|
String |
getProcessEndTag()
Obtain the process tag which indiciates the end of the header content. |
String |
getProcessStartTag()
Obtains the process tag which indicates the begin of the header content. |
String |
getSectionDelimiter()
The pattern used to separate sections of the header. |
boolean |
isCopyrightEquals(FileHeader header1,
FileHeader header2)
Tests if the copyright of the two models are equals. |
boolean |
isDescriptionEquals(FileHeader header1,
FileHeader header2)
Tests if the description of the two models are equals. |
boolean |
isLicenseEquals(FileHeader header1,
FileHeader header2)
Tests if the license of the two models are equals. |
void |
setCommentEndTag(String commentEndTag)
Changes the comment end tag. |
void |
setCommentLinePrefix(String commentLinePrefix)
Changes the comment prefix line. |
void |
setCommentStartTag(String commentStartTag)
Changes the comment start tag. |
void |
setDescription(String description)
Chages the description of the transformer. |
void |
setName(String name)
Changes the name of the transformer. |
void |
setProcessEndTag(String tag)
Changes the process end tag. |
void |
setProcessStartTag(String tag)
Changes the process start tag. |
void |
setSectionDelimiter(String headerSectionDelimiter)
Sets the header section delimiter. |
FileHeader |
toFileHeader(String header)
Build a FileHeader from an UNBOXED header content. |
String |
toHeaderContent(FileHeader model)
Build a fully boxed header content from the given model. |
String |
toString(FileHeader model)
Build a UNBOXED header content from the given model. |
String |
unboxComent(String boxedHeader)
Unbox the given boxed boxedHeader to obtain the header content. |
String |
unboxProcessTag(String boxedHeader)
Unbox the process tag on the given boxed boxedHeader to obtain
the brute header content. |
| Field Detail |
|---|
static final String ROLE_NAME
static final String DEFAULT_SECTION_DELIMITER
static final String DEFAULT_PROCESS_START_TAG
static final String DEFAULT_PROCESS_END_TAG
static final char LINE_SEPARATOR
| Method Detail |
|---|
String getName()
String getDescription()
String[] getDefaultAcceptedExtensions()
String getProcessStartTag()
setProcessStartTag(String) method), will use the
DEFAULT_PROCESS_START_TAG
String getProcessEndTag()
setProcessEndTag(String) method), will use the
DEFAULT_PROCESS_END_TAG.
String getSectionDelimiter()
setSectionDelimiter(String) method), will use the
DEFAULT_SECTION_DELIMITER.
String getCommentStartTag()
String getCommentEndTag()
String getCommentLinePrefix()
String addHeader(String header,
String content)
header - header to addcontent - content of original file
String boxComment(String header,
boolean withTags)
header in a comment.
header - the header content WITHOUT any comment boxingwithTags - flag to add start and end comment tags.
String unboxComent(String boxedHeader)
boxedHeader to obtain the header content.
boxedHeader - the boxed header
String boxProcessTag(String header)
header between process tags.
header - the header content WITHOUT any comment boxing
getProcessStartTag(),
getProcessEndTag()String unboxProcessTag(String boxedHeader)
boxedHeader to obtain
the brute header content.
boxedHeader - the boxed header
getProcessStartTag(),
getProcessEndTag()FileHeader toFileHeader(String header)
FileHeader from an UNBOXED header content.
header - unboxed header content
String toString(FileHeader model)
throws NullPointerException
model.
model - the model of the file header
NullPointerException - if model is null
String toHeaderContent(FileHeader model)
throws NullPointerException
model.
model - the model of the file header
NullPointerException - if model is null
boolean isDescriptionEquals(FileHeader header1,
FileHeader header2)
header1 - the first headerheader2 - the second header
true if headers description are stricly the same
boolean isCopyrightEquals(FileHeader header1,
FileHeader header2)
header1 - the first headerheader2 - the second header
true if headers copyright are stricly the same
boolean isLicenseEquals(FileHeader header1,
FileHeader header2)
header1 - the first headerheader2 - the second header
true if headers license are stricly the same (WITHOUT ANY space)void setName(String name)
name - the new name of the transformervoid setDescription(String description)
description - the new description of the transformervoid setSectionDelimiter(String headerSectionDelimiter)
DEFAULT_SECTION_DELIMITER.
headerSectionDelimiter - the new delimitervoid setProcessStartTag(String tag)
tag - the new start tagvoid setProcessEndTag(String tag)
tag - the new endtagvoid setCommentStartTag(String commentStartTag)
commentStartTag - the new comment start tagvoid setCommentEndTag(String commentEndTag)
commentEndTag - the new comment end tagvoid setCommentLinePrefix(String commentLinePrefix)
commentLinePrefix - the new comment prefix line
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||