use of com.google.gwt.safehtml.shared.SafeHtmlBuilder in project drools-wb by kiegroup.
the class AuditLogEntryCellHelper method buildColumnDetailsUpdate.
private void buildColumnDetailsUpdate(final ActionInsertFactColumnDetails details, final ActionInsertFactColumnDetails originalDetails, final List<BaseColumnFieldDiff> diffs, final SafeHtmlBuilder sb) {
sb.append(TEMPLATE.commentHeader(GuidedDecisionTableConstants.INSTANCE.DecisionTableAuditLogUpdateAction(details.getColumnHeader())));
SafeHtmlBuilder sbFields = null;
// Show changed fields too.
if (diffs != null && !diffs.isEmpty()) {
sbFields = new SafeHtmlBuilder();
for (BaseColumnFieldDiff diff : diffs) {
String changedFieldName = diff.getFieldName();
// if (changedFieldName.equals(ActionInsertFactCol52.FIELD_TYPE)) buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.Binding(), diff.getOldValue(), diff.getValue(), sb);
if (changedFieldName.equals(DTColumnConfig52.FIELD_HEADER)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.ColumnHeader(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(ActionInsertFactCol52.FIELD_FACT_FIELD)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.Field(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(ActionInsertFactCol52.FIELD_FACT_TYPE)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.FactType(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(ActionInsertFactCol52.FIELD_IS_INSERT_LOGICAL)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.LogicallyInsert(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(ActionInsertFactCol52.FIELD_VALUE_LIST)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.ValueList(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(DTColumnConfig52.FIELD_DEFAULT_VALUE)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.DefaultValue(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(DTColumnConfig52.FIELD_HIDE_COLUMN)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.HideThisColumn(), diff.getOldValue(), diff.getValue(), sbFields);
}
}
}
if (sbFields != null) {
sb.append(TEMPLATE.updatedFields(sbFields.toSafeHtml(), labelClass));
}
}
use of com.google.gwt.safehtml.shared.SafeHtmlBuilder in project drools-wb by kiegroup.
the class AuditLogEntryCellHelper method buildColumnDetailsUpdate.
private void buildColumnDetailsUpdate(final LimitedEntryActionInsertFactColumnDetails details, final LimitedEntryActionInsertFactColumnDetails originalDetails, final List<BaseColumnFieldDiff> diffs, final SafeHtmlBuilder sb) {
sb.append(TEMPLATE.commentHeader(GuidedDecisionTableConstants.INSTANCE.DecisionTableAuditLogUpdateAction(details.getColumnHeader())));
SafeHtmlBuilder sbFields = null;
// Show changed fields too.
if (diffs != null && !diffs.isEmpty()) {
sbFields = new SafeHtmlBuilder();
for (BaseColumnFieldDiff diff : diffs) {
String changedFieldName = diff.getFieldName();
// if (changedFieldName.equals(ActionInsertFactCol52.FIELD_TYPE)) buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.Binding(), diff.getOldValue(), diff.getValue(), sb);
if (changedFieldName.equals(DTColumnConfig52.FIELD_HEADER)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.ColumnHeader(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(LimitedEntryActionInsertFactCol52.FIELD_VALUE)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.Value(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(ActionInsertFactCol52.FIELD_FACT_FIELD)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.Field(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(ActionInsertFactCol52.FIELD_FACT_TYPE)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.FactType(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(ActionInsertFactCol52.FIELD_IS_INSERT_LOGICAL)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.LogicallyInsert(), diff.getOldValue(), diff.getValue(), sb);
} else if (changedFieldName.equals(ActionInsertFactCol52.FIELD_VALUE_LIST)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.ValueList(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(DTColumnConfig52.FIELD_DEFAULT_VALUE)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.DefaultValue(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(DTColumnConfig52.FIELD_HIDE_COLUMN)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.HideThisColumn(), diff.getOldValue(), diff.getValue(), sbFields);
}
}
}
if (sbFields != null) {
sb.append(TEMPLATE.updatedFields(sbFields.toSafeHtml(), labelClass));
}
}
use of com.google.gwt.safehtml.shared.SafeHtmlBuilder in project drools-wb by kiegroup.
the class AuditLogEntryCellHelper method buildColumnDetailsUpdate.
private void buildColumnDetailsUpdate(final LimitedEntryConditionColumnDetails details, final LimitedEntryConditionColumnDetails originalDetails, final List<BaseColumnFieldDiff> diffs, final SafeHtmlBuilder sb) {
sb.append(TEMPLATE.commentHeader(GuidedDecisionTableConstants.INSTANCE.DecisionTableAuditLogUpdateCondition(details.getColumnHeader())));
SafeHtmlBuilder sbFields = null;
// Show changed fields too.
if (diffs != null && !diffs.isEmpty()) {
sbFields = new SafeHtmlBuilder();
for (BaseColumnFieldDiff diff : diffs) {
String changedFieldName = diff.getFieldName();
if (changedFieldName.equals(DTColumnConfig52.FIELD_HEADER)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.ColumnHeader(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(LimitedEntryConditionCol52.FIELD_VALUE)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.Value(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(ConditionCol52.FIELD_FACT_FIELD)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.Field(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(ConditionCol52.FIELD_OPERATOR)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.Operator(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(ConditionCol52.FIELD_VALUE_LIST)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.ValueList(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(ConditionCol52.FIELD_BINDING)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.Binding(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(ConditionCol52.FIELD_CONSTRAINT_VALUE_TYPE)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.CalculationType(), getLiteralForCalculationType((Integer) diff.getOldValue()), getLiteralForCalculationType((Integer) diff.getValue()), sbFields);
} else if (changedFieldName.equals(DTColumnConfig52.FIELD_DEFAULT_VALUE)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.DefaultValue(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(DTColumnConfig52.FIELD_HIDE_COLUMN)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.HideThisColumn(), diff.getOldValue(), diff.getValue(), sbFields);
} else if (changedFieldName.equals(Pattern52.FIELD_FACT_TYPE)) {
buildColumnUpdateFields(GuidedDecisionTableConstants.INSTANCE.FactType(), diff.getOldValue(), diff.getValue(), sbFields);
}
}
}
if (sbFields != null) {
sb.append(TEMPLATE.updatedFields(sbFields.toSafeHtml(), labelClass));
}
}
use of com.google.gwt.safehtml.shared.SafeHtmlBuilder in project drools-wb by kiegroup.
the class AuditLogEntryCellHelper method getSafeHtml.
private SafeHtml getSafeHtml(final InsertRowAuditLogEntry event) {
SafeHtmlBuilder sb = new SafeHtmlBuilder();
sb.append(TEMPLATE.commentHeader(GuidedDecisionTableConstants.INSTANCE.DecisionTableAuditLogInsertRowAt0(event.getRowIndex() + 1)));
return sb.toSafeHtml();
}
use of com.google.gwt.safehtml.shared.SafeHtmlBuilder in project drools-wb by kiegroup.
the class AuditLogEntryCellHelper method getSafeHtml.
private SafeHtml getSafeHtml(final DeleteRowAuditLogEntry event) {
SafeHtmlBuilder sb = new SafeHtmlBuilder();
sb.append(TEMPLATE.commentHeader(GuidedDecisionTableConstants.INSTANCE.DecisionTableAuditLogDeleteRowAt0(event.getRowIndex() + 1)));
return sb.toSafeHtml();
}
Aggregations