Example usage for com.liferay.portal.kernel.dao.db DBProcessContext getOutputStream

List of usage examples for com.liferay.portal.kernel.dao.db DBProcessContext getOutputStream

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.dao.db DBProcessContext getOutputStream.

Prototype

public OutputStream getOutputStream();

Source Link

Usage

From source file:com.liferay.journal.upgrade.JournalServiceUpgrade.java

License:Open Source License

@Override
public void register(Registry registry) {
    registry.register("com.liferay.journal.service", "0.0.1", "0.0.2", new UpgradeClassNames());

    registry.register("com.liferay.journal.service", "0.0.2", "0.0.3",
            new UpgradeJournalArticleType(_assetCategoryLocalService, _assetEntryLocalService,
                    _assetVocabularyLocalService, _companyLocalService, _userLocalService));

    registry.register("com.liferay.journal.service", "0.0.3", "0.0.4", new UpgradeSchema());

    registry.register("com.liferay.journal.service", "0.0.4", "0.0.5", new UpgradeCompanyId(),
            new UpgradeJournal(_companyLocalService, _ddmStorageLinkLocalService, _ddmStructureLocalService,
                    _ddmTemplateLinkLocalService, _defaultDDMStructureHelper, _groupLocalService,
                    _resourceActionLocalService, _resourceActions, _userLocalService),
            new UpgradeJournalArticles(_assetCategoryLocalService, _ddmStructureLocalService,
                    _groupLocalService, _layoutLocalService),
            new UpgradeJournalDisplayPreferences(), new UpgradeLastPublishDate(),
            new UpgradePortletSettings(_settingsFactory), new UpgradeStep() {

                @Override//  w  ww.  ja v a  2  s .co m
                public void upgrade(DBProcessContext dbProcessContext) throws UpgradeException {

                    try {
                        deleteTempImages();
                    } catch (Exception e) {
                        e.printStackTrace(new PrintWriter(dbProcessContext.getOutputStream(), true));
                    }
                }

            });

    registry.register("com.liferay.journal.service", "0.0.5", "0.0.6", new UpgradeJournalArticleImage());

    registry.register("com.liferay.journal.service", "0.0.6", "1.0.0", new UpgradeImageTypeContentAttributes());

    registry.register("com.liferay.journal.service", "1.0.0", "1.1.0",
            new UpgradeDocumentLibraryTypeContent(_dlAppLocalService),
            new UpgradeImageTypeContent(_imageLocalService), new UpgradeJournalArticleLocalizedValues());

    registry.register("com.liferay.journal.service", "1.1.0", "1.1.1",
            new UpgradeFileUploadsConfiguration(_configurationAdmin, _prefsProps));
}