Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
149 changed files
with
5,009 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
webapp-java/dxa-module-cid/src/main/resources/dxa.modules.cid.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
dxa.modules.cid.mapping=/cid/* | ||
dxa.modules.cid.sessionid.name=DXA-SESSIONID | ||
# need to rename it in DXA because of CID bug | ||
dxa.web.sessionid.name=DXA-SESSIONID | ||
#dxa.modules.cid.className=should be configured it in dxa.properties file because if version-specific | ||
#dxa.modules.cid.appHostMapping=external path to the server which runs DXA for back-mapping for CID Service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.sdl.dxa</groupId> | ||
<artifactId>dxa-oss-parent</artifactId> | ||
<version>2.1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<groupId>com.sdl.dxa.modules</groupId> | ||
<artifactId>dxa-module-ugc</artifactId> | ||
|
||
<name>DXA Modules - UGC</name> | ||
<description>Implementation of DXA UGC module</description> | ||
|
||
<scm> | ||
<url>https://github.com/sdl/dxa-modules</url> | ||
<connection>scm:git:git@github.com:sdl/dxa-modules.git</connection> | ||
<developerConnection>scm:git:git@github.com:sdl/dxa-modules.git</developerConnection> | ||
<tag>HEAD</tag> | ||
</scm> | ||
<properties> | ||
<ugc-cil.version>11.0.0-SNAPSHOT</ugc-cil.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.sdl.dxa</groupId> | ||
<artifactId>dxa-common-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.sdl.dxa</groupId> | ||
<artifactId>dxa-tridion-provider</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.sdl.delivery</groupId> | ||
<artifactId>udp-cil-api</artifactId> | ||
<version>${ugc-cil.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.sdl.delivery</groupId> | ||
<artifactId>udp-ugc-cil-api</artifactId> | ||
<version>${ugc-cil.version}</version> | ||
</dependency> | ||
|
||
<!-- Servlet API --> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>jstl</artifactId> | ||
</dependency> | ||
|
||
<!-- Spring Framework --> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-test</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-all</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
50 changes: 50 additions & 0 deletions
50
webapp-java/dxa-module-ugc/src/main/java/com/sdl/dxa/modules/ugc/UgcInitializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.sdl.dxa.modules.ugc; | ||
|
||
import com.sdl.delivery.ugc.client.comment.UgcCommentApi; | ||
import com.sdl.delivery.ugc.client.comment.impl.DefaultUgcCommentApi; | ||
import com.sdl.dxa.modules.ugc.model.entity.UgcComments; | ||
import com.sdl.dxa.modules.ugc.model.entity.UgcPostCommentForm; | ||
import com.sdl.dxa.modules.ugc.model.entity.UgcRegion; | ||
import com.sdl.webapp.common.api.mapping.views.AbstractModuleInitializer; | ||
import com.sdl.webapp.common.api.mapping.views.ModuleInfo; | ||
import com.sdl.webapp.common.api.mapping.views.RegisteredViewModel; | ||
import com.sdl.webapp.common.api.mapping.views.RegisteredViewModels; | ||
import com.sdl.webapp.common.api.model.page.DefaultPageModel; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.ComponentScan; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.stereotype.Component; | ||
|
||
/** | ||
* <p>Ugc Module initializer which initializes | ||
* views registration in modules with {@link RegisteredViewModel} and {@link RegisteredViewModels}. | ||
*</p> | ||
*/ | ||
@Slf4j | ||
@Configuration | ||
@ComponentScan("com.sdl.dxa.modules.ugc") | ||
public class UgcInitializer { | ||
|
||
@Bean | ||
public UgcCommentApi ugcCommentApi() { | ||
return new DefaultUgcCommentApi(); | ||
} | ||
|
||
//Todo: use UgcVoteCommentApi implementation when it becomes available | ||
|
||
@Component | ||
@RegisteredViewModels({ | ||
@RegisteredViewModel(viewName = "Comments", modelClass = UgcRegion.class), | ||
@RegisteredViewModel(viewName = "UgcComments", modelClass = UgcComments.class), | ||
@RegisteredViewModel(viewName = "UgcPostCommentForm", modelClass = UgcPostCommentForm.class, controllerName = "Ugc"), | ||
@RegisteredViewModel(viewName = "GeneralPage", modelClass = DefaultPageModel.class) | ||
}) | ||
@ModuleInfo(name = "UGC module", areaName = "Ugc", description = "Support for UGC views") | ||
public static class UgcViewModuleInitializer extends AbstractModuleInitializer { | ||
@Override | ||
protected String getAreaName() { | ||
return "Ugc"; | ||
} | ||
} | ||
} |
Oops, something went wrong.