-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add layeranalytics bundle to all views
- Loading branch information
1 parent
9ab813b
commit dbd5233
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
asdi-resources/src/main/java/flyway/asdi2/V1_27_1__add_layeranalytics_bundle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package flyway.asdi2; | ||
|
||
import fi.nls.oskari.domain.map.view.Bundle; | ||
import org.flywaydb.core.api.migration.BaseJavaMigration; | ||
import org.flywaydb.core.api.migration.Context; | ||
import org.oskari.helpers.AppSetupHelper; | ||
|
||
import java.sql.Connection; | ||
import java.util.List; | ||
|
||
public class V1_27_1__add_layeranalytics_bundle extends BaseJavaMigration { | ||
@Override | ||
public void migrate(Context context) throws Exception { | ||
Connection connection = context.getConnection(); | ||
String bundleName = "layeranalytics"; | ||
Bundle layerAnalyticsBundle = new Bundle(bundleName); | ||
List<Long> appsetupIds = AppSetupHelper.getSetupsForType(connection, null); | ||
AppSetupHelper.addOrUpdateBundleInApps(connection, layerAnalyticsBundle, appsetupIds); | ||
} | ||
} |