Compare commits

..

4 Commits

Author SHA1 Message Date
Jens Pelzetter 28695756f0 Navbar for ccm-admin
Former-commit-id: 7ca0385666
2020-09-02 21:28:43 +02:00
Jens Pelzetter 348a2c635b Collect admin pages via CDI
Former-commit-id: 29ac4dcf84
2020-09-01 18:52:36 +02:00
Jens Pelzetter 37ad0cdaf4 More work on admin UI with Wicket
Former-commit-id: 69c7bcd092
2020-08-31 21:07:30 +02:00
Jens Pelzetter bad299d974 Integreted Apache Wicket
Former-commit-id: a6b20a34bf
2020-08-30 12:37:32 +02:00
2484 changed files with 207295 additions and 171155 deletions

4
.gitignore vendored
View File

@ -1,6 +1,5 @@
it-pgsql-datasources.properties it-pgsql-datasources.properties
nb-configuration.xml nb-configuration.xml
nbproject
node node
node_modules node_modules
runtime runtime
@ -8,10 +7,7 @@ target
.cache .cache
.classpath .classpath
.factorypath .factorypath
.parcel-cache
.project .project
.settings .settings
.tscache .tscache
*.vscode *.vscode
/ccm-core/nbproject/
/ccm-cms/nbproject/

13
Jenkinsfile vendored
View File

@ -1,33 +1,28 @@
pipeline { pipeline {
agent any agent any
tools { tools {
maven 'apache-maven-3.8.4' maven 'apache-maven-3.6.0'
} }
stages { stages {
stage('Build and Test') { stage('Build and Test') {
steps { steps {
dir('') { dir('') {
//sh 'mvn clean package verify -Prun-its-with-wildfly-h2mem -Dwildfly.propertiesFile=/srv/libreccm-wildfly.properties' sh 'mvn clean verify -Prun-its-with-wildfly-h2mem -Dwildfly.propertiesFile=/srv/libreccm-wildfly.properties'
sh 'mvn clean package'
} }
} }
} }
stage("Analyse") { stage("Analyse") {
steps { steps {
dir('') { dir('') {
sh 'mvn package pmd:pmd pmd:cpd spotbugs:spotbugs' sh 'mvn pmd:pmd pmd:cpd spotbugs:spotbugs'
} }
} }
} }
stage("Deploy") { stage("Deploy") {
environment {
DEPLOY_TOKEN = credentials('gitea_libreccm_ci_packages')
NPM_TOKEN = credentials('gitea_libreccm_ci_packages')
}
steps { steps {
dir('') { dir('') {
configFileProvider([configFile(fileId: 'libreccm-packages-deploy', variable: 'MAVEN_SETTINGS')]) { configFileProvider([configFile(fileId: 'libreccm-packages-deploy', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -U -s "$MAVEN_SETTINGS" -e package deploy' sh 'mvn -U -s "$MAVEN_SETTINGS" -e deploy'
} }
} }
} }

View File

@ -183,8 +183,13 @@
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version> <version>2.10.3</version>
<configuration> <configuration>
<detectLinks>false</detectLinks> <detectLinks>true</detectLinks>
<detectJavaApiLinks>false</detectJavaApiLinks> <detectJavaApiLinks>true</detectJavaApiLinks>
<links>
<link>http://docs.oracle.com/javase/7/docs/api/</link>
<link>http://docs.oracle.com/javaee/7/api/</link>
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
</links>
<show>private</show> <show>private</show>
<docfilessubdirs>true</docfilessubdirs> <docfilessubdirs>true</docfilessubdirs>
<charset>UTF-8</charset> <charset>UTF-8</charset>
@ -195,6 +200,16 @@
<author>true</author> <author>true</author>
<keywords>true</keywords> <keywords>true</keywords>
<failOnError>false</failOnError> <failOnError>false</failOnError>
<doclet>org.jboss.apiviz.APIviz</doclet>
<docletArtifact>
<groupId>org.jboss.apiviz</groupId>
<artifactId>apiviz</artifactId>
<version>1.3.2.GA</version>
</docletArtifact>
<useStandardDocletOptions>true</useStandardDocletOptions>
<additionalparam>
-sourceclasspath ${project.build.outputDirectory}
</additionalparam>
</configuration> </configuration>
</plugin> </plugin>
@ -221,7 +236,7 @@
<configuration> <configuration>
<linkXref>true</linkXref> <linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding> <sourceEncoding>utf-8</sourceEncoding>
<targetJdk>11</targetJdk> <targetJdk>1.8</targetJdk>
<rulesets> <rulesets>
<ruleset>/rulesets/java/basic.xml</ruleset> <ruleset>/rulesets/java/basic.xml</ruleset>
<ruleset>/rulesets/java/braces.xml</ruleset> <ruleset>/rulesets/java/braces.xml</ruleset>

View File

@ -0,0 +1,204 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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>org.libreccm</groupId>
<artifactId>ccm-bundle-devel</artifactId>
<relativePath>../ccm-bundle-devel</relativePath>
<version>7.0.0-SNAPSHOT</version>
</parent>
<groupId>org.libreccm</groupId>
<artifactId>ccm-bundle-devel-thorntail</artifactId>
<packaging>war</packaging>
<name>LibreCCM Devel Bundle for Thorntail</name>
<url>http://www.libreccm.org</url>
<distributionManagement>
<site>
<id>libreccm-site</id>
<name>LibreCCM</name>
<url>http://www.libreccm.org/project-sites/</url>
</site>
</distributionManagement>
<organization>
<name>LibreCCM Foundation</name>
</organization>
<licenses>
<license>
<name>LGPLv2 or newer</name>
<url>http://www.gnu.org/licenses/lgpl-2.0.html</url>
</license>
</licenses>
<properties>
<failOnMissingWebXml>false</failOnMissingWebXml>
</properties>
<!-- <dependencyManagement>
<dependencies>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>bom</artifactId>
<version>2.4.0.Final</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>-->
<dependencies>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>cdi</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>datasources</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>ejb</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>hibernate-search</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>jaxrs</artifactId>
</dependency>
<!-- <dependency>
<groupId>io.thorntail</groupId>
<artifactId>jaxrs-cdi</artifactId>
</dependency>-->
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>jaxrs-jsonp</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>jpa</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>jsf</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>jsonp</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>logging</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>mail</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>undertow</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.5.jre7</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>requirejs</artifactId>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>requirejs-domready</artifactId>
</dependency>
</dependencies>
<build>
<finalName>ccm-bundle-devel-wildfly</finalName>
<plugins>
<plugin>
<groupId>io.thorntail</groupId>
<artifactId>thorntail-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<overlays>
<overlay>
<groupId>org.libreccm</groupId>
<artifactId>ccm-editor</artifactId>
<type>jar</type>
</overlay>
<overlay>
<groupId>org.libreccm</groupId>
<artifactId>ccm-theme-foundry</artifactId>
<type>jar</type>
</overlay>
<overlay>
<groupId>org.libreccm</groupId>
<artifactId>ccm-core</artifactId>
<type>jar</type>
<includes>
<include>assets/</include>
</includes>
</overlay>
<overlay>
<groupId>org.librecms</groupId>
<artifactId>ccm-cms</artifactId>
<type>jar</type>
<includes>
<include>templates/</include>
</includes>
</overlay>
</overlays>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,215 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>org.libreccm</groupId>
<artifactId>libreccm-parent</artifactId>
<version>7.0.0-SNAPSHOT</version>
</parent>-->
<parent>
<groupId>org.libreccm</groupId>
<artifactId>ccm-bundle-devel</artifactId>
<relativePath>../ccm-bundle-devel</relativePath>
<version>7.0.0-SNAPSHOT</version>
</parent>
<groupId>org.libreccm</groupId>
<artifactId>ccm-bundle-devel-wildfly-swarm</artifactId>
<packaging>war</packaging>
<name>LibreCCM Devel Bundle for Wildfly Swarm</name>
<url>http://www.libreccm.org</url>
<distributionManagement>
<site>
<id>libreccm-site</id>
<name>LibreCCM</name>
<url>http://www.libreccm.org/project-sites/</url>
</site>
</distributionManagement>
<organization>
<name>LibreCCM Foundation</name>
</organization>
<licenses>
<license>
<name>LGPLv2 or newer</name>
<url>http://www.gnu.org/licenses/lgpl-2.0.html</url>
</license>
</licenses>
<properties>
<failOnMissingWebXml>false</failOnMissingWebXml>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>bom-all</artifactId>
<version>2017.11.0</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>cdi</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>container</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>datasources</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>ejb</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>hibernate-search</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>jaxrs</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>jaxrs-cdi</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>jpa</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>jsf</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>logging</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>mail</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>undertow</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.1.4.jre7</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId>
<version>4.7.0</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>requirejs</artifactId>
<version>2.3.5</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>requirejs-domready</artifactId>
<version>2.0.1-2</version>
</dependency>
</dependencies>
<build>
<finalName>ccm-bundle-devel-wildfly</finalName>
<plugins>
<plugin>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-plugin</artifactId>
<!--<configuration>
<mainClass>org.libreccm.CcmBundleDevel</mainClass>
</configuration>-->
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<overlays>
<overlay>
<groupId>org.libreccm</groupId>
<artifactId>ccm-editor</artifactId>
<type>jar</type>
</overlay>
<overlay>
<groupId>org.libreccm</groupId>
<artifactId>ccm-theme-foundry</artifactId>
<type>jar</type>
</overlay>
<overlay>
<groupId>org.libreccm</groupId>
<artifactId>ccm-core</artifactId>
<type>jar</type>
<includes>
<include>assets/</include>
<include>VAADIN/</include>
</includes>
</overlay>
<overlay>
<groupId>org.librecms</groupId>
<artifactId>ccm-cms</artifactId>
<type>jar</type>
<includes>
<include>templates/</include>
</includes>
</overlay>
</overlays>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,19 @@
package org.libreccm;
import org.wildfly.swarm.Swarm;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class CcmBundleDevel {
public static void main(final String[] args) throws Exception {
final Swarm swarm = new Swarm();
swarm.start();
}
}

View File

@ -0,0 +1,19 @@
package org.libreccm;
import org.wildfly.swarm.Swarm;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class CcmBundleDevel {
public static void main(final String[] args) throws Exception {
final Swarm swarm = new Swarm();
swarm.start();
}
}

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<Root level="warn">
<AppenderRef ref="Console"/>
</Root>
<!--<Logger name="org.hibernate"
level="info">
</Logger>
<Logger name="org.hibernate.SQL"
level="debug">
</Logger>
<Logger name="org.hibernate.type"
level="trace">
</Logger>
<Logger name="org.hibernate.type.descriptor.sql"
level="trace">
</Logger>-->
<!--<Logger name="com.arsdigita.bebop.util.Traversal"
level="debug">
</Logger>-->
<Logger name="com.arsdigita.cms.ui.assets.AssetFolderBrowserController"
level="debug">
</Logger>
<Logger name="com.arsdigita.cms.ui.folder.FolderBrowserTableModelBuilder"
level="debug">
</Logger>
<Logger name="com.arsdigita.ui.admin.AdminServlet"
level="debug">
</Logger>
<Logger name="com.arsdigita.ui.admin.configuration.ConfigurationTable"
level="debug">
</Logger>
<Logger name="com.arsdigita.ui.admin.usersgroupsroles.UsersTable"
level="debug">
</Logger>
<Logger name="com.arsdigita.cms.ui.assets.AssetPane"
level="debug">
</Logger>
<Logger name="com.arsdigita.ui.login.UserLoginForm"
level="debug">
</Logger>
<Logger name="com.arsdigita.packaging.Config"
level="debug">
</Logger>
<Logger name="com.arsdigita.templating.PatternStylesheetResolver"
level="info">
</Logger>
<Logger name="com.arsdigita.templating.SimpleURIResolver"
level="warn">
</Logger>
<Logger name="com.arsdigita.web.CCMDispatcherServlet"
level="debug">
</Logger>
<Logger name="org.libreccm.core.AbstractEntityRepository"
level="debug">
</Logger>
<Logger name="org.libreccm.modules.CcmIntegrator"
level="debug">
</Logger>
<Logger name="org.libreccm.pagemodel.PageModelManager"
level="debug">
</Logger>
<Logger name="org.libreccm.security.OneTimeAuthTokenCleaner"
level="debug">
</Logger>
<Logger name="org.libreccm.security.PermissionManager"
level="debug">
</Logger>
<Logger name="org.libreccm.security.Shiro"
level="debug">
</Logger>
<Logger name="org.libreccm.ui.admin.usersgroupsroles.RolesController"
level="debug">
</Logger>
<Logger name="org.librecms.contentsection.AssetRepository"
level="debug">
</Logger>
<Logger name="org.librecms.contentsection.ContentSectionSetup"
level="debug">
</Logger>
<Logger name="org.librecms.contentsection.ContentSectionServlet"
level="debug">
</Logger>
<Logger name="org.librecms.contentsection.rs.Images"
level="debug">
</Logger>
<Logger name="com.arsdigita.web.DefaultApplicationFileResolver"
level="debug">
</Logger>
</Loggers>
</Configuration>

View File

@ -0,0 +1,5 @@
swarm:
deployment:
ccm-bundle-devel-wildfly.war:
jaxrs:
application-path: /jaxrs

View File

@ -0,0 +1,17 @@
[main]
filterChainResolver = org.apache.shiro.web.filter.mgt.PathMatchingFilterChainResolver
passwordMatcher = org.apache.shiro.authc.credential.PasswordMatcher
passwordService = org.apache.shiro.authc.credential.DefaultPasswordService
passwordMatcher.passwordService = $passwordService
ccmRealm = org.libreccm.security.CcmShiroRealm
ccmRealm.credentialsMatcher = $passwordMatcher
securityManager.realms = $ccmRealm
securityManager.rememberMeManager.cipherKey = p5h/Aphy0gfV+XThbEPqSG4iQNh2fTNH9ZEkSBAt/Ok=
cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager
securityManager.cacheManager = $cacheManager

View File

@ -0,0 +1,65 @@
# -*- text -*-
# This file locates stylesheets, if you are using the
# "PatternStylesheetResolver". Please read the Javadoc for that file for
# the full story.
# Currently the "resource" part is actually "short-circuited", see
# Templating#transformURL(url). As long as we store and synchronize all theme
# files in each server's local file system, we use the direct file apprach to
# avoid unnecessary http request and traffic between client (user) and server!
# Additionally all modules are installed into one webapp context, so the
# webapp tag is redundant, but sort of required by some part of the code.
# Theme with single entry point (e.g Mandalay) managed by themedirector
#http://::host::/resource/::webapp::/themes/::themedir::/::theme::/start.xsl
http://::host::/::webapp::/themes/::themedir::/::theme::/start.xsl
# Theme with single entry point (e.g Mandalay) unmanaged default
#http://::host::/resource/::webapp::/themes/mandalay/start.xsl
#http://::host::/::webapp::/themes/mandalay/start.xsl
# Theme with single entry point (e.g Mandalay) unmanaged default
#http://::host::/resource/::webapp::/themes/mandalay/start.xsl
http://::host::/::webapp::/themes/libreccm-default/start.xsl
# ==============================================================================
# The following is for multi-entry themes, not used in ScientificCMS
# ==============================================================================
# Output type is for things such as text/javascript
# NOT used by ScientificCMS, uses Mandalay only!
#http://::host::/resource/::webapp::/themes/heirloom/apps/::application::/xsl/::url::-::outputtype::-::locale::.xsl
#http://::host::/resource/::webapp::/themes/heirloom/apps/::application::/xsl/::url::-::outputtype::.xsl
# Grabs custom item xsl for CMS
# NOT used by ScientificCMS, uses Mandalay only!
#http://::host::/themes/servlet/content-item/index.xsl?oid=::item_template_oid::&delegated=::item_delegated_url::
# Theme, with optional locale & prefix
# NOT used by ScientificCMS, uses Mandalay only!
#http://::host::/resource/::webapp::/themes/::themedir::/::theme::/::application::-::url::-::prefix::-::locale::.xsl
#http://::host::/resource/::webapp::/themes/::themedir::/::theme::/::application::-::url::-::prefix::.xsl
# Theme, with optional locale
# NOT used by ScientificCMS, uses Mandalay only!
#http://::host::/resource/::webapp::/themes/::themedir::/::theme::/::application::-::url::-::locale::.xsl
#http://::host::/resource/::webapp::/themes/::themedir::/::theme::/::application::-::url::.xsl
# APLAWS generic default, with locale and prefix
# XXX change ROOT -> ccm-ldn-aplaws
# http://::host::/resource/ROOT/themes/static/aplaws-generic/::application::-::url::-::prefix::-::locale::.xsl
# http://::host::/resource/ROOT/themes/static/aplaws-generic/::application::-::url::-::prefix::.xsl
# APLAWS generic default, with locale
# XXX change ROOT -> ccm-ldn-aplaws
# http://::host::/resource/ROOT/themes/static/aplaws-generic/::application::-::url::-::locale::.xsl
# http://::host::/resource/ROOT/themes/static/aplaws-generic/::application::-::url::.xsl
# Global default, from application's own web app
# NOT used by ScientificCMS
#http://::host::/resource/::webapp::/themes/heirloom/apps/::application::/xsl/::url::-::locale::.xsl
#http://::host::/resource/::webapp::/themes/heirloom/apps/::application::/xsl/::url::.xsl

View File

@ -0,0 +1,3 @@
version = 7.0.0-SNAPSHOT
appname = LibreCCM
apphomepage = http://www.libreccm.org

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
bean-discovery-mode="all">
</beans>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
author: Jens Pelzetter
-->
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<persistence-unit name="LibreCCM" transaction-type="JTA">
<!--
Enforce JPA provider
Not really necessary here because we don't use any Hibernate
specific features, but makes it easier to manage to database
creation scripts.
-->
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>java:jboss/datasources/LibreCCM</jta-data-source>
<!--<jta-data-source>java:/comp/env/jdbc/libreccm/db</jta-data-source>-->
<jar-file>lib/ccm-core-7.0.0-SNAPSHOT.jar</jar-file>
<jar-file>lib/ccm-cms-7.0.0-SNAPSHOT.jar</jar-file>
<jar-file>lib/ccm-shortcuts-7.0.0-SNAPSHOT.jar</jar-file>
<properties>
<!-- Properties for Hibernate -->
<property name="hibernate.hbm2ddl.auto" value="validate" />
<property name="hibernate.connection.autocommit" value="false" />
<property name="hibernate.id.new_generator_mappings" value="true" />
<property name="wildfly.jpa.hibernate.search.module"
value="org.hibernate.search.orm:main" />
<!--<property name="hibernate.show_sql" value="true" />
<property name="format_sql" value="true" />
<property name="use_sql_comments" value="true" />-->
<!--
Properties for Hibernate Envers
We are using the ValidityAuditStrategy here because it is faster
when querying data than the DefaultStrategy
-->
<property name="org.hibernate.envers.audit_strategy"
value="org.hibernate.envers.strategy.ValidityAuditStrategy"/>
</properties>
</persistence-unit>
</persistence>

View File

@ -0,0 +1 @@
waf.config.packages=ccm-core

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>LibreCCM Devel Bundle for Wildfly</display-name>
<context-param>
<param-name>ccm.develmode</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>ccm.distribution</param-name>
<param-value>libreccm</param-value>
</context-param>
<!-- No JSESSIONID!!! -->
<session-config>
<tracking-mode>COOKIE</tracking-mode>
<!--<tracking-mode>URL</tracking-mode>-->
</session-config>
<filter>
<filter-name>ShiroFilter</filter-name>
<filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ShiroFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
</listener>
<!-- JAX-RS -->
<!--<servlet>
<servlet-name>javax.ws.rs.core.Application</servlet-name>
</servlet>
<servlet-mapping>
<servlet-name>javax.ws.rs.core.Application</servlet-name>
<url-pattern>/content-sections/*</url-pattern>
</servlet-mapping>-->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<servlet>
<servlet-name>vaadin-servlet</servlet-name>
<servlet-class>com.vaadin.cdi.server.VaadinCDIServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>vaadin-servlet</servlet-name>
<url-pattern>/vaadin/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>vaadin-servlet</servlet-name>
<url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>
</web-app>

View File

@ -0,0 +1,72 @@
requirejs(["./ccm-editor",
"./ccm-cms-editor",
"../webjars/requirejs-domready/2.0.1/domReady!"],
function(editor, cmseditor, doc) {
editor.addEditor(".editor-textarea", {
"commandGroups": [
{
"name": "blocks",
"title": "Format blocks",
"commands": [
editor.FormatBlockCommand
]
},
{
"name": "format-text",
"title": "Format text",
"commands": [
editor.MakeBoldCommand,
editor.MakeItalicCommand,
editor.MakeUnderlineCommand,
editor.StrikeThroughCommand,
editor.SubscriptCommand,
editor.SuperscriptCommand,
editor.RemoveFormatCommand,
editor.InsertExternalLinkCommand,
cmseditor.InsertInternalLinkCommand,
cmseditor.InsertMediaAssetCommand
]
},
{
"name": "insert-list",
"title": "Insert list",
"commands": [
editor.InsertUnorderedListCommand,
editor.InsertOrderedListCommand
]
},
{
"name": "html",
"title": "HTML",
"commands": [editor.ToggleHtmlCommand]
}
],
"settings": {
"ccm-editor-css.path": "/libreccm/ccm-editor/ccm-editor.css",
"font-awesome.path": "/libreccm/webjars/font-awesome/4.7.0/css/font-awesome.min.css",
"formatBlock.blocks": [
{
"element": "h3",
"title": "Heading 3"
},
{
"element": "h4",
"title": "Heading 4"
},
{
"element": "h5",
"title": "Heading 5"
},
{
"element": "h6",
"title": "Heading 6"
},
{
"element": "p",
"title": "Paragraph"
}
]
}
});
});

View File

@ -1,3 +1,2 @@
datasource.properties datasource.properties
runtime.properties
wildfly.properties wildfly.properties

View File

@ -1,3 +0,0 @@
libreccm.datasource.connectionUrl=jdbc:postgresql://localhost:5432/ccm-devel
libreccm.datasource.username=ccm
libreccm.datasource.password=ccm47web

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scene Scope="Project" version="2">
<Scope Scope="Faces Configuration Only"/>
<Scope Scope="Project"/>
<Scope Scope="All Faces Configurations"/>
</Scene>

File diff suppressed because it is too large Load Diff

View File

@ -5,8 +5,11 @@
"build": "webpack" "build": "webpack"
}, },
"dependencies": { "dependencies": {
"@librecms/ccm-cms-pagemodelseditor": "7.0.0",
"tinymce": "^4.8.2"
}, },
"devDependencies": { "devDependencies": {
"@types/tinymce": "^4.5.16",
"@types/webpack-env": "^1.13.6", "@types/webpack-env": "^1.13.6",
"file-loader": "^1.1.11", "file-loader": "^1.1.11",
"ts-loader": "^4.4.2", "ts-loader": "^4.4.2",

View File

@ -24,12 +24,6 @@
<url>http://www.libreccm.org/modules/web/wildfly</url> <url>http://www.libreccm.org/modules/web/wildfly</url>
<dependencies> <dependencies>
<dependency>
<groupId>org.libreccm</groupId>
<artifactId>ccm-wildfly</artifactId>
<version>7.0.0-SNAPSHOT</version>
</dependency>
<dependency> <dependency>
<groupId>org.webjars</groupId> <groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId> <artifactId>font-awesome</artifactId>
@ -55,7 +49,7 @@
<artifactId>ccm-cms-js</artifactId> <artifactId>ccm-cms-js</artifactId>
<version>7.0.0-SNAPSHOT</version> <version>7.0.0-SNAPSHOT</version>
</dependency> --> </dependency> -->
<!-- <dependency> <dependency>
<groupId>org.librecms</groupId> <groupId>org.librecms</groupId>
<artifactId>ccm-cms-pagemodelseditor</artifactId> <artifactId>ccm-cms-pagemodelseditor</artifactId>
<version>${project.parent.version}</version> <version>${project.parent.version}</version>
@ -64,7 +58,7 @@
<groupId>org.librecms</groupId> <groupId>org.librecms</groupId>
<artifactId>ccm-cms-tinymce</artifactId> <artifactId>ccm-cms-tinymce</artifactId>
<version>${project.parent.version}</version> <version>${project.parent.version}</version>
</dependency>--> </dependency>
<!-- <dependency> <!-- <dependency>
<groupId>org.postgresql</groupId> <groupId>org.postgresql</groupId>
@ -80,9 +74,9 @@
<resource> <resource>
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
</resource> </resource>
<!--<resource> <resource>
<directory>${project.build.directory}/generated-resources</directory> <directory>${project.build.directory}/generated-resources</directory>
</resource>--> </resource>
</resources> </resources>
<plugins> <plugins>
@ -98,7 +92,7 @@
</configuration> </configuration>
</plugin> </plugin>
<!-- <plugin> <plugin>
<groupId>com.github.eirslett</groupId> <groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId> <artifactId>frontend-maven-plugin</artifactId>
@ -113,10 +107,10 @@
<goal>install-node-and-npm</goal> <goal>install-node-and-npm</goal>
</goals> </goals>
<configuration> <configuration>
<nodeVersion>v16.14.2</nodeVersion> <nodeVersion>v12.18.3</nodeVersion>
</configuration> </configuration>
</execution> </execution>
<execution> <!-- <execution>
<id>npm link @libreccm/ccm-pagemodelseditor</id> <id>npm link @libreccm/ccm-pagemodelseditor</id>
<goals> <goals>
<goal>npm</goal> <goal>npm</goal>
@ -124,7 +118,7 @@
<configuration> <configuration>
<arguments>link @libreccm/ccm-pagemodelseditor</arguments> <arguments>link @libreccm/ccm-pagemodelseditor</arguments>
</configuration> </configuration>
</execution> </execution> -->
<execution> <execution>
<id>npm link @librecms/ccm-cms-pagemodelseditor</id> <id>npm link @librecms/ccm-cms-pagemodelseditor</id>
<goals> <goals>
@ -134,7 +128,7 @@
<arguments>link @librecms/ccm-cms-pagemodelseditor</arguments> <arguments>link @librecms/ccm-cms-pagemodelseditor</arguments>
</configuration> </configuration>
</execution> </execution>
<execution> <!-- <execution>
<id>npm link @librecms/ccm-cms-tinymce</id> <id>npm link @librecms/ccm-cms-tinymce</id>
<goals> <goals>
<goal>npm</goal> <goal>npm</goal>
@ -142,8 +136,8 @@
<configuration> <configuration>
<arguments>link @librecms/ccm-cms-tinymce</arguments> <arguments>link @librecms/ccm-cms-tinymce</arguments>
</configuration> </configuration>
</execution> </execution>-->
<execution> <!--<execution>
<id>npm link @librecms/ccm-cms-js</id> <id>npm link @librecms/ccm-cms-js</id>
<goals> <goals>
<goal>npm</goal> <goal>npm</goal>
@ -151,7 +145,7 @@
<configuration> <configuration>
<arguments>link @librecms/ccm-cms-js</arguments> <arguments>link @librecms/ccm-cms-js</arguments>
</configuration> </configuration>
</execution> </execution>-->
<execution> <execution>
<id>npm install</id> <id>npm install</id>
<goals> <goals>
@ -168,7 +162,7 @@
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin>--> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
@ -179,9 +173,9 @@
<resource> <resource>
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
</resource> </resource>
<!--<resource> <resource>
<directory>${project.build.directory}/generated-resources</directory> <directory>${project.build.directory}/generated-resources</directory>
</resource>--> </resource>
</webResources> </webResources>
<overlays> <overlays>
@ -190,11 +184,11 @@
<artifactId>ccm-editor</artifactId> <artifactId>ccm-editor</artifactId>
<type>jar</type> <type>jar</type>
</overlay> </overlay>
<!-- <overlay> <overlay>
<groupId>org.libreccm</groupId> <groupId>org.libreccm</groupId>
<artifactId>ccm-pagemodelseditor</artifactId> <artifactId>ccm-pagemodelseditor</artifactId>
<type>jar</type> <type>jar</type>
</overlay>--> </overlay>
<overlay> <overlay>
<groupId>org.libreccm</groupId> <groupId>org.libreccm</groupId>
<artifactId>ccm-theme-foundry</artifactId> <artifactId>ccm-theme-foundry</artifactId>
@ -208,62 +202,6 @@
<include>assets/</include> <include>assets/</include>
</includes> </includes>
</overlay> </overlay>
<overlay>
<groupId>org.libreccm</groupId>
<artifactId>ccm-core</artifactId>
<type>jar</type>
<includes>
<include>themes/</include>
</includes>
</overlay>
<overlay>
<groupId>org.libreccm</groupId>
<artifactId>ccm-core</artifactId>
<type>jar</type>
<includes>
<include>WEB-INF/</include>
</includes>
</overlay>
<!-- <overlay>
<groupId>org.libreccm</groupId>
<artifactId>ccm-shortcuts</artifactId>
<type>jar</type>
<includes>
<include>WEB-INF/</include>
</includes>
</overlay>-->
<overlay>
<groupId>org.libreccm</groupId>
<artifactId>ccm-core</artifactId>
<type>jar</type>
<includes>
<include>resources/</include>
</includes>
</overlay>
<overlay>
<groupId>org.librecms</groupId>
<artifactId>ccm-cms</artifactId>
<type>jar</type>
<includes>
<include>WEB-INF/</include>
</includes>
</overlay>
<overlay>
<groupId>org.librecms</groupId>
<artifactId>ccm-cms</artifactId>
<type>jar</type>
<includes>
<include>assets/</include>
</includes>
</overlay>
<overlay>
<groupId>org.librecms</groupId>
<artifactId>ccm-cms</artifactId>
<type>jar</type>
<includes>
<include>icons/</include>
</includes>
</overlay>
<overlay> <overlay>
<groupId>org.librecms</groupId> <groupId>org.librecms</groupId>
<artifactId>ccm-cms</artifactId> <artifactId>ccm-cms</artifactId>
@ -272,22 +210,14 @@
<include>templates/</include> <include>templates/</include>
</includes> </includes>
</overlay> </overlay>
<!-- <overlay> <overlay>
<groupId>org.librecms</groupId> <groupId>org.librecms</groupId>
<artifactId>ccm-cms-tinymce</artifactId> <artifactId>ccm-cms-tinymce</artifactId>
<type>jar</type> <type>jar</type>
<includes> <includes>
<include>scripts/</include> <include>scripts/</include>
</includes> </includes>
</overlay>--> </overlay>
<!-- <overlay>
<groupId>org.librecms</groupId>
<artifactId>ccm-cms-default-theme</artifactId>
<type>jar</type>
<includes>
<include>themes/librecms/scripts/</include>
</includes>
</overlay> -->
</overlays> </overlays>
</configuration> </configuration>
</plugin> </plugin>
@ -308,90 +238,21 @@
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<executions>
<execution>
<id>read-runtime-properties</id>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${project.basedir}/runtime.example.properties</file>
<file>${project.basedir}/runtime.properties</file>
</files>
<quiet>true</quiet>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.wildfly.plugins</groupId> <groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId> <artifactId>wildfly-maven-plugin</artifactId>
<configuration> <configuration>
<skip>false</skip> <skip>false</skip>
<propertiesFile>${project.basedir}/wildfly.properties</propertiesFile> <propertiesFile>${project.basedir}/wildfly.properties</propertiesFile>
<env>
<wicket.configuration>development</wicket.configuration>
</env>
<java-opts> <java-opts>
<java-opt>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787</java-opt> <java-opt>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787</java-opt>
</java-opts> </java-opts>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-jar-maven-plugin</artifactId>
<configuration>
<jvmArguments>
<arg>-agentlib:jdwp=transport=dt_socket,server=y,suspend=${libreccm.debug.suspend},address=${libreccm.debug.port}</arg>
</jvmArguments>
<arguments>
-Dorg.wildfly.datasources.postgresql.database=${libreccm.database.name}
-Dorg.wildfly.datasources.postgresql.host=${libreccm.database.host}
-Dorg.wildfly.datasources.postgresql.jndi-name=java:/comp/env/jdbc/libreccm/db
-Dorg.wildfly.datasources.postgresql.password=${libreccm.database.password}
-Dorg.wildfly.datasources.postgresql.port=${libreccm.database.port}
-Dorg.wildfly.datasources.postgresql.user-name=${libreccm.database.user}
</arguments>
<feature-packs>
<feature-pack>
<location>wildfly@maven(org.jboss.universe:community-universe)#24.0.1.Final</location>
</feature-pack>
<feature-pack>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-datasources-galleon-pack</artifactId>
<version>2.0.2.Final</version>
</feature-pack>
</feature-packs>
<layers>
<layer>cdi</layer>
<layer>datasources</layer>
<layer>ejb</layer>
<layer>jaxrs</layer>
<layer>jpa</layer>
<layer>jsf</layer>
<layer>jsonp</layer>
<layer>logging</layer>
<layer>mail</layer>
<layer>management</layer>
<layer>postgresql-datasource</layer>
</layers>
<!-- <excluded-layers>
<layer>deployment-scanner</layer>
</excluded-layers>-->
<skip>false</skip>
</configuration>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>

View File

@ -1,7 +0,0 @@
libreccm.debug.suspend=n
libreccm.database.host=localhost
libreccm.database.port=5432
libreccm.database.name=ccm-devel
libreccm.database.user=ccm
libreccm.database.password=ccm47web

View File

@ -1,10 +0,0 @@
libreccm.http.port=8080
libreccm.https.port=8180
libreccm.debug.port=8787
libreccm.debug.suspend=n
libreccm.database.host=localhost
libreccm.database.port=5432
libreccm.database.name=libreccm-devel
libreccm.database.user=libreccm
libreccm.database.password=libreccm

View File

@ -80,9 +80,17 @@
<Logger name="org.libreccm.security.Shiro" <Logger name="org.libreccm.security.Shiro"
level="debug"> level="debug">
</Logger> </Logger>
<Logger name="org.libreccm.ui.admin.usersgroupsroles.RolesController" <Logger name="org.libreccm.theming.xslt.CcmUriResolver"
level="debug"> level="debug">
</Logger> </Logger>
<Logger name="org.libreccm.ui.admin.usersgroupsroles.RolesController"
level="debug">
</Logger>
<Logger
name="org.libreccm.ui.admin.CcmAdmin"
level="debug"
>
</Logger>
<Logger name="org.librecms.contentsection.AssetRepository" <Logger name="org.librecms.contentsection.AssetRepository"
level="debug"> level="debug">
</Logger> </Logger>
@ -98,17 +106,5 @@
<Logger name="com.arsdigita.web.DefaultApplicationFileResolver" <Logger name="com.arsdigita.web.DefaultApplicationFileResolver"
level="debug"> level="debug">
</Logger> </Logger>
<Logger name = "org.libreccm.ui.admin.AdminApplication"
level="debug">
</Logger>
<Logger name="org.libreccm.ui.admin.applications.ApplicationsPage"
level="debug">
</Logger>
<Logger name="org.librecms.ui.ContentSectionController"
level="debug">
</Logger>
<Logger name="org.libreccm.categorization.CategoryManager"
level="debug">
</Logger>
</Loggers> </Loggers>
</Configuration> </Configuration>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

View File

@ -1,2 +0,0 @@
example.setting=Properties from the Freemarker theme.

View File

@ -1,73 +0,0 @@
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
header {
padding: 1em 2em;
}
header img {
display: block;
margin-left: auto;
margin-right: auto;
width: 20vw;
max-width: 1020px;
max-height: 566px;
}
main {
max-width: 55em;
margin-left: auto;
margin-right: auto;
padding: 2em 1em;
}
main h1 {
text-align: center;
}
main form.login {
display: flex;
align-items: center;
flex-direction: column;
margin-top: 1em;
}
main form.login .form-row {
display: flex;
align-items: flex-start;
flex-direction: column;
margin-bottom: 0.5em;
}
main form.login button[type=submit] {
display: block;
margin-top: 0.75em;
margin-left: auto;
margin-right: auto;
padding: 0.25em;
}
footer {
background-color: #71ac52;
color: #fff;
padding: 3em 1em;
width: 100vw;
}
footer p {
text-align: center;
}

View File

@ -1,62 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>LibreCCM Devel Theme</title>
</head>
<body>
<h1>LibreCCM Devel</h1>
<h2>Site Info</h2>
<dl>
<dt>host</dt>
<dd>${CmsPagesSiteInfoModel.host}</dd>
<dt>domain</dt>
<dd>${CmsPagesSiteInfoModel.domain}</dd>
<dt>name</dt>
<dd>${CmsPagesSiteInfoModel.name}</dd>
<dt>Current category</dt>
<dd>${CmsPagesCategoryModel.category.name}</dd>
</dl>
<h2>Category Tree</h2>
<ul>
<!--<#list CmsPagesCategoryModel.categoryTree.subCategories as category>
<@categoryTreeNode category />
</#list>-->
<@categoryTreeNode CmsPagesCategoryModel.categoryTree />
</ul>
<h2>(Index) Item</h2>
<#if (CmsPagesCategoryModel.category.hasIndexItem)>
<dl>
<dt>Name</dt>
<dd>${CmsPagesCategorizedItemModel.name}</dd>
<dt>Title</dt>
<dd>${CmsPagesCategorizedItemModel.title}</dd>
<dt>Description</dt>
<dd>${CmsPagesCategorizedItemModel.description}</dd>
</dl>
<#else>
<p>No (Index) Item</p>
</#if>
<h2>Item List</h2>
<ul>
<#list CmsPagesItemListModel.items as item>
<li>
<b>${item.title} (${item.name})</b>
${item.description}
</li>
</#list>
</ul>
</body>
</html>
<#macro categoryTreeNode category>
<li>
${category.name}
<#if (category.subCategories?size > 0)>
<ul>
<#list category.subCategories as subCategory>
<@categoryTreeNode subCategory />
</#list>
</ul>
</#if>
</li>
</#macro>

View File

@ -1,19 +0,0 @@
<footer>
<ul>
<li>
<a href="/impressum">
<!--Impressum-->
${localize("footer.impressum")}
</a>
</li>
<li>
<a href="/privacy">
<!--Privacy-->
${localize("footer.privacy")}
</a>
</li>
<li>
<code>imported</code>
</li>
</ul>
</footer>

View File

@ -1,35 +0,0 @@
<#import "../main.html.ftl" as main>
<@main.ccm_main>
<h1>${LoginMessages['login.title']}</h1>
<#if (loginFailed)>
<div class="alert-error">
${LoginMessages['login.errors.failed']}
</div>
</#if>
<form action="${mvc.uri('LoginController#processLogin')}"
class="login"
method="post">
<div class="form-row">
<label for="login">${LoginMessages['login.screenname.label']}</label>
<input id="login" name="login" required="true" type="text" />
</div>
<div class="form-row">
<label for="password">
${LoginMessages['login.password.label']}
</label>
<input id="password"
name="password"
required="true"
type="password" />
</div>
<input type="hidden"
name="returnUrl"
value="${returnUrl}" />
<button type="submit">
${LoginMessages['login.submit']}
</button>
</form>
</@main.ccm_main>

View File

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Category page</title>
<link rel="stylesheet" href="${getContextPath()}/theming/ccm/style.css" />
</head>
<body>
<main>
<h1>${LoginMessages['login.password_recovered.title']}</h1>
<p>${LoginMessages['login.password_recovered.message']}</p>
</main>
<#include "footer.html.ftl">
</body>
</html>

View File

@ -1,27 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Category page</title>
<link rel="stylesheet" href="${getContextPath()}/theming/ccm/style.css" />
</head>
<body>
<main>
<h1>${LoginMessages['login.recover_password.title']}</h1>
<# if (failedToSendRecoverMessage)>
<div class="alert-error">
${LoginMessages['login.errors.failedToSendRecoverMessage']}
</div>
</#if>
<form action="${mvc.url('LoginController#recoverPassword')}"
method="post">
<label for="email">${LoginMessages['login.email.label']}</label>
<input id="email" name="email" required="true" type="text" />
<button type="submit">
${LoginMessages['login.recover_password.submit']}
</button>
</form>
</main>
<#include "footer.html.ftl">
</body>
</html>

View File

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Category page</title>
<link rel="stylesheet" href="${themeUrl}/style.css" />
</head>
<body>
<main>
<h1>Logout successful</h1>
<p>Logout successful</p>
</main>
</body>
</html>

View File

@ -1,25 +0,0 @@
<#macro ccm_main scripts=[]>
<html>
<head>
<title>Category page</title>
<link rel="stylesheet" href="${themeUrl}/styles/style.css" />
<#list scripts as script>
<script src="${themeUrl}/${script}" />
</#list>
</head>
<body>
<header>
<a href="https://www.libreccm.org">
<img alt="LibreCCM Logo"
src="${themeUrl}/images/libreccm.png" />
</a>
</header>
<main>
<#nested>
</main>
<footer>
<p>LibreCCM basic theme. The customize create your own theme.</p>
</footer>
</body>
</html>
</#macro>

View File

@ -1,5 +0,0 @@
label.critical=Critical
label.error=Error
label.ok=OK
label.warning=Warning

View File

@ -1,3 +0,0 @@
footer.impressum=Impressum
footer.privacy=Privacy

View File

@ -1,95 +0,0 @@
{
"files": [
{
"name": "images",
"isDirectory": true,
"files": [
{
"name": "libreccm.png",
"isDirectory": false,
"mimeType": "image/png"
}
]
},
{
"name": "settings.properties",
"isDirectory": false,
"mimeType": "text/plain"
},
{
"name": "styles",
"isDirectory": true,
"files": [
{
"name": "style.css",
"isDirectory": false,
"mimeType": "text/css"
}
]
},
{
"name": "templates",
"isDirectory": true,
"files": [
{
"name": "login",
"isDirectory": true,
"files": [
{
"name": "login-form.html.ftl",
"isDirectory": false,
"mimeType": "text/plain"
},
{
"name": "login-password-recovered.html.ftl",
"isDirectory": false,
"mimeType": "text/plain"
}, {
"name": "login-recover-password.html.ftl",
"isDirectory": false,
"mimeType": "text/plain"
}
]
},
{
"name": "logout",
"isDirectory": true,
"files": [
{
"name": "loggedout.html.ftl",
"isDirectory": false,
"mimeText": "text/plain"
}
]
}
]
},
{
"name": "texts",
"isDirectory": true,
"files": [
{
"name": "labels.properties",
"isDirectory": false,
"mimeType": "text/plain"
}
]
},
{
"name": "theme-bundle.properties",
"isDirectory": false,
"mimeType": "text/plain"
},
{
"name": "theme-index.json",
"isDirectory": false,
"mimeType": "application/json"
},
{
"name": "theme.json",
"isDirectory": false,
"mimeType": "application/json"
}
]
}

View File

@ -1,144 +0,0 @@
{
"name": "librecms-devel",
"type": "freemarker",
"default-template": "templates/default.html.ftl",
"mvc-templates": {
"default": {
"description": {
"values": {
"value": [
{
"lang": "en",
"value": "Default Template"
}
]
}
},
"name": "Default Template",
"path": "templates/default.html.ftl",
"title": {
"values": {
"value": [
{
"lang": "en",
"value": "Default Template"
}
]
}
}
},
"login-form": {
"description": {
"values": {
"value": [
{
"lang": "en",
"value": "Login Form"
}
]
}
},
"name": "Login Form",
"path": "templates/login/login-form.html.ftl",
"title": {
"values": {
"value": [
{
"lang": "en",
"value": "Login Form"
}
]
}
}
},
"login-recover-password": {
"description": {
"values": {
"value": [
{
"lang": "en",
"value": "Recover lost passwords"
}
]
}
},
"name": "login-recover-password",
"path": "templates/login/login-recover-password.html.ftl",
"title": {
"values": {
"value": [
{
"lang": "en",
"value": "Recover password"
}
]
}
}
},
"login-password-recovered": {
"description": {
"values": {
"value": [
{
"lang": "en",
"value": "Password recovered"
}
]
}
},
"name": "login-password-recovered",
"path": "templates/login/login-password-recovered.html.ftl",
"title": {
"values": {
"value": [
{
"lang": "en",
"value": "Password recovered"
}
]
}
}
},
"loggedout": {
"description": {
"values": {
"value": [
{
"lang": "en",
"value": "Logout successful"
}
]
}
},
"name": "loggedout",
"path": "templates/logout/loggedout.html.ftl",
"title": {
"values": {
"value": [
{
"lang": "en",
"value": "Logout succesful"
}
]
}
}
}
},
"views": {
"default": {
"default": "default",
"@default": "default"
},
"login": {
"loginForm": "login-form",
"passwordRecovered": "login-password-recovered",
"recoverPassword": "login-recover-password"
},
"logout": {
"loggedout": "loggedout"
}
}
}

View File

@ -25,6 +25,7 @@
<jar-file>lib/ccm-cms-7.0.0-SNAPSHOT.jar</jar-file> <jar-file>lib/ccm-cms-7.0.0-SNAPSHOT.jar</jar-file>
<jar-file>lib/ccm-shortcuts-7.0.0-SNAPSHOT.jar</jar-file> <jar-file>lib/ccm-shortcuts-7.0.0-SNAPSHOT.jar</jar-file>
<properties> <properties>
<!-- Properties for Hibernate --> <!-- Properties for Hibernate -->
<property name="hibernate.hbm2ddl.auto" value="validate" /> <property name="hibernate.hbm2ddl.auto" value="validate" />
@ -33,7 +34,7 @@
<property name="wildfly.jpa.hibernate.search.module" <property name="wildfly.jpa.hibernate.search.module"
value="org.hibernate.search.orm:main" /> value="org.hibernate.search.orm:main" />
<!-- <property name="hibernate.show_sql" value="true" /> <!--<property name="hibernate.show_sql" value="true" />
<property name="format_sql" value="true" /> <property name="format_sql" value="true" />
<property name="use_sql_comments" value="true" />--> <property name="use_sql_comments" value="true" />-->

View File

@ -4,7 +4,4 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"> http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
<application>
<resource-handler>org.libreccm.mvc.facelets.CcmViewResourceHandler</resource-handler>
</application>
</faces-config> </faces-config>

View File

@ -1,5 +1,4 @@
<?xml version="1.0" ?> <?xml version="1.0" ?>
<jboss-web> <jboss-web>
<context-root>/libreccm</context-root> <context-root>/libreccm</context-root>
<default-encoding>UTF-8</default-encoding>
</jboss-web> </jboss-web>

View File

@ -15,10 +15,6 @@
<param-name>ccm.distribution</param-name> <param-name>ccm.distribution</param-name>
<param-value>libreccm</param-value> <param-value>libreccm</param-value>
</context-param> </context-param>
<context-param>
<param-name>resteasy.resources</param-name>
<param-value>org.jboss.resteasy.plugins.stats.RegistryStatsResource</param-value>
</context-param>
<!-- No JSESSIONID!!! --> <!-- No JSESSIONID!!! -->
<session-config> <session-config>
@ -69,12 +65,8 @@
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name> <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
<param-value>true</param-value> <param-value>true</param-value>
</context-param> </context-param>
<context-param>
<param-name>PARAMETER_ENCODING</param-name>
<param-value>UTF-8</param-value>
</context-param>
<!-- <servlet> <!-- <servlet>
<servlet-name>vaadin-servlet</servlet-name> <servlet-name>vaadin-servlet</servlet-name>
<servlet-class>com.vaadin.cdi.server.VaadinCDIServlet</servlet-class> <servlet-class>com.vaadin.cdi.server.VaadinCDIServlet</servlet-class>
</servlet> </servlet>

View File

@ -5,7 +5,7 @@ module.exports = {
devtool: "source-map", devtool: "source-map",
entry: { entry: {
// "ccm-cms-pagemodelseditor": "./src/main/typescript/ccm-cms-pagemodelseditor.ts", "ccm-cms-pagemodelseditor": "./src/main/typescript/ccm-cms-pagemodelseditor.ts",
// "ccm-cms-tinymce-loader": "./src/main/typescript/tinymce/ccm-cms-tinymce-loader.ts", // "ccm-cms-tinymce-loader": "./src/main/typescript/tinymce/ccm-cms-tinymce-loader.ts",
}, },

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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> <modelVersion>4.0.0</modelVersion>
@ -13,7 +12,7 @@
<groupId>org.libreccm</groupId> <groupId>org.libreccm</groupId>
<artifactId>ccm-bundle-devel</artifactId> <artifactId>ccm-bundle-devel</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>LibreCCM Devel Bundle</name> <name>LibreCCM Devel Bundle</name>
<url>http://www.libreccm.org/bundles/devel</url> <url>http://www.libreccm.org/bundles/devel</url>
@ -23,7 +22,7 @@
<artifactId>ccm-core</artifactId> <artifactId>ccm-core</artifactId>
<version>${project.parent.version}</version> <version>${project.parent.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.libreccm</groupId> <groupId>org.libreccm</groupId>
<artifactId>ccm-editor</artifactId> <artifactId>ccm-editor</artifactId>
@ -39,37 +38,40 @@
<artifactId>ccm-theme-foundry</artifactId> <artifactId>ccm-theme-foundry</artifactId>
<version>${project.parent.version}</version> <version>${project.parent.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.librecms</groupId> <groupId>org.librecms</groupId>
<artifactId>ccm-theme-ftllibs-devel</artifactId> <artifactId>ccm-theme-ftllibs-devel</artifactId>
<version>${project.parent.version}</version> <version>${project.parent.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.librecms</groupId> <groupId>net.sf.saxon</groupId>
<artifactId>ccm-cms-default-theme</artifactId> <artifactId>Saxon-HE</artifactId>
<version>${project.parent.version}</version>
</dependency> </dependency>
<!-- CCM modules --> <!-- CCM modules -->
<!-- <dependency> <dependency>
<groupId>org.libreccm</groupId> <groupId>org.libreccm</groupId>
<artifactId>ccm-shortcuts</artifactId> <artifactId>ccm-shortcuts</artifactId>
<version>${project.parent.version}</version> <version>${project.parent.version}</version>
</dependency>--> </dependency>
<dependency> <dependency>
<groupId>org.librecms</groupId> <groupId>org.librecms</groupId>
<artifactId>ccm-cms</artifactId> <artifactId>ccm-cms</artifactId>
<version>${project.parent.version}</version> <version>${project.parent.version}</version>
</dependency> </dependency>
<!-- CCM Modules end --> <!-- CCM Modules end -->
<!-- Dependencies for log4j 2 including adapter for the log4j 1.2 API --> <!-- Dependencies for log4j 2 including adapter for the log4j 1.2 API -->
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId> <artifactId>log4j-core</artifactId>
<scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
</dependencies> </dependencies>
<reporting> <reporting>

View File

@ -113,8 +113,8 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version> <version>3.3</version>
<configuration> <configuration>
<source>11</source> <source>1.7</source>
<target>11</target> <target>1.7</target>
<optimize>true</optimize> <optimize>true</optimize>
<debug>true</debug> <debug>true</debug>
<encoding>${project.build.sourceEncoding}</encoding> <encoding>${project.build.sourceEncoding}</encoding>
@ -191,8 +191,13 @@
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version> <version>2.10.3</version>
<configuration> <configuration>
<detectLinks>false</detectLinks> <detectLinks>true</detectLinks>
<detectJavaApiLinks>false</detectJavaApiLinks> <detectJavaApiLinks>true</detectJavaApiLinks>
<links>
<link>http://docs.oracle.com/javase/7/docs/api/</link>
<link>http://docs.oracle.com/javaee/7/api/</link>
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
</links>
<show>private</show> <show>private</show>
<docfilessubdirs>true</docfilessubdirs> <docfilessubdirs>true</docfilessubdirs>
<charset>UTF-8</charset> <charset>UTF-8</charset>
@ -203,6 +208,16 @@
<author>true</author> <author>true</author>
<keywords>true</keywords> <keywords>true</keywords>
<failOnError>false</failOnError> <failOnError>false</failOnError>
<doclet>org.jboss.apiviz.APIviz</doclet>
<docletArtifact>
<groupId>org.jboss.apiviz</groupId>
<artifactId>apiviz</artifactId>
<version>1.3.2.GA</version>
</docletArtifact>
<useStandardDocletOptions>true</useStandardDocletOptions>
<additionalparam>
-sourceclasspath ${project.build.outputDirectory}
</additionalparam>
</configuration> </configuration>
</plugin> </plugin>
@ -229,7 +244,7 @@
<configuration> <configuration>
<linkXref>true</linkXref> <linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding> <sourceEncoding>utf-8</sourceEncoding>
<targetJdk>11</targetJdk> <targetJdk>1.8</targetJdk>
<rulesets> <rulesets>
<ruleset>/rulesets/java/basic.xml</ruleset> <ruleset>/rulesets/java/basic.xml</ruleset>
<ruleset>/rulesets/java/braces.xml</ruleset> <ruleset>/rulesets/java/braces.xml</ruleset>

File diff suppressed because it is too large Load Diff

View File

@ -1,30 +0,0 @@
{
"name": "@librecms/default-theme",
"version": "7.0.0",
"scripts": {
"build": "npm-run-all build:*",
"build:mkdir": "shx mkdir -p target/generated-resources/themes/librecms",
"build:theme": "shx cp -r src/main/resources/themes/librecms/* target/generated-resources/themes/librecms",
"build:icons": "shx cp node_modules/bootstrap-icons/bootstrap-icons.svg target/generated-resources/themes/librecms/images/",
"build:js": "webpack",
"build:css": "npm-run-all build:css:*",
"build:css:librecms": "sass src/main/scss/librecms.scss target/generated-resources/themes/librecms/styles/librecms.css",
"build:index": "theme-index-builder target/generated-resources/themes/librecms"
},
"author": "Jens Pelzetter",
"license": "LGPL-3.0-or-later",
"devDependencies": {
"@types/bootstrap": "^5.1.8",
"npm-run-all": "^4.1.5",
"sass": "^1.48.0",
"shx": "^0.3.4",
"ts-loader": "^9.2.6",
"typescript": "^4.5.4",
"webpack": "^5.66.0",
"webpack-cli": "^4.9.1"
},
"dependencies": {
"bootstrap": "^5.1.3",
"bootstrap-icons": "^1.7.2"
}
}

View File

@ -1,113 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
</properties>
<parent>
<groupId>org.libreccm</groupId>
<artifactId>libreccm-parent</artifactId>
<version>7.0.0-SNAPSHOT</version>
</parent>
<groupId>org.librecms</groupId>
<artifactId>ccm-cms-default-theme</artifactId>
<version>7.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>LibreCMS Default Theme</name>
<licenses>
<license>
<name>Lesser GPL 2.1</name>
<url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1</url>
</license>
</licenses>
<dependencies>
<dependency>
<groupId>org.libreccm</groupId>
<artifactId>ccm-static-theme-index-builder</artifactId>
<version>7.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<finalName>ccm-cms-default-theme</finalName>
<resources>
<!-- <resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/typescript</directory>
</resource> -->
<resource>
<directory>${project.build.directory}/generated-resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<configuration>
<installDirectory>../node</installDirectory>
</configuration>
<executions>
<execution>
<id>Install node.js and NPM</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v16.14.2</nodeVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
</execution>
<execution>
<id>npm link @libreccm/ccm-static-theme-index-builder</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>link @libreccm/ccm-static-theme-index-builder</arguments>
</configuration>
</execution>
<execution>
<id>build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
<execution>
<id>npm link</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>link</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1 +0,0 @@
import "bootstrap";

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 175 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 180 KiB

View File

@ -1,63 +0,0 @@
<#macro "org.librecms.assets.AudioAsset" asset>
<figure>
<audio controls
src="/content-sections/${asset.contentSection}/audiomedia${asset.assetPath}"
width="240"></audio>
<figcaption>${asset.description}</figcaption>
</figure>
</#macro>
<#macro "org.librecms.assets.ExternalAudioAsset" asset>
<figure>
<audio controls src="${asset.url}" width="240"></audio>
<figcaption>${asset.description}</figcaption>
</figure>
</#macro>
<#macro "org.librecms.assets.ExternalVideoAsset" asset>
<figure>
<video controls src="${asset.url}" width="240"></video>
<figcaption>${asset.description}</figcaption>
</figure>
</#macro>
<#macro "org.librecms.assets.FileAsset" asset>
<h3><a href="/content-sections/${asset.contentSection}/files${asset.assetPath}">${asset.title}</a></h3>
<p>${asset.description}</p>
<small>${asset.mimeType} ${asset.size} Bytes</small>
</#macro>
<#macro "org.librecms.assets.Image" asset>
<figure>
<img src="/content-sections/${asset.contentSection}/images${asset.assetPath}"
width="240" />
<figcaption>${asset.description}</figcaption>
</figure>
</#macro>
<#macro "org.librecms.assets.RelatedLink" asset>
<#if asset.externalLink>
<div>
<a href="${asset.targetUrl}">${asset.title}</a>
<svg class="bi"
fill="current-color"
height="1em"
width="1em">
<use xlink:href="${themeUrl}/images/bootstrap-icons.svg#globe" />
</svg>
<span class="visually-hidden">External link</span>
</div>
<#else>
<a href="${asset.targetItemPath}">${asset.title}</a>
</#if>
</#macro>
<#macro "org.librecms.assets.VideoAsset" asset>
<figure>
<video controls
src="/content-sections/${asset.contentSection}/videos${asset.assetPath}"
width="240"></video>
<figcaption>${asset.description}</figcaption>
</figure>
</#macro>

View File

@ -1,51 +0,0 @@
<#import "./main.html.ftl" as main>
<#import "./assets.html.ftl" as assets>
<@main.librecms>
<div class="container">
<div class="row align-items-start justify-content-center">
<div class="col-lg-8">
<#if CmsPagesContentItemTypeModel.itemClass != "">
<#assign itemTemplate = .getOptionalTemplate("./contentitems/${CmsPagesContentItemTypeModel.itemClass}.html.ftl")>
<#if itemTemplate.exists>
<#import "./contentitems/${CmsPagesContentItemTypeModel.itemClass}.html.ftl" as contentitem>
<#else>
<#import "./contentitems/default.html.ftl" as contentitem>
</#if>
<@contentitem.details />
</#if>
</div>
<div class="col-lg-4">
<#list CmsPagesCategorizedItemModel.attachmentLists as attachmentList>
<h2>${attachmentList.title}</h2>
<p class="item-description">${attachmentList.description}</p>
<#list attachmentList.attachments>
<ul class="list-group">
<#items as attachment>
<li class="list-group-item">
<@.vars["assets"][attachment.asset.type] attachment.asset />
</li>
</#items>
</ul>
</#list>
</#list>
</div>
</div>
<#list CmsPagesItemListModel.getItems()>
<div class="row align-items-start">
<div class="col-12">
<ul class="list-group">
<#items as item>
<li class="list-group-item">
<h2>
<a href="/pages/${CmsPagesCategoryModel.category.path}${item.name}.${negotiatedLocale}.html${CmsPagesPageUrlModel.queryString}">${item.title}</a>
</h2>
<p class="item-description">${item.description}</p>
</li>
</#items>
</ul>
</div>
</div>
</div>
</#list>
</@main.librecms>

View File

@ -1,7 +0,0 @@
<#macro details>
<h1>${CmsPagesCategorizedItemModel.title}</h1>
<p class="item-description">${CmsPagesCategorizedItemModel.description}</p>
<div class="alert alert-warning">
No template for ${CmsPagesContentItemTypeModel.itemClass} available
</div>
</#macro>

View File

@ -1,17 +0,0 @@
<#import "../assets.html.ftl" as assets>
<#macro details>
<h1>${CmsPagesCategorizedItemModel.title}</h1>
<p class="item-description">${CmsPagesCategorizedItemModel.description}</p>
<div class="float-end">
<#list CmsPagesCategorizedItemModel.mediaLists as mediaList>
<#list mediaList.attachments as media>
<@.vars["assets"][media.asset.type] media.asset />
</#list>
</#list>
</div>
<div>
${CmsPagesArticleModel.text}
</div>
</#macro>

View File

@ -1,25 +0,0 @@
<#macro details>
<div class="d-flex">
<h1>
${CmsPagesCategorizedItemModel.title}
<span class="badge bg-secondary rounded-pill">
${CmsPagesEventModel.getStartDateTime('yyyy-MM-dd')}
<#if CmsPagesEventModel.getEndDateTime()??>
- ${CmsPagesEventModel.getEndDateTime('yyyy-MM-dd')}
</#if>
</span>
</h1>
</div>
<p class="item-description">${CmsPagesCategorizedItemModel.description}</p>
<div>
${CmsPagesEventModel.text}
</div>
<#if CmsPagesEventModel.location??>
<h2>Location</h2>
<div>
${CmsPagesEventModel.location}
</div>
</#if>
</#macro>

View File

@ -1,61 +0,0 @@
<#macro details>
<h1>${CmsPagesCategorizedItemModel.title}</h1>
<p class="item-description">${CmsPagesCategorizedItemModel.description}</p>
<h2>${CmsPagesMultiPartArticleModel.currentSectionTitle}</h2>
<div>
<nav>
<ul class="flex-column float-end nav">
<#list CmsPagesMultiPartArticleModel.sectionTitles as section>
<li class="nav-item">
<#if section?index == CmsPagesMultiPartArticleModel.currentSection>
<a aria-current="page"
class="active nav-link"
href="${CmsPagesMultiPartArticleModel.sectionLinks[section?index]}">
${section}
</a>
<#else>
<a class="nav-link"
href="${CmsPagesMultiPartArticleModel.sectionLinks[section?index]}">
${section}
</a>
</#if>
</li>
</#list>
</ul>
</nav>
${CmsPagesMultiPartArticleModel.currentSectionText}
<nav>
<ul class="pagination">
<#if CmsPagesMultiPartArticleModel.prevSectionLink != "">
<li class="list-item">
<a class="page-link"
href="${CmsPagesMultiPartArticleModel.prevSectionLink}">
<svg class="bi"
fill="current-color"
height="1em"
width="1em">
<use xlink:href="${themeUrl}/images/bootstrap-icons.svg#caret-left-fill" />
</svg>
<span class="visually-hidden">Previous</span>
</a>
</li>
</#if>
<#if CmsPagesMultiPartArticleModel.nextSectionLink != "">
<li class="list-item">
<a class="page-link"
href="${CmsPagesMultiPartArticleModel.nextSectionLink}">
<svg class="bi"
fill="current-color"
height="1em"
width="1em">
<use xlink:href="${themeUrl}/images/bootstrap-icons.svg#caret-right-fill" />
</svg>
<span class="visually-hidden">Next</span>
</a>
</li>
</#if>
</ul>
</nav>
</div>
</#macro>

View File

@ -1,15 +0,0 @@
<#macro details>
<div class="d-flex">
<h1>
${CmsPagesCategorizedItemModel.title}
<span class="badge bg-secondary rounded-pill">
${CmsPagesNewsModel.getReleaseDate('yyyy-MM-dd')}
</span>
</h1>
</div>
<p class="item-description">${CmsPagesCategorizedItemModel.description}</p>
<div>
${CmsPagesNewsModel.text}
</div>
</#macro>

View File

@ -1,21 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link href="${themeUrl}/styles/librecms.css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Default Template</title>
</head>
<body>
<div class="container">
<p>This theme works.</p>
<dl>
<dt>application</dt>
<dd>${application}</dd>
<dt>themeUrl</dt>
<dd>${themeUrl}</dd>
<dt>view</dt>
<dd>${view!""}</dd>
</dl>
</div>
</body>
</html>

View File

@ -1,48 +0,0 @@
<#import "./main.html.ftl" as main>
<#-- <#import "./contentitems/${CmsPagesContentItemTypeModel.itemClass}.html.ftl" as contentitem> -->
<@main.librecms>
<div class="container">
<div class="row align-items-start justify-content-center">
<div class="col-lg-8">
<#if CmsPagesContentItemTypeModel.itemClass != "">
<#assign itemTemplate = .getOptionalTemplate("./contentitems/${CmsPagesContentItemTypeModel.itemClass}.html.ftl")>
<#if itemTemplate.exists>
<#import "./contentitems/${CmsPagesContentItemTypeModel.itemClass}.html.ftl" as contentitem>
<#else>
<#import "./contentitems/default.html.ftl" as contentitem>
</#if>
<@contentitem.details />
</#if>
</div>
<div class="col-lg-4">
<!-- Attachments -->
<h2>Notes</h2>
<ul class="list-group mb-4">
<li class="list-group-item">
<p>
A side note with some text
</p>
<p>
Occaecat sit eu ipsum irure. Enim consectetur aute anim proident sint dolor sint ea ex eu adipisicing et. Veniam laborum mollit velit incididunt aliquip do esse officia eu ea nostrud nulla.
</p>
</li>
</ul>
<h2>More information</h2>
<p>
Consequat occaecat eu ullamco amet id tempor.
</p>
<ul class="list-group mb-4">
<li class="list-group-item">
<p>Anim ex ut reprehenderit in enim id proident duis pariatur est anim do.</p>
<a href="https://example.com">A related link</a>
</li>
<li class="list-group-item">
<p>Quis minim deserunt incididunt ea voluptate laboris fugiat elit nulla.</p>
<a href="https://example.com">Some download link</a>
</li>
</ul>
</div>
</div>
</div>
</@main.librecms>

View File

@ -1,173 +0,0 @@
<#import "./main.html.ftl" as main>
<@main.librecms>
<div class="container">
<div class="row align-items-center">
<div class="col">
<div class="bg-light mb-4 rounded-3">
<div class="container-fluid py-5">
<#if CmsPagesCategorizedItemModel.itemAvailable>
<h1 class="display-5 fw-bold">
${CmsPagesCategorizedItemModel.title}
</h1>
<p>
${CmsPagesCategorizedItemModel.description}
</p>
<a class="btn btn-primary btn-lg"
href="#">
Find out more
</a>
<#else>
<h1 class="display-5 fw-bold">
LibreCMS
</h1>
<p>
No index item has been defined.
</p>
<a class="btn btn-primary btn-lg"
href="https://www.libreccm.org">
Find out more
</a>
</#if>
</div>
</div>
<#-- <#if CmsPagesCategorizedItemModel.itemAvailable>
Category has an index item
<#else>
Category has no index item
</#if>
<h2>Index page</h2>
<p>This theme works.</p>
<dl>
<dt>application</dt>
<dd>${application}</dd>
<dt>themeUrl</dt>
<dd>${themeUrl}</dd>
<dt>view</dt>
<dd>${view!""}</dd>
</dl>
<h2>From <code>ArticleModel</code></h2>
<dl>
<dt>Title</dt>
<dd>${CmsPagesArticleModel.title}</dd>
<dt>Description</dt>
<dd>${CmsPagesArticleModel.description}</dd>
<dt>Text</dt>
<dd>${CmsPagesArticleModel.text}</dd>
</dl>
</div> -->
</div>
<div class="row align-items-start justify-content-center">
<#list CmsPagesItemListModel.getItems("newslist")>
<div class="col">
<h2>News</h2>
<ul class="list-group">
<#items as news>
<li class="list-group-item">
<h3 class="d-flex w-100 justify-content-between">
<div>
<a href="/pages${CmsPagesCategoryModel.category.path}${news.name}.${negotiatedLocale}.html${CmsPagesPageUrlModel.queryString}">${news.title}</a>
</div>
<#-- <div>${news.getReleaseDate('yyyy-MM-dd')}</div> -->
<div>${news.getReleaseDate('dd. MMM yyyy')}</div>
</h3>
<p class="item-description">${news.description}</p>
</li>
</#items>
</ul>
</div>
</#list>
<#list CmsPagesItemListModel.getItems("eventlist")>
<div class="col">
<h2>Upcoming events</h2>
<ul class="list-group">
<#items as event>
<li class="list-group-item">
<h3 class="d-flex w-100 justify-content-between">
<div>
<a href="/pages${CmsPagesCategoryModel.category.path}${event.name}.${negotiatedLocale}.html${CmsPagesPageUrlModel.queryString}">${event.title}</a>
</div>
<div>${event.getStartDate('dd. MMM yyyy HH:mm')}</div>
</h3>
<p class="item-description">${event.description}</p>
</li>
</#items>
</ul>
</div>
</#list>
</div>
<#-- <h2>Item List</h2>
<p>Item List size: ${CmsPagesItemListModel.listSize}</p>
<dl>
<dt>Item List size:</dt>
<dd>${CmsPagesItemListModel.listSize}</dd>
<dt>Page size</dt>
<dd>${CmsPagesItemListModel.pageSize}</dd>
<dt>Page</dt>
<dd>${CmsPagesItemListModel.page}</dd>
<dt>Offset</dt>
<dd>${CmsPagesItemListModel.offset}</dd>
</dl>
<ul>
<#list CmsPagesItemListModel.items as item>
<li>
<dl>
<dt>UUID</dt>
<dd>${item.uuid}</dd>
<dt>displayName</dt>
<dd>${item.displayName}</dd>
<dt>Name</dt>
<dd>${item.name}</dd>
<dt>Title</dt>
<dd>${item.title}</dd>
<dt>description</dt>
<dd>${item.description}</dd>
<dt>Type</dt>
<dd>${item.type}</dd>
</dl>
</li>
</#list>
</ul>
</div>
<h2>News List</h2>
<p>News List size: ${CmsPagesItemListModel.getListSize("newslist")}</p>
<dl>
<dt>Item List size:</dt>
<dd>${CmsPagesItemListModel.getListSize("newslist")}</dd>
<dt>Page size</dt>
<dd>${CmsPagesItemListModel.getPageSize("newslist")}</dd>
<dt>Page</dt>
<dd>${CmsPagesItemListModel.getPage("newslist")}</dd>
<dt>Offset</dt>
<dd>${CmsPagesItemListModel.getOffset("newslist")}</dd>
</dl>
<ul>
<#list CmsPagesItemListModel.getItems("newslist") as item>
<li>
<dl>
<dt>UUID</dt>
<dd>${item.uuid}</dd>
<dt>displayName</dt>
<dd>${item.displayName}</dd>
<dt>Name</dt>
<dd>${item.name}</dd>
<dt>Title</dt>
<dd>${item.title}</dd>
<dt>description</dt>
<dd>${item.description}</dd>
<dt>Type</dt>
<dd>${item.type}</dd>
</dl>
</li>
</#list>
</ul>
</div> -->
</@main.librecms>

View File

@ -1,50 +0,0 @@
<#macro librecms scripts=[]>
<!DOCTYPE html>
<html>
<head>
<link href="${themeUrl}/styles/librecms.css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Default Template</title>
</head>
<body>
<header>
<nav class="navbar navbar-expand-lg navbar-expand navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand"
href="/pages">
<img class="theme-logo img-fluid"
src="${themeUrl}/images/librecms.svg" />
</a>
<button aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation"
class="navbar-toggler"
data-bs-toggle="collapse"
data-bs-target="#navbar-items"
type="button">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse"
id="navbar-items">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<#list CmsPagesCategoryModel.categoryTree.subCategories as category>
<li ${category.selected?then("aria-selected=\"page\"","")}
class="nav-item ${category.selected?then( "active","")}">
<a class="nav-link"
href="/pages${category.categoryPath}/index.${negotiatedLocale}.html${CmsPagesPageUrlModel.queryString}">
${category.title}
</a>
</li>
</#list>
</ul>
</div>
</div>
</nav>
</header>
<main>
<#nested>
</main>
<script src="${themeUrl}/scripts/librecms.js"></script>
</body>
</html>
</#macro>

View File

@ -1,121 +0,0 @@
{
"name": "librecms",
"type": "freemarker",
"master-theme": null,
"title": {
"values": {
"value": [
{
"lang": "en",
"value": "LibreCMS Default Theme"
},
{
"lang": "de",
"value": "LibreCMS Standard Theme"
}
]
}
},
"description": {
"values": {
"value": [
{
"lang": "en",
"value": "The LibreCMS default theme"
},
{
"lang": "de",
"value": "Das LibreCMS Standard Theme"
}
]
}
},
"mvc-templates": {
"category-page": {
"description": {
"values": {
"value": [
{
"lang": "en",
"value": "Template for category pages."
}
]
}
},
"name": "Category Page Template",
"path": "templates/category-page.html.ftl",
"title": {
"values": {
"value": [
{
"lang": "en",
"value": "Category Page Template"
}
]
}
}
},
"default": {
"description": {
"values": {
"value": [
{
"lang": "en",
"value": "Default Template used if no other template fits."
}
]
}
},
"name": "Default Template",
"path": "templates/default.html.ftl",
"title": {
"values": {
"value": [
{
"lang": "en",
"value": "Default Template"
}
]
}
}
},
"index-page": {
"description": {
"values": {
"value": [
{
"lang": "en",
"value": "Template for the index page of a site."
}
]
}
},
"name": "index-page",
"path": "templates/index-page.html.ftl",
"title": {
"values": {
"value": [
{
"lang": "en",
"value": "Index Page"
}
]
}
}
}
},
"views": {
"default": {
"default": "default",
"@default": "default"
},
"pages": {
"category-page": "category-page",
"index": "index-page",
"default": "default",
"@default": "default"
}
}
}

View File

@ -1,15 +0,0 @@
$primary: #0A9793;
a.navbar-brand {
max-width: 15%;
}
.imgbox-button {
background-color: transparent;
border: none;
padding: 0;
}
.item-description {
white-space: pre-wrap;
}

View File

@ -1,2 +0,0 @@
@import "custom";
@import "../../../node_modules/bootstrap/scss/bootstrap"

View File

@ -1 +0,0 @@
import "bootstrap";

View File

@ -1,14 +0,0 @@
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": true,
"lib": ["DOM", "ES2016"],
"module": "commonjs",
"moduleResolution": "node",
"outDir": "scripts",
"sourceMap": true,
"strict": true,
"target": "ES6"
},
"include": ["src/main/typescript/**/*"]
}

View File

@ -1,25 +0,0 @@
module.exports = {
mode: "development",
devtool: "source-map",
optimization: {
chunkIds: false
},
entry: {
librecms: "./src/main/typescript/librecms.ts"
},
output: {
filename: "[name].js",
path: __dirname + "/target/generated-resources/themes/librecms/scripts"
},
resolve: {
extensions: [".tsx", ".ts", ".js", ".jsx"],
},
module: {
rules: [
// all files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'
{ test: /\.tsx?$/, use: ["ts-loader"], exclude: /node_modules/ },
],
}
}

View File

@ -75,7 +75,7 @@
<goal>install-node-and-npm</goal> <goal>install-node-and-npm</goal>
</goals> </goals>
<configuration> <configuration>
<nodeVersion>v16.14.2</nodeVersion> <nodeVersion>v8.11.4</nodeVersion>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -93,16 +93,6 @@
<goal>npm</goal> <goal>npm</goal>
</goals> </goals>
</execution> </execution>
<!-- Sync Maven module version and NPM module version -->
<execution>
<id>npm version</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>version --allow-same-version=true ${project.version}</arguments>
</configuration>
</execution>
<execution> <execution>
<id>build</id> <id>build</id>
<goals> <goals>

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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> <modelVersion>4.0.0</modelVersion>
@ -8,7 +7,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<timestamp>${maven.build.timestamp}</timestamp> <timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format> <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
<buildNumber></buildNumber>
</properties> </properties>
<parent> <parent>
@ -139,7 +137,7 @@
<goal>install-node-and-npm</goal> <goal>install-node-and-npm</goal>
</goals> </goals>
<configuration> <configuration>
<nodeVersion>v16.14.2</nodeVersion> <nodeVersion>v8.11.4</nodeVersion>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -157,16 +155,6 @@
<goal>npm</goal> <goal>npm</goal>
</goals> </goals>
</execution> </execution>
<!-- Sync Maven module version and NPM module version -->
<execution>
<id>npm version</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>version --allow-same-version=true ${project.version}${buildNumber}</arguments>
</configuration>
</execution>
<execution> <execution>
<id>build</id> <id>build</id>
<goals> <goals>
@ -185,17 +173,17 @@
<arguments>link</arguments> <arguments>link</arguments>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
<id>npm publish</id> <id>npm publish</id>
<goals> <goals>
<goal>npm</goal> <goal>npm</goal>
</goals> </goals>
<phase>deploy</phase> <phase>deploy</phase>
<configuration> <configuration>
<arguments>publish -userconfig ../libreccm.npmrc</arguments> <arguments>publish --userconfig ../libreccm.npmrc</arguments>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
@ -203,18 +191,4 @@
</plugins> </plugins>
</build> </build>
<profiles>
<profile>
<id>with-buildnumber</id>
<activation>
<property>
<name>env.BUILD_NUMBER</name>
</property>
</activation>
<properties>
<buildNumber>.${env.BUILD_NUMBER}</buildNumber>
</properties>
</profile>
</profiles>
</project> </project>

View File

@ -74,12 +74,6 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- Dependencies for log4j 2 -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
@ -144,8 +138,8 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>11</source> <source>1.8</source>
<target>11</target> <target>1.8</target>
<optimize>true</optimize> <optimize>true</optimize>
<debug>true</debug> <debug>true</debug>
<encoding>${project.build.sourceEncoding}</encoding> <encoding>${project.build.sourceEncoding}</encoding>
@ -221,8 +215,13 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<configuration> <configuration>
<detectLinks>false</detectLinks> <detectLinks>true</detectLinks>
<detectJavaApiLinks>false</detectJavaApiLinks> <detectJavaApiLinks>true</detectJavaApiLinks>
<links>
<link>http://docs.oracle.com/javase/7/docs/api/</link>
<link>http://docs.oracle.com/javaee/7/api/</link>
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
</links>
<show>private</show> <show>private</show>
<docfilessubdirs>true</docfilessubdirs> <docfilessubdirs>true</docfilessubdirs>
<charset>UTF-8</charset> <charset>UTF-8</charset>
@ -233,6 +232,14 @@
<author>true</author> <author>true</author>
<keywords>true</keywords> <keywords>true</keywords>
<failOnError>false</failOnError> <failOnError>false</failOnError>
<doclet>org.jboss.apiviz.APIviz</doclet>
<docletArtifact>
<groupId>org.jboss.apiviz</groupId>
<artifactId>apiviz</artifactId>
<version>1.3.2.GA</version>
</docletArtifact>
<useStandardDocletOptions>true</useStandardDocletOptions>
<additionalparam>-sourceclasspath ${project.build.outputDirectory}</additionalparam>
</configuration> </configuration>
</plugin> </plugin>
@ -255,7 +262,7 @@
<configuration> <configuration>
<linkXref>true</linkXref> <linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding> <sourceEncoding>utf-8</sourceEncoding>
<targetJdk>11</targetJdk> <targetJdk>1.8</targetJdk>
<!-- <rulesets> <!-- <rulesets>
<ruleset>/rulesets/java/basic.xml</ruleset> <ruleset>/rulesets/java/basic.xml</ruleset>
<ruleset>/rulesets/java/braces.xml</ruleset> <ruleset>/rulesets/java/braces.xml</ruleset>

View File

@ -0,0 +1,117 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.arsdigita.cms.contenttypes.ui;
import org.librecms.assets.Person;
import org.librecms.contentsection.AssetRepository;
import org.librecms.contentsection.ContentItemRepository;
import org.librecms.profilesite.ProfileSiteItem;
import java.util.Locale;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.transaction.Transactional;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
@RequestScoped
class ProfileSiteItemController {
public static final String OWNER = "owner";
public static final String POSITION = "position";
public static final String INTERSETS = "interests";
public static final String MISC = "misc";
@Inject
private AssetRepository assetRepository;
@Inject
private ContentItemRepository itemRepository;
@Transactional(Transactional.TxType.REQUIRED)
public void setOwner(final long profileSiteItemId, final long ownerId) {
final ProfileSiteItem profileSiteItem = itemRepository
.findById(profileSiteItemId, ProfileSiteItem.class)
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No ProfileSiteItem with ID %d found.",
profileSiteItemId
)
)
);
final Person owner = assetRepository
.findById(ownerId, Person.class)
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No Person with ID %d found.", ownerId
)
)
);
profileSiteItem.setOwner(owner);
itemRepository.save(profileSiteItem);
}
public void setPosition(
final long profileSiteItemId, final String position, final Locale locale
) {
final ProfileSiteItem profileSiteItem = itemRepository
.findById(profileSiteItemId, ProfileSiteItem.class)
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No ProfileSiteItem with ID %d found.",
profileSiteItemId
)
)
);
profileSiteItem.getPosition().addValue(locale, position);
}
public void setInterests(
final long profileSiteItemId,
final String interests,
final Locale locale
) {
final ProfileSiteItem profileSiteItem = itemRepository
.findById(profileSiteItemId, ProfileSiteItem.class)
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No ProfileSiteItem with ID %d found.",
profileSiteItemId
)
)
);
profileSiteItem.getInterests().addValue(locale, interests);
}
public void setMisc(
final long profileSiteItemId, final String misc, final Locale locale
) {
final ProfileSiteItem profileSiteItem = itemRepository
.findById(profileSiteItemId, ProfileSiteItem.class)
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No ProfileSiteItem with ID %d found.",
profileSiteItemId
)
)
);
profileSiteItem.getMisc().addValue(locale, misc);
}
}

View File

@ -0,0 +1,80 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.assets.AssetSearchWidget;
import com.arsdigita.cms.ui.authoring.CreationSelector;
import com.arsdigita.cms.ui.authoring.PageCreateForm;
import com.arsdigita.globalization.GlobalizedMessage;
import org.librecms.assets.Person;
import org.librecms.contentsection.ContentItemInitializer;
import org.librecms.profilesite.ProfileSiteConstants;
import org.librecms.profilesite.ProfileSiteItem;
import java.util.Locale;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class ProfileSiteItemCreate extends PageCreateForm {
private final static String OWNER_SEARCH = "owner";
private AssetSearchWidget ownerSearch;
public ProfileSiteItemCreate(
final ItemSelectionModel itemModel,
final CreationSelector creationSelector,
final StringParameter selectedLanguageParam
) {
super(itemModel, creationSelector, selectedLanguageParam);
}
@Override
public void addWidgets() {
ownerSearch = new AssetSearchWidget(OWNER_SEARCH, Person.class);
ownerSearch.setLabel(
new GlobalizedMessage(
"profile_site.owner.label", ProfileSiteConstants.BUNDLE
)
);
add(ownerSearch);
}
@Override
public void validate(final FormSectionEvent event)
throws FormProcessException {
super.validate(event);
final FormData formData = event.getFormData();
if (!formData.containsKey(OWNER_SEARCH)
|| formData.get(OWNER_SEARCH) == null) {
formData.addError(
new GlobalizedMessage(
"profile_site.owner.not_selected",
ProfileSiteConstants.BUNDLE
)
);
}
}
@Override
protected ContentItemInitializer<ProfileSiteItem> getItemInitializer(
final FormData formData, final PageState state
) {
return (item) -> item.setOwner((Person) formData.get(OWNER_SEARCH));
}
}

View File

@ -0,0 +1,108 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.event.FormInitListener;
import com.arsdigita.bebop.event.FormProcessListener;
import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.form.TextArea;
import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SelectedLanguageUtil;
import com.arsdigita.globalization.GlobalizedMessage;
import org.libreccm.cdi.utils.CdiUtil;
import org.librecms.profilesite.ProfileSiteConstants;
import org.librecms.profilesite.ProfileSiteItem;
import java.util.Locale;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class ProfileSiteItemInterestsForm
extends BasicItemForm
implements FormProcessListener, FormInitListener {
private final StringParameter selectedLangParam;
public ProfileSiteItemInterestsForm(
final ItemSelectionModel itemModel,
final StringParameter selectedLangParam
) {
super("ProfileSiteItemEditInterests", itemModel, selectedLangParam);
this.selectedLangParam = selectedLangParam;
}
@Override
public void addWidgets() {
add(
new Label(
new GlobalizedMessage(
"profile_site_item.ui.interests",
ProfileSiteConstants.BUNDLE
)
)
);
final ParameterModel interestsParam = new StringParameter(
ProfileSiteItemController.POSITION);
final TextArea interests = new TextArea(interestsParam);
interests.setCols(80);
interests.setRows(8);
add(interests);
}
@Override
public void init(final FormSectionEvent event) throws FormProcessException {
final PageState state = event.getPageState();
final FormData data = event.getFormData();
final ProfileSiteItem profile
= (ProfileSiteItem) getItemSelectionModel()
.getSelectedItem(state);
data.put(ProfileSiteItemController.POSITION, profile.getInterests());
setVisible(state, true);
}
@Override
public void process(final FormSectionEvent event)
throws FormProcessException {
final PageState state = event.getPageState();
final FormData data = event.getFormData();
final ProfileSiteItem profile
= (ProfileSiteItem) getItemSelectionModel()
.getSelectedItem(state);
if ((profile != null)
&& getSaveCancelSection().getSaveButton().isSelected(state)) {
final ProfileSiteItemController controller = CdiUtil
.createCdiUtil()
.findBean(ProfileSiteItemController.class);
final Locale selectedLocale = SelectedLanguageUtil.selectedLocale(
state, selectedLangParam
);
controller.setInterests(
profile.getObjectId(),
(String) data.get(ProfileSiteItemController.POSITION),
selectedLocale
);
}
init(event);
}
}

View File

@ -0,0 +1,81 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.globalization.GlobalizedMessage;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
import org.librecms.profilesite.ProfileSiteConstants;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class ProfileSiteItemInterestsStep extends SimpleEditStep {
private String EDIT_POSITION_SHEET_NAME = "editInterests";
public ProfileSiteItemInterestsStep(
final ItemSelectionModel itemModel,
final AuthoringKitWizard parent,
final StringParameter selectedLangParam
) {
this(itemModel, parent, selectedLangParam, null);
}
public ProfileSiteItemInterestsStep(
final ItemSelectionModel itemModel,
final AuthoringKitWizard parent,
final StringParameter selectedLangParam,
final String prefix
) {
super(itemModel, parent, selectedLangParam, prefix);
final BasicItemForm editInterestsForm = new ProfileSiteItemInterestsForm(
itemModel, selectedLangParam
);
add(
EDIT_POSITION_SHEET_NAME,
new GlobalizedMessage(
"profile_site_site.ui.interests.edit",
ProfileSiteConstants.BUNDLE
),
new WorkflowLockedComponentAccess(parent, itemModel),
editInterestsForm.getSaveCancelSection().getCancelButton()
);
setDisplayComponent(getProfileSiteItemInterestsSheet(
itemModel, selectedLangParam)
);
}
public static final Component getProfileSiteItemInterestsSheet(
final ItemSelectionModel itemModel,
final StringParameter selectedLangParam
) {
final DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(
itemModel, false, selectedLangParam
);
sheet.add(
new GlobalizedMessage(
"profile_site_item.ui.interests",
ProfileSiteConstants.BUNDLE
),
ProfileSiteItemController.POSITION
);
return sheet;
}
}

View File

@ -0,0 +1,108 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.event.FormInitListener;
import com.arsdigita.bebop.event.FormProcessListener;
import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.form.TextArea;
import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SelectedLanguageUtil;
import com.arsdigita.globalization.GlobalizedMessage;
import org.libreccm.cdi.utils.CdiUtil;
import org.librecms.profilesite.ProfileSiteConstants;
import org.librecms.profilesite.ProfileSiteItem;
import java.util.Locale;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class ProfileSiteItemMiscForm
extends BasicItemForm
implements FormProcessListener, FormInitListener {
private final StringParameter selectedLangParam;
public ProfileSiteItemMiscForm(
final ItemSelectionModel itemModel,
final StringParameter selectedLangParam
) {
super("ProfileSiteItemEditMisc", itemModel, selectedLangParam);
this.selectedLangParam = selectedLangParam;
}
@Override
public void addWidgets() {
add(
new Label(
new GlobalizedMessage(
"profile_site_item.ui.misc",
ProfileSiteConstants.BUNDLE
)
)
);
final ParameterModel miscParam = new StringParameter(
ProfileSiteItemController.POSITION);
final TextArea misc = new TextArea(miscParam);
misc.setCols(80);
misc.setRows(8);
add(misc);
}
@Override
public void init(final FormSectionEvent event) throws FormProcessException {
final PageState state = event.getPageState();
final FormData data = event.getFormData();
final ProfileSiteItem profile
= (ProfileSiteItem) getItemSelectionModel()
.getSelectedItem(state);
data.put(ProfileSiteItemController.POSITION, profile.getMisc());
setVisible(state, true);
}
@Override
public void process(final FormSectionEvent event)
throws FormProcessException {
final PageState state = event.getPageState();
final FormData data = event.getFormData();
final ProfileSiteItem profile
= (ProfileSiteItem) getItemSelectionModel()
.getSelectedItem(state);
if ((profile != null)
&& getSaveCancelSection().getSaveButton().isSelected(state)) {
final ProfileSiteItemController controller = CdiUtil
.createCdiUtil()
.findBean(ProfileSiteItemController.class);
final Locale selectedLocale = SelectedLanguageUtil.selectedLocale(
state, selectedLangParam
);
controller.setMisc(
profile.getObjectId(),
(String) data.get(ProfileSiteItemController.POSITION),
selectedLocale
);
}
init(event);
}
}

View File

@ -0,0 +1,81 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.globalization.GlobalizedMessage;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
import org.librecms.profilesite.ProfileSiteConstants;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class ProfileSiteItemMiscStep extends SimpleEditStep {
private String EDIT_POSITION_SHEET_NAME = "editMisc";
public ProfileSiteItemMiscStep(
final ItemSelectionModel itemModel,
final AuthoringKitWizard parent,
final StringParameter selectedLangParam
) {
this(itemModel, parent, selectedLangParam, null);
}
public ProfileSiteItemMiscStep(
final ItemSelectionModel itemModel,
final AuthoringKitWizard parent,
final StringParameter selectedLangParam,
final String prefix
) {
super(itemModel, parent, selectedLangParam, prefix);
final BasicItemForm editMiscForm = new ProfileSiteItemMiscForm(
itemModel, selectedLangParam
);
add(
EDIT_POSITION_SHEET_NAME,
new GlobalizedMessage(
"profile_site_site.ui.misc.edit",
ProfileSiteConstants.BUNDLE
),
new WorkflowLockedComponentAccess(parent, itemModel),
editMiscForm.getSaveCancelSection().getCancelButton()
);
setDisplayComponent(getProfileSiteItemMiscSheet(
itemModel, selectedLangParam)
);
}
public static final Component getProfileSiteItemMiscSheet(
final ItemSelectionModel itemModel,
final StringParameter selectedLangParam
) {
final DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(
itemModel, false, selectedLangParam
);
sheet.add(
new GlobalizedMessage(
"profile_site_item.ui.misc",
ProfileSiteConstants.BUNDLE
),
ProfileSiteItemController.POSITION
);
return sheet;
}
}

View File

@ -0,0 +1,108 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.event.FormInitListener;
import com.arsdigita.bebop.event.FormProcessListener;
import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.form.TextArea;
import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SelectedLanguageUtil;
import com.arsdigita.globalization.GlobalizedMessage;
import org.libreccm.cdi.utils.CdiUtil;
import org.librecms.profilesite.ProfileSiteConstants;
import org.librecms.profilesite.ProfileSiteItem;
import java.util.Locale;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class ProfileSiteItemPositionForm
extends BasicItemForm
implements FormProcessListener, FormInitListener {
private final StringParameter selectedLangParam;
public ProfileSiteItemPositionForm(
final ItemSelectionModel itemModel,
final StringParameter selectedLangParam
) {
super("ProfileSiteItemEditPosition", itemModel, selectedLangParam);
this.selectedLangParam = selectedLangParam;
}
@Override
public void addWidgets() {
add(
new Label(
new GlobalizedMessage(
"profile_site_item.ui.position",
ProfileSiteConstants.BUNDLE
)
)
);
final ParameterModel positionParam = new StringParameter(
ProfileSiteItemController.POSITION);
final TextArea position = new TextArea(positionParam);
position.setCols(80);
position.setRows(8);
add(position);
}
@Override
public void init(final FormSectionEvent event) throws FormProcessException {
final PageState state = event.getPageState();
final FormData data = event.getFormData();
final ProfileSiteItem profile
= (ProfileSiteItem) getItemSelectionModel()
.getSelectedItem(state);
data.put(ProfileSiteItemController.POSITION, profile.getPosition());
setVisible(state, true);
}
@Override
public void process(final FormSectionEvent event)
throws FormProcessException {
final PageState state = event.getPageState();
final FormData data = event.getFormData();
final ProfileSiteItem profile
= (ProfileSiteItem) getItemSelectionModel()
.getSelectedItem(state);
if ((profile != null)
&& getSaveCancelSection().getSaveButton().isSelected(state)) {
final ProfileSiteItemController controller = CdiUtil
.createCdiUtil()
.findBean(ProfileSiteItemController.class);
final Locale selectedLocale = SelectedLanguageUtil.selectedLocale(
state, selectedLangParam
);
controller.setPosition(
profile.getObjectId(),
(String) data.get(ProfileSiteItemController.POSITION),
selectedLocale
);
}
init(event);
}
}

View File

@ -0,0 +1,81 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.globalization.GlobalizedMessage;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
import org.librecms.profilesite.ProfileSiteConstants;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class ProfileSiteItemPositionStep extends SimpleEditStep {
private String EDIT_POSITION_SHEET_NAME = "editPosition";
public ProfileSiteItemPositionStep(
final ItemSelectionModel itemModel,
final AuthoringKitWizard parent,
final StringParameter selectedLangParam
) {
this(itemModel, parent, selectedLangParam, null);
}
public ProfileSiteItemPositionStep(
final ItemSelectionModel itemModel,
final AuthoringKitWizard parent,
final StringParameter selectedLangParam,
final String prefix
) {
super(itemModel, parent, selectedLangParam, prefix);
final BasicItemForm editPositionForm = new ProfileSiteItemPositionForm(
itemModel, selectedLangParam
);
add(
EDIT_POSITION_SHEET_NAME,
new GlobalizedMessage(
"profile_site_site.ui.position.edit",
ProfileSiteConstants.BUNDLE
),
new WorkflowLockedComponentAccess(parent, itemModel),
editPositionForm.getSaveCancelSection().getCancelButton()
);
setDisplayComponent(getProfileSiteItemPositionSheet(
itemModel, selectedLangParam)
);
}
public static final Component getProfileSiteItemPositionSheet(
final ItemSelectionModel itemModel,
final StringParameter selectedLangParam
) {
final DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(
itemModel, false, selectedLangParam
);
sheet.add(
new GlobalizedMessage(
"profile_site_item.ui.position",
ProfileSiteConstants.BUNDLE
),
ProfileSiteItemController.POSITION
);
return sheet;
}
}

View File

@ -0,0 +1,116 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.SegmentedPanel;
import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicPageForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.globalization.GlobalizedMessage;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
import org.librecms.assets.Person;
import org.librecms.profilesite.ProfileSiteConstants;
import org.librecms.profilesite.ProfileSiteItem;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class ProfileSiteItemPropertiesStep extends SimpleEditStep {
public static final String EDIT_SHEET_NAME = "editProfileSiteItem";
public ProfileSiteItemPropertiesStep(
final ItemSelectionModel itemModel,
final AuthoringKitWizard parent,
final StringParameter selectedLangParam
) {
super(itemModel, parent, selectedLangParam);
setDefaultEditKey(EDIT_SHEET_NAME);
final SimpleEditStep basicProperties = new SimpleEditStep(
itemModel, parent, selectedLangParam, EDIT_SHEET_NAME
);
final BasicPageForm editBasicSheet = new ProfileSiteItemPropertyForm(
itemModel, this, selectedLangParam
);
basicProperties.add(
EDIT_SHEET_NAME,
new GlobalizedMessage(
ProfileSiteConstants.BUNDLE,
"profile_site.ui.edit_basic_properties"
),
new WorkflowLockedComponentAccess(editBasicSheet, itemModel),
editBasicSheet.getSaveCancelSection().getCancelButton()
);
basicProperties.setDisplayComponent(
getProfileSiteItemPropertiesSheet(itemModel, selectedLangParam)
);
final SegmentedPanel segmentedPanel = new SegmentedPanel();
segmentedPanel.addSegment(
new Label(
new GlobalizedMessage(
ProfileSiteConstants.BUNDLE,
"profile_site.ui.basic_properties"
)
),
basicProperties
);
setDisplayComponent(segmentedPanel);
}
public static Component getProfileSiteItemPropertiesSheet(
final ItemSelectionModel itemModel,
final StringParameter selectedLangParam
) {
final DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(
itemModel, false, selectedLangParam
);
sheet.add(
new GlobalizedMessage(
ProfileSiteConstants.BUNDLE, "profile_site.ui.OWNER"
),
ProfileSiteItemController.OWNER,
new OwnerFormatter()
);
return sheet;
}
private static class OwnerFormatter
implements DomainObjectPropertySheet.AttributeFormatter {
@Override
public String format(
final Object obj, final String attribute, final PageState state
) {
final ProfileSiteItem profileSiteItem = (ProfileSiteItem) obj;
final Person owner = profileSiteItem.getOwner();
if (owner == null) {
return "";
} else {
return owner.getDisplayName();
}
}
}
}

View File

@ -0,0 +1,104 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.event.FormInitListener;
import com.arsdigita.bebop.event.FormProcessListener;
import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.event.FormValidationListener;
import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.assets.AssetSearchWidget;
import com.arsdigita.cms.ui.authoring.BasicPageForm;
import com.arsdigita.globalization.GlobalizedMessage;
import org.libreccm.cdi.utils.CdiUtil;
import org.librecms.assets.Person;
import org.librecms.profilesite.ProfileSiteConstants;
import org.librecms.profilesite.ProfileSiteItem;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class ProfileSiteItemPropertyForm
extends BasicPageForm
implements FormInitListener, FormProcessListener, FormValidationListener {
public static final String ID = "PublicPersonalProfile_edit";
private static final String OWNER_SEARCH = "ownerSearch";
private final ItemSelectionModel itemModel;
public ProfileSiteItemPropertyForm(
final ItemSelectionModel itemModel,
final ProfileSiteItemPropertiesStep step,
final StringParameter selectedLangParam
) {
super(ID, itemModel, selectedLangParam);
this.itemModel = itemModel;
addValidationListener(this);
}
@Override
public void addWidgets() {
super.addWidgets();
final AssetSearchWidget ownerSearch = new AssetSearchWidget(
OWNER_SEARCH, Person.class
);
add(ownerSearch);
}
@Override
public void init(final FormSectionEvent event) throws FormProcessException {
final FormData formData = event.getFormData();
final ProfileSiteItem profileSiteItem = (ProfileSiteItem) super
.initBasicWidgets(event);
formData.put(OWNER_SEARCH, profileSiteItem.getOwner());
}
@Override
public void validate(final FormSectionEvent event)
throws FormProcessException {
super.validate(event);
final FormData formData = event.getFormData();
if (!formData.containsKey(OWNER_SEARCH)
|| formData.get(OWNER_SEARCH) == null) {
formData.addError(
new GlobalizedMessage(
"profile_site.owner.not_selected",
ProfileSiteConstants.BUNDLE
)
);
}
}
@Override
public void process(final FormSectionEvent event)
throws FormProcessException {
final ProfileSiteItem profileSiteItem = (ProfileSiteItem) super
.processBasicWidgets(event);
final FormData formData = event.getFormData();
final Person owner = (Person) formData.get(OWNER_SEARCH);
final ProfileSiteItemController controller = CdiUtil
.createCdiUtil()
.findBean(ProfileSiteItemController.class);
controller.setOwner(profileSiteItem.getObjectId(), owner.getObjectId());
init(event);
}
}

View File

@ -1,20 +1,7 @@
/* /*
* Copyright (C) 2021 LibreCCM Foundation. * To change this license header, choose License Headers in Project Properties.
* * To change this template file, choose Tools | Templates
* This library is free software; you can redistribute it and/or * and open the template in the editor.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/ */
package org.librecms.profilesite; package org.librecms.profilesite;

View File

@ -1,20 +1,7 @@
/* /*
* Copyright (C) 2021 LibreCCM Foundation. * To change this license header, choose License Headers in Project Properties.
* * To change this template file, choose Tools | Templates
* This library is free software; you can redistribute it and/or * and open the template in the editor.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/ */
package org.librecms.profilesite; package org.librecms.profilesite;

View File

@ -1,27 +1,21 @@
/* /*
* Copyright (C) 2021 LibreCCM Foundation. * To change this license header, choose License Headers in Project Properties.
* * To change this template file, choose Tools | Templates
* This library is free software; you can redistribute it and/or * and open the template in the editor.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/ */
package org.librecms.profilesite; package org.librecms.profilesite;
import com.arsdigita.cms.contenttypes.ui.ProfileSiteItemCreate;
import com.arsdigita.cms.contenttypes.ui.ProfileSiteItemInterestsStep;
import com.arsdigita.cms.contenttypes.ui.ProfileSiteItemMiscStep;
import com.arsdigita.cms.contenttypes.ui.ProfileSiteItemPositionStep;
import com.arsdigita.cms.contenttypes.ui.ProfileSiteItemPropertiesStep;
import org.libreccm.l10n.LocalizedString; import org.libreccm.l10n.LocalizedString;
import org.librecms.assets.Person; import org.librecms.assets.Person;
import org.librecms.contentsection.ContentItem; import org.librecms.contentsection.ContentItem;
import org.librecms.contenttypes.AuthoringKit;
import org.librecms.contenttypes.AuthoringStep;
import org.librecms.contenttypes.ContentTypeDescription; import org.librecms.contenttypes.ContentTypeDescription;
import java.util.Objects; import java.util.Objects;
@ -46,6 +40,43 @@ import static org.librecms.profilesite.ProfileSiteConstants.*;
labelBundle = "org.librecms.profilesite.ProfileSiteItem", labelBundle = "org.librecms.profilesite.ProfileSiteItem",
descriptionBundle = "org.librecms.profilesite.ProfileSiteItem" descriptionBundle = "org.librecms.profilesite.ProfileSiteItem"
) )
@AuthoringKit(
createComponent = ProfileSiteItemCreate.class,
steps = {
@AuthoringStep(
component = ProfileSiteItemPropertiesStep.class,
labelBundle = ProfileSiteConstants.BUNDLE,
labelKey = "profile_site_item.basic_properties.label",
descriptionBundle = ProfileSiteConstants.BUNDLE,
descriptionKey = "profile_site_item.basic_properties.description",
order = 1
),
@AuthoringStep(
component = ProfileSiteItemPositionStep.class,
labelBundle = ProfileSiteConstants.BUNDLE,
labelKey = "profile_site_item.position.label",
descriptionBundle = ProfileSiteConstants.BUNDLE,
descriptionKey = "profile_site_item.position.description",
order = 2
),
@AuthoringStep(
component = ProfileSiteItemInterestsStep.class,
labelBundle = ProfileSiteConstants.BUNDLE,
labelKey = "profile_site_item.interests.label",
descriptionBundle = ProfileSiteConstants.BUNDLE,
descriptionKey = "profile_site_item.interests.description",
order = 3
),
@AuthoringStep(
component = ProfileSiteItemMiscStep.class,
labelBundle = ProfileSiteConstants.BUNDLE,
labelKey = "profile_site_item.misc.label",
descriptionBundle = ProfileSiteConstants.BUNDLE,
descriptionKey = "profile_site_item.misc.description",
order = 4
)
}
)
public class ProfileSiteItem extends ContentItem { public class ProfileSiteItem extends ContentItem {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -0,0 +1,26 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.librecms.profilesite.pagemodel;
import org.libreccm.pagemodel.ComponentModel;
import javax.persistence.Entity;
import javax.persistence.Table;
import static org.librecms.profilesite.ProfileSiteConstants.*;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
@Entity
@Table(name = "PROFILE_SITE_COMPONENTS", schema = DB_SCHEMA)
public class ProfileSiteComponent extends ComponentModel {
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,270 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.librecms.profilesite.pagemodel;
import com.arsdigita.kernel.KernelConfig;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.libreccm.categorization.Category;
import org.libreccm.categorization.CategoryManager;
import org.libreccm.categorization.CategoryRepository;
import org.libreccm.configuration.ConfigurationManager;
import org.libreccm.core.CcmObject;
import org.libreccm.pagemodel.ComponentRenderer;
import org.libreccm.pagemodel.RendersComponent;
import org.libreccm.security.PermissionChecker;
import org.librecms.assets.Person;
import org.librecms.contentsection.ContentItem;
import org.librecms.contentsection.ContentItemL10NManager;
import org.librecms.contentsection.ContentItemManager;
import org.librecms.contentsection.ContentItemVersion;
import org.librecms.contentsection.privileges.ItemPrivileges;
import org.librecms.pagemodel.assets.AbstractAssetRenderer;
import org.librecms.pagemodel.assets.AssetRenderers;
import org.librecms.profilesite.ProfileSiteItem;
import java.util.Collections;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Instance;
import javax.inject.Inject;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
import static org.librecms.pages.PagesConstants.*;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
@RequestScoped
@RendersComponent(componentModel = ProfileSiteComponent.class)
public class ProfileSiteComponentRenderer
implements ComponentRenderer<ProfileSiteComponent> {
private static final Logger LOGGER = LogManager.getLogger(
ProfileSiteComponentRenderer.class
);
@Inject
private AssetRenderers assetRenderers;
@Inject
private CategoryRepository categoryRepo;
@Inject
private CategoryManager categoryManager;
@Inject
private ConfigurationManager confManager;
@Inject
private ContentItemL10NManager iteml10nManager;
@Inject
private Instance<ProfileSiteContentRenderer> contentRenderers;
@Inject
private ContentItemManager itemManager;
@Inject
private PermissionChecker permissionChecker;
@Override
public Map<String, Object> renderComponent(
final ProfileSiteComponent componentModel,
final Map<String, Object> parameters
) {
Objects.requireNonNull(componentModel);
Objects.requireNonNull(parameters);
if (!parameters.containsKey(PARAMETER_CATEGORY)) {
throw new IllegalArgumentException(
String.format(
"The parameters map passed to this component does "
+ "not include the parameter \"%s\"",
PARAMETER_CATEGORY
)
);
}
if (!(parameters.get(PARAMETER_CATEGORY) instanceof Category)) {
throw new IllegalArgumentException(
String.format(
"The parameters map passed to this ProfileSiteComponent "
+ "component contains the parameter \"category\", but "
+ "parameter is not of type \"%s\" but of type \"%s\".",
Category.class.getName(),
parameters.get(PARAMETER_CATEGORY).getClass().getName()
)
);
}
final Category category = categoryRepo
.findById(
((CcmObject) parameters.get(PARAMETER_CATEGORY)).getObjectId()
)
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No category with ID %d in the database.",
((CcmObject) parameters.get(PARAMETER_CATEGORY))
.getObjectId()
)
)
);
final Optional<CcmObject> indexObj = categoryManager
.getIndexObject(category)
.stream()
.filter(object -> object instanceof ContentItem)
.filter(item -> {
return ((ContentItem) item)
.getVersion() == ContentItemVersion.LIVE;
})
.findFirst();
if (indexObj.isPresent()) {
if (!(indexObj.get() instanceof ProfileSiteItem)) {
LOGGER.debug(
"The index item of the category {} is not an item of "
+ "the class",
ProfileSiteItem.class.getName()
);
return Collections.emptyMap();
}
final ProfileSiteItem profileSiteItem = (ProfileSiteItem) indexObj
.get();
if (Boolean.TRUE.equals(parameters.get("showDraft"))) {
final ProfileSiteItem draftItem = itemManager
.getDraftVersion(profileSiteItem, profileSiteItem.getClass());
if (permissionChecker.isPermitted(
ItemPrivileges.PREVIEW, draftItem
)) {
final Map<String, Object> result = generateItem(
componentModel, parameters, draftItem
);
result.put("showDraft", Boolean.TRUE);
return result;
} else {
throw new WebApplicationException(
"You are not permitted to view the draft version of "
+ "this profile site.",
Response.Status.UNAUTHORIZED
);
}
} else {
final ProfileSiteItem liveItem = itemManager
.getLiveVersion(profileSiteItem, profileSiteItem.getClass())
.orElseThrow(
() -> new NotFoundException(
"This content item does not have a live version."
)
);
if (permissionChecker.isPermitted(
ItemPrivileges.VIEW_PUBLISHED, liveItem
)) {
return generateItem(
componentModel, parameters, liveItem
);
} else {
throw new WebApplicationException(
"You are not permitted to view the live version of "
+ "this profile site.",
Response.Status.UNAUTHORIZED);
}
}
} else {
LOGGER.debug("The category {} does not have a index item.",
Objects.toString(category));
return Collections.emptyMap();
}
}
protected Map<String, Object> generateItem(
final ProfileSiteComponent componentModel,
final Map<String, Object> parameters,
final ProfileSiteItem profileSiteItem
) {
final Category category = (Category) parameters.get(PARAMETER_CATEGORY);
final String categoryName = category.getName();
final Optional<ProfileSiteContentRenderer> result = contentRenderers
.stream()
.filter(renderer -> categoryName.equals(renderer.getCategoryName()))
.findAny();
if (result.isPresent()) {
return result.get().renderContent(
componentModel, parameters, profileSiteItem
);
} else {
return renderProfileSiteIndexPage(parameters, profileSiteItem);
}
}
private Map<String, Object> renderProfileSiteIndexPage(
final Map<String, Object> parameters,
final ProfileSiteItem profileSiteItem
) {
final Locale language;
if (parameters.containsKey("language")) {
language = new Locale((String) parameters
.get(PARAMETER_LANGUAGE));
} else {
final KernelConfig kernelConfig = confManager
.findConfiguration(KernelConfig.class);
language = kernelConfig.getDefaultLocale();
}
if (iteml10nManager.hasLanguage(profileSiteItem, language)) {
final Map<String, Object> result = new HashMap<>();
result.put(
"owner", renderOwner(profileSiteItem.getOwner(), language)
);
result.put(
"position", profileSiteItem.getPosition().getValue(language)
);
result.put(
"interests", profileSiteItem.getInterests().getValue(language)
);
result.put(
"misc", profileSiteItem.getMisc().getValue(language)
);
return result;
} else {
throw new NotFoundException(
"Requested language is not available.");
}
}
private Map<String, Object> renderOwner(
final Person owner, final Locale language
) {
final AbstractAssetRenderer renderer = assetRenderers.findRenderer(
owner.getClass()
);
return renderer.render(owner, language);
}
}

View File

@ -0,0 +1,41 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.librecms.profilesite.pagemodel;
import org.librecms.profilesite.ProfileSiteItem;
import java.util.Map;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public interface ProfileSiteContentRenderer {
/**
* Provides the category name for which this renderer is responsible.
*
* @return The category name for which this renderer is responsible.
*/
String getCategoryName();
/**
* Renders special content for a profile site depending on the current
* category.
*
* @param componentModel
* @param parameters
* @param profileSiteItem
*
* @return
*/
Map<String, Object> renderContent(
ProfileSiteComponent componentModel,
Map<String, Object> parameters,
ProfileSiteItem profileSiteItem
);
}

View File

@ -0,0 +1,54 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.librecms.profilesite.pagemodel.contentitem;
import org.librecms.contentsection.ContentItem;
import org.librecms.pagemodel.assets.AssetRenderers;
import org.librecms.pagemodel.contentitems.AbstractContentItemRenderer;
import org.librecms.pagemodel.contentitems.ContentItemRenderer;
import org.librecms.profilesite.ProfileSiteItem;
import java.util.Locale;
import java.util.Map;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
@ContentItemRenderer(renders = ProfileSiteItem.class)
@RequestScoped
public class ProfileSiteItemRenderer extends AbstractContentItemRenderer {
private static final long serialVersionUID = 1L;
@Inject
private AssetRenderers assetRenderers;
@Override
protected void renderItem(
final ContentItem item,
final Locale language,
final Map<String, Object> result
) {
// Nothing
// final ProfileSiteItem profileSiteItem;
// if (item instanceof ProfileSiteItem) {
// profileSiteItem = (ProfileSiteItem) item;
// } else {
// return;
// }
}
@Override
protected AssetRenderers getAssetRenderers() {
return assetRenderers;
}
}

View File

@ -65,7 +65,7 @@
<goal>install-node-and-npm</goal> <goal>install-node-and-npm</goal>
</goals> </goals>
<configuration> <configuration>
<nodeVersion>v16.14.2</nodeVersion> <nodeVersion>v8.11.4</nodeVersion>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>

View File

@ -73,13 +73,7 @@
<artifactId>hibernate-validator-cdi</artifactId> <artifactId>hibernate-validator-cdi</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- Dependencies for log4j 2 -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
@ -143,8 +137,8 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>11</source> <source>1.8</source>
<target>11</target> <target>1.8</target>
<optimize>true</optimize> <optimize>true</optimize>
<debug>true</debug> <debug>true</debug>
<encoding>${project.build.sourceEncoding}</encoding> <encoding>${project.build.sourceEncoding}</encoding>
@ -218,8 +212,13 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<configuration> <configuration>
<detectLinks>falsed</detectLinks> <detectLinks>true</detectLinks>
<detectJavaApiLinks>false</detectJavaApiLinks> <detectJavaApiLinks>true</detectJavaApiLinks>
<links>
<link>http://docs.oracle.com/javase/7/docs/api/</link>
<link>http://docs.oracle.com/javaee/7/api/</link>
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
</links>
<show>private</show> <show>private</show>
<docfilessubdirs>true</docfilessubdirs> <docfilessubdirs>true</docfilessubdirs>
<charset>UTF-8</charset> <charset>UTF-8</charset>
@ -230,6 +229,14 @@
<author>true</author> <author>true</author>
<keywords>true</keywords> <keywords>true</keywords>
<failOnError>false</failOnError> <failOnError>false</failOnError>
<doclet>org.jboss.apiviz.APIviz</doclet>
<docletArtifact>
<groupId>org.jboss.apiviz</groupId>
<artifactId>apiviz</artifactId>
<version>1.3.2.GA</version>
</docletArtifact>
<useStandardDocletOptions>true</useStandardDocletOptions>
<additionalparam>-sourceclasspath ${project.build.outputDirectory}</additionalparam>
</configuration> </configuration>
</plugin> </plugin>
@ -252,7 +259,7 @@
<configuration> <configuration>
<linkXref>true</linkXref> <linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding> <sourceEncoding>utf-8</sourceEncoding>
<targetJdk>11</targetJdk> <targetJdk>1.8</targetJdk>
<!-- <rulesets> <!-- <rulesets>
<ruleset>/rulesets/java/basic.xml</ruleset> <ruleset>/rulesets/java/basic.xml</ruleset>
<ruleset>/rulesets/java/braces.xml</ruleset> <ruleset>/rulesets/java/braces.xml</ruleset>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@ -73,13 +73,6 @@
<artifactId>hibernate-validator-cdi</artifactId> <artifactId>hibernate-validator-cdi</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- Dependencies for log4j 2 -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
@ -143,8 +136,8 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>11</source> <source>1.8</source>
<target>11</target> <target>1.8</target>
<optimize>true</optimize> <optimize>true</optimize>
<debug>true</debug> <debug>true</debug>
<encoding>${project.build.sourceEncoding}</encoding> <encoding>${project.build.sourceEncoding}</encoding>
@ -218,8 +211,13 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<configuration> <configuration>
<detectLinks>false</detectLinks> <detectLinks>true</detectLinks>
<detectJavaApiLinks>false</detectJavaApiLinks> <detectJavaApiLinks>true</detectJavaApiLinks>
<links>
<link>http://docs.oracle.com/javase/7/docs/api/</link>
<link>http://docs.oracle.com/javaee/7/api/</link>
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
</links>
<show>private</show> <show>private</show>
<docfilessubdirs>true</docfilessubdirs> <docfilessubdirs>true</docfilessubdirs>
<charset>UTF-8</charset> <charset>UTF-8</charset>
@ -230,6 +228,14 @@
<author>true</author> <author>true</author>
<keywords>true</keywords> <keywords>true</keywords>
<failOnError>false</failOnError> <failOnError>false</failOnError>
<doclet>org.jboss.apiviz.APIviz</doclet>
<docletArtifact>
<groupId>org.jboss.apiviz</groupId>
<artifactId>apiviz</artifactId>
<version>1.3.2.GA</version>
</docletArtifact>
<useStandardDocletOptions>true</useStandardDocletOptions>
<additionalparam>-sourceclasspath ${project.build.outputDirectory}</additionalparam>
</configuration> </configuration>
</plugin> </plugin>
@ -252,7 +258,7 @@
<configuration> <configuration>
<linkXref>true</linkXref> <linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding> <sourceEncoding>utf-8</sourceEncoding>
<targetJdk>11</targetJdk> <targetJdk>1.8</targetJdk>
<!-- <rulesets> <!-- <rulesets>
<ruleset>/rulesets/java/basic.xml</ruleset> <ruleset>/rulesets/java/basic.xml</ruleset>
<ruleset>/rulesets/java/braces.xml</ruleset> <ruleset>/rulesets/java/braces.xml</ruleset>

Some files were not shown because too many files have changed in this diff Show More