Example usage for com.liferay.portal.util PortalInstances getCompanyIdsBySQL

List of usage examples for com.liferay.portal.util PortalInstances getCompanyIdsBySQL

Introduction

In this page you can find the example usage for com.liferay.portal.util PortalInstances getCompanyIdsBySQL.

Prototype

public static long[] getCompanyIdsBySQL() throws SQLException 

Source Link

Usage

From source file:com.custom.portal.verify.CustomVerifyDocumentLibrary.java

License:Open Source License

protected void verifyTree() throws Exception {
    long[] companyIds = PortalInstances.getCompanyIdsBySQL();

    for (long companyId : companyIds) {
        DLFileEntryLocalServiceUtil.rebuildTree(companyId);
        DLFileShortcutLocalServiceUtil.rebuildTree(companyId);
        DLFileVersionLocalServiceUtil.rebuildTree(companyId);
        DLFolderLocalServiceUtil.rebuildTree(companyId);
    }//  www  .  j  ava  2 s . co  m
}

From source file:com.liferay.asset.publisher.layout.prototype.internal.upgrade.v1_0_0.UpgradeLocalizedColumn.java

License:Open Source License

@Override
protected void doUpgrade() throws Exception {
    long[] companyIds = PortalInstances.getCompanyIdsBySQL();

    upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutPrototype", "name", _NAME,
            "layout-prototype-web-content-title", "Name", companyIds);

    upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutPrototype", "description",
            _DESCRIPTION, "layout-prototype-web-content-description", "Description", companyIds);
}

From source file:com.liferay.blogs.layout.prototype.internal.upgrade.v1_0_0.UpgradeLocalizedColumn.java

License:Open Source License

@Override
protected void doUpgrade() throws Exception {
    long[] companyIds = PortalInstances.getCompanyIdsBySQL();

    upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutPrototype", "name", _NAME,
            "layout-prototype-blog-title", "Name", companyIds);

    upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutPrototype", "description",
            _DESCRIPTION, "layout-prototype-blog-description", "Description", companyIds);
}

From source file:com.liferay.bookmarks.verify.BookmarksServiceVerifyProcess.java

License:Open Source License

protected void verifyTree() throws Exception {
    try (LoggingTimer loggingTimer = new LoggingTimer()) {
        long[] companyIds = PortalInstances.getCompanyIdsBySQL();

        for (long companyId : companyIds) {
            _bookmarksFolderLocalService.rebuildTree(companyId);
        }//from   w  ww .  j  av  a  2  s . c om
    }
}

From source file:com.liferay.document.library.layout.set.prototype.internal.upgrade.v1_0_0.UpgradeLocalizedColumn.java

License:Open Source License

@Override
protected void doUpgrade() throws Exception {
    long[] companyIds = PortalInstances.getCompanyIdsBySQL();

    upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutSetPrototype", "name", _NAME,
            "layout-set-prototype-intranet-site-title", "Name", companyIds);

    upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutSetPrototype", "description",
            _DESCRIPTION, "layout-set-prototype-intranet-site-description", "Description", companyIds);
}

From source file:com.liferay.journal.verify.JournalServiceVerifyProcess.java

License:Open Source License

protected void verifyTree() throws Exception {
    try (LoggingTimer loggingTimer = new LoggingTimer()) {
        long[] companyIds = PortalInstances.getCompanyIdsBySQL();

        for (long companyId : companyIds) {
            _journalFolderLocalService.rebuildTree(companyId);
        }/*w ww . java2 s  . c om*/
    }
}

From source file:com.liferay.message.boards.layout.set.prototype.internal.upgrade.v1_0_0.UpgradeLocalizedColumn.java

License:Open Source License

@Override
protected void doUpgrade() throws Exception {
    long[] companyIds = PortalInstances.getCompanyIdsBySQL();

    upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutSetPrototype", "name", _NAME,
            "layout-set-prototype-community-site-title", "Name", companyIds);

    upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutSetPrototype", "description",
            _DESCRIPTION, "layout-set-prototype-community-site-description", "Description", companyIds);
}

From source file:com.liferay.wiki.layout.prototype.internal.upgrade.v1_0_0.UpgradeLocalizedColumn.java

License:Open Source License

@Override
protected void doUpgrade() throws Exception {
    long[] companyIds = PortalInstances.getCompanyIdsBySQL();

    upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutPrototype", "name", _NAME,
            "layout-prototype-wiki-title", "Name", companyIds);

    upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutPrototype", "description",
            _DESCRIPTION, "layout-prototype-wiki-description", "Description", companyIds);
}