CoreMedia 8 //Version 7.1.8-16

CoreMedia 8 Migration Guide CoreMedia 8 Migration Guide |

CoreMedia 8 Migration Guide

Copyright CoreMedia AG © 2015 CoreMedia AG Ludwig-Erhard-Straße 18 20459 Hamburg International All rights reserved. No part of this manual or the corresponding program may be reproduced or copied in any form (print, photocopy or other process) without the written permission of CoreMedia AG. Germany Alle Rechte vorbehalten. CoreMedia und weitere im Text erwähnte CoreMedia Produkte sowie die entsprechenden Logos sind Marken oder eingetragene Marken der CoreMedia AG in Deutschland. Alle anderen Namen von Produkten sind Marken der jeweiligen Firmen. Das Handbuch bzw. Teile hiervon sowie die dazugehörigen Programme dürfen in keiner Weise (Druck, Fotokopie oder sonstige Verfahren) ohne schriftliche Genehmigung der CoreMedia AG reproduziert oder vervielfältigt werden. Unberührt hiervon bleiben die gesetzlich erlaubten Nutzungsarten nach dem UrhG. Licenses and Trademarks All trademarks acknowledged. 19.May 2015

CoreMedia 8 ii CoreMedia 8 Migration Guide |

1. Preface ...... 1 1.1. Audience ...... 2 1.2. Typographic Conventions ...... 3 1.3. CoreMedia Services ...... 5 1.3.1. Registration ...... 5 1.3.2. CoreMedia Releases ...... 5 1.3.3. Documentation ...... 6 1.3.4. CoreMedia Training ...... 8 1.3.5. CoreMedia Support ...... 9 1.4. Change Chapter ...... 12 2. Overview ...... 13 2.1. Supported Environments ...... 14 2.2. Updated and New Components and Features ...... 16 2.3. Blueprint Changes ...... 17 2.4. Removed Components ...... 18 2.5. API Changes ...... 19 2.5.1. Java API ...... 19 2.5.2. Studio API ...... 26 2.6. CLI Changes ...... 28 2.7. Updated Third-Party Libraries ...... 30 3. Migration Tasks ...... 32 3.1. Prerequisites ...... 33 3.2. Migrating the Project Workspace ...... 34 3.2.1. Chef Deployment ...... 34 3.2.2. Content Security Policy ...... 34 3.3. Migrating the Servers ...... 36 3.4. Migrating Workflows ...... 37 3.4.1. Publication Workflows ...... 37 3.5. Migrating Content Types ...... 38 3.6. Migrating CAE Applications ...... 41 3.6.1. CAE Modularization ...... 41 3.6.2. Changes in the CAE Tag Library ...... 42 3.7. Migrating CAE Web Resources ...... 44 3.8. Migrating Search ...... 51 3.9. Migrating the CAE Feeder ...... 54 3.10. Migrating the Content Feeder ...... 56 3.11. Migrating Studio Customizations ...... 58 3.11.1. Studio Plugins ...... 58 3.11.2. Content Security Policy ...... 60 3.11.3. Page Grid ...... 60 3.11.4. Teaser Text ...... 61

CoreMedia 8 iii CoreMedia 8 Migration Guide |

3.12. Migrating Multi-Site Features ...... 63 3.12.1. Site Model/Sites Service ...... 63 3.12.2. MultiSiteUtil ...... 65 3.12.3. Document Forms ...... 72 3.12.4. Sites Structure ...... 73 3.12.5. Groups and Rights ...... 75 3.12.6. Multi-Site Workflows ...... 75 3.12.7. Version Cleanup ...... 76 3.13. Migrating Elastic Social ...... 77 3.13.1. Data Changes ...... 77 3.13.2. Migration Tool ...... 78 3.13.3. Performing the Migration ...... 78 Index ...... 81

CoreMedia 8 iv CoreMedia 8 Migration Guide |

List of Tables

1.1. Typographic conventions ...... 3 1.2. Pictographs ...... 3 1.3. CoreMedia manuals ...... 6 1.4. Log files check list ...... 10 1.5. Changes ...... 12 2.1. Supported Operation Systems ...... 14 2.2. Supported Databases ...... 14 2.3. Other Environments ...... 14 2.4. Client environments ...... 15 2.5. Changes command line tools ...... 28 2.6. Overview of third-party library versions ...... 30 3.1. Changed/New CoreMedia 8 Content Types ...... 38 3.2. CAE Module contents ...... 41 3.3. CoreMedia 8 Common Template Changes ...... 44 3.4. CoreMedia 8 Sites Template Changes ...... 46 3.5. CoreMedia 8 Extensions Template Changes ...... 47 3.6. CoreMedia 8 Web resources structure for each theme ...... 50 3.7. CoreMedia 8 JS Changes ...... 50 3.8. Substitution of MultiSiteUtil.as methods ...... 65 3.9. Substitution of MultiSiteUtil.as constants ...... 70 3.10. Substitution of MultiSiteUtil.java methods ...... 70

CoreMedia 8 v CoreMedia 8 Migration Guide |

List of Examples

3.1. Retrieving SitesService ...... 65 3.2. Retrieving SitesService ...... 70 3.3. Retrieving ContentSiteAspect ...... 70 3.4. Using multiLanguageDocumentForm ...... 73

CoreMedia 8 vi Preface |

1. Preface

This manual describes the migration from a CoreMedia 7 Blueprint system to a CoreMedia 8 Blueprint system. ➞ Chapter 2, Overview [13] gives a high-level overview of all changes. This in- cludes new, deprecated and removed components and third-party software; new operation and configuration schemes, and much more. ➞ Chapter 3, Migration Tasks [32] describes the details for the actual migration tasks according to the migration scenarios.

CoreMedia 8 1 Preface | Audience

1.1 Audience

This manual is intended for developers, architects, and project managers who plan to migrate from CoreMedia 7 to CoreMedia 8. Project managers and architects should review Chapter 3, Migration Tasks [32] to gain a quick understanding of the neces- sary steps.

CoreMedia 8 2 Preface | Typographic Conventions

1.2 Typographic Conventions

CoreMedia uses different fonts and types in order to label different elements. The following table lists typographic conventions for this documentation:

Element Typographic format Example Table 1.1. Typographic conventions Source code Courier new cm systeminfo start Command line entries Parameter and values Class and method names Packages and modules Menu names and entries Bold, linked with | Open the menu entry Format|Normal Field names Italic Enter in the field Heading CoreMedia Components The CoreMedia Component Applications Use Chef Entries In quotation marks Enter "On" (Simultaneously) pressed Bracketed in "<>", linked with Press the keys + keys "+" Emphasis Italic It is not saved Buttons Bold, with square brackets Click on the [OK] button Code lines in code examples \ cm systeminfo \ which continue in the next line -u user Mention of other manuals Square Brackets See the [Studio Developer Manual] for more information.

In addition, these symbols can mark single paragraphs:

Pictograph Description Table 1.2. Pictographs Tip: This denotes a best practice or a recommendation.

Warning: Please pay special attention to the text.

CoreMedia 8 3 Preface | Typographic Conventions

Pictograph Description Danger: The violation of these rules causes severe damage.

CoreMedia 8 4 Preface | CoreMedia Services

1.3 CoreMedia Services

This section describes the CoreMedia services that support you in running a Core- Media system successfully. You will find all the URLs that guide you to the right places. For most of the services you need a CoreMedia account. See Section 1.3.1, “Registration” [5] for details on how to register.

CoreMedia User Orientation for CoreMedia Developers and Partners Find the latest overview of all CoreMedia services and further references at: http://documentation.coremedia.com/new-user-orientation

➞ Section 1.3.1, “Registration” [5] describes how to register for the usage of the services. ➞ Section 1.3.2, “CoreMedia Releases” [5] describes where to find the download of the software. ➞ Section 1.3.3, “Documentation” [6] describes the CoreMedia documentation. This includes an overview of the manuals and the URL where to find the documentation. ➞ Section 1.3.4, “CoreMedia Training” [8] describes CoreMedia training. This includes the training calendar, the curriculum and certification information. ➞ Section 1.3.5, “CoreMedia Support” [9] describes the CoreMedia support.

1.3.1 Registration

In order to use CoreMedia services you need to register. Start your initial registra- tion via the CoreMedia website. Afterwards, contact the CoreMedia Support (see Section 1.3.5, “CoreMedia Support” [9]) by email to request further access so that you can use the CoreMedia services. The services you have access to depend on your customer, partner or freelancer status. 1.3.2 CoreMedia Releases

Downloading and Upgrading the Blueprint Workspace

CoreMedia provides its software as a Maven based workspace. You can download the current workspace or older releases via the following URL: http://releases.coremedia.com/cm8 Refer to our Blueprint Github mirror repository for recommendations to upgrade the workspace either via Git or patch files.

CoreMedia 8 5 Preface | Documentation

If you encounter a 404 error then you are probably not logged in at GitHub or do not have sufficient permissions yet. See Section 1.3.1, “Registration” [5] for details about the registration process. If the problems persist, try clearing your browser cache and cookies.

Maven artifacts

CoreMedia provides its release artifacts via Maven under the following URL: https://repository.coremedia.com You have to add your CoreMedia credentials to your Maven settings file as described in section [GettingStarted/Configuration/Configuring Maven] of the CoreMedia 8 Manual.

License files

You need license files to run the CoreMedia system. Contact the support (see Section 1.3.5, “CoreMedia Support” [9] ) to get your licenses. 1.3.3 Documentation

CoreMedia provides extensive manuals and Javadoc as PDF files and as online documentation at the following URL:

http://documentation.coremedia.com/cm8 The manuals have the following content and use cases: Table 1.3. CoreMedia Manual Audience Content manuals CoreMedia 8 Manual Developers, ar- This manual gives an overview over the struc- chitects, admin- ture and usage of CoreMedia 8. It describes the istrators features of the CoreMedia Blueprint application; the content type model, the Studio extensions, folder and user rights concept and many more details. It also describes administrative tasks for the features. It also describes concepts and usages of a CoreMedia Project, that is, the workspace in which you develop your CoreMedia extensions. You will find a description of the Maven structure and the virtualization concept, learn how to perform a release and more.

CoreMedia 8 6 Preface | Documentation

Manual Audience Content CoreMedia Utilized Open Developers, ar- This manual lists the third-party software used Source Software chitects, admin- by CoreMedia and lists, when required, the li- istrators cense texts. Supported Environments Developers, ar- This document lists the third-party environ- chitects, admin- ments with which you can use the CoreMedia istrators system, Java versions or operation systems and more. Studio User Manual Editors This manual describes the usage of CoreMedia Studio for editorial and administrative work. It also describes the usage of the Adaptive Person- alization and Elastic Social GUI that are integ- rated into Studio. CoreMedia 8 Migration Developers, ar- This manual gives hints for the migration from Manual chitects, admin- CoreMedia 7 Release 7.0.30 to CoreMedia 8. istrators Operations Basics Manual Developers, ad- This manual describes some overall concepts ministrators such as the communication between the components, how to set up secure connec- tions, how to start application or the usage of the watchdog component. Adaptive Personalization Developers, ar- This manual describes the configuration of and Manual chitects, admin- development with Adaptive Personalization, the istrators CoreMedia module for personalized websites. You will learn how to configure the GUI used in CoreMedia Studio, how to use predefined contexts and how to develop your own exten- sions. Analytics Connectors Developers, ar- This manual describes how you can connect Manual chitects, admin- your CoreMedia website with external analytics istrators services, such as Google Analytics or others. Content Application De- Developers, ar- This manual describes concepts and develop- veloper Manual chitects ment of the Content Application Engine (CAE). You will learn how to write JSP or Freemarker templates that access the other CoreMedia modules and use the sophisticated caching mechanisms of the CAE. Content Server Manual Developers, ar- This manual describes the concepts and admin- chitects, admin- istration of the main CoreMedia component, istrators the Content Server. You will learn about the content type model which lies at the heart of a CoreMedia system, about user and rights management, database configuration, and more.

CoreMedia 8 7 Preface | CoreMedia Training

Manual Audience Content Elastic Social Manual Developers, ar- This manual describes the concepts and admin- chitects, admin- istration of the Elastic Social module and how istrators you can integrate it into your websites. Importer Manual Developers, ar- This manual describes the structure of the in- chitects ternal CoreMedia XML format used for storing data, how you set up an Importer application and how you define the transformations that convert your content into CoreMedia content. Search Manual Developers, ar- This manual describes the configuration and chitects, admin- customization of the CoreMedia Search Engine istrators and the two feeder applications: the Content Feeder and the CAE Feeder. Site Manager Developer Developers, ar- This manual describes the configuration and Manual chitects, admin- customization of Site Manager, the Java based istrators stand-alone application for administrative tasks. You will learn how to configure the Site Manager with property files and XML files and how to develop your own extensions using the Site Manager API. Studio Developer Manual Developers, ar- This manual describes the concepts and exten- chitects sion of CoreMedia Studio. You will learn about the underlying concepts, how to use the devel- opment environment and how to customize Studio to your needs. Unified API Developer Developers, ar- This manual describes the concepts and usage Manual chitects of the CoreMedia Unified API, which is the re- commended API for most applications. This includes access to the content repository, the workflow repository and the user repository. Workflow Manual Developers, ar- This manual describes the Workflow Server. This chitects, admin- includes the administration of the server, the istrators development of workflows using the XML lan- guage and the development of extensions.

If you have comments or questions about CoreMedia's manuals, contact the Docu- mentation department: Email: [email protected] 1.3.4 CoreMedia Training

CoreMedia's training department provides you with the training for your CoreMedia projects either in the CoreMedia training center or at your own location.

CoreMedia 8 8 Preface | CoreMedia Support

You will find information about the CoreMedia training program, the training schedule and the CoreMedia certification program at the following URL: http://www.coremedia.com/training Contact the Training department at the following email address: Email: [email protected] 1.3.5 CoreMedia Support

CoreMedia's support is located in Hamburg and accepts your support requests between 9 am and 6 pm MET. If you have subscribed to 24/7 support, you can al- ways reach the support using the phone number provided to you. To submit a support ticket, track your submitted tickets or receive access to our forums visit the CoreMedia Online Support at: http://support.coremedia.com/ Do not forget to request further access via email after your initial registration as described in Section 1.3.1, “Registration” [5]. The support email address is: Email: [email protected]

Create a support request

CoreMedia systems are distributed systems that have a rather complex structure. Support request This includes, for example, databases, hardware, operating systems, drivers, virtual machines, class libraries and customized code in many different combinations. That's why CoreMedia needs detailed information about the environment for a support case. In order to track down your problem, provide the following informa- tion: ➞ Which CoreMedia component(s) did the problem occur with (include the release number)? ➞ Which database is in use (version, drivers)? ➞ Which operating system(s) is/are in use? ➞ Which Java environment is in use? ➞ Which customizations have been implemented? ➞ A full description of the problem (as detailed as possible) ➞ Can the error be reproduced? If yes, give a description please. ➞ How are the security settings (firewall)?

In addition, log files are the most valuable source of information.

CoreMedia 8 9 Preface | CoreMedia Support

To put it in a nutshell, CoreMedia needs: Support checklist

1. A person in charge (ideally, the CoreMedia system administrator) 2. Extensive and sufficient system specifications 3. Detailed error description 4. Log files for the affected component(s) 5. If required, system files

An essential feature for the CoreMedia system administration is the output log of Log files Java processes and CoreMedia components. They're often the only source of in- formation for error tracking and solving. All protocolling services should run at the highest log level that is possible in the system context. For a fast breakdown, you should be logging at debug level. The location where component log output is written is specified in its < appName>-logback. file. Which Log File? Mostly at least two CoreMedia components are involved in errors. In most cases, the Content Server log files in coremedia.log files together with the log file from the client. If you are able locate the problem exactly, solving the problem becomes much easier. Where do I Find the Log Files? By default, log files can be found in the CoreMedia component's installation direct- ory in /var/logs or for web applications in the logs/ directory of the servlet container.See the "Logging" chapter of the [Operations Basics Manual] for details.

Component Problem Log files Table 1.4. Log files check list CoreMedia Studio general CoreMedia-Studio.log coremedia.log CoreMedia Editor general editor.log coremedia.log workflowserver.log capclient.properties check-in/check-out editor.log coremedia.log workflowserver.log capclient.properties publication or pre- coremedia.log view (Content Management Server) coremedia.log (Master Live Server)

CoreMedia 8 10 Preface | CoreMedia Support

Component Problem Log files workflowserver.log capclient.properties import importer.log coremedia.log capclient.properties workflow editor.log workflow.log coremedia.log capclient.properties spell check editor.log MS Office version details coremedia.log licenses coremedia.log (Content Management Server) coremedia.log (Master Live Server) Server and client communication errors editor.log coremedia.log (Content Management Server) coremedia.log (Master Live Server) *.jpif files preview not running coremedia.log(content server) preview.log website not running coremedia.log (Content Management Server) coremedia.log (Master Live Server) coremedia.log (Replication Live Server) Blueprint.log capclient.properties license.zip Server not starting coremedia.log (Content Management Server) coremedia.log (Master Live Server) coremedia.log (Replication Live Server) capclient.properties license.zip

CoreMedia 8 11 Preface | Change Chapter

1.4 Change Chapter

In this chapter you will find a table with all major changes made in different versions of this manual.

Section Version Description Table 1.5. Changes

CoreMedia 8 12 Overview |

2. Overview

This chapter gives an overview of the improvements in CoreMedia 8 over Core- Media 7. ➞ Section 2.1, “Supported Environments” [14] shows the differences between the supported environments. ➞ Section 2.2, “Updated and New Components and Features” [16] describes the high-level changes in CoreMedia 8 components. ➞ Section 2.3, “Blueprint Changes” [17] describes the changes in CoreMedia Blueprint. ➞ Section 2.4, “Removed Components” [18] lists the components that are no longer available in CoreMedia 8 and its replacements. ➞ Section 2.5, “API Changes” [19] describes changes in the different APIs of CoreMedia 8. ➞ Section 2.6, “CLI Changes” [28] describes changes in the command line tools of CoreMedia 8. ➞ Section 2.7, “Updated Third-Party Libraries” [30] lists the version changes of third-party software used by CoreMedia 8.

A complete list of changes is available on the CoreMedia 8 Release Notes (http://doc- umentation.coremedia.com/cm8/release-notes) pages.

CoreMedia 8 13 Overview | Supported Environments

2.1 Supported Environments

CoreMedia 8 supports newer versions of environment systems and has removed support for older versions. See the following tables for a comparison of the suppor- ted environments in both CoreMedia versions. Table 2.1. Supported System CoreMedia 7 CoreMedia 8 Operation Systems Windows 7, 64-bit, only for develop- 7, 64-bit, only for develop- ment ment Server 2008 R2, 64-bit Server 2012 Enterprise Edi- tion R2 Novell Suse Linux Enterprise 11 SP1+, 64-bit, x86 11 SP2+, 64-bit, x86 Oracle Solaris 11, 64-bit, SPARC 11, 64-bit, x86

Red Hat Enterprise Linux 6, 64-bit, Enterprise Linux 6, 64-bit, x86 x86 IBM AIX 7.1, 64-bit, POWER 7.1, 64-bit, POWER Amazon Linux 2012.09+, 64-bit, Instance 2014.09+, 64-bit, Instance Store Store

Database CoreMedia 7 CoreMedia 8 Table 2.2. Supported Databases MySQL 5.5.8+ PostgreSQL 9.2 9.3 Oracle 11g R2 DB2 10.1 MS SQL Server 2008 R2 2012 MongoDB 2.2, 2.4 for Elastic Social 2.6 Amazon RDS MySQL 5.5 PostgreSQL 9.3

System CoreMedia 7 CoreMedia 8 Table 2.3. Other Envir- onments Java SE 7 u6+, 64-bit 8 u21+, 64-bit 7 u6+, 32-bit (Windows only)

CoreMedia 8 14 Overview | Supported Environments

System CoreMedia 7 CoreMedia 8 Tomcat 7.0.30+ 7.0.50+ IBM WebSphere Application 8.5.5 Fixpack 3 Server Windows Server Active Direct- 2008 R2 2012 R2 ory Elastic Search 0.19, for Elastic Social -

System CoreMedia 7 CoreMedia 8 Table 2.4. Client envir- onments Windows 7, 64-bit 7, 64-bit Java SE 7 latest, 32-bit 8 latest, 32-bit MS Office 2010 Internet Explorer 8, Windows 7 only 9, Windows 7 only 9, Windows 7 only 10, Windows 7 only 10, Windows 7 only 11, Windows 7 only 11, Windows 7 only Firefox The latest version The latest version or latest extended release Chrome The latest version The latest version

For a complete reference of all supported operating environments which contains some restricting information, see the Supported Environments page at https://doc- umentation.coremedia.com/cm8/supported-environments.

CoreMedia 8 15 Overview | Updated and New Components and Features

2.2 Updated and New Components and Features

The following components have been updated or are new:

Control Room The Control Room is a new window in Studio in which you manage your current work and workflows. Multi-site and multi-language The multi-site feature of CoreMedia 7 has features been improved and supports multi-language sites with workflows and GUI features. Content Security Policy CoreMedia has introduced a Content Secur- ity Policy to secure the Studio web applica- tion.

CoreMedia 8 16 Overview | Blueprint Changes

2.3 Blueprint Changes

This chapter lists all changes that have been made in CoreMedia Blueprint from CoreMedia 7 to CoreMedia 8.

Changes in Studio Components

Referrer List Panel

The classes ReferrerListPanel and ReferrerListPanelBase have been moved into the package com.coremedia.cms.editor.sdk.premular of the Studio core module editor-components. They are public API now.

SiteUtil

Due to the changes for the ReferrerListPanel, the class SiteUtil has also been moved to the Studio core module editor-components. It is now located in the package com.coremedia.cms.editor.sdk.util. It is public API now.

CoreMedia 8 17 Overview | Removed Components

2.4 Removed Components

Some deprecated components of CoreMedia 7 have been removed and are replaced with new components.

CoreMedia HTTP Cache This component was removed in CoreMedia 8. You can use a standard reverse proxy such as Varnish or a CDN instead. See also Section 6.2.1, “Using Dynamic Fragments in HTML Responses” in CoreMedia 8 Manual. CoreMedia Webtrekk Analytics This connector is no longer supported. Connectors CoreMedia Studio Tasks Extension This extension for displaying the status of two-step publication workflows is no longer supported. It is replaced by the newly intro- duced control room Studio plugin.

CoreMedia 8 18 Overview | API Changes

2.5 API Changes

In this chapter you will find any API changes from CoreMedia 7 to CoreMedia 8. ➞ Section 2.5.1, “Java API” [19] ➞ Section 2.5.2, “Studio API” [26]

2.5.1 Java API

Along with the API changes listed below, logging was streamlined to use SLF4J throughout many components. For details have a look at section “Logging Changes” [25]. cae-test

➞ Removed deprecated method com.coremedia.cae.testing.Re questHandler.handle. Use com.coremedia.cae.testing.Re questHandler.invokeHandler instead. cap-editor

➞ The deprecated methods registerTargets(CommandManager) and un- registerTargets(CommandManager) have been removed from class hox.corem.editor.toolkit.CommandManager. ➞ Removed field format of Site Manager API class hox.corem.edit or.proxy.CalendarModel. You can use new SimpleDateFormat(Cal endarModel.DATE_FORMAT) instead. cap-httpcache

removed completely in CoreMedia 8 cap-importer

➞ Method equalsLinklistProperty of interface com.coremedia.pub lisher.importer.DifferencingTransformer.Differencer now takes a List and a List instead of two raw List parameters. ➞ Package com.coremedia.publisher.importer: Methods process and processSource of class TargetXmlImporter and the constructors of TargetXmlImporter.Context and XmlImportEvent now take a Map instead of a raw Map parameter.

CoreMedia 8 19 Overview | Java API

cap-objectserver

Please note that the module cap-objectserver was split up into multiple modules in addition to the changes listed here. See Section 3.6, “Migrating CAE Applications” [41] for details.

➞ The com.coremedia.objectserver.beans.ContentBeanFactory was changed for weak links. #createBeanFor() now returns null for a weak link content that is not available. #createBeansFor() returns only content beans for available Content. ➞ Removed deprecated methods com.coremedia.objectserv er.web.taglib.IncludeSupport.getTheView and com.coremedia.ob jectserver.web.taglib.IncludeSupport.getTheSelf without re- placement. ➞ Removed deprecated method com.coremedia.objectserv er.web.links.UriComponentsHelper.appendPathSegments. use org.springframework.web.util.UriComponentsBuilder#pathSeg ment instead. ➞ Removed deprecated method com.coremedia.objectserv er.dataviews.AbstractDataViewFactory.getLog. Use com.core media.objectserver.dataviews.AbstractDataViewFactory.get Logger instead. ➞ Removed deprecated method com.coremedia.objectserver.view.Re sourceViewRepository.getBasePath. Use com.coremedia.object server.view.ResourceViewRepository.getTemplateBaseLoca tions instead. ➞ Removed deprecated method com.coremedia.objectserver.view.Re sourceViewRepository.setBasePath. Use com.coremedia.object server.view.ResourceViewRepository.setTemplateBaseLocation instead. ➞ Removed deprecated class com.coremedia.objectserver.view.Mod elAwareViewDispatcher. Use com.coremedia.objectserv er.view.RenderNodeDecorator instead. ➞ Removed deprecated class com.coremedia.objectserver.view.re solver.RenderNodeDecoratorProvider. Use com.coremedia.object server.view.RenderNodeDecoratorProvider instead. ➞ Removed deprecated class com.coremedia.objectserver.web.bind ing.IdContentBeanConverter. Use com.coremedia.objectserv er.web.binding.GenericIdToContentBeanConverter instead.

CoreMedia 8 20 Overview | Java API

➞ Removed deprecated class com.coremedia.objectserver.web.Bean PropertyEditor. Use com.coremedia.id.IdProviderPropertyEdit or instead. ➞ Removed, replaced by new view lookup / repository services introduced in CoreMedia 7: ➞ view-legacy-services.xml. ➞ com.coremedia.objectserver.view.RepositoryViewDis patcherManager ➞ com.coremedia.objectserver.view.RepositoryViewDis patcher ➞ com.coremedia.objectserver.view.SimpleViewRepository ➞ com.coremedia.objectserver.web.BeanViewResolver ➞ Removed deprecated class com.coremedia.objectserv er.web.links.AbstractLinkScheme. Use Handler and link scheme in- frastructure introduced in CM7 instead. ➞ Removed deprecated class com.coremedia.objectserv er.web.links.BeanPropertyBlobLinkScheme. Use Handler and link scheme infrastructure introduced in CM7 instead. Implement a link scheme by translating com.coremedia.objectserver.blob.BeanProper- tyBlob#getBean() to an id by using com.coremedia.id.IdProvider and com.coremedia.objectserver.blob.BeanPropertyBlob#get- Property() as the second path segment. ➞ Removed deprecated class com.coremedia.objectserv er.web.links.ContentBlobLinkScheme. Use com.coremedia.object- server.web.ContentBlobHandlerBase instead ➞ Removed deprecated class com.coremedia.objectserv er.web.links.ContentLinkScheme. Use Handler and link scheme infra- structure introduced in CM7 instead. Implement a link scheme by translating com.coremedia.objectserver.beans.ContentBean#getContent() to an id by using a com.coremedia.id.IdProvider and add it to the prefix "/content/". ➞ Removed deprecated class com.coremedia.objectserver.web.Ab stractViewController. Use Handler and link scheme infrastructure in- troduced in CM7 instead. ➞ Removed deprecated class com.coremedia.objectserver.web.Con tentBlobViewController. Use com.coremedia.objectserv- er.web.ContentBlobHandlerBase instead. ➞ Removed deprecated class com.coremedia.objectserver.web.Con tentPathEntryController. Implement a Handler that exactly matches your needs instead.

CoreMedia 8 21 Overview | Java API

➞ Removed deprecated class com.coremedia.objectserver.web.Con trollerUtils. Use com.coremedia.objectserver.web.HandlerHelp- er instead. ➞ Removed deprecated class com.coremedia.objectserver.web.Entry Controller. Implement a Handler that exactly matches your needs instead. ➞ Removed deprecated class com.coremedia.objectserver.web.Stat icContentEntryController. Implement a Handler that exactly matches your needs instead. ➞ Removed deprecated class com.coremedia.objectserver.web.Pre viewController. Use com.coremedia.objectserver.web.IdRedir- ectHandlerBase instead. ➞ Removed deprecated class com.coremedia.objectserver.web.Con tentViewController. Use Handler and link scheme infrastructure intro- duced in CM7 instead. Implement a handler by letting the framework pass a com.coremedia.objectserver.beans.ContentBean to the handler method and creating an org.springframework.web.servlet.ModelAnd- View class using com.coremedia.objectserver.web.HandlerHelper convenience methods. ➞ Removed deprecated class com.coremedia.objectserver.web.Bean PropertyBlobViewController. Use Handler and link scheme infrastruc- ture introduced in CM7 instead. Implement a handler by converting "beanId" to an object using a com.coremedia.id.IdProvider and by using org.springframework.beans.BeanWrapperImpl for accessing the blob property from the "property" string. cap-persistentcache

➞ Removed package com.coremedia.cap.persistentcache.valuecache and all its classes. ➞ Removed deprecated class com.coremedia.cap.persistentcache.Re- leasingPersistentCacheKey. cap-rest-service

➞ The deprecated class com.coremedia.rest.cap.blob.BlobUploadSer vice has been removed. Use HTML5 FormData object on client side and Jersey's FormDataParam on server side instead. cap-search-api

➞ Removed fields of interface com.coremedia.cap.feeder.FeedableEle ment:

CoreMedia 8 22 Overview | Java API

➞ FEEDERSTATE_INVALID_GROUPS

➞ FEEDERSTATE_REMOVE ➞ Removed fields of interface com.coremedia.cap.feeder.index.Index er: ➞ PARAMETER_SUPPORTS_MIXED_BATCHES

➞ DEFAULT_SUPPORTS_MIXED_BATCHES

➞ PARAMETER_SUPPORTS_REPEATED_REMOVE

➞ DEFAULT_SUPPORTS_REPEATED_REMOVE ➞ Removed methods of class com.coremedia.cap.feeder.index.Index erBase: ➞ supportsMixedBatches

➞ supportsRepeatedRemove cap-unified-api

➞ Removed deprecated methods of com.coremedia.cap.con tent.query.QueryService which took a separate limit parameter: ➞ poseContentQuery(String, int) ➞ poseContentQuery(String, Object[], int) ➞ poseVersionQuery(String, int) ➞ poseVersionQuery(String, Object[], int) ➞ Removed deprecated com.coremedia.cap.common.infos.CapLicen seInfo constructor which took the unused parameter workflowCustom izable ➞ Removed deprecated method com.coremedia.cap.common.infos.Cap LicenseInfo#isWorkflowCustomizable. ➞ Removed deprecated constant PUBLICATON_CANCELLED of com.core media.cap.errorcodes.CapErrorCodes. ➞ The class com.coremedia.cap.user.CapAuthenticationPro vider.CapUserAuthority has been removed in the course of the new SSO integration feature. Please refer to the [Studio Developer Manual] for further details. cap-workflow

➞ Removed deprecated interface com.coremedia.workflow.WfErrorCodes.

CoreMedia 8 23 Overview | Java API

cap-workflow-protocol

➞ Removed unused constant CANNOT_DELEGATE_NON_REMOTE_TRANSAC TIONS of com.coremedia.workflow.errorcodes.WfErrorCodes. commandline-tools-base

➞ The static field com.coremedia.cmdline.AbstractUAPIClient.op- tions has been removed. As before, the Options object is passed to the methods fillInOptions(Options), which is responsible for extending the set of options. ➞ Introduced com.coremedia.cmdline.AbstractSpringAwareUAPICli- ent as direct subclass of com.coremedia.cmdline.AbstractUAPIClient and made it the parent of many UAPI clients.

It provides a Spring context available via getApplicationContext which by default is searched for in a configuration file named properties/cor em/commandline-tools-context.xml. Mind that external resources like property files are only available via the classpath or absolute file path. To resolve to files which come along with the command line tool use Spring Expression Language to access hox.cor- em.Corem.getHome():

coremedia-cache

➞ Removed deprecated method cacheFor(long) in com.core- media.cache.Cache. commandline-xml

➞ The writeOn and transform methods of com.coremedia.xml.Markup now take a List instead of a raw List paramet- er. ➞ The method transform(Templates, Map) of com.core media.xml.Markup now takes a Map instead of a raw Map parameter.

CoreMedia 8 24 Overview | Java API

Logging Changes

Replaced org.apache.commons.logging.Log with org.slf4j.Logger in

➞ protected method getLog of com.coremedia.objectserv er.web.links.AbstractLinkScheme ➞ protected method getLogger of com.coremedia.cap.persistent cache.proactive.BaseReceiver ➞ protected method getLog of com.coremedia.springframework.cus tomizer.BeanCustomizer ➞ package local method setLog of com.coremedia.cap.com mon.pool.CapSessionPool ➞ public methods getLog and setLog of com.coremedia.cap.com mon.pool.CapSessionPoolImpl ➞ protected field log and public method setLog of hox.corem.server.me dia.ChunkingBlobStore ➞ protected method getLog of com.coremedia.watchdog.CodeConverter ➞ public static field log of com.coremedia.workflow.common.Common ➞ protected static field log of com.coremedia.cap.content.ContentHelp er ➞ package local static field log of com.coremedia.cap.content.Conten tRepository ➞ protected method getLogger of com.coremedia.easyedit.taglib.Con textInfoTag ➞ protected method getLogger of com.coremedia.objectserv er.web.EntryController ➞ protected field log of hox.corem.server.media.FileStore ➞ protected method getLogger of com.coremedia.easyed it.taglib.HeadTag ➞ protected field log of hox.corem.server.media.LoggingMe diaStoreSelector ➞ protected method getLogger of com.coremedia.easyed it.taglib.PbeTag ➞ package local field log of com.coremedia.cap.workflow.plugin.Per formersPolicy ➞ protected field log of hox.corem.server.media.PostgreSQLBlobStore ➞ protected method getLog of com.coremedia.cap.persistent cache.ProcessingCallbackBase ➞ protected static field log of com.coremedia.cap.content.publica tion.PublicationHelper ➞ protected method getLog of com.coremedia.objectserver.view.Rich textToHtmlFilterFactory

CoreMedia 8 25 Overview | Studio API

➞ package local static field log of com.coremedia.cap.user.UserRepos itory ➞ public method getLog of com.coremedia.workflow.WfClient ➞ package-private field LOG of com.coremedia.cap.workflow.WorkflowRe pository

In addition, the protected methods getOut and enableOutVerbose are deprec- ated in com.coremedia.cmdline.AbstractUAPIClient. Use the new methods getLogger and enableVerboseLogging instead. 2.5.2 Studio API editor-components

➞ The signature of the method CollectionViewManager#openSearchFor Type() was changed from

function openSearchForType( type:String, view:String = null ):void

to

function openSearchForType( type:String, view:String = null, baseFolder:Content = null ):void

For detailed information consult the ASDoc of com.coremedia.cms.edit- or.sdk.collectionview.CollectionViewManager ➞ The FilterState has been deleted. Use SearchFilterState instead. ➞ The method com.coremedia.cms.editor.sdk.IEditorCon text#setAfterLogoutHandler() has been removed in the course of the new SSO integration feature. Please refer to the [Studio Developer Manual] for further details. ➞ The second (optional) parameter of the method com.coremedia.cap.com mon.CapLoginService#retrieveSession() has been removed in the course of the new SSO integration feature. Please refer to the [Studio De- veloper Manual] for further details. cap-rest-client ➞ The ActionScript API of Studio now allows the computation the referrers of a content item, in a dependency tracked and automatically invalidated

CoreMedia 8 26 Overview | Studio API

fashion. Consult the ASDoc of com.coremedia.cap.content.Con- tent#getReferrersWithDescriptor and its variants for further details.

CoreMedia 8 27 Overview | CLI Changes

2.6 Command Line Tool Changes

This chapter list changes of the command line tools. Table 2.5. Changes Command line tool Changes command line tools BeanShell, (cm bsh) The BeanShell interpreter has been replaced by a GroovyShell (cm groovysh) interpreter. Bulk publish, cm bulkpub- The behavior of bulkpublish has changed slightly. When the lish --approve-versions option is given to cm bulkpublish, it only approves the latest (checked-in) version. The tool used to also approve any other versions newer than the latest ap- proved version, or in the case of new documents, all versions. This results in a performance improvement when dealing with large content repositories due to a simpler query and less ap- proval operations. Administrative tools The administrative command line tools uniformly use the timezone as configured in the file capclient.properties now. Previously the tools mistakenly used the default JVM timezone for parsing the command line, but the configured timezone during normal operation. In particular, this affects the behavior of the tool cm cleanrecyclebin for which start and end time may be specified. It may also affect custom tools. Server import and server Special handling of the masterVersion property has been export, cm serverim- added to store whether a document was up-to-date with its port/serverexport master during export. For details see the section " ServerImport and ServerExport " in chapter "Localized Content Manage- ment/Development" of the [CoreMedia 8 Manual]. This change only applies to exported content with the new ver- sion of cm serverexport. Old content export data will not be affected. Server export, cm server- Server Export can now report different warnings and fail if any export of those warnings occur. The following new command line op- tions are available:

--lint (all|none|linkmiss Triggers warnings. The ing|linkignored|transla default is what like be- tionstate) (default: fore. linkmissing linkignored) might assist in detecting when an export is incom- plete regarding links. translationstate will report on invalid translation states espe- cially those which cannot

CoreMedia 8 28 Overview | CLI Changes

Command line tool Changes be rebuilt in exactly the same state after server import. --fail-on-warning Fails the export when one of the above warn- ings occurs. --fail-at-end Collect all warnings and only fail at the end.

Validate multisite, cm val- cm validate-multisite is a new command line tool which will idate-multisite assist you when migrating the multi-site feature as described in Section 3.12, “Migrating Multi-Site Features” [63]. For details read Section, “Validate Multi-Site” in CoreMedia Content Server Manual.

CoreMedia 8 29 Overview | Updated Third-Party Libraries

2.7 Updated Third-Party Libraries

CoreMedia 8 relies on several third-party libraries. Most of these libraries have been updated to newer versions: Table 2.6. Overview of Library CM7 CM8 third-party library ver- ASM 3.1 3.3.1 sions Apache Commons Codec 1.6 1.9 Apache Commons Lang3 3.1 3.2.1 Apache Solr 4.3.0 4.10.3 AspectJ 1.7.0 1.7.4 commons-compress 1.3 1.6 commons-fileupload 1.2.2 1.3 commons-lang 3.1 3.2.1 commons-dbcp 1.4 2.0.1 diffutils - 1.3.0 esapi 2.0.1 2.1.0 de.flapdoodle.embed.mongo 1.31 1.45 de.flapdoodle.embed.process - 1.39.0 FreeMarker 2.3.19 2.3.20 groovy-all - 2.2.1 gson 2.2.2 2.2.4 guava 13.0.1 14.0.1 hsqldb 2.2.9 2.3.1 htmlunit - 2.14 Apache HttpComponents Ht- 4.2.5 4.3.2 tpClient Apache HttpComponents Ht- 4.2.4 4.3.1 tpCore jackson 1.9.9 1.9.13 jangaroo-lib 2.0.9 2.0.10 jansi - 1.6 javax.el 2.2.1 2.2.5 javax.json - 1.0

CoreMedia 8 30 Overview | Updated Third-Party Libraries

Library CM7 CM8 javax.validation 1.0.0.GA 1.1.0.Final jersey 1.13 1.16 Jetty 8.1.5.v20120716 8.1.14.v20131031 jhlabs 2.0.235 2.0.235-1 jline - 2.11 joda-time - 1.6.2 org.json:json 20090211 20131018 jsr305 1.3.9 2.0.3 Logback 1.0.7 1.1.0 lucene 3.6.1 4.8.1 mockito-core 1.9.0 1.9.5 mongo-java-driver 2.11.2 2.12.2 objenesis 1.0 1.4 powermock 1.4.12 1.5.4 rhino 1.7R3 1.7R4 SLF4J 1.6.6 1.7.6 snakeyaml 1.6 1.13 Spring Framework 3.1.2.RELEASE 4.0.1.RELEASE Spring Security 3.1.2.RELEASE 3.2.0.RELEASE Spring Social 1.0.2.RELEASE 1.0.3.RELEASE Spring Social Facebook 1.0.2.RELEASE 1.0.3.RELEASE Spring Social Twitter 1.0.3.RELEASE 1.0.5.RELEASE Spring Webflow 2.3.1.RELEASE 2.3.3.RELEASE tika 1.3 1.7

CoreMedia 8 31 Migration Tasks |

3. Migration Tasks

This chapter contains detailed information about necessary migration steps for each component.

CoreMedia 8 32 Migration Tasks | Prerequisites

3.1 Prerequisites

A CoreMedia 7 release equals or greater than 7.0.30-97 is the prerequisite for a smooth CoreMedia 8 Blueprint migration. Refer to the CM7 Blueprint GitHub mirror repository for recommendations to up- grade your CoreMedia 7 workspace either via Git or patch files.

If you encounter a 404 error then you are probably not logged in at GitHub or do not have sufficient permissions yet. See Section 1.3.1, “Registration” [5] for details about the registration process. If problems persist, try clearing your browser cache and cookies.

CoreMedia 8 Blueprint needs a Workflow Server. If a Workflow Server is not part of your environment, then you need to set up a Workflow Server and connect it to your Content Management Server. The CoreMedia Studio needs the Workflow Server in order to run the publication and translation workflows.

CoreMedia 8 33 Migration Tasks | Migrating the Project Workspace

3.2 Migrating the Project Workspace

This chapter describes the migration from the CoreMedia 7 project workspace with CoreMedia Blueprint to CoreMedia 8 Blueprint. The major change between CoreMedia 7 and CoreMedia 8 regarding the project workspace is that CoreMedia 8 contains the latest Studio version and new features for internationalization and localization. For all CAE related components only bug fixes have been applied and therefore should be easy to migrate, especially the existing JSP templates. Front-end developers should review Section 3.7, “Migrating CAE Web Resources” [44] to gain a deeper understanding about the necessary migration steps. 3.2.1 Chef Deployment

Both CoreMedia 7 Release 7.0.30-97 and CoreMedia 8 Release 7.1.x are supporting Chef v11 (11.16.4).

1. The elasticsearch cookbook has been removed because CoreMedia now only uses Apache Solr for search. 2. A new recipe to create sitemap cron jobs on a delivery node has been added to replace the RPM cron job installation. Add recipe[coremedia::sitemaps] to your Chef run list to activate the cron jobs. The configuration of the sites for which a sitemap is generated is now done in Chef. As a result, the token con figure.BLUEPRINT_SITEMAP_ENABLED has been removed. The default configuration looks like the snippet below:

"coremedia": { "sitemaps": { "media": { "path": "/Sites/Reframed/United\\%20States/English", "minute": "0", "hour": "3" } } }

Make sure to escape spaces correctly in the path attribute.

For further information about Chef as the provisioning tool of choice, refer to the CoreMedia 8 Manual. 3.2.2 Content Security Policy

This section lists all changes that have been applied to the workspace in order to make it comply with the newly introduced Content Security Policy for CoreMedia Studio. To assure CSP compatibility of your custom project workspace, you have to merge these changes and change your custom project code accordingly.

CoreMedia 8 34 Migration Tasks | Content Security Policy

1. The wildcard format of the studio.previewUrlWhitelist property in the application.properties of the Studio web application has changed. All URLs must also be valid Content Security Policy source values according to the relevant W3C draft. Adjust the values accordingly. 2. The following Blueprint Studio classes have been changed in order to comply with the Content Security Policy: ➞ com.coremedia.blueprint.studio.topicpages.administra tion.TopicsPanel ➞ com.coremedia.blueprint.studio.topicpages.administra tion.TopicsPanelBase ➞ com.coremedia.blueprint.studio.taxonomy.chooser.Letter ListPanelBase ➞ com.coremedia.blueprint.studio.taxonomy.rendering.Link ListRenderer ➞ com.coremedia.blueprint.studio.taxonomy.rendering.Selec tionListRenderer ➞ com.coremedia.blueprint.studio.taxonomy.render ing.SingleSelectionListRenderer 3. The following file from the taxonomy-studio-plugin has been removed: ➞ taxonomy-mouse-handler.js

4. The Maven dependency to jangaroo-libs has been updated to version 2.0.10.

For further information about the new Content Security Policy refer to Chapter 8, Security in CoreMedia Studio Manual

CoreMedia 8 35 Migration Tasks | Migrating the Servers

3.3 Migrating the Servers

This chapter provides the required background and describes the actions necessary to migrate a CoreMedia 7 Content Server deployment to CoreMedia 8. While migrating the servers, you most likely also want to adapt the required changes to the content type model. You will find a detailed description at Section 3.5, “Mi- grating Content Types” [38]. Event Sequence Numbers Upgrade

The event sequence numbers, which are one part of the event timestamps, have been converted from 32 bit numbers to 64 bit numbers. This removes the risk that the sequence number might roll over into negative numbers. During the first start of a Content Server, the persistent change log will be converted automatically.

Except for Oracle, all databases will need to rewrite the table ChangeLog and/or the associated index at that time. Check the size of the table ChangeLog in all of your Content Server schemas before upgrading. Make sure to configure enough disk space for the database during the update, because twice the previous size of the table might be required for the migration. Testing the migration beforehand on a copy of the Content Management Server database will give you a good estimation of the running time of the upgrade. If the operation turns out too slow, you can reduce the size of the table as described in Section 3.11, “Truncate the ChangeLog” in CoreMedia Content Server Manual.

CoreMedia 8 36 Migration Tasks | Migrating Workflows

3.4 Migrating Workflows

CoreMedia Studio has built-in support for most common editorial publication and multi-site workflows. See Section 3.12, “Migrating Multi-Site Features” [63] for the migration to the new multi-site/multi-language concepts. 3.4.1 Publication Workflows

By default, CoreMedia Studio supports two publication workflows in its GUI called Publication workflows direct publication and reviewed publication. Although, the new workflows are quite similar to the existing simple-publication and two-step-publication workflows from CoreMedia 7, you cannot use these older workflows with CoreMedia Studio. The same is true for customized workflow definitions which would require adaptions of the front-end of Studio. CoreMedia recommends that you use the new built-in Studio workflows with CoreMedia 8. It is advised to use the built-in CoreMedia Studio workflows for publication after migrating to CoreMedia 8. However, you can still use the old workflows in the Site Manager. Before you do so, you have to convert still running workflows with the cm workflowconverter utility. See the [CoreMedia Workflow Manual] for its usage.

CoreMedia 8 37 Migration Tasks | Migrating Content Types

3.5 Migrating Content Types

If your project uses CoreMedia 7 content types and you want to update to the CoreMedia 8 source code, apply the changes as denoted in Table 3.1, “Changed/New CoreMedia 8 Content Types” [38]. The multi-site feature, including translation workflows, is a concept which has been carried through to many content types. In order to support this new feature all documents created in a site must provide necessary properties, especially master and masterVersion. In Blueprint those properties are provided by the content type CMLocalized. The locale property, which is also provided by CMLocalized, is recommended for content types that have translatable properties. The locale of a content defaults to the locale of the CMSite document. Still, it should be set explicitly even if it matches the site locale. The locale must be set for CMSite documents. Table 3.1. Changed/New Content Type Change description CoreMedia 8 Content CMImageMap This new content type has been introduced to create Types image maps. Since the content type is a new one, no changes are required to enable it. CMNavigation The link type of property children has been changed from CMNavigation to CMLinkable to allow content types like CMArticle to be linked into the navigation. CMSite The parent of this content type has been changed to CMLocalized. The locale is mandatory for this content type, because it is used as default for every content of the site that has no explicit locale. Additionally, the CMSite content type has been ex- tended by the properties: ➞ id ➞ name ➞ siteManagerGroup

All of these properties must be set explicitly after mi- gration. Refer to "Localized Content Manage- ment/Concept/Terms" of [CoreMedia 8 Manual] for further information about the properties of the site indicator, which generally is represented by the CMS ite content type.

CoreMedia 8 38 Migration Tasks | Migrating Content Types

Content Type Change description CMFolderProperties The parent of this content type has been changed to CMLocalized. CMSegment The parent of this content type has been changed to CMLocalized. CMSymbol The parent of this content type has been changed to CMLocalized. CMUserProfile The parent of this content type has been changed to CMLocalized. CMViewtype This content type has a new string property layout. The property is used to apply a name for the layout that differs from the document name. If the layout property is not set, the name will be used as default. Change the parent of this content type to CMLocal ized, if it does not inherit from CMSymbol. CMProduct The content type has been removed from Blueprint. If you use it in your project, you have to reenable it. CMLocalized The size of the locale has been increased to 64 be- cause even IETF BCP 47 language tags for available locales in Java 7 exceed the length of the previously used value of 32. all localizable content types For every master property the weakLink attribute has been introduced with default value true. This assures that the content may be published or with- drawn without affecting the linked master content. Every property that needs translation has been marked with the attribute translatable. Only these prop- erties will be part of the XLIFF export.

These changes only clarify the intended use of the properties. Therefore, when you have used the document types in the intended way, no content migration steps should be necessary. The only exception is the removed CMProduct content type which you have to reenable if you have used it in CoreMedia 7. During the first start of the Content Servers, you have to set the relevant properties .schema.* in the sql.properties to allow the servers to migrate the database schemes as described in the [Content Server Manual].

Please consider that you have to adapt the ContentInitializer.as after per- forming changes in the properties and hierarchy of the content type model.

CoreMedia 8 39 Migration Tasks | Migrating Content Types

Consolidating Page Grid Data

The placement property of CMNavigation may contain Struct data in two out- dated data formats for placements. In CoreMedia 8, a third data format is introduced (actually a mixture of both old formats). All three formats are still understood by the CAE, and for Studio, both old formats are converted to the new format on the fly in the REST service. So everything works out of the box and there is no need to change your CMS data. In order to consolidate the persistent state (which saves on-the-fly conversion), CoreMedia 8 provides a migration tool that converts all existing placements to the most recent format. To this end, the module cms-tools-application provides the tool migrateplacements, which can be run once during an update to the current CMS version. You can start the tool using the command cm migrateplace ments -u admin, in which case the tool will convert all placement structs stored in the property placements of documents of type CMChannel. By adding the option -t the tool can be applied to another document type instead.

CoreMedia 8 40 Migration Tasks | Migrating CAE Applications

3.6 Migrating CAE Applications

This section lists changes in CAE configuration and module structure. Also, it provides pointers for further reading regarding API changes and new features. 3.6.1 CAE Modularization

The module cap-objectserver.jar contained many services that can be cat- egorized as ContentBean services, View services, Handler services and Link services. The modules were split up into API and IMPL modules. Here, the premise is, that it is encouraged to have compile-time dependencies on API modules and runtime dependencies on IMPL modules. No classes have been moved to different packages or otherwise modified to reduce compile time errors and migration effort. Only some already deprecated classes were removed. Some packages are now distributed across multiple modules. Spring configuration XML files have been moved to the appropriate IMPL modules.

cap-objectserver.jar now doesn't contain classes anymore but has depend- encies on all new CAE modules and will not be deleted so that non-modified workspaces can still be built (maven-dependency-plugin will show warnings/er- rors to change the imports) Table 3.2. CAE Module cae-contentbeanservices-{api|impl} contents Packages com.coremedia.objectserver.beans com.coremedia.objectserver.blob com.coremedia.objectserver.dataviews Spring Configur- contentbean-services.xml ation contentbean-services-defaults.properties dataview-services.xml cae-handlerservices-{api|impl} Packages com.coremedia.objectserver.web com.coremedia.objectserver.web.binding Spring Config controller-services.xml handler-services.xml cae-linkservices-{api|impl} Packages com.coremedia.objectserver.web.links com.coremedia.objectserver.util Spring Config link-services.xml

CoreMedia 8 41 Migration Tasks | Changes in the CAE Tag Library

cap-viewservices-{api|impl} Packages com.coremedia.objectserver.view com.coremedia.objectserver.web.taglib com.coremedia.objectserver.web Spring Config view-development-services.xml view-error-services.xml view-events-services.xml view-freemarker-services.xml view-freemarker-services-defaults.properties view-services.xml view-services-defaults.properties view-substitution-services.xml cae-util Packages com.coremedia.objectserver.util com.coremedia.objectserver.web

3.6.2 Changes in the CAE Tag Library

Metadata Tags

The JSP metadata tags metadata, object and property have been reworked and consolidated with the new FreeMarker metadata macro, see Section, “Metadata Support in Freemarker Templates” in CoreMedia Content Application Developer Manual. The tags now share the concept of a default property which is automatically used by the metadata and object tag. Content objects and properties in the default property are evaluated by the Studio preview integration. For details and other properties interpreted by the Studio see Section 4.3.5, “Adding Document Metadata” in CoreMedia Content Application Developer Manual. Furthermore, the usage has been simplified to prevent misuse, increase clarity and to better support the most common use cases. Note that all these changes do not limit the data structures that can be expressed via the tag library. However, you may now need to write a few more tags to specify complex data. The changes are:

➞ The tags metadata and object no longer support the name attribute. To create an object with a single property, you now have to use a nested property tag. Note that this case is now rare, since typical values like con- tent objects and property paths are automatically wrapped inside the default property needed for the Studio preview integration.

CoreMedia 8 42 Migration Tasks | Changes in the CAE Tag Library

➞ The tags metadata, property and object are no longer allowed to have a value attribute and nested tags at the same time. ➞ The tags property and object must not be mixed as siblings anymore, that is the tags metadata, property and object are no longer allowed to have direct child tags property and object at the same time.

Additionally, a new tag called previewScripts has been introduced, which has to be called once while rendering an HTML page that contains metadata to initiate Studio preview integration. For details see Section, “Metadata Support in JSP Templates” in CoreMedia Content Application Developer Manual.

CoreMedia 8 43 Migration Tasks | Migrating CAE Web Resources

3.7 Migrating CAE Web Resources

This section lists changes to be made to migrate JSP templates, CSS and JavaScript to CoreMedia 8. JSP Templates

JSP Templates for Preview CAE in cae-preview-webapp have been enhanced with PDE metadata and some minor HTML changes. No template was deleted, only some new templates were added.

In cae-base-lib all specific templates for "corporation" site have been removed. Changes have been made only in common/com.coremedia.blueprint.cae.ac tion, common/com.coremedia.blueprint.cae.action.search, com mon/com.coremedia.blueprint.common.contentbeans, common/com.core media.objectserver.view and for "media" site. Table 3.3. CoreMedia 8 Template Change description Common Template CMActionState.asHeader Moved to CMActionState.asFooterItem.jsp Changes Item.jsp SearchAction Simplify search form and adapt to new styles State.asHeaderItem.jsp SearchActionState.asTeas Simplify search form and adapt to new styles er.jsp SearchActionState.jsp Simplify search form and adapt to new styles CMAction.asHeader Change TagLib inclusion Item.jsp CMAction.as Change TagLib inclusion MetaNavItem.jsp CMAction.asTeaser.jsp Change TagLib inclusion CMAudio.details.jsp Remove inline JavaScript for the Media Player (see coremedia.blueprint.common.js) CMCollection.asTeas Change HTML to new site layout er.jsp CMCollection.asTeas Change slideshow implementation er[slideshow].jsp CMCollection.asTeas Enhance PDE Metadata, minor HTML changes er[sub_3col_33_33_33].jsp

CoreMedia 8 44 Migration Tasks | Migrating CAE Web Resources

Template Change description CMExternalLink.as Change HTML to new site layout Link.jsp CMExternalLink.asTeas Enhance PDE Metadata, minor HTML changes er.jsp CMGallery.asTeaser.jsp Enhance PDE Metadata CMGallery.jsp Fix Elastic Social Implementation CMHTML.jsp Simplify the template CMInteractive.de Remove inline JavaScript tails.jsp CMNavigation.asSitemap Fix CMS-2584 Item.jsp CMPicture.asRichtex Fix CMS-2615 tEmbed.jsp CMPicture.details.jsp Enhance Template for new site layout CMTeasable.asHighlighted Change HTML to new site layout SearchListItem.jsp CMTeasable.asLink.jsp Enhance PDE Metadata and minor changes of HTML CMTeasable.as Enhance Template for new site layout ListItem.jsp CMTeasable.asTeaserS Change image transformation to large4x3 lideItem.jsp CMTeasable.detail Minor changes of HTML Text.jsp CMTeasable.meta.jsp Change order of Elastic Social tab elements for CMTeasable CMTeasable.picture.jsp Enhance PDE Metadata CMTeasable.related.jsp Minor HTML changes CMTeasable.related Minor HTML changes Items.jsp CMTeasable.sharing.jsp Complete rewrite due to Elastic Social Changes CMVideo.asTeaser.jsp Enhance Template for new site layout CMVideo.details.jsp Minor HTML changes

CoreMedia 8 45 Migration Tasks | Migrating CAE Web Resources

Template Change description CMVideo.singleAs Remove inline JavaScript for the Kaltura Player setVideoKalturaPlay er.jsp CMVideo.singleAssetVideo Remove inline JavaScript for the Media Player MediaElementPlayer.jsp CMVideo.singleAssetVideo Remove inline JavaScript for the Vimeo Player VimeoPlayer.jsp CMVideo.singleAs Remove inline JavaScript for the YouTube Player setVideoYouTubePlay er.jsp Page.breadCrumb.jsp Enhance Template for new site layout ViewException.jsp Complete rewrite of the Exception View Template

Template Change description Table 3.4. CoreMedia 8 Sites Template Changes CMChannel.asTopNaviga Enhance PDE Metadata and minor HTML changes tion.jsp CMCollection.asTeas Enhance Template for new site layout er[searchResultBox].jsp CMCollection.asTeas Enhance PDE Metadata and minor HTML changes er[sub_2col_50_50].jsp CMCollection.asTeas Enhance PDE Metadata and minor HTML changes er[teaserBox].jsp CCMCollection.asTeas Enhance Template for new site layout er[topStoryLand scape].jsp CMPicture.asPhotoGallery Improve Robustness against missing properties Item.jsp CMPicture.jsp Enhance PDE Metadata CMPlaceholder.asFooter Minor HTML changes Item_rss.jsp CMTeasable.asLandsca Enhance PDE Metadata peTeaser.jsp CMTeasable.asTeaser.jsp Enhance PDE Metadata

CoreMedia 8 46 Migration Tasks | Migrating CAE Web Resources

Template Change description CMTeasable.asTeaserL Enhance PDE Metadata istItem.jsp CMTeas Minor HTML changes able.asTitleStory.jsp CMTeasable.detail Enhance PDE Metadata Text[sections].jsp CMTeasable.jsp Enhance PDE Metadata and structural HTML changes CMTeasable.pictures.jsp Remove inline JavaScript CMVideo.jsp Major HTML changes - restructure file Page.footer.jsp Minor HTML changes Page.head.jsp Minor HTML changes Page.header.jsp Structural HTML changes Page.jsp Enhance PDE Metadata, change metadata for respons- ive studio slider, some minor HTML changes Page.nav.jsp Rewrite of navigation PageGrid.jsp Minor HTML changes CMProduct.asExternalDe Remove "corporation" specific templates tails.jsp CMProduct.imagegal Remove "corporation" specific templates lery.jsp CMProduct.jsp Remove "corporation" specific templates CMProduct.metaPrice.jsp Remove "corporation" specific templates CMProduct.price.jsp Remove "corporation" specific templates CMProduct.tabContain Remove "corporation" specific templates er.jsp CMTeasable.related.jsp Remove "corporation" specific templates

JSP Templates have been changed in es, es-p13n and osm extensions. Table 3.5. CoreMedia 8 Template Change description Extensions Template CMTeasable.asHead Change TagLib inclusion Changes lineItem.jsp

CoreMedia 8 47 Migration Tasks | Migrating CAE Web Resources

Template Change description CMTeasable.liking.jsp Enhance Template for new site layout CMTeasable.metaCom Enhance Template for new site layout ments.jsp CMTeasable.rating.jsp Change TagLib inclusion CMTeasable.sharing.jsp Removed duplicated template AuthenticationState.as Fix CMS-2576 MetaNavItem.jsp AuthenticationState.com Enhance Template for new site layout mentForm.jsp AuthenticationState.com Enhance Template for new site layout ments.jsp AuthenticationState.as Enhance Template for new site layout MetaNavItem.jsp AuthenticationState.as Enhance Template for new site layout Teaser.jsp ActivateRegistra Enhance Template for new site layout tion.failure.jsp ActivateRegistration.suc Enhance Template for new site layout cess.jsp ConfirmPasswordRe Enhance Template for new site layout set.failure.jsp ConfirmPasswordReset.re Enhance Template for new site layout setForm.jsp ConfirmPasswordReset.suc Enhance Template for new site layout cess.jsp Login.login.jsp Enhance Template for new site layout Login.success.jsp Enhance Template for new site layout Logout.logout.jsp Enhance Template for new site layout PasswordReset.passwordRe Enhance Template for new site layout set.jsp PasswordReset.suc Enhance Template for new site layout cess.jsp Registration.registra Enhance Template for new site layout tion.jsp

CoreMedia 8 48 Migration Tasks | Migrating CAE Web Resources

Template Change description Registration.success.jsp Enhance Template for new site layout UserDetails.userDe Enhance Template for new site layout tails.jsp UserDetails.userDetails Enhance Template for new site layout Form.jsp ESDynamicList.asTeas Minor HTML changes er.jsp ESDynamicList.MOST_COM Enhance Template for new site layout MENTED.jsp ESDynam Enhance Template for new site layout icList.MOST_LIKED.jsp ESDynam Enhance Template for new site layout icList.MOST_RATED.jsp ESDynam Enhance Template for new site layout icList.MOST_SHARED.jsp ESDynam Enhance Template for new site layout icList.TOP_RATED.jsp Comments.jsp Enhance Template for new site layout CMTeasable.metaCom Enhance Template for new site layout ments.jsp complaining.tag Enhance Template for new site layout likeRating.tag Enhance Template for new site layout Interests.popup.jsp Enhance Template for new site layout Personalization Enhance Template for new site layout Form.ajax.jsp CMTeasable.map.jsp Fix CMS-2166

Web Resources

The structure of the cae-development-resources has been changed. In this module, all web resources are grouped in themes now. CoreMedia Blueprint in- cludes two themes, media for the demo site "Reframed", and basic for common blueprint features.

The command line tool css-importer has been changed to import the new structure by default. The default root folder for web resources in content repository has been changed from Designs to Themes, too.

CoreMedia 8 49 Migration Tasks | Migrating CAE Web Resources

Name Description Table 3.6. CoreMedia 8 Web resources struc- $theme.css Placeholder file for linking all CSS files in Content ture for each theme $theme.js Placeholder file for linking all JavaScript files in Content /css Only CSS files /docs Style guide documentation (optional) /fonts Web font files /img All images like icons, backgrounds /js Only own JavaScript files /swf Flash files (optionally) /vendor All third-party libraries should be placed here README.md Used as index file for style guide documentation (optional) package.json Configuration file for documentations (optional)

Inline JavaScript used in media templates was moved to coremedia.blue print.common.js. This change affects search, audio, video, flash, and slide shows. The JavaScript files for the OpenStreetMap integration were moved to core media.blueprint.osm.js. Some third-party Libraries have been updated. Table 3.7. CoreMedia 8 JavaScript Document Change description JS Changes coremedia.blueprint.common.js Enhance JavaScript for new site layout coremedia.blueprint.corpora Remove "corporation" specific JS tion.js coremedia.blueprint.media.js Minor JavaScript changes jQuery Updated from version 1.10.2 to 1.11.1 jQuery UI Updated from version 1.10.3 to 1.11.2 Magnific Popup Updated from version 0.9.3 to 0.9.9 coremedia.es.commentcontrol.js Enhance JavaScript for new site layout coremedia.es.socialanalyt Fix CMS-2732 ics.js jquery.coremedia.es.so Remove "elastic search" specific JS cialshareprivacy.js socialshareprivacy Remove "elastic search" specific JS

CoreMedia 8 50 Migration Tasks | Migrating Search

3.8 Migrating Search

This chapter describes important changes of the CoreMedia Search Engine in Core- Media 8 and necessary migration steps from CoreMedia 7. Solr Update

Apache Solr was updated from version 4.3.0 to 4.10.3 to get the latest features, bug fixes and performance improvements. The Solr update itself is largely backwards-compatible and should not cause any additional migration efforts. However, CoreMedia recommends reading the Solr release notes, especially if your project uses additional Solr features. You can find the Solr release notes at: http://lucene.apache.org/solr/4_10_3/changes/Changes.html. Configuration Changes

CoreMedia 7 Blueprint uses separate indices (aka Solr Cores) for Studio, preview and live CAE. But it still has a shared index configuration for these cores in the directory /collection1/conf. With CoreMedia 8 the index configuration has been separated and cleaned up. The Solr configuration sets directory /configsets contains now distinct configuration sets in subdirectories content and cae for Content Feeder and CAE Feeder indices. Each type of search index has its own index schema (schema.xml) and index configur- ation (solrconfig.xml). Index fields and settings that are only needed for Content Feeder indices have been removed from the configuration set for CAE Feeder indices, and vice versa. The CoreMedia 7 index schema defines lots of field types that were copied from Unused configuration the Apache Solr example configuration, for example field types for various lan- removed guages. In CoreMedia 8 most of the unused field types have been removed from the schema.xml files to keep them simple and avoid unnecessary overhead. The index schema for Content Feeder indices defines all fields with attribute Stored fields for Con- stored="true" in CoreMedia 8 to allow partial document updates. Note that this tent Feeder index change leads to larger index files. You can change the definition of the largest field textbody back to stored="false" in /configsets/con tent/conf/schema.xml to reduce the index disk size, if needed. The actual index data files are no longer written to the directory configured with Index data directory JVM system property solr.data.dir. Each Solr core has its own directory now changed below the Solr home directory, which also contains the index files. For example, the data files for the studio index are written to /cores/stu dio/data. The Solr web application needs write access to its Solr home directory.

CoreMedia 8 51 Migration Tasks | Migrating Search

The new configuration is described in more detail in Section 3.2, “Solr Home Dir- ectory” in CoreMedia Search Manual.

If you've changed the Solr configuration in schema.xml or solrconfig.xml in Migrating Solr configur- CoreMedia 7, then you must check whether the change is still needed for the Content ation Feeder index, for the CAE Feeder indices or both and apply your changes accordingly to the new configuration files. If you use additional field types that are no longer present in the CoreMedia default configuration files, then you can just copy these definitions from the example configuration of the Apache Solr distribution. You can find these additional field types in the file example/solr/collection1/conf/schema.xml after down- loading and unpacking the Apache Solr distribution. You can download Solr from http://lucene.apache.org/solr/. Support for Elastic Social

The Solr based CoreMedia Search Engine now also provides search functionality for CoreMedia Elastic Social. Elastic Search is not required and supported as a search engine for Elastic Social anymore. Elastic Social applications create Solr cores for users and comments automatically when they are started the first time. These indices use the configuration set elastic, which defines index fields and additional settings. Normally, you do not need to change the default configuration. Existing users and comments must be reindexed. This happens automatically when migrating Elastic Social with the provided migration tool as described in Section 3.13, “Migrating Elastic Social” [77]. Text extraction

The option to extract text from blob values in the CoreMedia Search Engine has been removed. The Content Feeder and CAE Feeder applications extract text from blob values now. Apache Tika has been removed from the classpath of the CoreMedia Search Engine. Logging configuration

The log framework for Apache Solr was changed from JDK logging to Apache Log4J. Custom Solr log configurations need to be migrated to Log4J. Migrating a shared index to multiple cores in a custom project

CoreMedia 7 Blueprint uses separate Solr cores for Studio, preview and live CAE. Use multiple Solr cores However, if you are migrating from a custom project which still uses a single shared

CoreMedia 8 52 Migration Tasks | Migrating Search

index, then you must first migrate it to multiple Solr cores and configure search applications to connect to the correct Solr core. The [Search Manual] of the last version of CoreMedia 7 describes necessary changes to migrate a custom project to use multiple cores in section "Using multiple Solr cores".

CoreMedia 8 53 Migration Tasks | Migrating the CAE Feeder

3.9 Migrating the CAE Feeder

This chapter describes important changes of the CoreMedia CAE Feeder in CoreMedia 8 and necessary migration steps from CoreMedia 7. Reindexing required

Content type changes in Blueprint and index schema changes make it necessary Reindexing to start with a clean index and reindex from scratch when feeding Apache Solr. To this end, you must clear the CAE Feeder database, for example with the command- line tool cm resetcaefeeder reset. Configuration Changes

The configuration property feeder.tika.enable has been removed from the Text Extraction CAE Feeder. Apache Tika is always used to extract text before indexing blob values. Migrating an existing database

When feeding into Apache Solr, you must index from scratch with an empty CAE Changes in the data- Feeder database schema and empty search index. However, if you want to start a base custom CoreMedia 8 CAE Feeder application (and not the Blueprint CAE Feeder for Apache Solr) with an existing database from CoreMedia 7, you need to perform some additional steps. You can skip these steps if you start with an empty database. ➞ Execute the following SQL statement before starting the CAE Feeder:

UPDATE pcproperties SET content = 'caefeeder' WHERE property = 'com.coremedia.amaro.persistentcache.propertystore.PropertyVerifier-application';

➞ The type of some database columns or database sequences used by Proactive Engine and CAE Feeder applications has changed from INT to BIGINT for MySQL, IBM DB2 and Microsoft SQL Server databases. No changes are ne- cessary for PostgreSQL and Oracle databases. This change avoids future database errors with long running applications and high update frequency. Existing databases continue to work, but Core- Media recommends adapting the database definitions to avoid future prob- lems. To this end, execute the following SQL statements before starting Proactive Engine or CAE Feeder: For MySQL:

ALTER TABLE ppckeys CHANGE COLUMN validated validated BIGINT DEFAULT 0, CHANGE COLUMN removed removed BIGINT DEFAULT 0,

CoreMedia 8 54 Migration Tasks | Migrating the CAE Feeder

CHANGE COLUMN lastmodified lastmodified BIGINT NOT NULL; ALTER TABLE ppcevents CHANGE COLUMN acknowledged acknowledged BIGINT DEFAULT 0;

For IBM DB2:

SELECT max(lastmodified)+1 FROM ppckeys; DROP SEQUENCE s_ppckeys_lastmodified; -- replace with the result of the first statement CREATE SEQUENCE s_ppckeys_lastmodified AS BIGINT ORDER START WITH ;

For Microsoft SQL Server CoreMedia cannot provide simple ALTER TABLE statements because column type changes are not possible with existing column constraints such as default values. You have to change the following table columns from data type INT to BIGINT: ➞ The columns validated, removed, lastmodified of table ppckeys

➞ The column acknowledged of table ppcevents

Alternatively you can either start with an empty database to create new tables with BIGINT columns or just keep the current database schema. You will not run into problems with the existing INT columns as long as the value of select max(lastmodified) from ppckeys is much smaller than 2147483647.

CoreMedia 8 55 Migration Tasks | Migrating the Content Feeder

3.10 Migrating the Content Feeder

This chapter describes important changes of the CoreMedia Content Feeder in Core- Media 8 and necessary migration steps from CoreMedia 7. Reindexing required

Document type changes in Blueprint and index schema changes make it necessary Reindexing to start with a clean index and reindex from scratch. Standalone deployment

In CoreMedia 7 it was possible to run the CoreMedia Content Feeder embedded in the Content Server. This is no longer possible in CoreMedia 8. The Content Server al- ways runs as separate web application. This was also the recommended approach in CoreMedia 7. The following configuration properties that were not needed for an embedded Content Feeder are required now:

➞ repository.url: IOR URL of the Content Management Server Configure connection to Content Server ➞ repository.user: user to connect to the Content Management Server ➞ repository.password: password to connect to the Content Management Server Configuration Changes

The class of the Spring bean PropertyField to configure feeding of document PropertyField properties in the Content Feeder has changed from hox.corem.server.Proper- tyField to com.coremedia.cms.feeder.content.PropertyField. You must adapt the package if you use a PropertyField bean in your project config- uration. The following configuration properties have been removed and do not need to be Update after rule set anymore: changes

➞ feeder.updateGroups.inBackground ➞ feeder.updateGroups.scheduler.referenceTime ➞ feeder.updateGroups.scheduler.initialDelay ➞ feeder.updateGroups.scheduler.period

CoreMedia 8 56 Migration Tasks | Migrating the Content Feeder

➞ feeder.updateGroups.scheduler.periodUnit

The configuration property feeder.tika.enable has been removed from the Text Extraction Content Feeder. Apache Tika is always used to extract text before indexing blob values.

CoreMedia 8 57 Migration Tasks | Migrating Studio Customizations

3.11 Migrating Studio Customizations 3.11.1 Studio Plugins

With CoreMedia 8, Studio allows more straightforward definition of plugins that customize existing Studio UI components. This is a new, optional option that is used in CoreMedia Blueprint, but you can also leave your CoreMedia 7 Studio Plugin code untouched. However, it is recommended to follow the best practice used in the Blueprint Studio Plugins listed below. Studio Plugins are defined via plugin rules that allow customizing Studio compon- ents of a given type. A plugin rule declares one or more Ext JS plugins to be added when the component is instantiated. A typical use case is to add a button that in- vokes a custom action to some Studio toolbar that is declared as a public extension point. This can be specified declaratively via the EXML element . A problem turned out to be that there was no declarative way to use data from the component to parametrize the plugin. Most often, actions need context inform- ation like the current selection in quite another component than the one they are plugged into. CoreMedia introduced Studio Component IoC to overcome this problem, but it turned out to be hard to comprehend and to debug, and IDE support is lacking. Accessing Container State without IoC

CoreMedia Studio now offers a more straightforward solution to the problem of accessing the state of a surrounding container component to configure your plugin. In the new Jangaroo Ext AS release, any EXML plugin now receives a reference to the component it is plugged into in its config parameter, under the config option name component. To receive the container that provides the state your plugin is interested in, you now use that container in the plugin rule, not the container whose items to customize. There is now extended public API to look up the item container, given the state container. A typical example is an outer container that provides a selection or some other model, and a toolbar to which buttons are to be added. New API

There is a new config class ext.config.plugin (defined in module ext-as) that declares the new config option component. The config class of every Ext JS plugin written in EXML automatically inherits from ext.config.plugin, allowing access to the component instance the plugin is attached to in its EXML code.

There is a new plugin compoundPlugin (defined in module ui-components in package com.coremedia.ui.config) with a single config option plugins that

CoreMedia 8 58 Migration Tasks | Studio Plugins

lists plugins to delegate to. This can be useful when you want to apply multiple customizations to the same Studio public extension point in one EXML file. The following Studio public extension points now provide a "find toolbar" function to use in the applyTo configuration option of addItemsPlugin or removeItem sPlugin:

➞ package com.coremedia.cms.editor.sdk.config ➞ linkListPropertyField.FIND_TOOLBAR

Should be used in favor of LinkListPropertyFieldBase.getLink ListToolbar(). ➞ previewPanel.FIND_TOOLBAR

Changes in Blueprint Code

The following blueprint EXML and ActionScript files were changed to match the new best practice:

modules

➞ extensions ➞ Module alx/alx-studio-plugin ➞ Modified AnalyticsStudioPlugin.exml

➞ Module external-preview/external-preview-studio ➞ Removed AddExternalPreviewButtonPlugin.as ➞ Modified AddExternalPreviewButtonPlugin.exml ➞ Modified ExternalPreviewStudioPlugin.exml

➞ Module p13n/p13n-studio ➞ Modified P13NStudioPlugin.exml ➞ Modified addsitespecificpath.as ➞ Added AddPersonaSelectorPlugin.exml ➞ Modified AddSiteSpecificPathPlugin.as ➞ studio ➞ Module blueprint-components ➞ Modified BlueprintStudioPlugin.exml ➞ Modified PreviewDateSelectorButton.exml ➞ Modified PreviewDateSelectorButtonBase.as ➞ Added AddPreviewDateSelectorButtonPlugin.exml

CoreMedia 8 59 Migration Tasks | Content Security Policy

➞ Modified ExtendedLinkListPropertyField.exml

➞ Module studio-plugins/library-studio-plugin ➞ Modified CreateFromPicturesAction.as ➞ Added CreateFromPicturesAction.exml ➞ Modified CreateImageGalleryAction.as ➞ Modified CreateImageGalleryAction.exml ➞ Modified CreateImageMapAction.as ➞ Modified CreateImageMapAction.exml ➞ Modified OpenCreateFromPicturesWindowAction.as ➞ Modified CreateFromPicturesWindow.exml ➞ Modified CreateFromPicturesWindowBase.as ➞ Modified CreateImageGalleryWindow.exml ➞ Modified CreateImageMapWindow.exml

➞ Module studio-plugins/preferences-studio-plugin ➞ Modified PreferencesStudioPlugin.exml

➞ Module studio-plugins/quick-create-studio-plugin ➞ Added AddQuickCreateLinklistMenuPlugin.exml ➞ Modified QuickCreateStudioPlugin.exml

3.11.2 Content Security Policy

In order to comply with the newly introduced Content Security Policy (CSP) for CoreMedia Studio all Studio customizations have to deal with the restrictions of the default Studio Content Security Policy or they have to customize the policy. For further details about the default policy, policy customization options, and coding tips refer to the [Studio Developer Manual]. 3.11.3 Page Grid

The CoreMedia Blueprint module pagegrid-studio-plugin has been removed in favor of the new modules and bpbase-pagegrid-studio-plugin, which is not contained in the Blueprint workspace, but provided as a Maven artifact. Other features of the old module have been moved to the Blueprint module quick- create-studio-plugin and to the new Blueprint module quick-create-ex tension-studio-plugin. You should remove the module pagegrid-studio- plugin from your workspace, too. In CM8, any features provided by that module have been replaced as follows.

CoreMedia 8 60 Migration Tasks | Teaser Text

The main exported component of pagegrid-studio-plugin was the property field placementsPropertyField. As a replacement, CMChannelForm now uses the new property field pageGridPropertyField, a significantly more robust implementation with a compatible API.

Thus, you can simply replace all usages of placementsPropertyField by pageGridPropertyField, using the EXML namespace of the new module, com.coremedia.blueprint.base.pagegrid.config (see CMChannel Form.exml). If you have modified the code of the old placements property field, you can customize the new field accordingly like any link list property field, either directly through its configuration API or through Studio plugin rules. For an example, see how the Blueprint Studio plugin quick-create-studio-plugin plugs a custom button into all page grid property field toolbars. You can customize the fields and columns of pageGridPropertyField through its configuration API.

The old placementsPropertyField used to include a quick create button for new link list content items. Since the new pageGridPropertyField is contained in a base module and as such may not have dependencies on Blueprint modules, and to refactor quick create to a real plug-in feature, the quick create button is now plugged into the page grid property field's toolbar by quick-create-stu dio-plugin (see AddQuickCreateLinklistMenuPlugin.exml).

The old module pagegrid-studio-plugin was also responsible for customizing page (CMChannel) creation. This functionality has been moved to the new Blueprint module quick-create-extension-studio-plugin, where you are encouraged to add other document type specific customizations of the quick create feature.

The localization methods for layouts, placements, and view types have been mod- ified. View types can now be localized in the file BlueprintViewtypes.proper ties instead of the file Blueprint.properties. A new resource bundle Blue printLayouts.properties has also been added. See Section 5.2.4, “Page Assembly” in CoreMedia 8 Manual for details about the usage of the page grid property field and about localization and configuration op- tions. 3.11.4 Teaser Text

The property editor for the Teaser Text property was a RichText editor without toolbars that could display default text inherited from the Detail Text property. There were several issues with the implementation that could not be easily fixed. Also, while the Teaser Text is persisted as RichText, it was never intended to be edited as such. The property editor for the Teaser Text property was replaced with a newly created TextAreaPropertyField. This property editor transforms persisted RichText into plain text for viewing and vice versa.

CoreMedia 8 61 Migration Tasks | Teaser Text

A TextAreaPropertyFieldDelegatePlugin was added to the Studio core and is used for the Teaser Text property. The RichTextPropertyFieldDelegatePlu gin was deleted. The Teaser Title property is inherited using the StringProper tyFieldDelegatePlugin which was moved to the Studio core. Changes in Blueprint Code

The following blueprint EXML and ActionScript files were changed:

➞ Module studio/blueprint-forms ➞ Modified TeaserDocumentForm.exml ➞ Added TeaserDocumentFormBase.as ➞ Module studio/studio-plugins ➞ Removed RichTextPropertyFieldDelegatePlugin.as ➞ Removed RichTextPropertyFieldDelegatePlugin.exml ➞ Moved StringPropertyFieldDelegatePlugin.as to Studio Core ➞ Moved StringPropertyFieldDelegatePlugin.exml to Studio Core

CoreMedia 8 62 Migration Tasks | Migrating Multi-Site Features

3.12 Migrating Multi-Site Features

This section lists all steps that you have to perform in order to migrate your existing multi-site project to the new concepts with much better support for content valid- ation and translation workflows. If you have not used any multi-site features before, you may also read this section as a reference on how to enable multi-site/multi- language support while migrating your existing project. The migration comprises the following steps:

1. As a prerequisite, adapt content type model to multi-site requirements (see Section 3.5, “Migrating Content Types” [38]) 2. Replace the $site placeholder (p. 64) 3. Replace usages of the MultiSiteUtil (p. 65) 4. Add multi-language editors to document forms (p. 72) 5. Adapt the site folder structure (p. 73) 6. Configure the site indicators (p. 74) 7. Adapt site contents (p. 74) 8. Adapt users and groups (p. 75) 9. Upload workflows for translation (p. 75) 10. Before, in between and/or afterwards you may want to run the command line tool validate-multisite which validates your multi-site configuration content types as well as the content as described in Section 3.13, “Server Utility Programs” in CoreMedia Content Server Manual.

Before starting the migration you should be familiar with the terms, concepts and requirements described in Section 5.4, “Localized Content Management” in Core- Media 8 Manual. Nevertheless, you might also read the relevant sections when referenced from within this guide. In addition, you should read Section 3.5, “Migrating Content Types” [38]. This chapter lists all changes of the content type model, some of which are required for the new multi-site concept. See also the subsection on the content type model of Section 5.4.3, “Development” in CoreMedia 8 Manual. 3.12.1 Site Model and Sites Service

Section 5.4.3, “Development” in CoreMedia 8 Manual, and especially the subsection on the site model and the sites service, introduces the site model and the sites service. They are the essential configuration points for the multi-site feature. Though it is generally advised to use the default settings of the CoreMedia 8 site model, you may want to configure some properties according to your needs. For

CoreMedia 8 63 Migration Tasks | Site Model/Sites Service

example, you might consider adjusting the site model rather than adapting the new proposed content structure of sites. Refer to the site model documentation in [CoreMedia 8 Manual] for further information.

Predecessors of site model and sites service in CoreMedia 7 were the $site placeholder and the classes MultiSiteUtil, available in Java and ActionScript. While the latter might require more extensive migration steps as described in Section 3.12.2, “ MultiSiteUtil ” [65], replacing the $site placeholder is not much more than a search-and-replace operation. For details, follow the instructions in the following section “Placeholder $site ” [64].

Placeholder $site

In previous versions the site model existed implicitly through a placeholder in dif- ferent configurations named $site. You were able to define site-specific paths for example for linklist editors like /Sites/$site/Options/Viewtypes/CMTeas able. When migrating you typically change these paths to relative paths like Op tions/Viewtypes/CMTeasable which is then resolved to an absolute path with these two properties from the site model:

➞ sitemodel.site.indicator.documentType ➞ sitemodel.site.indicator.depth

The new behavior will locate the site folder relative to the location of site indicator content items, thus it provides a much more flexible way to place and structure your sites. Therefore, you need to adapt all site specific paths using $site by their relative counterparts. In Blueprint for example, you need to adjust:

➞ NewContentSettingsStudioPlugin ➞ ViewtypeContentSelectorPropertyField ➞ paths of viewTypeSelectorForm in document forms ➞ folders in openContentChooserAction in document forms ➞ siteSpecificPaths for SiteSpecificComboBoxLinkListEditor and SiteSpecificLinkListEditor in editor.xml ➞ paths in the create from template plugin ➞ paths in the topic pages plugin ➞ paths for image gallery in the library plugin ➞ ...

While the list seems to be quite long it is actually not much more than searching for $site and replacing it by relative paths.

CoreMedia 8 64 Migration Tasks | MultiSiteUtil

In addition to the changes that are required for your Blueprint code, you also have to adapt the site specific path in the properties of some settings documents in CoreMedia Studio:

➞ The default path in /Settings/Options/Settings/UploadSettings ➞ The folder in /Settings/Options/Settings/TopicPages

Here, too, you simply have to set a site-relative path as needed. 3.12.2 Substitution of MultiSiteUtil

The ActionScript and Java classes MultiSiteUtil of CoreMedia 7 provided several methods and constants for the former multi-site concept. With the implementation of the new multi-site features in CoreMedia 8, these utility classes were removed and their methods and fields either became obsolete or have been replaced by other classes/methods. This chapter describes how you can adapt all usages of the old MultiSiteUtil.as (see section “MultiSiteUtil.as” [65]) and MultiSiteUt il.java (see section “MultiSiteUtil.java” [70]) in your Blueprint code.

MultiSiteUtil.as

Most methods and fields of MultiSiteUtil.as are now available through a new class named SitesService. This can be retrieved from the editorContext as in Example 3.1, “Retrieving SitesService” [65].

Example 3.1. Retriev- editorContext.getSitesService() ing SitesService

Note also that CoreMedia Studio now represents sites as objects of type Site rather than just by name. Thus, methods which previously returned/accepted site names now typically use Site objects. Table 3.8. Substitution formatPath of MultiSiteUtil.as methods Signature in CoreMedia 7 formatPath(path:String):String

Usage in Core- Media 7 var path:String = MultiSiteUtil.formatPath("/Sites/$site/Navigation");

Usage in Core- Media 8 var path:String = PathFormatter.formatSitePath("Navigation");

CoreMedia 8 65 Migration Tasks | MultiSiteUtil

Remark PathFormatter provides additional functionality, not only to return the preferred site path, but also the site path inside the site the given (optional) content belongs to. Mind that the path is now relative to the site folder and does not parse the placeholder $site any longer. See section “Placeholder $site ” [64] for details. getActiveSite Signature in CoreMedia 7 getActiveSite():String

Usage in Core- Media 7 var activeSiteName:String = MultiSiteUtil.getActiveSite();

Usage in Core- Media 8 var preferredSite:Site = sitesService.getPreferredSite();

var preferredSiteId:String = sitesService.getPreferredSiteId();

var preferredSiteName:String = sitesService.getPreferredSiteName();

Remark In contrast to getActiveSite(), which returned the name of the site, the method getPreferredSite() of the SitesService re- turns an object of type Site. The SitesService also offers two methods to retrieve the id and the name of the preferred site directly. getActiveSiteExpression Signature in CoreMedia 7 getActiveSiteExpression():ValueExpression

Usage in Core- Media 7 var activeSiteValueExpression:ValueExpression = MultiSiteUtil.getActiveSiteExpression(); var siteName:String = activeSiteValueExpression.getValue();

Usage in Core- Media 8 var preferredSiteValueExpression:ValueExpression = sitesService.getPreferredSiteIdExpression(); var site:Site = sitesService.getSite(preferredSiteValueExpression.getValue());

CoreMedia 8 66 Migration Tasks | MultiSiteUtil

Remark While the value of the activeSiteExpression is the site name, the preferredSiteIdExpression holds the site id. Use the sitesService.getSite(siteId:String) method to retrieve the information about the site. getIsRootChannelValueExpression Signature in getIsRootChannelValueExpression( CoreMedia 7 bindTo:ValueExpression ):ValueExpression

Usage in Core- Media 7

Usage in Core- Media 8

Remark This method is only used in CMChannelForm.exml and was therefore moved to its base class. getSiteFor Signature in CoreMedia 7 getSiteFor(content:Content):String

Usage in Core- Media 7 var siteName:String = MultiSiteUtil.getSiteFor(content);

Usage in Core- Media 8 var site:Site = sitesService.getSiteFor(content);

var siteId:String = sitesService.getSiteIdFor(content);

var siteName:String = sitesService.getSiteNameFor(content);

Remark The original method getSiteFor() returned the name of the site, while the corresponding method of the SitesService returns an object of type Site. The SitesService also offers corresponding methods to retrieve the name and the id of a site. getSiteName Signature in CoreMedia 7 getSiteName(path:String):String

CoreMedia 8 67 Migration Tasks | MultiSiteUtil

Usage in Core- Media 7 var siteName:String = MultiSiteUtil.getSiteName(content.getPath());

Usage in Core- Media 8 var siteName:String = sitesService.getSiteNameFor(content);

Remark Typical calls to getSiteName() that passed content.getPath() as argument. getSiteNameFor() of SiteService now directly accepts the content object. getSites Signature in CoreMedia 7 getSites():Array

Usage in Core- Media 7 var sites:Array = MultiSiteUtil.getSites(); for(var i:int = 0; i

Usage in Core- Media 8 var sites:Array = editorContext.getSitesService().getSites(); if (sites) { for(var i:int = 0; i

Remark Mind that the former getSites() only returned site names while SitesService returns objects representing the sites of type Site. loadSites Signature in CoreMedia 7 loadSites(callback:Function = undefined):void

Remark Explicit loading of sites is not required anymore as they are loaded initially by EditorMain and are updated automatically as new sites are avail- able. resolveFolder Signature in CoreMedia 7 resolveFolder(folder:String, content:Content):String

Usage in Core- Media 7 var folderPath:String = "/Sites/$site/Navigation"; var path:String = MultiSiteUtil .resolveFolder(folderPath, content);

CoreMedia 8 68 Migration Tasks | MultiSiteUtil

Usage in Core- Media 8 var path:String = PathFormatter .formatSitePath("Navigation", content);

Remark As in MultiSiteUtil, the provided content is optional and just used to determine the site to format the path. Mind that the path is now relative to the site folder and does not parse the placeholder $site any longer. See section “Placeholder $site ” [64] for details. resolveFolders Signature in CoreMedia 7 resolveFolders(content:Content, folders:Array):Array

Usage in Core- Media 7 var folders:Array = ["/Sites/$site/Navigation", "/Sites/$site/Editorial"]; var path:String = MultiSiteUtil .resolveFolders(content, folders);

Usage in Core- Media 8 var folders:Array = ["Navigation", "Editorial"]; var result:Array = []; folders.forEach(function (folder:String):void { var result:String = resolveFolder(folder, content); result.push(resolvedFolder); });

Remark There is no direct substitution of resolveFolders() in CoreMedia 8, use the method resolveFolder() instead. As described for the resolveFolder() method, the path in CoreMedia 8 must be relative to the site folder and does not parse the placeholder $site any longer. setActiveSite Signature in CoreMedia 7 setActiveSite(site:String):void

Usage in Core- Media 7 MultiSiteUtil.setActiveSite(newSite);

Usage in Core- sitesService.getPreferredSiteIdExpression() Media 8 .setValue(siteId);

Remark In CoreMedia 8 the preferred site is set by using the SiteSelector- ComboBox. Therefore, it is not necessary to set the preferred site via the SitesService.

CoreMedia 8 69 Migration Tasks | MultiSiteUtil

PREFERENCE_ACTIVE_SITE Table 3.9. Substitution of MultiSiteUtil.as con- Substitution EditorMain.PREFERRED_SITE stants SITE_PLACEHOLDER Substitution obsolete Remark The $site placeholder is obsolete and is typically replaced by paths re- lative to the site folder. See section “Placeholder $site ” [64] for details. SITES_FOLDER Substitution obsolete Remark The property rootFolderPathPattern of the site model contains the root folder of all sites implicitly. This property should be adapted if you choose to change the sites folder. See also Section 3.12.1, “Site Model/Sites Service” [63].

MultiSiteUtil.java

As already stated for MultiSiteUtil.as, the methods are typically moved to another class. This class is again named SitesService with similar (but not the same) features as provided by its ActionScript counterpart.

Retrieve the singleton instance of SitesService through your Spring context as in Example 3.2, “Retrieving SitesService” [70]

Example 3.2. Retriev- private SitesService sitesService; ing SitesService @Required public void setSitesService(SitesService sitesService) { this.sitesService = sitesService; }

Another concept introduced is the ContentSiteAspect. It represents the site specific view of a content. To retrieve a ContentSiteAspect for a content, pro- ceed as given in Example 3.3, “Retrieving ContentSiteAspect” [70]. The aspect can then determine the site a content belongs to, the master of the given content, etc.

Example 3.3. Retriev- sitesService.getContentSiteAspect(content) ing Content- SiteAspect getSiteName Table 3.10. Substitu- tion of MultiSiteUt- il.java methods

CoreMedia 8 70 Migration Tasks | MultiSiteUtil

Signature in CoreMedia 7 String getSiteName(Content content)

String getSiteName(String path)

Usage in Core- Media 7 String siteName = MultiSiteUtil.getSiteName(content);

Usage in Core- Site site = contentSiteAspect.getSite(); Media 8 String name = site.getName();

getSites Signature in CoreMedia 7 Set getSites(ContentRepository contentRepository)

Usage in Core- Collection sites = Media 7 MultiSiteUtil.getSites(contentRepository);

Usage in Core- Media 8 Set sites = sitesService.getSites();

Remark Note that the signature in CoreMedia 7 getSites() returned a set of site folders. Code relying on this behavior needs to map Site objects to their corresponding site folders. The site folder can be retrieved from the Site object via Content Site.getSiteRootFolder(). getSiteSpecificFolderPath Signature in String getSiteSpecificFolderPath( CoreMedia 7 Content content, String path )

String getSiteSpecificFolderPath( String contentPath, String path )

Usage in Core- Media 7 String path = "/Sites/$site/Navigation"; String folder = MultiSiteUtil.getSiteSpecificFolderPath(content, path);

Usage in Core- Site site = sitesService.getSiteFor(content); Media 8; String folder = site.getSiteRootFolder().getChild("Navigation");

CoreMedia 8 71 Migration Tasks | Document Forms

Remark There is no direct replacement. Note that all site specific paths are relative and do not use the $site placeholder any longer. See section “Place- holder $site ” [64]. for details. getSiteSpecificFolderSite Signature in CoreMedia 7 String getSiteSpecificFolderSite(String site, String path)

Usage in Core- String path = “/Sites/$site/Options/Settings/TopicPages”; Media 7 String folderPath = MultiSiteUtil.getSiteSpecificFolderSite(site, path);

Usage in Core- String path = “Options/Settings/TopicPages” Media 8; Content siteRootFolder = site.getSiteRootFolder(); Content folder = siteRootFolder.getChild(path);

Remark Again there is no direct replacement. Note that all site specific paths are relative and do not use the $site placeholder any longer. See section “Placeholder $site ” [64]. for details. sitePath Signature in CoreMedia 7 String sitePath(Content navigationAsContent)

Usage in Core- Media 7 String path = MultiSiteUtil.sitePath(content);

Usage in Core- Site site = contentSiteAspect.getSite(); Media 8; String path = site.getSiteRootFolder().getPath();

3.12.3 Studio Document Forms

In addition to the changes to document forms regarding the $site placeholder as described in section “Placeholder $site ” [64] you also need to adapt the docu- ment forms regarding the changes you applied to the content type model as de- scribed in Section 3.5, “Migrating Content Types” [38]. To enable editing the multi-site properties (versioned master link and locale), it is required to include the multiLanguageDocumentForm component to document forms of every localizable content type. Thus, it is important to adapt all document forms for content types you migrated to a localizable content type beforehand.

CoreMedia 8 72 Migration Tasks | Sites Structure

Example 3.4. Using multiLanguageDoc ... umentForm ...

Mind that in order to enable the selection of locales in the combo box you have to provide a central configuration document listing all available locales as described in subsection "Locales Administration" of Section 5.4.2, “Administration” in Core- Media 8 Manual. You will recognize that you missed this step if the list of available locales in the combo box is empty. 3.12.4 Sites Structure

As already introduced in CoreMedia 7, all sites are located in a dedicated folder structure. According to the default scenario in CoreMedia 7 Blueprint your sites were located in, for example, /Sites/Media where Media is what is called a site name in CoreMedia 8 which, upon migration, you will have to set in your site indic- ator (see section “Site Indicators” [74]). In CoreMedia 8 the flexibility of the configuration was enhanced and adapted to the requirements for the multi-site feature (see section “Placeholder $site ” [64]). Refer to the subsection on the site model and the sites service of Section 5.4.3, “Development” in CoreMedia 8 Manual to learn more about the configuration of sites.

The following sections provide information on how to change your sites structure to the recommended structure for CoreMedia 8.

Folder Structure

The suggested folder structure is described in Section “Sites Structure” in CoreMedia 8 Manual. It is based on three properties of the site model:

➞ sitemodel.site.indicator.depth ➞ sitemodel.rootFolderPathPattern ➞ sitemodel.rootFolderPathDefaultCountry

It is advisable to adapt your folder structure to the new concept. Otherwise, some scenarios like deriving a new site might create unexpected results. As an alternative you might consider changing the site model so that it fits the existing structure better.

CoreMedia 8 73 Migration Tasks | Sites Structure

Site Indicators

As described in Section “Terms” in CoreMedia 8 Manual and Section “Sites Structure” in CoreMedia 8 Manual the site indicator is the central configuration object for a site. It defines several properties that are needed for your site. In CoreMedia 7 the site indicator existed as well but with fewer properties (namely only the home page). After migrating your content type model as described in Section 3.5, “Mi- grating Content Types” [38] you will have to set these properties as described hereinafter. The site identifier has to be set in the field ID of the site indicator. This field is read Site Identifier only by default, because the site identifier is generally created automatically and has to be unique among all sites. However, if you migrate to CoreMedia 8, the ID is not defined yet and has to be added manually. Please login as administrative user to change the value. The Name of the site is inherited from the master and has to be equal among all Site Name variants of the site. Like the ID, this field will be empty after migrating to CoreMedia 8 and has to be set manually as administrative user. The Locale of the site indicator applies to the whole site and is used as fallback for Locale all contents whose locale is not defined. Before defining the locale, please make sure that a content item with all available locales defined in a struct property exists - see also Section 3.5, “Migrating Content Types” [38] and Section “Locales Admin- istration” in CoreMedia 8 Manual. Mind that as described in Section “Terms” in CoreMedia 8 Manual the locale needs to be an IETF BCP 47 language tag - which compared to standard Java Locale.to String() means to replace underscores with dashes. In Java you will get an IETF BCP 47 language tag by converting a locale via Locale.toLanguageTag(). If the Site Manager Group is not specified, the group "administratoren" will be used Site Manager Group by default.

Site Contents

After adapting your Content Type Model as described in Section 3.5, “Migrating Content Types” [38] you most likely have to adapt contents in your sites as well, especially those where you introduced the required properties master and mas- terVersion.

To make this a feasible task you might rely on the command line tool validate- multisite which validates not only your multi-site configuration and content types but also site contents as described in Section 3.13, “Server Utility Programs” in CoreMedia Content Server Manual. The tool description also provides hints on possible options to deal with issues detected by that tool. For bulk operations you might consider parsing the tab separated file output, for example, to adjust all missing master links.

CoreMedia 8 74 Migration Tasks | Groups and Rights

The tool will also detect problems with your site indicator such as locales that do not match the IETF BCP 47 language tag requirements (see Section “Terms” in CoreMedia 8 Manual for details). It will be reported as MS-VALIDATION-4000 - In- valid Property Value.

Once the locale of the site indicator is fixed a next run of validate-multisite will reveal that you also have to adopt all site contents to the new locale. Reported as MS-VALIDATION-5001 - Not Site Locale.

So it is quite typical on a migration project that you have to run validate- multisite multiple times until all issues are fixed. 3.12.5 Groups and Rights Administration

To enable the full functionality of the multi-site concept in CoreMedia Studio, you have to provide specific groups and users. Refer to "Groups and Rights Administra- tion" of [CoreMedia 8 Manual] in "CoreMedia 8 Website and Content Structure/Loc- alized Content Management/Administration" for more information and examples. 3.12.6 Multi-Site Workflows

In order to support translation processes and to create derived sites, you have to install two workflows: the translation workflow and the workflow for deriving complete sites.

The translation workflow is located in the file cmd-tools/wfs-tools-applica Translate tion/src/main/app/properties/corem/workflows/translation.xml and can be uploaded using cm upload -f translation.xml or via CoreMedia Site Manager. For further information about the configuration options of the translation workflow refer to "Workflow Management/Predefined Translation Workflow" of [CoreMedia 8 Manual]. The derive-site workflow cannot be adapted and is available as a built-in workflow Derive Site from the module translate-workflow. To upload the derive-site workflow, use cm upload -n /com/coremedia/translate/workflow/derive-site.xml on the command line. Both workflows can only be started by users which are members of the group which is configured in the site model in the property sitemodel.translation- ManagerRole. The default name for this group is translation-manager-role. See also the subsection on the site model and the sites service of Section 5.4.3, “Devel- opment” in CoreMedia 8 Manual.

CoreMedia 8 75 Migration Tasks | Version Cleanup

3.12.7 Multi-Site Aware Version Cleanup

Using the multi-site feature you are required to keep your versions consistent while performing version cleanups such as the Publisher feature to destroy intermediate versions as well as using the cleanversions command line tool. Otherwise, versions might be deleted, although they are still referenced by some derived contents.

Destroy Intermediate Versions

The destruction of intermediate versions during publications has been adopted to match the multi-site set up. Thus, it respects versions which are referred to from derived contents. As a consequence the flag to enable/disable the destruction of intermediate versions has been changed from false/true to off/dumb/strict for publisher properties as well as JMX configuration.

For JMX a new three-state property DestroyIntermediateVersions got intro- duced while the old property DestroyIntVersions is marked as deprecated.

For migration purpose the old flags false/true are still supported and are mapped to false = off and true = strict. Thus, most likely you could skip adopting this step of the migration project. The dumb mode uses the old implementation which ignores any version references.

Clean Versions

As for the destruction of intermediate versions, also the command line tool cleanversions has been adapted to match the multi-site set up. Thus, the warning in the Content Server manual not to use cleanversions in multi-site set up has been removed accordingly. Unlike the version cleanup on publication (destruction of intermediate versions), cleanversions only recognizes version references in the latest version of any content. Thus, reverting changes in derived contents might result in broken ver- sioned links. Having a reasonable time scale in the keep-days option will reduce the possible impact of this destruction.

On migration you just need to ensure that the sites service is known to cleanver sions. For further reference read the subsection on the site model and the sites service of Section 5.4.3, “Development” in CoreMedia 8 Manual.

CoreMedia 8 76 Migration Tasks | Migrating Elastic Social

3.13 Migrating Elastic Social

Elastic Social data from CoreMedia Blueprint is stored in a MongoDB database. The format of this data has changed and must be migrated to the new format before it can be used in CoreMedia 8. Without data migration, models such as comments or likes from CoreMedia 7 can neither be found nor displayed on the website. Moreover, counter values would be reset to 0 if data migration is not performed. CoreMedia 8 comes with a tool that automatically migrates old data. ➞ Section 3.13.1, “Data Changes” [77] describes the changes in the data model ➞ Section 3.13.2, “Migration Tool” [78] describes details about the migration tool ➞ Section 3.13.3, “Performing the Migration” [78] describes how you do the actual migration 3.13.1 Data Changes

The following MongoDB collections are affected by migration:

➞ comments, likes, shares, ratings in database blueprint__mod- els ➞ counters, histogram_counters in database blueprint__counters

has to be replaced with a concrete tenant name, for example, media. All these collections contain values with an attribute target which has changed in CoreMedia 8. For example, for the tenant media you can execute the following Mongo client commands in CoreMedia 7 which output target attribute values matching this format:

> use blueprint_media_models > db.comments.findOne().pretty() { ... "target" : { "_type" : "contentBean", "id" : “contentbean:4711" }, ... }

The corresponding new format in CoreMedia 8 is different:

> use blueprint_media_models > db.comments.findOne().pretty() { ... "target" : { "_type" : "contentWithSite",

CoreMedia 8 77 Migration Tasks | Migration Tool

"id" : "coremedia:///cap/content/4711", "site" : "dc9a22768123b9169c739c7bbf0d11b7" }, ... }

As you can see, the contentBean value in property _type was changed to content- WithSite. The id attribute value now contains a content ID and the new site at- tribute identifies the site of the content. Hence, the target property of your models referencing content beans have to be migrated. If you have added custom models to your project referencing content beans, you might have to convert these models too. Migration is necessary if your project re- quires that models of your custom type can be filtered by site on the persistence layer or if they simply have to work with similar types as the predefined models. To migrate models of custom types, you have to adapt the migration tasks described in the following subsection to match your models' collections and properties. 3.13.2 Migration Tool

The migration of Elastic Social data is performed by a main task (MigrationTask) Technical details of the and three subordinated tasks (CollectTargetsTask, MigrateModelTarget- migration tool sTask, and MigrateCounterTargetsTask) running in the elastic-worker web application in the CoreMedia 8 Studio Tomcat. The main task repeatedly checks for the existence of a content at elastic-worker web application in the Studio Tomcat of CoreMedia 8. The main task repeatedly checks for the existence of a content at /System/migration/ where has to be replaced with a concrete tenant. If that content exists, that tenant's data is migrated. The migration tasks perform the following cleanup actions: Built-in cleanup ac- tions ➞ The comments models are reindexed. Add your own indexes if needed. ➞ After successful migration, the tenant's migration folder is deleted automat- ically. For example, you create the folder /System/migration/media to start the main task for the tenant media. After successful migration, the media folder is deleted. ➞ The counter task queue is restored to its configuration as defined in the worker's local class path. 3.13.3 Performing the Migration

Before you start with the migration do the following: Prerequisites

1. Estimate the expected migration time and select an appropriate time slot. The duration of Elastic Social data migration is affected by the number of models to migrate and the number of referenced targets. As a rule of thumb, you can

CoreMedia 8 78 Migration Tasks | Performing the Migration

expect 2,000,000 models referencing 100,000 targets per tenant to be converted within an hour. Similar performance was confirmed on CentOS boxes operating on two 2.20GHz CPUs and 10 GB RAM. CoreMedia recommends that you determine a time slot such that it matches the expected duration of the migration tasks and also minimizes your com- munity's output (in terms of created comments). Disable Elastic Social and trigger migration when that time slot starts and enable Elastic Social when that time slot is over. Note that the CAE instances have to be switched from CoreMedia 7 to CoreMedia 8 while Elastic Social is disabled and Elastic Social is not enabled before migration has finished. 2. Check that your content has already been migrated, so each content item has a site. 3. Disable Elastic Social, so no new social data can be created by users. To do so, set the Boolean flag elasticSocial.enabled in the Elastic Social settings document to "false" and publish the document.

In order to start the migration process, you simply have to create a folder below Starting the main mi- /System/migration. The folder's name must match the tenant's name for which gration task you want to migrate the data. For example, /System/migration/media. The folder will be deleted when the migration has successfully finished.

Controlling the migration tasks

You can control the running migration elastic-worker tasks. When queued a task Check the database together with its parameters is stored for each tenant in the two MongoDB collec- tions migrationManagementQueue and migrationQueue in the tasks database. For example, for the tenant media you can execute these commands in the Mongo client shell:

> use blueprint_media_tasks > db.migrationManagementQueue.find().pretty() > db.migrationQueue.find().pretty()

Another way to control the running tasks is to look at the MongoDB collection mi- gratedTargets in the model's database. For the tenant media, for instance, you can execute these commands in the MongoDB client shell:

> use blueprint_media_models > db.migratedTargets.find().pretty() > db.migratedTargets.count()

After successful migration the migrationQueue collection should be empty, the migrationManagementQueue will contain a single element and the migratedTargets collection will contain pairs of already migrated content beans and targets. If you don’t need it any longer, you can delete the migratedTargets collection. Of course,

CoreMedia 8 79 Migration Tasks | Performing the Migration

all target attributes in the collections comments, likes, shares, ratings, counters and histogram_counters should be migrated, which was the aim of migration. Content beans that cannot be migrated to content with a site are converted into Content that could not an object combining the content bean's ID with a brief description of the problem. be migrated Note that this does not necessarily indicate an error. The most obvious example is a comment whose target content no longer exists.

CoreMedia 8 80 Index |

migration, 63 Index MultiSiteUtil, 65 permissions, 75 SiteModel, 63 SitesService, 63 translation manager role, 75 workflow, 75 MultiSiteUtil, 65 ActionScript, 65 Symbols Java, 70 $site, 64 P C Publisher Chef destroyIntermediateVersions, 76 Workspace, 34 cleanversions, 76 R cm release notes, 13 cleanversions, 76 removals, 18 validate-multisite, 63, 74 Content Security Policy S Studio, 60 site Workspace, 34 contents, 74 CSP home page, 74 Studio, 60 locale, 74 Workspace, 34 migration, 63 site id, 74 D site identifier, 74 Deployment site indicator, 74 Workspace, 34 site manager group, 74 destroyIntermediateVersions, 76 site name, 74 Document Forms, 72 SiteModel, 63 multiLanguageDocumentForm, 72 SitesService, 63 translation manager role, 75 H site manager group, 74 home page, 74 SiteModel, 63 SitesService, 63 Studio J Document Forms, 72 JSP, 34 supported environments, 15 JSP templates, 34 T M Templates, 34 multi-site, 63 third-party libraries, 30 groups, 75 translation

CoreMedia 8 81 Index |

workflow, 75 V validate-multisite, 63, 74 W workflow derive-site, 75 multi-site, 75 publication, 37 translation, 75

CoreMedia 8 82