Upgrading to a Java/JSP Web application-based UGC Moderation Service microservice (discouraged)
Continuing to use a Web application, containing the UGC Moderation Service microservice, is deprecated and strongly discouraged. The resources required for such an upgrade are not shipped with the product deliverable.
Procedure
- Access the library location of the Web application that contains your UGC Moderation Web service.
- Remove the following JAR files, which this Role no longer uses:
- asm.jar
- cd_odata.jar
- cd_odata_types.jar
- commons-collections.jar
- hibernate-jpa-2.0-api.jar
- jackson-core-asl.jar
- jackson-jaxrs.jar
- jackson-mapper-asl.jar
- jackson-xc.jar
- jboss-transaction-api_1.1_spec.jar
- jdbcpool.jar
- jersey-client.jar
- jersey-core.jar
- jersey-json.jar
- jersey-server.jar
- jersey-servlet.jar
- json-smart.jar
- spring-asm.jar
- spring-context-support.jar
- ugc_dynamic.jar
- ugc_taglib.jar
- ugc_tcdl.jar
- ugc_webservice.jar
- Also remove the following JAR files, which have a new filename in this Role (showing the version):
- activation.jar
- antlr.jar
- aopalliance.jar
- cd_ambient.jar
- cd_broker.jar
- cd_cache.jar
- cd_core.jar
- cd_datalayer.jar
- cd_dynamic.jar
- cd_linking.jar
- cd_model.jar
- cd_tcdl.jar
- cd_wai.jar
- commons-dbcp.jar
- commons-pool.jar
- dom4j.jar
- easylicense.jar
- guava.jar
- hibernate-commons-annotations.jar
- hibernate-core.jar
- hibernate-entitymanager.jar
- javassist.jar
- jaxb-api.jar
- jaxb-impl.jar
- jboss-logging.jar
- jcl-over-slf4j.jar
- jettison.jar
- jsoup.jar
- logback-classic.jar
- logback-core.jar
- serializer.jar
- slf4j-api.jar
- spring-aop.jar
- spring-beans.jar
- spring-context.jar
- spring-core.jar
- spring-expression.jar
- spring-jdbc.jar
- spring-orm.jar
- spring-tx.jar
- stax-api.jar
- ugc_model.jar
- ugc_storage.jar
- xalan.jar
- Contact SDL Customer Support to obtain a WAR file for the Content Service, called moderation-service.war. Unpack this file to a location of your choice, then navigate to the WEB-INF/lib/ folder.
- Copy all files in this location to your Role's library location.
- Depending on the Web application server you use, remove the following JAR files you just copied:
Web application server File to remove Oracle WebLogic stax-api-VERSION.jar RedHat JBoss - serializer-VERSION.jar
- stax-api-VERSION.jar
- xalan-VERSION.jar
where VERSION is the version number of the JAR file.
- Access the configuration location and do one of the following:
- If you have modified the file logback.xml, merge its contents with that of the file Content Delivery\roles\ugc\service-moderation\standalone\config\logback.xml.
- Otherwise, copy Content Delivery\roles\ugc\service-moderation\standalone\config\logback.xml over your current logback.xml.
- In the configuration location, open the following files for editing:
- cd_webservice_conf.xml
- cd_storage_conf.xml
- cd_ambient_conf.xml
- From cd_webservice_conf.xml, copy the section called
<OData>, with all of its contents, to your clipboard. - In cd_storage_conf.xml, place your cursor before the
<License>section and paste the copied code. - Save and close cd_storage_conf.xml.
- From cd_webservice_conf.xml, copy the sections called
<AuthenticationServer>and<Accounts>, with all of their contents, to your clipboard. - In cd_ambient_conf.xml, place your cursor inside the
<Security>section, before the<Rules>subsection or, if there is no<Rules>subsection, just before the closing tag</Security>, and then paste the copied code. - If you use OAuth authentication, add an
OAuthEnabledattribute to theSecurityelement and set it totrue. - If you use OAuth authentication, add the following subelement inside the
Securityelement:<RequestValidator>com.sdl.web.oauth.validator.OAuth2RequestValidator</RequestValidator> - If you use OAuth authentication, cut the
<SharedSecret>element out of yourSecuritysection and paste it inside the<AuthenticationServer>section you just pasted from cd_webservice_conf.xml, replacing any<SharedSecret>element that is already there. - Add the following
Claimelements to your<GloballyAcceptedClaims>section:<Claim Uri="taf:tracking:id"/> <Claim Uri="taf:claim:contentdelivery:webservice:user"/> <Claim Uri="taf:claim:contentdelivery:webservice:post:allowed"/> - Remove all
Pathelements inside the<ExcludedPaths>section, and add the followingPathelement:<Path>/token.svc</Path> - In your
Cartridgeelement for the UGC Cartridge, add a new attribute calledCategoryand set it tosystem, so that the element looks like this:<Cartridge Category="system" File="ugc_ambient_cartridge_conf.xml" /> - Inside the
<Cookies>section, add the following subelement:<Cookie Type="ADF" Name="TAFContext" /> - Save and close cd_ambient_conf.xml.
- Close cd_webservice_conf.xml. You can now delete this file.
- If your Web application server is WebSphere, in the folder WebSphere/Liberty/usr/servers/defaultServer/, do the following in the file server.xml:
- Check for the line
<feature>javaee-7.0</feature>(in thefeatureManagersection). If you see it, add the line<feature>cdi-1.0</feature>and save and closeserver.xmlto commit your changes. - Ensure that the file contains an
applicationMonitorelement with itsupdateTriggerattribute set todisabled.
- Check for the line
- Restart the Web application that contains the Role.