|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.migration.ChangeDescription
public final class ChangeDescription
This class is used to describe the changes that need to be performed over a particular property.
Field Summary | |
---|---|
static int |
TYPE_ADD
Specifies that the property should be added. |
static int |
TYPE_COMMENT
Specifies that the property should be commented. |
static int |
TYPE_DELETE
Specifies that the property should be deleted. |
static int |
TYPE_MODIFY
Specifies that the property should be modified. |
static int |
TYPE_UNCOMMENT
Specifies that the property should be uncommented. |
Constructor Summary | |
---|---|
ChangeDescription(String propertyKey,
int type)
Constructs an instance by providing the type of change only. |
|
ChangeDescription(String propertyKey,
int type,
boolean deleteCommentsBefore)
Constructs an instance by providing the type of change. |
|
ChangeDescription(String propertyKey,
int type,
String value)
Constructs an instance by providing the type of change. |
|
ChangeDescription(String propertyKey,
int type,
String value,
String addAfterKey)
Constructs an instance by providing the type of change. |
|
ChangeDescription(String propertyKey,
int type,
String value,
String addAfterKey,
String[] addCommentLines,
int addNewLinesBefore,
int addNewLinesAfter)
Constructs an instance by providing the type of change. |
Method Summary | |
---|---|
String |
getAddAfterKey()
|
List<String> |
getAddComment()
|
protected int |
getAddNewLinesAfter()
|
protected int |
getAddNewLinesBefore()
|
String |
getPropertyKey()
|
String |
getValue()
|
boolean |
isAdded()
Answers true if the change type contains TYPE_ADD |
boolean |
isCommented()
Answers true if the change type contains
TYPE_COMMENT |
boolean |
isDeleted()
Answers true if the change type contains
TYPE_DELETE |
boolean |
isDeletingComments()
|
boolean |
isModifyed()
Answers true if the change type contains
TYPE_MODIFY |
boolean |
isUncommented()
Answers true if the change type contains
TYPE_UNCOMMENT |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TYPE_COMMENT
public static final int TYPE_UNCOMMENT
public static final int TYPE_ADD
public static final int TYPE_MODIFY
public static final int TYPE_DELETE
Constructor Detail |
---|
public ChangeDescription(String propertyKey, int type)
TYPE_COMMENT
,
TYPE_UNCOMMENT
, TYPE_DELETE
.
type
- the type of change to create. The changes could be logically
OR'd to build a complex type of change.public ChangeDescription(String propertyKey, int type, String value)
TYPE_ADD
, TYPE_MODIFY
. It could also be used with
null
for the following changes - TYPE_COMMENT
,
TYPE_UNCOMMENT
, TYPE_DELETE
type
- the type of change to create. The changes could be logically
OR'd to build a complex type of change.value
- the value of the added/modified property or null
public ChangeDescription(String propertyKey, int type, String value, String addAfterKey)
TYPE_ADD
. It
could also be used with nullified values for the following changes -
TYPE_COMMENT
, TYPE_UNCOMMENT
, TYPE_DELETE
,
TYPE_MODIFY
type
- the type of change to create. The changes could be logically
OR'd to build a complex type of change.value
- the value of the added/modified property or null
addAfterKey
- specifies the name of the key to add this property after. May
be null
addCommentLines
- specifies an array of lines of comments to add before this
property. Each string will be commented and put on a separate
line in the output configuration file. May be
null
addNewLinesBefore
- specifies the number of lines to add before the property (or
the comments if there are some)addNewLinesAfter
- specifies the number of lines to add after the propertypublic ChangeDescription(String propertyKey, int type, String value, String addAfterKey, String[] addCommentLines, int addNewLinesBefore, int addNewLinesAfter)
TYPE_ADD
. It
could also be used with nullified values for the following changes -
TYPE_COMMENT
, TYPE_UNCOMMENT
, TYPE_DELETE
,
TYPE_MODIFY
type
- the type of change to create. The changes could be logically
OR'd to build a complex type of change.value
- the value of the added/modified property or null
addAfterKey
- specifies the name of the key to add this property after. May
be null
public ChangeDescription(String propertyKey, int type, boolean deleteCommentsBefore)
TYPE_DELETE
.
type
- the type of change to create. The changes could be logically
OR'd to build a complex type of change.deleteCommentsBefore
- specifies whether the comments right before the property
should be deleted.Method Detail |
---|
public String getPropertyKey()
public boolean isAdded()
true
if the change type contains TYPE_ADD
true
if TYPE_ADD
is present,
false
otherwise.public boolean isModifyed()
true
if the change type contains
TYPE_MODIFY
true
if TYPE_MODIFY
is present,
false
otherwise.public boolean isDeleted()
true
if the change type contains
TYPE_DELETE
true
if TYPE_DELETE
is present,
false
otherwise.public boolean isCommented()
true
if the change type contains
TYPE_COMMENT
true
if TYPE_COMMENT
is present,
false
otherwise.public boolean isUncommented()
true
if the change type contains
TYPE_UNCOMMENT
true
if TYPE_UNCOMMENT
is present,
false
otherwise.public String getValue()
public String getAddAfterKey()
public boolean isDeletingComments()
true
if the interpreter should delete the comments
before this property.public List<String> getAddComment()
protected int getAddNewLinesBefore()
protected int getAddNewLinesAfter()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |