Moved content types Article, Event and News to ccm-cms module
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4176 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
00f2a64c27
commit
c62744ca7e
|
|
@ -1,337 +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/maven-v4_0_0.xsd">
|
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<artifactId>libreccm-parent</artifactId>
|
|
||||||
<groupId>org.libreccm</groupId>
|
|
||||||
<version>7.0.0-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
||||||
<groupId>org.librecms</groupId>
|
|
||||||
<artifactId>ccm-cms-types-article</artifactId>
|
|
||||||
|
|
||||||
<name>LibreCMS Contenttype Article</name>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax</groupId>
|
|
||||||
<artifactId>javaee-api</artifactId>
|
|
||||||
<type>jar</type>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.libreccm</groupId>
|
|
||||||
<artifactId>ccm-core</artifactId>
|
|
||||||
<version>${project.parent.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.librecms</groupId>
|
|
||||||
<artifactId>ccm-cms</artifactId>
|
|
||||||
<version>${project.parent.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hibernate</groupId>
|
|
||||||
<artifactId>hibernate-entitymanager</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hibernate</groupId>
|
|
||||||
<artifactId>hibernate-envers</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hibernate</groupId>
|
|
||||||
<artifactId>hibernate-validator</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hibernate</groupId>
|
|
||||||
<artifactId>hibernate-validator-cdi</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-core</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-library</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.libreccm</groupId>
|
|
||||||
<artifactId>ccm-testutils</artifactId>
|
|
||||||
<version>${project.parent.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>nl.jqno.equalsverifier</groupId>
|
|
||||||
<artifactId>equalsverifier</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.arquillian.junit</groupId>
|
|
||||||
<artifactId>arquillian-junit-container</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.arquillian.extension</groupId>
|
|
||||||
<artifactId>arquillian-persistence-dbunit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.arquillian.extension</groupId>
|
|
||||||
<artifactId>arquillian-transaction-impl-base</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
|
||||||
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.h2database</groupId>
|
|
||||||
<artifactId>h2</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<finalName>ccm-cms-types-article</finalName>
|
|
||||||
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.3</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.7</source>
|
|
||||||
<target>1.7</target>
|
|
||||||
<optimize>true</optimize>
|
|
||||||
<debug>true</debug>
|
|
||||||
<encoding>${project.build.sourceEncoding}</encoding>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>2.18.1</version>
|
|
||||||
<configuration>
|
|
||||||
<groups>org.libreccm.tests.categories.UnitTest</groups>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.jacoco</groupId>
|
|
||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
|
||||||
<version>0.7.5.201505241946</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>default-prepare-agent</id>
|
|
||||||
<goals>
|
|
||||||
<goal>prepare-agent</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>default-report</id>
|
|
||||||
<phase>prepare-package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>report</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>default-check</id>
|
|
||||||
<goals>
|
|
||||||
<goal>check</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<rules>
|
|
||||||
<rule>
|
|
||||||
<element>BUNDLE</element>
|
|
||||||
<limits>
|
|
||||||
<limit>
|
|
||||||
<counter>COMPLEXITY</counter>
|
|
||||||
<value>COVEREDRATIO</value>
|
|
||||||
<minimum>0.60</minimum>
|
|
||||||
</limit>
|
|
||||||
</limits>
|
|
||||||
</rule>
|
|
||||||
</rules>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>de.jpdigital</groupId>
|
|
||||||
<artifactId>hibernate5-ddl-maven-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<dialects>
|
|
||||||
<param>h2</param>
|
|
||||||
<param>oracle10g</param>
|
|
||||||
<param>postgresql9</param>
|
|
||||||
</dialects>
|
|
||||||
<packages>
|
|
||||||
<param>org.libreccm</param>
|
|
||||||
</packages>
|
|
||||||
<useEnvers>true</useEnvers>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>gen-ddl</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>process-classes</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
|
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>src/main/resources</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<reporting>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>2.10.3</version>
|
|
||||||
<configuration>
|
|
||||||
<detectLinks>true</detectLinks>
|
|
||||||
<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>
|
|
||||||
<docfilessubdirs>true</docfilessubdirs>
|
|
||||||
<charset>UTF-8</charset>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<docencoding>UTF-8</docencoding>
|
|
||||||
<breakiterator>true</breakiterator>
|
|
||||||
<version>true</version>
|
|
||||||
<author>true</author>
|
|
||||||
<keywords>true</keywords>
|
|
||||||
<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>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jxr-plugin</artifactId>
|
|
||||||
<version>2.5</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-report-plugin</artifactId>
|
|
||||||
<version>2.18.1</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.jacoco</groupId>
|
|
||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
|
||||||
<version>0.7.5.201505241946</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
|
||||||
<version>3.0.1</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-pmd-plugin</artifactId>
|
|
||||||
<version>3.4</version>
|
|
||||||
<configuration>
|
|
||||||
<linkXref>true</linkXref>
|
|
||||||
<sourceEncoding>utf-8</sourceEncoding>
|
|
||||||
<targetJdk>1.7</targetJdk>
|
|
||||||
<rulesets>
|
|
||||||
<ruleset>/rulesets/java/basic.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/braces.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/clone.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/design.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/empty.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/finalizers.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/imports.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/junit.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/naming.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/optimizations.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/strictexception.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/strings.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/sunsecure.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/typeresolution.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/unnecessary.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
|
||||||
</rulesets>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>javancss-maven-plugin</artifactId>
|
|
||||||
<version>2.1</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
|
||||||
<version>2.8</version>
|
|
||||||
<reportSets>
|
|
||||||
<reportSet>
|
|
||||||
<reports>
|
|
||||||
<report>dependencies</report>
|
|
||||||
<report>license</report>
|
|
||||||
</reports>
|
|
||||||
</reportSet>
|
|
||||||
</reportSets>
|
|
||||||
<configuration>
|
|
||||||
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</reporting>
|
|
||||||
</project>
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2015 LibreCCM Foundation.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* 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.article;
|
|
||||||
|
|
||||||
import static org.librecms.article.ArticleConstants.*;
|
|
||||||
|
|
||||||
import org.hibernate.envers.Audited;
|
|
||||||
|
|
||||||
import org.librecms.contentsection.ContentItem;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
|
||||||
import javax.persistence.Table;
|
|
||||||
import org.librecms.contenttypes.GenericArticle;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This type simply exposes the {@link GenericArticle} type from the
|
|
||||||
* @code{ccm-cms} module.
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
|
||||||
*/
|
|
||||||
@Entity
|
|
||||||
@Audited
|
|
||||||
@Table(name = "${type_name}", schema = DB_SCHEMA)
|
|
||||||
public class Article extends ContentItem implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2015 LibreCCM Foundation.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* 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.article;
|
|
||||||
|
|
||||||
public final class ArticleConstants {
|
|
||||||
|
|
||||||
public static final String DB_SCHEMA = "cms_article";
|
|
||||||
|
|
||||||
private ArticleConstants() {
|
|
||||||
//Nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2015 LibreCCM Foundation.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* 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.article;
|
|
||||||
|
|
||||||
import org.libreccm.modules.CcmModule;
|
|
||||||
import org.libreccm.modules.InitEvent;
|
|
||||||
import org.libreccm.modules.InstallEvent;
|
|
||||||
import org.libreccm.modules.Module;
|
|
||||||
import org.libreccm.modules.RequiredModule;
|
|
||||||
import org.libreccm.modules.ShutdownEvent;
|
|
||||||
import org.libreccm.modules.UnInstallEvent;
|
|
||||||
|
|
||||||
@Module(packageName="org.librecms.article",
|
|
||||||
requiredModules = {@RequiredModule(module = org.libreccm.core.CcmCore.class)})
|
|
||||||
public class ArticleModule implements CcmModule {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void install(final InstallEvent event) {
|
|
||||||
//ToDo Create initial data for the module if neccessary
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init(final InitEvent event) {
|
|
||||||
//ToDo Add initialisation logic necessary for your module
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void shutdown(final ShutdownEvent event) {
|
|
||||||
//ToDo Add shutdown logic if necessary
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void uninstall(final UnInstallEvent event) {
|
|
||||||
//ToDo Remove module data
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
org.librecms.article.Article
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
groupId=${project.groupId}
|
|
||||||
artifactId=${project.artifactId}
|
|
||||||
version=${project.version}
|
|
||||||
build.date=${timestamp}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
package org.librecms.article;
|
|
||||||
|
|
||||||
import junit.framework.Test;
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
import junit.framework.TestSuite;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unit test for simple App.
|
|
||||||
*/
|
|
||||||
public class AppTest
|
|
||||||
extends TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Create the test case
|
|
||||||
*
|
|
||||||
* @param testName name of the test case
|
|
||||||
*/
|
|
||||||
public AppTest( String testName )
|
|
||||||
{
|
|
||||||
super( testName );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the suite of tests being tested
|
|
||||||
*/
|
|
||||||
public static Test suite()
|
|
||||||
{
|
|
||||||
return new TestSuite( AppTest.class );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Rigourous Test :-)
|
|
||||||
*/
|
|
||||||
public void testApp()
|
|
||||||
{
|
|
||||||
assertTrue( true );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,338 +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/maven-v4_0_0.xsd">
|
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<artifactId>libreccm-parent</artifactId>
|
|
||||||
<groupId>org.libreccm</groupId>
|
|
||||||
<version>7.0.0-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
||||||
<groupId>org.librecms</groupId>
|
|
||||||
<artifactId>ccm-cms-types-event</artifactId>
|
|
||||||
<version>7.0.0-SNAPSHOT</version>
|
|
||||||
|
|
||||||
<name>ccm-cms-types-event</name>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax</groupId>
|
|
||||||
<artifactId>javaee-api</artifactId>
|
|
||||||
<type>jar</type>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.libreccm</groupId>
|
|
||||||
<artifactId>ccm-core</artifactId>
|
|
||||||
<version>${project.parent.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.librecms</groupId>
|
|
||||||
<artifactId>ccm-cms</artifactId>
|
|
||||||
<version>${project.parent.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hibernate</groupId>
|
|
||||||
<artifactId>hibernate-entitymanager</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hibernate</groupId>
|
|
||||||
<artifactId>hibernate-envers</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hibernate</groupId>
|
|
||||||
<artifactId>hibernate-validator</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hibernate</groupId>
|
|
||||||
<artifactId>hibernate-validator-cdi</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-core</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-library</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.libreccm</groupId>
|
|
||||||
<artifactId>ccm-testutils</artifactId>
|
|
||||||
<version>${project.parent.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>nl.jqno.equalsverifier</groupId>
|
|
||||||
<artifactId>equalsverifier</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.arquillian.junit</groupId>
|
|
||||||
<artifactId>arquillian-junit-container</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.arquillian.extension</groupId>
|
|
||||||
<artifactId>arquillian-persistence-dbunit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.arquillian.extension</groupId>
|
|
||||||
<artifactId>arquillian-transaction-impl-base</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
|
||||||
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.h2database</groupId>
|
|
||||||
<artifactId>h2</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<finalName>ccm-cms-types-event</finalName>
|
|
||||||
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.3</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.7</source>
|
|
||||||
<target>1.7</target>
|
|
||||||
<optimize>true</optimize>
|
|
||||||
<debug>true</debug>
|
|
||||||
<encoding>${project.build.sourceEncoding}</encoding>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>2.18.1</version>
|
|
||||||
<configuration>
|
|
||||||
<groups>org.libreccm.tests.categories.UnitTest</groups>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.jacoco</groupId>
|
|
||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
|
||||||
<version>0.7.5.201505241946</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>default-prepare-agent</id>
|
|
||||||
<goals>
|
|
||||||
<goal>prepare-agent</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>default-report</id>
|
|
||||||
<phase>prepare-package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>report</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>default-check</id>
|
|
||||||
<goals>
|
|
||||||
<goal>check</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<rules>
|
|
||||||
<rule>
|
|
||||||
<element>BUNDLE</element>
|
|
||||||
<limits>
|
|
||||||
<limit>
|
|
||||||
<counter>COMPLEXITY</counter>
|
|
||||||
<value>COVEREDRATIO</value>
|
|
||||||
<minimum>0.60</minimum>
|
|
||||||
</limit>
|
|
||||||
</limits>
|
|
||||||
</rule>
|
|
||||||
</rules>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>de.jpdigital</groupId>
|
|
||||||
<artifactId>hibernate5-ddl-maven-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<dialects>
|
|
||||||
<param>h2</param>
|
|
||||||
<param>oracle10g</param>
|
|
||||||
<param>postgresql9</param>
|
|
||||||
</dialects>
|
|
||||||
<packages>
|
|
||||||
<param>org.libreccm</param>
|
|
||||||
</packages>
|
|
||||||
<useEnvers>true</useEnvers>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>gen-ddl</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>process-classes</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
|
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>src/main/resources</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<reporting>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>2.10.3</version>
|
|
||||||
<configuration>
|
|
||||||
<detectLinks>true</detectLinks>
|
|
||||||
<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>
|
|
||||||
<docfilessubdirs>true</docfilessubdirs>
|
|
||||||
<charset>UTF-8</charset>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<docencoding>UTF-8</docencoding>
|
|
||||||
<breakiterator>true</breakiterator>
|
|
||||||
<version>true</version>
|
|
||||||
<author>true</author>
|
|
||||||
<keywords>true</keywords>
|
|
||||||
<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>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jxr-plugin</artifactId>
|
|
||||||
<version>2.5</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-report-plugin</artifactId>
|
|
||||||
<version>2.18.1</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.jacoco</groupId>
|
|
||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
|
||||||
<version>0.7.5.201505241946</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
|
||||||
<version>3.0.1</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-pmd-plugin</artifactId>
|
|
||||||
<version>3.4</version>
|
|
||||||
<configuration>
|
|
||||||
<linkXref>true</linkXref>
|
|
||||||
<sourceEncoding>utf-8</sourceEncoding>
|
|
||||||
<targetJdk>1.7</targetJdk>
|
|
||||||
<rulesets>
|
|
||||||
<ruleset>/rulesets/java/basic.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/braces.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/clone.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/design.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/empty.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/finalizers.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/imports.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/junit.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/naming.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/optimizations.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/strictexception.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/strings.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/sunsecure.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/typeresolution.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/unnecessary.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
|
||||||
</rulesets>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>javancss-maven-plugin</artifactId>
|
|
||||||
<version>2.1</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
|
||||||
<version>2.8</version>
|
|
||||||
<reportSets>
|
|
||||||
<reportSet>
|
|
||||||
<reports>
|
|
||||||
<report>dependencies</report>
|
|
||||||
<report>license</report>
|
|
||||||
</reports>
|
|
||||||
</reportSet>
|
|
||||||
</reportSets>
|
|
||||||
<configuration>
|
|
||||||
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</reporting>
|
|
||||||
</project>
|
|
||||||
|
|
@ -1,242 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2015 LibreCCM Foundation.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* 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.contenttypes.event;
|
|
||||||
|
|
||||||
import static org.librecms.contenttypes.event.EventConstants.*;
|
|
||||||
|
|
||||||
import org.hibernate.envers.Audited;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
import javax.persistence.Column;
|
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
|
||||||
import javax.persistence.Table;
|
|
||||||
import javax.persistence.Temporal;
|
|
||||||
import org.hibernate.validator.constraints.NotEmpty;
|
|
||||||
import org.libreccm.l10n.LocalizedString;
|
|
||||||
import org.librecms.contentsection.ContentItem;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This class represent the content type event.
|
|
||||||
* <br />
|
|
||||||
* <p>
|
|
||||||
* This class extends
|
|
||||||
* {@link org.librecms.contentsection.ContentItem content item} and adds
|
|
||||||
* extended attributes specific for an event:</p>
|
|
||||||
* <dl>
|
|
||||||
* <dt>lead</dt> <dd>optional, standard text field, short description (summary),
|
|
||||||
* used as lead text</dd>
|
|
||||||
* <dt>startDate</dt> <dd>mandatory, date when it will begin</dd>
|
|
||||||
* <dt>startTime</dt> <dd>mandatory, time when it will begin</dd>
|
|
||||||
* <dt>endDate</dt> <dd>optional, date when it will end</dd>
|
|
||||||
* <dt>endTime</dt> <dd>optional, time when it will end</dd>
|
|
||||||
* <dt>eventDate</dt> <dd>optional, rich text field. From pdl File: The date and
|
|
||||||
* time of the event, stored as varchar for now so you can enter other
|
|
||||||
* information configurable as hidden in the authoring kit</dd>
|
|
||||||
* <dt>location</dt> <dd>optional, rich text field, description of location</dd>
|
|
||||||
* <dt>mainContributor</dt> <dd>optional, rich text field, configurable as
|
|
||||||
* hidden in the authoring kit</dd>
|
|
||||||
* <dt>eventType</dt> <dd>optional, standard text field, type of event,
|
|
||||||
* configurable as hidden in the authoring kit</dd>
|
|
||||||
* <dt>mapLink</dt> <dd>optional, standard text field, ling to a map,
|
|
||||||
* configurable as hidden in the authoring kit</dd>
|
|
||||||
* <dt>cost</dt> <dd>optional, standard text field, costs, configurable as
|
|
||||||
* hidden in the authoring kit</dd>
|
|
||||||
* </dl>
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:konerman@tzi.de">Alexander Konermann</a>
|
|
||||||
* @version 3/11/2015
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Entity
|
|
||||||
@Audited
|
|
||||||
@Table(name = "${type_name}", schema = DB_SCHEMA)
|
|
||||||
public class Event extends ContentItem implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
public Event() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* The starting date and time of the event, so the events content type can
|
|
||||||
* be used by calendar
|
|
||||||
*/
|
|
||||||
@Column(name = "STARTDATE")
|
|
||||||
@Temporal(javax.persistence.TemporalType.DATE)
|
|
||||||
@NotEmpty
|
|
||||||
private Date startDate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The ending date time of the event, so the events content type can be used
|
|
||||||
* by calendar
|
|
||||||
*/
|
|
||||||
@Column(name = "ENDDATE")
|
|
||||||
@Temporal(javax.persistence.TemporalType.DATE)
|
|
||||||
private Date endDate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The starting time of the event
|
|
||||||
*/
|
|
||||||
@Column(name = "STARTTIME")
|
|
||||||
@Temporal(javax.persistence.TemporalType.TIME)
|
|
||||||
@NotEmpty
|
|
||||||
private Date startTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The ending time of the event
|
|
||||||
*/
|
|
||||||
@Column(name = "ENDTIME")
|
|
||||||
@Temporal(javax.persistence.TemporalType.TIME)
|
|
||||||
private Date endTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The date and time of the event, stored as varchar for now so you can
|
|
||||||
* enter other information
|
|
||||||
*/
|
|
||||||
@Column(name = "EVENTDATE")
|
|
||||||
private LocalizedString eventDate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The location of the event
|
|
||||||
*/
|
|
||||||
@Column(name = "LOCATION")
|
|
||||||
private LocalizedString location;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The tease/lead information for the event
|
|
||||||
*/
|
|
||||||
@Column(name = "LEAD")
|
|
||||||
private LocalizedString lead;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The main contributor for the event
|
|
||||||
*/
|
|
||||||
@Column(name = "MAINCONTRIBUTOR")
|
|
||||||
private LocalizedString mainContributot;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The type of the event
|
|
||||||
*/
|
|
||||||
@Column(name = "EVENTTYPE")
|
|
||||||
private LocalizedString eventType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The link to a map for the event
|
|
||||||
*/
|
|
||||||
@Column(name = "MAPLINK")
|
|
||||||
private LocalizedString mapLink;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The cost of the event
|
|
||||||
*/
|
|
||||||
@Column(name = "COST")
|
|
||||||
private LocalizedString cost;
|
|
||||||
|
|
||||||
// Getter and Setter:
|
|
||||||
public Date getStartDate() {
|
|
||||||
return new Date(startDate.getTime());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStartDate(Date startDate) {
|
|
||||||
this.startDate = new Date(startDate.getTime());
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getEndDate() {
|
|
||||||
return new Date(endDate.getTime());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEndDate(Date endDate) {
|
|
||||||
this.endDate = new Date(endDate.getTime());
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getStartTime() {
|
|
||||||
return new Date(startTime.getTime());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStartTime(Date startTime) {
|
|
||||||
this.startTime = new Date(startTime.getTime());
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getEndTime() {
|
|
||||||
return new Date(endTime.getTime());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEndTime(Date ENDTIME) {
|
|
||||||
this.endTime = new Date(endTime.getTime());
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalizedString getEventdate() {
|
|
||||||
return eventDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEventdate(LocalizedString eventdate) {
|
|
||||||
this.eventDate = eventdate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalizedString getLocation() {
|
|
||||||
return location;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLocation(LocalizedString location) {
|
|
||||||
this.location = location;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalizedString getLead() {
|
|
||||||
return lead;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLead(LocalizedString lead) {
|
|
||||||
this.lead = lead;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalizedString getMainContributot() {
|
|
||||||
return mainContributot;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMainContributot(LocalizedString mainContributot) {
|
|
||||||
this.mainContributot = mainContributot;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalizedString getEventType() {
|
|
||||||
return eventType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEventType(LocalizedString eventType) {
|
|
||||||
this.eventType = eventType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalizedString getMapLink() {
|
|
||||||
return mapLink;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMapLink(LocalizedString mapLink) {
|
|
||||||
this.mapLink = mapLink;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalizedString getCost() {
|
|
||||||
return cost;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCost(LocalizedString cost) {
|
|
||||||
this.cost = cost;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2015 LibreCCM Foundation.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* 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.contenttypes.event;
|
|
||||||
|
|
||||||
public class EventConstants {
|
|
||||||
|
|
||||||
public static final String DB_SCHEMA = "cms_types_event";
|
|
||||||
|
|
||||||
private EventConstants() {
|
|
||||||
//Nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2015 LibreCCM Foundation.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* 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.contenttypes.event;
|
|
||||||
|
|
||||||
import org.libreccm.modules.CcmModule;
|
|
||||||
import org.libreccm.modules.InitEvent;
|
|
||||||
import org.libreccm.modules.InstallEvent;
|
|
||||||
import org.libreccm.modules.Module;
|
|
||||||
import org.libreccm.modules.RequiredModule;
|
|
||||||
import org.libreccm.modules.ShutdownEvent;
|
|
||||||
import org.libreccm.modules.UnInstallEvent;
|
|
||||||
|
|
||||||
@Module(packageName="org.librecms.contenttypes.event",
|
|
||||||
requiredModules = {@RequiredModule(module = org.libreccm.core.CcmCore.class)})
|
|
||||||
public class EventModule implements CcmModule {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void install(final InstallEvent event) {
|
|
||||||
//ToDo Create initial data for the module if neccessary
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init(final InitEvent event) {
|
|
||||||
//ToDo Add initialisation logic necessary for your module
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void shutdown(final ShutdownEvent event) {
|
|
||||||
//ToDo Add shutdown logic if necessary
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void uninstall(final UnInstallEvent event) {
|
|
||||||
//ToDo Remove module data
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
org.librecms.contenttypes.event.Event
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
groupId=${project.groupId}
|
|
||||||
artifactId=${project.artifactId}
|
|
||||||
version=${project.version}
|
|
||||||
build.date=${timestamp}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
package $org.libreccm.cms;
|
|
||||||
|
|
||||||
import junit.framework.Test;
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
import junit.framework.TestSuite;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unit test for simple App.
|
|
||||||
*/
|
|
||||||
public class AppTest
|
|
||||||
extends TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Create the test case
|
|
||||||
*
|
|
||||||
* @param testName name of the test case
|
|
||||||
*/
|
|
||||||
public AppTest( String testName )
|
|
||||||
{
|
|
||||||
super( testName );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the suite of tests being tested
|
|
||||||
*/
|
|
||||||
public static Test suite()
|
|
||||||
{
|
|
||||||
return new TestSuite( AppTest.class );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Rigourous Test :-)
|
|
||||||
*/
|
|
||||||
public void testApp()
|
|
||||||
{
|
|
||||||
assertTrue( true );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,338 +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/maven-v4_0_0.xsd">
|
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<artifactId>libreccm-parent</artifactId>
|
|
||||||
<groupId>org.libreccm</groupId>
|
|
||||||
<version>7.0.0-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
||||||
<groupId>org.librecms</groupId>
|
|
||||||
<artifactId>ccm-cms-types-newsitem</artifactId>
|
|
||||||
<version>7.0.0-SNAPSHOT</version>
|
|
||||||
|
|
||||||
<name>ccm-cms-types-newsitem</name>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax</groupId>
|
|
||||||
<artifactId>javaee-api</artifactId>
|
|
||||||
<type>jar</type>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.libreccm</groupId>
|
|
||||||
<artifactId>ccm-core</artifactId>
|
|
||||||
<version>${project.parent.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.librecms</groupId>
|
|
||||||
<artifactId>ccm-cms</artifactId>
|
|
||||||
<version>${project.parent.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hibernate</groupId>
|
|
||||||
<artifactId>hibernate-entitymanager</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hibernate</groupId>
|
|
||||||
<artifactId>hibernate-envers</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hibernate</groupId>
|
|
||||||
<artifactId>hibernate-validator</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hibernate</groupId>
|
|
||||||
<artifactId>hibernate-validator-cdi</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-core</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-library</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.libreccm</groupId>
|
|
||||||
<artifactId>ccm-testutils</artifactId>
|
|
||||||
<version>${project.parent.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>nl.jqno.equalsverifier</groupId>
|
|
||||||
<artifactId>equalsverifier</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.arquillian.junit</groupId>
|
|
||||||
<artifactId>arquillian-junit-container</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.arquillian.extension</groupId>
|
|
||||||
<artifactId>arquillian-persistence-dbunit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.arquillian.extension</groupId>
|
|
||||||
<artifactId>arquillian-transaction-impl-base</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
|
||||||
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.h2database</groupId>
|
|
||||||
<artifactId>h2</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<finalName>ccm-cms-types-newsitem</finalName>
|
|
||||||
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.3</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.7</source>
|
|
||||||
<target>1.7</target>
|
|
||||||
<optimize>true</optimize>
|
|
||||||
<debug>true</debug>
|
|
||||||
<encoding>${project.build.sourceEncoding}</encoding>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>2.18.1</version>
|
|
||||||
<configuration>
|
|
||||||
<groups>org.libreccm.tests.categories.UnitTest</groups>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.jacoco</groupId>
|
|
||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
|
||||||
<version>0.7.5.201505241946</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>default-prepare-agent</id>
|
|
||||||
<goals>
|
|
||||||
<goal>prepare-agent</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>default-report</id>
|
|
||||||
<phase>prepare-package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>report</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>default-check</id>
|
|
||||||
<goals>
|
|
||||||
<goal>check</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<rules>
|
|
||||||
<rule>
|
|
||||||
<element>BUNDLE</element>
|
|
||||||
<limits>
|
|
||||||
<limit>
|
|
||||||
<counter>COMPLEXITY</counter>
|
|
||||||
<value>COVEREDRATIO</value>
|
|
||||||
<minimum>0.60</minimum>
|
|
||||||
</limit>
|
|
||||||
</limits>
|
|
||||||
</rule>
|
|
||||||
</rules>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>de.jpdigital</groupId>
|
|
||||||
<artifactId>hibernate5-ddl-maven-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<dialects>
|
|
||||||
<param>h2</param>
|
|
||||||
<param>oracle10g</param>
|
|
||||||
<param>postgresql9</param>
|
|
||||||
</dialects>
|
|
||||||
<packages>
|
|
||||||
<param>org.libreccm</param>
|
|
||||||
</packages>
|
|
||||||
<useEnvers>true</useEnvers>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>gen-ddl</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>process-classes</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
|
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>src/main/resources</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<reporting>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>2.10.3</version>
|
|
||||||
<configuration>
|
|
||||||
<detectLinks>true</detectLinks>
|
|
||||||
<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>
|
|
||||||
<docfilessubdirs>true</docfilessubdirs>
|
|
||||||
<charset>UTF-8</charset>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<docencoding>UTF-8</docencoding>
|
|
||||||
<breakiterator>true</breakiterator>
|
|
||||||
<version>true</version>
|
|
||||||
<author>true</author>
|
|
||||||
<keywords>true</keywords>
|
|
||||||
<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>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jxr-plugin</artifactId>
|
|
||||||
<version>2.5</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-report-plugin</artifactId>
|
|
||||||
<version>2.18.1</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.jacoco</groupId>
|
|
||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
|
||||||
<version>0.7.5.201505241946</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
|
||||||
<version>3.0.1</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-pmd-plugin</artifactId>
|
|
||||||
<version>3.4</version>
|
|
||||||
<configuration>
|
|
||||||
<linkXref>true</linkXref>
|
|
||||||
<sourceEncoding>utf-8</sourceEncoding>
|
|
||||||
<targetJdk>1.7</targetJdk>
|
|
||||||
<rulesets>
|
|
||||||
<ruleset>/rulesets/java/basic.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/braces.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/clone.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/design.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/empty.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/finalizers.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/imports.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/javabeans.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/junit.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/naming.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/optimizations.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/strictexception.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/strings.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/sunsecure.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/typeresolution.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/unnecessary.xml</ruleset>
|
|
||||||
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
|
||||||
</rulesets>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>javancss-maven-plugin</artifactId>
|
|
||||||
<version>2.1</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
|
||||||
<version>2.8</version>
|
|
||||||
<reportSets>
|
|
||||||
<reportSet>
|
|
||||||
<reports>
|
|
||||||
<report>dependencies</report>
|
|
||||||
<report>license</report>
|
|
||||||
</reports>
|
|
||||||
</reportSet>
|
|
||||||
</reportSets>
|
|
||||||
<configuration>
|
|
||||||
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</reporting>
|
|
||||||
</project>
|
|
||||||
|
|
@ -1,95 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2015 LibreCCM Foundation.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* 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.contenttypes.newsitem;
|
|
||||||
|
|
||||||
import static org.librecms.contenttypes.newsitem.NewsitemConstants.*;
|
|
||||||
|
|
||||||
import org.hibernate.envers.Audited;
|
|
||||||
|
|
||||||
import org.librecms.contentsection.ContentItem;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
import javax.persistence.Column;
|
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
|
||||||
import javax.persistence.Table;
|
|
||||||
import javax.persistence.Temporal;
|
|
||||||
import org.hibernate.validator.constraints.NotEmpty;
|
|
||||||
import org.libreccm.l10n.LocalizedString;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This content type represents a newsitem.
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:konerman@tzi.de">Alexander Konermann</a>
|
|
||||||
* @version 25/11/2015
|
|
||||||
*/
|
|
||||||
@Entity
|
|
||||||
@Audited
|
|
||||||
@Table(name = "${type_name}", schema = DB_SCHEMA)
|
|
||||||
public class Newsitem extends ContentItem implements Serializable {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The tease/lead paragraph for the news item
|
|
||||||
*/
|
|
||||||
@Column(name = "LEAD")
|
|
||||||
private LocalizedString lead;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The date for the news item
|
|
||||||
*/
|
|
||||||
@Column(name = "NEWSDATE")
|
|
||||||
@Temporal(javax.persistence.TemporalType.DATE)
|
|
||||||
private Date newsDate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* True, if it is a Homepage
|
|
||||||
*/
|
|
||||||
@Column(name = "ISHOMEPAGE")
|
|
||||||
@NotEmpty
|
|
||||||
private boolean isHompage;
|
|
||||||
|
|
||||||
|
|
||||||
//Getter and setter:
|
|
||||||
public LocalizedString getLead() {
|
|
||||||
return lead;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLead(LocalizedString lead) {
|
|
||||||
this.lead = lead;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getNewsDate() {
|
|
||||||
return newsDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNewsDate(Date newsDate) {
|
|
||||||
this.newsDate = newsDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isIsHompage() {
|
|
||||||
return isHompage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIsHompage(boolean isHompage) {
|
|
||||||
this.isHompage = isHompage;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2015 LibreCCM Foundation.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* 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.contenttypes.newsitem;
|
|
||||||
|
|
||||||
public class NewsitemConstants {
|
|
||||||
|
|
||||||
public static final String DB_SCHEMA = "cms_types_newsitem";
|
|
||||||
|
|
||||||
private NewsitemConstants() {
|
|
||||||
//Nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2015 LibreCCM Foundation.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* 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.contenttypes.newsitem;
|
|
||||||
|
|
||||||
import org.libreccm.modules.CcmModule;
|
|
||||||
import org.libreccm.modules.InitEvent;
|
|
||||||
import org.libreccm.modules.InstallEvent;
|
|
||||||
import org.libreccm.modules.Module;
|
|
||||||
import org.libreccm.modules.RequiredModule;
|
|
||||||
import org.libreccm.modules.ShutdownEvent;
|
|
||||||
import org.libreccm.modules.UnInstallEvent;
|
|
||||||
|
|
||||||
@Module(packageName="org.librecms.contenttypes.newsitem",
|
|
||||||
requiredModules = {@RequiredModule(module = org.libreccm.core.CcmCore.class)})
|
|
||||||
public class NewsitemModule implements CcmModule {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void install(final InstallEvent event) {
|
|
||||||
//ToDo Create initial data for the module if neccessary
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init(final InitEvent event) {
|
|
||||||
//ToDo Add initialisation logic necessary for your module
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void shutdown(final ShutdownEvent event) {
|
|
||||||
//ToDo Add shutdown logic if necessary
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void uninstall(final UnInstallEvent event) {
|
|
||||||
//ToDo Remove module data
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
org.librecms.contenttypes.newsitem.Newsitem
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
groupId=${project.groupId}
|
|
||||||
artifactId=${project.artifactId}
|
|
||||||
version=${project.version}
|
|
||||||
build.date=${timestamp}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
package $org.libreccm.cms;
|
|
||||||
|
|
||||||
import junit.framework.Test;
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
import junit.framework.TestSuite;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unit test for simple App.
|
|
||||||
*/
|
|
||||||
public class AppTest
|
|
||||||
extends TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Create the test case
|
|
||||||
*
|
|
||||||
* @param testName name of the test case
|
|
||||||
*/
|
|
||||||
public AppTest( String testName )
|
|
||||||
{
|
|
||||||
super( testName );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the suite of tests being tested
|
|
||||||
*/
|
|
||||||
public static Test suite()
|
|
||||||
{
|
|
||||||
return new TestSuite( AppTest.class );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Rigourous Test :-)
|
|
||||||
*/
|
|
||||||
public void testApp()
|
|
||||||
{
|
|
||||||
assertTrue( true );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,105 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2016 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* 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.contenttypes;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Objects;
|
||||||
|
import javax.persistence.AssociationOverride;
|
||||||
|
import javax.persistence.Embedded;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.JoinTable;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
|
import org.libreccm.l10n.LocalizedString;
|
||||||
|
|
||||||
|
import static org.libreccm.core.CoreConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="mailto:konerman@tzi.de">Alexander Konermann</a>
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Audited
|
||||||
|
@Table(name = "ARTICLES", schema = DB_SCHEMA)
|
||||||
|
public class Article extends GenericArticle implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 3832010184748095822L;
|
||||||
|
|
||||||
|
@Embedded
|
||||||
|
@AssociationOverride(
|
||||||
|
name = "VALUES",
|
||||||
|
joinTable = @JoinTable(name = "ARTICLE_LEADS",
|
||||||
|
schema = DB_SCHEMA,
|
||||||
|
joinColumns = {
|
||||||
|
@JoinColumn(name = "OBJECT_ID")}
|
||||||
|
))
|
||||||
|
private LocalizedString lead;
|
||||||
|
|
||||||
|
public LocalizedString getLead() {
|
||||||
|
return lead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLead(final LocalizedString lead) {
|
||||||
|
this.lead = lead;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = super.hashCode();
|
||||||
|
hash = 29 * hash + Objects.hashCode(lead);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object obj) {
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!super.equals(obj)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(obj instanceof Article)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final Article other = (Article) obj;
|
||||||
|
if (!(other.canEqual(this))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Objects.equals(lead, other.getLead());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canEqual(final Object obj) {
|
||||||
|
return obj instanceof Article;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString(final String data) {
|
||||||
|
return super.toString(String.format(", lead = %s%s",
|
||||||
|
Objects.toString(lead),
|
||||||
|
data));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,299 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2015 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* 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.contenttypes;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Objects;
|
||||||
|
import javax.persistence.AssociationOverride;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Embedded;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.JoinTable;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
|
import org.hibernate.validator.constraints.NotEmpty;
|
||||||
|
|
||||||
|
import org.libreccm.l10n.LocalizedString;
|
||||||
|
|
||||||
|
import static org.libreccm.core.CoreConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="mailto:konerman@tzi.de">Alexander Konermann</a>
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Audited
|
||||||
|
@Table(name = "EVENTS", schema = DB_SCHEMA)
|
||||||
|
public class Event extends GenericArticle implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -9104886733503414635L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Short description of the news, usually used as teaser.
|
||||||
|
*/
|
||||||
|
@Embedded
|
||||||
|
@AssociationOverride(
|
||||||
|
name = "VALUES",
|
||||||
|
joinTable = @JoinTable(name = "EVENT_LEADS",
|
||||||
|
schema = DB_SCHEMA,
|
||||||
|
joinColumns = {
|
||||||
|
@JoinColumn(name = "OBJECT_ID")}
|
||||||
|
))
|
||||||
|
private LocalizedString lead;
|
||||||
|
|
||||||
|
@Column(name = "START_DATE", nullable = false)
|
||||||
|
@Temporal(TemporalType.DATE)
|
||||||
|
@NotEmpty
|
||||||
|
private Date startDate;
|
||||||
|
|
||||||
|
@Column(name = "END_DATE")
|
||||||
|
@Temporal(TemporalType.DATE)
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Additional information about the date the event takes places.
|
||||||
|
*/
|
||||||
|
@Embedded
|
||||||
|
@AssociationOverride(
|
||||||
|
name = "VALUES",
|
||||||
|
joinTable = @JoinTable(name = "EVENT_DATES",
|
||||||
|
schema = DB_SCHEMA,
|
||||||
|
joinColumns = {
|
||||||
|
@JoinColumn(name = "OBJECT_ID")}
|
||||||
|
))
|
||||||
|
private LocalizedString eventDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The location of the event
|
||||||
|
*/
|
||||||
|
@Embedded
|
||||||
|
@AssociationOverride(
|
||||||
|
name = "VALUES",
|
||||||
|
joinTable = @JoinTable(name = "EVENT_LOCATIONS",
|
||||||
|
schema = DB_SCHEMA,
|
||||||
|
joinColumns = {
|
||||||
|
@JoinColumn(name = "OBJECT_ID")}
|
||||||
|
))
|
||||||
|
private LocalizedString location;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The main contributor for the event
|
||||||
|
*/
|
||||||
|
@Embedded
|
||||||
|
@AssociationOverride(
|
||||||
|
name = "VALUES",
|
||||||
|
joinTable = @JoinTable(name = "EVENT_MAIN_CONTRIBUTORS",
|
||||||
|
schema = DB_SCHEMA,
|
||||||
|
joinColumns = {
|
||||||
|
@JoinColumn(name = "OBJECT_ID")}
|
||||||
|
))
|
||||||
|
private LocalizedString mainContributor;
|
||||||
|
|
||||||
|
@Embedded
|
||||||
|
@AssociationOverride(
|
||||||
|
name = "VALUES",
|
||||||
|
joinTable = @JoinTable(name = "EVENT_TYPES",
|
||||||
|
schema = DB_SCHEMA,
|
||||||
|
joinColumns = {
|
||||||
|
@JoinColumn(name = "OBJECT_ID")}
|
||||||
|
))
|
||||||
|
private LocalizedString eventType;
|
||||||
|
|
||||||
|
//ToDo: check if this is necessary or can be better handled using related links.
|
||||||
|
@Column(name = "MAP_LINK")
|
||||||
|
private String mapLink;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The cost of the event
|
||||||
|
*/
|
||||||
|
@Embedded
|
||||||
|
@AssociationOverride(
|
||||||
|
name = "VALUES",
|
||||||
|
joinTable = @JoinTable(name = "EVENT_COSTS",
|
||||||
|
schema = DB_SCHEMA,
|
||||||
|
joinColumns = {
|
||||||
|
@JoinColumn(name = "OBJECT_ID")}
|
||||||
|
))
|
||||||
|
private LocalizedString cost;
|
||||||
|
|
||||||
|
public LocalizedString getLead() {
|
||||||
|
return lead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLead(final LocalizedString lead) {
|
||||||
|
this.lead = lead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getStartDate() {
|
||||||
|
return startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartDate(final Date startDate) {
|
||||||
|
this.startDate = startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getEndDate() {
|
||||||
|
return endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndDate(final Date endDate) {
|
||||||
|
this.endDate = endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalizedString getEventDate() {
|
||||||
|
return eventDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEventDate(final LocalizedString eventDate) {
|
||||||
|
this.eventDate = eventDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalizedString getLocation() {
|
||||||
|
return location;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocation(final LocalizedString location) {
|
||||||
|
this.location = location;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalizedString getMainContributor() {
|
||||||
|
return mainContributor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMainContributor(final LocalizedString mainContributor) {
|
||||||
|
this.mainContributor = mainContributor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalizedString getEventType() {
|
||||||
|
return eventType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEventType(final LocalizedString eventType) {
|
||||||
|
this.eventType = eventType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMapLink() {
|
||||||
|
return mapLink;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMapLink(final String mapLink) {
|
||||||
|
this.mapLink = mapLink;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalizedString getCost() {
|
||||||
|
return cost;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCost(final LocalizedString cost) {
|
||||||
|
this.cost = cost;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = super.hashCode();
|
||||||
|
hash = 97 * hash + Objects.hashCode(lead);
|
||||||
|
hash = 97 * hash + Objects.hashCode(startDate);
|
||||||
|
hash = 97 * hash + Objects.hashCode(endDate);
|
||||||
|
hash = 97 * hash + Objects.hashCode(eventDate);
|
||||||
|
hash = 97 * hash + Objects.hashCode(location);
|
||||||
|
hash = 97 * hash + Objects.hashCode(mainContributor);
|
||||||
|
hash = 97 * hash + Objects.hashCode(mapLink);
|
||||||
|
hash = 97 * hash + Objects.hashCode(cost);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object obj) {
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!super.equals(obj)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(obj instanceof Event)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final Event other = (Event) obj;
|
||||||
|
if (!other.canEqual(obj)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Objects.equals(mapLink, other.getMapLink())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!Objects.equals(lead, other.getLead())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!Objects.equals(startDate, other.getStartDate())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!Objects.equals(endDate, other.getEndDate())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!Objects.equals(eventDate, other.getEventDate())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!Objects.equals(location, other.getLocation())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!Objects.equals(mainContributor, other.getMainContributor())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!Objects.equals(eventType, other.getEventType())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Objects.equals(cost, other.getCost());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canEqual(final Object obj) {
|
||||||
|
return obj instanceof Event;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString(final String data) {
|
||||||
|
return super.toString(String.format(", lead = %s, "
|
||||||
|
+ "startDate = %tF %<tT, "
|
||||||
|
+ "endDate = %tF %<tT, "
|
||||||
|
+ "eventDate = %s, "
|
||||||
|
+ "location = %s,"
|
||||||
|
+ "mainContributor, %s, "
|
||||||
|
+ "eventType = %s, "
|
||||||
|
+ "mapLink = \"%s\", "
|
||||||
|
+ "cost = %s%s",
|
||||||
|
Objects.toString(lead),
|
||||||
|
startDate,
|
||||||
|
endDate,
|
||||||
|
Objects.toString(eventDate),
|
||||||
|
Objects.toString(location),
|
||||||
|
Objects.toString(mainContributor),
|
||||||
|
Objects.toString(eventType),
|
||||||
|
mapLink,
|
||||||
|
Objects.toString(cost),
|
||||||
|
data));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -28,11 +28,12 @@ import javax.persistence.JoinTable;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import org.hibernate.envers.Audited;
|
import org.hibernate.envers.Audited;
|
||||||
|
|
||||||
import static org.librecms.CmsConstants.*;
|
|
||||||
|
|
||||||
import org.librecms.contentsection.ContentItem;
|
import org.librecms.contentsection.ContentItem;
|
||||||
import org.libreccm.l10n.LocalizedString;
|
import org.libreccm.l10n.LocalizedString;
|
||||||
|
|
||||||
|
import static org.libreccm.core.CoreConstants.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for article like content items. These items usually contain a
|
* Base class for article like content items. These items usually contain a
|
||||||
* short introduction text (the description) and a longer text containing
|
* short introduction text (the description) and a longer text containing
|
||||||
|
|
@ -42,7 +43,7 @@ import org.libreccm.l10n.LocalizedString;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Audited
|
@Audited
|
||||||
@Table(name = "ARTICLES", schema = DB_SCHEMA)
|
@Table(name = "GENERIC_ARTICLES", schema = DB_SCHEMA)
|
||||||
public class GenericArticle extends ContentItem implements Serializable {
|
public class GenericArticle extends ContentItem implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -6737443527969703121L;
|
private static final long serialVersionUID = -6737443527969703121L;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,154 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2015 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* 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.contenttypes;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Objects;
|
||||||
|
import javax.persistence.AssociationOverride;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Embedded;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.JoinTable;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
|
import org.hibernate.validator.constraints.NotEmpty;
|
||||||
|
import org.libreccm.l10n.LocalizedString;
|
||||||
|
|
||||||
|
import static org.libreccm.core.CoreConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="mailto:konerman@tzi.de">Alexander Konermann</a>
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Audited
|
||||||
|
@Table(name = "NEWS", schema = DB_SCHEMA)
|
||||||
|
public class News extends GenericArticle implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -4939565845920227974L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Short description of the news, usually used as teaser.
|
||||||
|
*/
|
||||||
|
@Embedded
|
||||||
|
@AssociationOverride(
|
||||||
|
name = "VALUES",
|
||||||
|
joinTable = @JoinTable(name = "NEWS_LEADS",
|
||||||
|
schema = DB_SCHEMA,
|
||||||
|
joinColumns = {
|
||||||
|
@JoinColumn(name = "OBJECT_ID")}
|
||||||
|
))
|
||||||
|
private LocalizedString lead;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Release date of the news
|
||||||
|
*/
|
||||||
|
@Column(name = "NEWS_DATE", nullable = false)
|
||||||
|
@NotEmpty
|
||||||
|
@Temporal(TemporalType.DATE)
|
||||||
|
private Date releaseDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should the news item be published on the portal homepage? Will be used by
|
||||||
|
* the function recentItems.
|
||||||
|
*/
|
||||||
|
@Column(name = "HOMEPAGE")
|
||||||
|
@NotEmpty
|
||||||
|
private boolean homepage;
|
||||||
|
|
||||||
|
public LocalizedString getLead() {
|
||||||
|
return lead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLead(final LocalizedString lead) {
|
||||||
|
this.lead = lead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getReleaseDate() {
|
||||||
|
return releaseDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReleaseDate(final Date releaseDate) {
|
||||||
|
this.releaseDate = releaseDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isHomepage() {
|
||||||
|
return homepage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHomepage(final boolean homepage) {
|
||||||
|
this.homepage = homepage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = super.hashCode();
|
||||||
|
hash = 11 * hash + Objects.hashCode(this.lead);
|
||||||
|
hash = 11 * hash + Objects.hashCode(this.releaseDate);
|
||||||
|
hash = 11 * hash + (this.homepage ? 1 : 0);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object obj) {
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!super.equals(obj)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof News)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final News other = (News) obj;
|
||||||
|
if (!other.canEqual(this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (homepage != other.isHomepage()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!Objects.equals(lead, other.getLead())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Objects.equals(releaseDate, other.getReleaseDate());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canEqual(final Object obj) {
|
||||||
|
return obj instanceof News;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString(final String data) {
|
||||||
|
return super.toString(String.format(", lead = \"%s\", "
|
||||||
|
+ "releaseDate = %tF %<tT, "
|
||||||
|
+ "homepage = %b%d",
|
||||||
|
Objects.toString(lead),
|
||||||
|
releaseDate,
|
||||||
|
homepage,
|
||||||
|
data));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# NewsItemResources_de.properties
|
# NewsItemResources_de.properties
|
||||||
#
|
#
|
||||||
# Alle deutschem Umlaute muessen als UTF-8 eingetragen werden:
|
# Alle deutschem Umlaute muessen als UTF-8 eingetragen werden:
|
||||||
# \u00c3\u00a4 = \u00e4 \u00c3\u0084 = \u00c4
|
# \u00c3\u00a4 = \u00e4 \u00c3\u0084 = \u00c4
|
||||||
# \u00c3\u00bc = \u00fc \u00c3\u009c = \u00dc
|
# \u00c3\u00bc = \u00fc \u00c3\u009c = \u00dc
|
||||||
# \u00c3\u00b6 = \u00f6 \u00c3\u0096 = \u00d6
|
# \u00c3\u00b6 = \u00f6 \u00c3\u0096 = \u00d6
|
||||||
# \u00c3\u009f = \u00df
|
# \u00c3\u009f = \u00df
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# NewsItemResources_fr.properties
|
# NewsItemResources_fr.properties
|
||||||
#
|
#
|
||||||
# UTF-8 characters:
|
# UTF-8 characters:
|
||||||
# \u00c3\u00a8 = \u00e8 (LETTER E WITH GRAVE)
|
# \u00c3\u00a8 = \u00e8 (LETTER E WITH GRAVE)
|
||||||
# \u00c3\u00a9 = \u00e9 (LETTER E WITH ACUTE)
|
# \u00c3\u00a9 = \u00e9 (LETTER E WITH ACUTE)
|
||||||
#
|
#
|
||||||
newsitem.authoring.body_text.description=Bearbeitung von Titel, Namen, Zusammenfassung und Datum
|
newsitem.authoring.body_text.description=Bearbeitung von Titel, Namen, Zusammenfassung und Datum
|
||||||
3
pom.xml
3
pom.xml
|
|
@ -55,17 +55,14 @@
|
||||||
<module>ccm-archetype-module</module>
|
<module>ccm-archetype-module</module>
|
||||||
<module>ccm-cms</module>
|
<module>ccm-cms</module>
|
||||||
<module>ccm-cms-archetype-contenttype</module>
|
<module>ccm-cms-archetype-contenttype</module>
|
||||||
<module>ccm-cms-types-article</module>
|
|
||||||
<module>ccm-cms-types-agenda</module>
|
<module>ccm-cms-types-agenda</module>
|
||||||
<module>ccm-cms-types-bookmark</module>
|
<module>ccm-cms-types-bookmark</module>
|
||||||
<module>ccm-cms-types-event</module>
|
|
||||||
<module>ccm-cms-types-minutes</module>
|
<module>ccm-cms-types-minutes</module>
|
||||||
<module>ccm-cms-types-decisiontree</module>
|
<module>ccm-cms-types-decisiontree</module>
|
||||||
<module>ccm-cms-types-mparticle</module>
|
<module>ccm-cms-types-mparticle</module>
|
||||||
<module>ccm-cms-types-glossaryitem</module>
|
<module>ccm-cms-types-glossaryitem</module>
|
||||||
<module>ccm-cms-types-faqitem</module>
|
<module>ccm-cms-types-faqitem</module>
|
||||||
<module>ccm-cms-types-externallink</module>
|
<module>ccm-cms-types-externallink</module>
|
||||||
<module>ccm-cms-types-newsitem</module>
|
|
||||||
<module>ccm-bundle-devel-wildfly-web</module>
|
<module>ccm-bundle-devel-wildfly-web</module>
|
||||||
<module>ccm-bundle-devel-wildfly</module>
|
<module>ccm-bundle-devel-wildfly</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue