-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
19 changed files
with
526 additions
and
94 deletions.
There are no files selected for viewing
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
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
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
27 changes: 0 additions & 27 deletions
27
src/main/java/de/mikromedia/webpages/migrations/Migration21.java
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
src/main/java/de/mikromedia/webpages/migrations/Migration22.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,39 @@ | ||
package de.mikromedia.webpages.migrations; | ||
|
||
|
||
import de.mikromedia.webpages.WebpagePlugin; | ||
import systems.dmx.accesscontrol.AccessControlService; | ||
import static systems.dmx.core.Constants.ONE; | ||
import systems.dmx.core.Topic; | ||
import systems.dmx.core.TopicType; | ||
import systems.dmx.core.service.Inject; | ||
import systems.dmx.core.service.Migration; | ||
import systems.dmx.workspaces.WorkspacesService; | ||
|
||
public class Migration22 extends Migration { | ||
|
||
@Inject WorkspacesService workspaces; | ||
@Inject AccessControlService accessControlService; | ||
|
||
@Override | ||
public void run () { | ||
|
||
// Assign new default pages | ||
Topic webpagesWs = workspaces.getWorkspace(WebpagePlugin.WEBPAGES_WS_URI); | ||
Topic bookmarksPage = dmx.getTopicByUri("de.mikromedia.bookmarks.page"); | ||
Topic contactsPage = dmx.getTopicByUri("de.mikromedia.contacts.page"); | ||
Topic notesPage = dmx.getTopicByUri("de.mikromedia.notes.page"); | ||
Topic promutCss = dmx.getTopicByUri("de.mikromedia.iass_promut_style"); | ||
workspaces.assignToWorkspace(bookmarksPage, webpagesWs.getId()); | ||
workspaces.assignToWorkspace(contactsPage, webpagesWs.getId()); | ||
workspaces.assignToWorkspace(notesPage, webpagesWs.getId()); | ||
workspaces.assignToWorkspace(promutCss, webpagesWs.getId()); | ||
// Add "Page Template" value to "Webpage" | ||
TopicType webpage = dmx.getTopicType("de.mikromedia.page"); | ||
TopicType pageTemplate = dmx.getTopicType("de.mikromedia.page.template"); | ||
webpage.addCompDef(mf.newCompDefModel(webpage.getUri(), pageTemplate.getUri(), ONE)); | ||
workspaces.assignTypeToWorkspace(webpage, webpagesWs.getId()); | ||
|
||
} | ||
|
||
} |
58 changes: 58 additions & 0 deletions
58
src/main/java/de/mikromedia/webpages/migrations/Migration23.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,58 @@ | ||
package de.mikromedia.webpages.migrations; | ||
|
||
|
||
import systems.dmx.accesscontrol.AccessControlService; | ||
import systems.dmx.core.CompDef; | ||
import systems.dmx.core.Topic; | ||
import systems.dmx.core.TopicType; | ||
import systems.dmx.core.ViewConfig; | ||
import systems.dmx.core.service.Inject; | ||
import systems.dmx.core.service.Migration; | ||
import systems.dmx.workspaces.WorkspacesService; | ||
|
||
public class Migration23 extends Migration { | ||
|
||
@Inject WorkspacesService workspaces; | ||
@Inject AccessControlService accessControlService; | ||
|
||
@Override | ||
public void run () { | ||
|
||
// Migrate default "page" template into all existing "Webpage" topics | ||
// Activate "Select" Widgets for new Child Topic Types | ||
TopicType websote = dmx.getTopicType("de.mikromedia.site"); | ||
CompDef footerFragment = websote.getCompDef("de.mikromedia.site.footer_fragment_name"); | ||
ViewConfig cdefAttachment = footerFragment.getViewConfig(); | ||
cdefAttachment.setConfigValueRef("dmx.webclient.view_config", "dmx.webclient.widget", "dmx.webclient.select"); | ||
TopicType webpage = dmx.getTopicType("de.mikromedia.page"); | ||
CompDef pageTemplate = webpage.getCompDef("de.mikromedia.page.template"); | ||
ViewConfig styleConfig = pageTemplate.getViewConfig(); | ||
styleConfig.setConfigValueRef("dmx.webclient.view_config", "dmx.webclient.widget", "dmx.webclient.select"); | ||
webpage.removeCompDef("de.mikromedia.page.author_name"); | ||
// Removing "Author Name" from "Webpage" topic | ||
TopicType authorName = dmx.getTopicType("de.mikromedia.page.author_name"); | ||
authorName.delete(); | ||
// Remove Un-Maintained Section Layouts | ||
Topic mapWidget = dmx.getTopicByUri("de.mikromedia.layout.map_widget"); | ||
mapWidget.delete(); | ||
Topic embed = dmx.getTopicByUri("de.mikromedia.layout.embed"); | ||
embed.delete(); | ||
// Authors/Contributors | ||
// User Profile | ||
// Rename Topics | ||
// de.mikromedia.footer.footer-new | ||
// de.mikromedia.footer.qpq-footer | ||
// de.mikromedia.footer.dmx-footer | ||
// de.mikromedia.footer.footer-links | ||
// de.mikromedia.layout.native_embed | ||
// de.mikromedia.layout.single_tile | ||
// de.mikromedia.layout.quote_section | ||
// de.mikromedia.layout.two_tiles | ||
// de.mikromedia.layout.tiles_ten_six | ||
// de.mikromedia.layout.n_tiles | ||
// de.mikromedia.layout.2_and_n_tiles | ||
// de.mikromedia.standard_site | ||
|
||
} | ||
|
||
} |
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
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
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
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
Oops, something went wrong.