Search in sources :

Example 1 with StringChangeLogSerializer

use of liquibase.serializer.core.string.StringChangeLogSerializer in project liquibase by liquibase.

the class GenerateChangeLogTask method addConfiguredTxt.

public void addConfiguredTxt(ChangeLogOutputFile changeLogOutputFile) {
    changeLogOutputFile.setChangeLogSerializer(new StringChangeLogSerializer());
    changeLogOutputFiles.add(changeLogOutputFile);
}
Also used : StringChangeLogSerializer(liquibase.serializer.core.string.StringChangeLogSerializer)

Example 2 with StringChangeLogSerializer

use of liquibase.serializer.core.string.StringChangeLogSerializer in project liquibase by liquibase.

the class ChangeLogSerializerFactoryTest method unregister_instance.

@Test
public void unregister_instance() {
    ChangeLogSerializerFactory factory = ChangeLogSerializerFactory.getInstance();
    factory.getSerializers().clear();
    assertEquals(0, factory.getSerializers().size());
    XMLChangeLogSerializer changeLogSerializer = new XMLChangeLogSerializer();
    factory.register(new StringChangeLogSerializer());
    factory.register(changeLogSerializer);
    assertEquals(2, factory.getSerializers().size());
    factory.unregister(changeLogSerializer);
    assertEquals(1, factory.getSerializers().size());
}
Also used : StringChangeLogSerializer(liquibase.serializer.core.string.StringChangeLogSerializer) XMLChangeLogSerializer(liquibase.serializer.core.xml.XMLChangeLogSerializer) Test(org.junit.Test)

Example 3 with StringChangeLogSerializer

use of liquibase.serializer.core.string.StringChangeLogSerializer in project liquibase by liquibase.

the class VerifyChangeClassesTest method formatParameter.

private String formatParameter(Object paramValue) {
    String serializedValue;
    if (paramValue instanceof Collection) {
        serializedValue = "[";
        for (Object obj : (Collection) paramValue) {
            serializedValue += formatParameter(obj) + ", ";
        }
        serializedValue += "]";
    } else if (paramValue instanceof LiquibaseSerializable) {
        serializedValue = new StringChangeLogSerializer().serialize(((LiquibaseSerializable) paramValue), true);
    } else {
        serializedValue = paramValue.toString();
    }
    return serializedValue;
}
Also used : StringChangeLogSerializer(liquibase.serializer.core.string.StringChangeLogSerializer) LiquibaseSerializable(liquibase.serializer.LiquibaseSerializable)

Example 4 with StringChangeLogSerializer

use of liquibase.serializer.core.string.StringChangeLogSerializer in project liquibase by liquibase.

the class DiffDatabaseToChangeLogTask method addConfiguredTxt.

public void addConfiguredTxt(ChangeLogOutputFile changeLogOutputFile) {
    changeLogOutputFile.setChangeLogSerializer(new StringChangeLogSerializer());
    changeLogOutputFiles.add(changeLogOutputFile);
}
Also used : StringChangeLogSerializer(liquibase.serializer.core.string.StringChangeLogSerializer)

Aggregations

StringChangeLogSerializer (liquibase.serializer.core.string.StringChangeLogSerializer)4 LiquibaseSerializable (liquibase.serializer.LiquibaseSerializable)1 XMLChangeLogSerializer (liquibase.serializer.core.xml.XMLChangeLogSerializer)1 Test (org.junit.Test)1