CCM NG: Added Content types bookmark, event and minutes.
minor changes in Agenda.java git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@3720 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
92b42bbe7d
commit
50d9bf40ec
|
|
@ -29,6 +29,7 @@ import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
|
import org.hibernate.validator.constraints.NotEmpty;
|
||||||
import org.libreccm.l10n.LocalizedString;
|
import org.libreccm.l10n.LocalizedString;
|
||||||
import org.librecms.contentsection.ContentItem;
|
import org.librecms.contentsection.ContentItem;
|
||||||
|
|
||||||
|
|
@ -64,6 +65,7 @@ public class Agenda extends ContentItem implements Serializable {
|
||||||
*/
|
*/
|
||||||
@Column(name = "AGENDADATE")
|
@Column(name = "AGENDADATE")
|
||||||
@Temporal(javax.persistence.TemporalType.DATE)
|
@Temporal(javax.persistence.TemporalType.DATE)
|
||||||
|
@NotEmpty
|
||||||
private Date agendaDate;
|
private Date agendaDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -103,11 +105,11 @@ public class Agenda extends ContentItem implements Serializable {
|
||||||
//getter and setter:
|
//getter and setter:
|
||||||
|
|
||||||
public Date getAgendaDate() {
|
public Date getAgendaDate() {
|
||||||
return agendaDate;
|
return new Date(agendaDate.getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAgendaDate(Date agendaDate) {
|
public void setAgendaDate(Date agendaDate) {
|
||||||
this.agendaDate = agendaDate;
|
this.agendaDate = new Date(agendaDate.getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalizedString getLocation() {
|
public LocalizedString getLocation() {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,326 @@
|
||||||
|
<?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-bookmark</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>ccm-cms-types-bookmark</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>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
</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-bookmark</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>hibernate4-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</param>
|
||||||
|
<param>mysql5_innodb</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>
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
/*
|
||||||
|
* 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.bookmark;
|
||||||
|
|
||||||
|
import static org.librecms.contenttypes.bookmark.BookmarkConstants.*;
|
||||||
|
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import org.hibernate.validator.constraints.NotEmpty;
|
||||||
|
import org.libreccm.l10n.LocalizedString;
|
||||||
|
import org.librecms.contentsection.ContentItem;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This content type represents a Bookmark.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:konerman@tzi.de">Alexander Konermann</a>
|
||||||
|
* @version 30/10/2015
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Audited
|
||||||
|
@Table(name = "${type_name}", schema = DB_SCHEMA)
|
||||||
|
public class Bookmark extends ContentItem implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Column(name = "DESCRIPTION")
|
||||||
|
private LocalizedString description;
|
||||||
|
|
||||||
|
@Column(name = "URL")
|
||||||
|
@NotEmpty
|
||||||
|
private LocalizedString url;
|
||||||
|
|
||||||
|
public LocalizedString getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(LocalizedString description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalizedString getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(LocalizedString url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* 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.bookmark;
|
||||||
|
|
||||||
|
public class BookmarkConstants {
|
||||||
|
|
||||||
|
public static final String DB_SCHEMA = "cms_types_bookmark";
|
||||||
|
|
||||||
|
private BookmarkConstants() {
|
||||||
|
//Nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* 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.bookmark;
|
||||||
|
|
||||||
|
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.bookmark",
|
||||||
|
requiredModules = {@RequiredModule(module = org.libreccm.core.CcmCore.class)})
|
||||||
|
public class BookmarkModule 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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
cms.contenttypes.ui.bookmark.url=URL:
|
||||||
|
cms.contenttypes.bookmark.type_label=Bookmark
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
cms.contenttypes.ui.bookmark.url=URL:
|
||||||
|
cms.contenttypes.bookmark.type_label=Lesezeichen
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
cms.contenttypes.ui.bookmark.url=URL:
|
||||||
|
cms.contenttypes.bookmark.type_label=Bookmark
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
cms.contenttypes.ui.bookmark.url=URL:
|
||||||
|
cms.contenttypes.bookmark.type_label=Bookmark
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
org.librecms.contenttypes.bookmark.Bookmark
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
groupId=${project.groupId}
|
||||||
|
artifactId=${project.artifactId}
|
||||||
|
version=${project.version}
|
||||||
|
build.date=${timestamp}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
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,326 @@
|
||||||
|
<?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>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
</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>hibernate4-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</param>
|
||||||
|
<param>mysql5_innodb</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>
|
||||||
|
|
@ -0,0 +1,242 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
# EventResources.properties
|
||||||
|
#
|
||||||
|
event.authoring.basic_properties.description=Edit the title, name, start date, date/time, location, lead, main contributor, type, map link, and cost
|
||||||
|
#
|
||||||
|
cms.contenttypes.ui.event.name=Name (URL):
|
||||||
|
cms.contenttypes.ui.event.title=Title:
|
||||||
|
cms.contenttypes.ui.event.lead=Lead Text:
|
||||||
|
#
|
||||||
|
cms.contenttypes.ui.event.start_date=Start date:
|
||||||
|
cms.contenttypes.ui.event.start_time=Start time:
|
||||||
|
cms.contenttypes.ui.event.end_date=End date:
|
||||||
|
cms.contenttypes.ui.event.end_time=End time:
|
||||||
|
cms.contenttypes.ui.event.end_date_after_start_date=The end date must be later then the start date
|
||||||
|
#
|
||||||
|
cms.contenttypes.ui.event.date_description=Additional date description:
|
||||||
|
cms.contenttypes.ui.event.location=Location:
|
||||||
|
cms.contenttypes.ui.event.main_contributor=Main contributor:
|
||||||
|
cms.contenttypes.ui.event.event_type=Event Type:
|
||||||
|
cms.contenttypes.ui.event.link_to_map=Link to Map
|
||||||
|
cms.contenttypes.ui.event.cost=Cost:
|
||||||
|
#Probably not used!
|
||||||
|
cms.contenttypes.ui.event.there_are_no_events=There are no events.
|
||||||
|
cms.contenttypes.event.type_label=Event
|
||||||
|
cms.contenttypes.event_type_not_registered=Type not registered
|
||||||
|
cms.contenttypes.ui.event.lead_hint=A short description of the focus of the event and its main topic. Should be no longer than 2-3 sentences. The lead text will be displayed in the detail view of the event as well as in listings of events.
|
||||||
|
cms.contenttypes.ui.event.end_date_hint=Optionally enter an end date. It is displayed on the detail view as well as in listings of other short references.
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
# EventResources_de.properties
|
||||||
|
# Alle deutschem Umlaute muessen als UTF-8 eingetragen werden:
|
||||||
|
event.authoring.basic_properties.description=Bearbeitung des Titels, Namens, Datums, Zeit, Ort, Haupt- Mitarbeiter, Typ, Link zur Karte und Kosten
|
||||||
|
#
|
||||||
|
# useless here, must be transferred to CMSResources
|
||||||
|
#
|
||||||
|
cms.contenttypes.ui.event.name=Name:
|
||||||
|
cms.contenttypes.ui.event.title=Titel:
|
||||||
|
cms.contenttypes.ui.event.lead=Zusammenfassung:
|
||||||
|
#
|
||||||
|
cms.contenttypes.ui.event.start_date=Anfangs-Datum:
|
||||||
|
cms.contenttypes.ui.event.start_time=Beginn:
|
||||||
|
cms.contenttypes.ui.event.end_date=End-Datum:
|
||||||
|
cms.contenttypes.ui.event.end_time=Ende:
|
||||||
|
cms.contenttypes.ui.event.end_date_after_start_date=Das Anfangs-Datum ist sp\u00e4ter als das End-Datum
|
||||||
|
#
|
||||||
|
cms.contenttypes.ui.event.date_description=Termin Zusatz:
|
||||||
|
cms.contenttypes.ui.event.location=Ort:
|
||||||
|
cms.contenttypes.ui.event.main_contributor=Haupt-Mitarbeiter:
|
||||||
|
cms.contenttypes.ui.event.event_type=Veranstaltungs-Typ:
|
||||||
|
cms.contenttypes.ui.event.link_to_map=Link zur Karte
|
||||||
|
cms.contenttypes.ui.event.cost=Kosten:
|
||||||
|
cms.contenttypes.ui.event.there_are_no_events=Es sind keine Veranstaltungen vorhanden.
|
||||||
|
cms.contenttypes.event.type_label=Veranstaltung
|
||||||
|
cms.contenttypes.event_type_not_registered=Typ nicht registriert
|
||||||
|
cms.contenttypes.ui.event.lead_hint=Kurze Beschreibung der Veranstaltung und ihres zentralen Themas. Die L\u00e4nge sollte maximal 2-3 S\u00e4tze betragen. Die Zusammenfassung wird sowohl in der Vollansicht der Veranstaltung als auch in allen Teilsichten und Listen angezeigt.
|
||||||
|
cms.contenttypes.ui.event.end_date_hint=Ein optionales Enddatum; es wird sowohl in der Vollansicht als auch in allen Listen und sonstigen Referencen angezeigt.
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
# EventResources_fr.properties
|
||||||
|
# UTF-8 characters:
|
||||||
|
# \u00e8 = \u00e8 (LETTER E WITH GRAVE)
|
||||||
|
# \u00e9 = \u00e9 (LETTER E WITH ACUTE)
|
||||||
|
cms.contenttypes.event_type_not_registered=Type d'\u00e9venement non enregistr\u00e9
|
||||||
|
event.authoring.basic_properties.description=Edit the title, name, start date, date/time, location, lead, main contributor, type, map link, and cost
|
||||||
|
#
|
||||||
|
cms.contenttypes.ui.event.name=Name (URL):
|
||||||
|
cms.contenttypes.ui.event.title=Title:
|
||||||
|
cms.contenttypes.ui.event.lead=Lead Text:
|
||||||
|
#
|
||||||
|
cms.contenttypes.ui.event.start_date=Start date:
|
||||||
|
cms.contenttypes.ui.event.start_time=Start time:
|
||||||
|
cms.contenttypes.ui.event.end_date=End date:
|
||||||
|
cms.contenttypes.ui.event.end_time=End time:
|
||||||
|
cms.contenttypes.ui.event.end_date_after_start_date=The end date must be later then the start date
|
||||||
|
#
|
||||||
|
cms.contenttypes.ui.event.date_description=Additional date description:
|
||||||
|
cms.contenttypes.ui.event.location=Location:
|
||||||
|
cms.contenttypes.ui.event.main_contributor=Main contributor:
|
||||||
|
cms.contenttypes.ui.event.event_type=Event Type:
|
||||||
|
cms.contenttypes.ui.event.link_to_map=Link to Map
|
||||||
|
cms.contenttypes.ui.event.cost=Cost:
|
||||||
|
cms.contenttypes.ui.event.there_are_no_events=Il n'y a aucun \u00e9venement
|
||||||
|
cms.contenttypes.event.type_label=Event
|
||||||
|
cms.contenttypes.ui.event.lead_hint=A short description of the focus of the event and its main topic. Should be no longer than 2-3 sentences. The lead text will be displayed in the detail view of the event as well as in listings of events.
|
||||||
|
cms.contenttypes.ui.event.end_date_hint=Optionally enter an end date. It is displayed on the detail view as well as in listings of other short references.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
org.librecms.contenttypes.event.Event
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
groupId=${project.groupId}
|
||||||
|
artifactId=${project.artifactId}
|
||||||
|
version=${project.version}
|
||||||
|
build.date=${timestamp}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
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,326 @@
|
||||||
|
<?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-minutes</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>ccm-cms-types-minutes</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>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
</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-minutes</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>hibernate4-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</param>
|
||||||
|
<param>mysql5_innodb</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>
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
/*
|
||||||
|
* 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.minutes;
|
||||||
|
|
||||||
|
import static org.librecms.contenttypes.minutes.MinutesConstants.*;
|
||||||
|
|
||||||
|
import org.hibernate.envers.Audited;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import org.libreccm.l10n.LocalizedString;
|
||||||
|
import org.librecms.contentsection.ContentItem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This content type represents a minutes.
|
||||||
|
*
|
||||||
|
* @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 Minutes extends ContentItem implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The minute number for the minutes
|
||||||
|
*/
|
||||||
|
@Column(name = "MINUTENUMBER")
|
||||||
|
private LocalizedString minuteNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The description of the minutes
|
||||||
|
*/
|
||||||
|
@Column(name = "DESCRIPTION")
|
||||||
|
private LocalizedString description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Action item(s) for the minutes
|
||||||
|
*/
|
||||||
|
@Column(name = "ACTIONITEM")
|
||||||
|
private LocalizedString actionItem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attendees for the minutes
|
||||||
|
*/
|
||||||
|
@Column(name = "ATTENDEES")
|
||||||
|
private LocalizedString attendees;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The description for the minutes
|
||||||
|
*/
|
||||||
|
@Column(name = "DESCRIPTIONOFMINUTES")
|
||||||
|
private LocalizedString descriptionOfMinutes;
|
||||||
|
|
||||||
|
|
||||||
|
// Getter and setter:
|
||||||
|
|
||||||
|
public LocalizedString getMinuteNumber() {
|
||||||
|
return minuteNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMinuteNumber(LocalizedString minuteNumber) {
|
||||||
|
this.minuteNumber = minuteNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalizedString getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(LocalizedString description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalizedString getActionItem() {
|
||||||
|
return actionItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActionItem(LocalizedString actionItem) {
|
||||||
|
this.actionItem = actionItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalizedString getAttendees() {
|
||||||
|
return attendees;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAttendees(LocalizedString attendees) {
|
||||||
|
this.attendees = attendees;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalizedString getDescriptionOfMinutes() {
|
||||||
|
return descriptionOfMinutes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescriptionOfMinutes(LocalizedString descriptionOfMinutes) {
|
||||||
|
this.descriptionOfMinutes = descriptionOfMinutes;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* 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.minutes;
|
||||||
|
|
||||||
|
public class MinutesConstants {
|
||||||
|
|
||||||
|
public static final String DB_SCHEMA = "cms_types_minutes";
|
||||||
|
|
||||||
|
private MinutesConstants() {
|
||||||
|
//Nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* 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.minutes;
|
||||||
|
|
||||||
|
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.minutes",
|
||||||
|
requiredModules = {@RequiredModule(module = org.libreccm.core.CcmCore.class)})
|
||||||
|
public class MinutesModule 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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
minutes.authoring.basic_properties.description=Edit the title, name, attendees, note taker and apologies of minutes
|
||||||
|
cms.contenttypes.ui.minutes.reference=Reference:
|
||||||
|
cms.contenttypes.ui.minutes.action_item=Action Item:
|
||||||
|
cms.contenttypes.ui.minutes.attendees=Attendees:
|
||||||
|
cms.contenttypes.ui.minutes.description_of=Description of Minutes:
|
||||||
|
#Fixed Key! Defined in class ContentType#getLabel()
|
||||||
|
cms.contenttypes.minutes.type_label=Minutes
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
minutes.authoring.basic_properties.description=Editieren von Titel, Name, Teilnehmer, etc.
|
||||||
|
cms.contenttypes.ui.minutes.reference=Referenz:
|
||||||
|
cms.contenttypes.ui.minutes.action_item=Aktionselement:
|
||||||
|
cms.contenttypes.ui.minutes.attendees=Teilnehmer:
|
||||||
|
cms.contenttypes.ui.minutes.description_of=Beschreibung der Tagesordnungspunkte:
|
||||||
|
#Fixed Key! Defined in class ContentType#getLabel()
|
||||||
|
cms.contenttypes.minutes.type_label=Protokoll
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
minutes.authoring.basic_properties.description=Edit the title, name, attendees, note taker and apologies of minutes
|
||||||
|
cms.contenttypes.ui.minutes.reference=Reference:
|
||||||
|
cms.contenttypes.ui.minutes.action_item=Action Item:
|
||||||
|
cms.contenttypes.ui.minutes.attendees=Attendees:
|
||||||
|
cms.contenttypes.ui.minutes.description_of=Description of Minutes:
|
||||||
|
#Fixed Key! Defined in class ContentType#getLabel()
|
||||||
|
cms.contenttypes.minutes.type_label=Minutes
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
minutes.authoring.basic_properties.description=Edit the title, name, attendees, note taker and apologies of minutes
|
||||||
|
cms.contenttypes.ui.minutes.reference=R\u00e9ference
|
||||||
|
cms.contenttypes.ui.minutes.action_item=Action de l'\u00e9l\u00e9ment
|
||||||
|
cms.contenttypes.ui.minutes.attendees=Participants:
|
||||||
|
cms.contenttypes.ui.minutes.description_of=Description de la r\u00e9union
|
||||||
|
#Fixed Key! Defined in class ContentType#getLabel()
|
||||||
|
cms.contenttypes.minutes.type_label=Minutes
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
org.librecms.contenttypes.minutes.Minutes
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
groupId=${project.groupId}
|
||||||
|
artifactId=${project.artifactId}
|
||||||
|
version=${project.version}
|
||||||
|
build.date=${timestamp}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
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 );
|
||||||
|
}
|
||||||
|
}
|
||||||
3
pom.xml
3
pom.xml
|
|
@ -50,6 +50,9 @@
|
||||||
<module>ccm-cms-types-article</module>
|
<module>ccm-cms-types-article</module>
|
||||||
<module>ccm-cms-types-agenda</module>
|
<module>ccm-cms-types-agenda</module>
|
||||||
<module>ccm-cms-types-decisiontree</module>
|
<module>ccm-cms-types-decisiontree</module>
|
||||||
|
<module>ccm-cms-types-bookmark</module>
|
||||||
|
<module>ccm-cms-types-event</module>
|
||||||
|
<module>ccm-cms-types-minutes</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<!--<repositories>
|
<!--<repositories>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue