From 50d9bf40eca48634ab1f2829020bcaad16e1faeb Mon Sep 17 00:00:00 2001 From: konermann Date: Fri, 6 Nov 2015 16:32:24 +0000 Subject: [PATCH] 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-94f89814c4df --- .../librecms/contenttypes/agenda/Agenda.java | 6 +- ccm-cms-types-bookmark/pom.xml | 326 ++++++++++++++++++ .../contenttypes/bookmark/Bookmark.java | 70 ++++ .../bookmark/BookmarkConstants.java | 29 ++ .../contenttypes/bookmark/BookmarkModule.java | 54 +++ .../bookmark/Resources.properties | 2 + .../bookmark/Resources_de.properties | 2 + .../bookmark/Resources_en.properties | 2 + .../bookmark/Resources_fr.properties | 2 + .../services/org.libreccm.modules.CcmModule | 1 + ...librecms.ccm-cms-types-bookmark.properties | 4 + .../contenttypes/bookmark/AppTest.java | 38 ++ ccm-cms-types-event/pom.xml | 326 ++++++++++++++++++ .../librecms/contenttypes/event/Event.java | 242 +++++++++++++ .../contenttypes/event/EventConstants.java | 29 ++ .../contenttypes/event/EventModule.java | 54 +++ .../contenttypes/event/Resources.properties | 26 ++ .../event/Resources_de.properties | 27 ++ .../event/Resources_fr.properties | 27 ++ .../services/org.libreccm.modules.CcmModule | 1 + ...rg.librecms.ccm-cms-types-event.properties | 4 + .../librecms/contenttypes/event/AppTest.java | 38 ++ ccm-cms-types-minutes/pom.xml | 326 ++++++++++++++++++ .../contenttypes/minutes/Minutes.java | 119 +++++++ .../minutes/MinutesConstants.java | 29 ++ .../contenttypes/minutes/MinutesModule.java | 54 +++ .../contenttypes/minutes/Resources.properties | 7 + .../minutes/Resources_de.properties | 7 + .../minutes/Resources_en_GB.properties | 7 + .../minutes/Resources_fr.properties | 7 + .../services/org.libreccm.modules.CcmModule | 1 + ....librecms.ccm-cms-types-minutes.properties | 4 + .../contenttypes/minutes/AppTest.java | 38 ++ pom.xml | 3 + 34 files changed, 1910 insertions(+), 2 deletions(-) create mode 100644 ccm-cms-types-bookmark/pom.xml create mode 100644 ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Bookmark.java create mode 100644 ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/BookmarkConstants.java create mode 100644 ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/BookmarkModule.java create mode 100755 ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources.properties create mode 100755 ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources_de.properties create mode 100755 ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources_en.properties create mode 100755 ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources_fr.properties create mode 100644 ccm-cms-types-bookmark/src/main/resources/META-INF/services/org.libreccm.modules.CcmModule create mode 100644 ccm-cms-types-bookmark/src/main/resources/module-info/org.librecms.ccm-cms-types-bookmark.properties create mode 100644 ccm-cms-types-bookmark/src/test/java/org/librecms/contenttypes/bookmark/AppTest.java create mode 100644 ccm-cms-types-event/pom.xml create mode 100644 ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Event.java create mode 100644 ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/EventConstants.java create mode 100644 ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/EventModule.java create mode 100755 ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Resources.properties create mode 100755 ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Resources_de.properties create mode 100755 ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Resources_fr.properties create mode 100644 ccm-cms-types-event/src/main/resources/META-INF/services/org.libreccm.modules.CcmModule create mode 100644 ccm-cms-types-event/src/main/resources/module-info/org.librecms.ccm-cms-types-event.properties create mode 100644 ccm-cms-types-event/src/test/java/org/librecms/contenttypes/event/AppTest.java create mode 100644 ccm-cms-types-minutes/pom.xml create mode 100644 ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Minutes.java create mode 100644 ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/MinutesConstants.java create mode 100644 ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/MinutesModule.java create mode 100755 ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources.properties create mode 100644 ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources_de.properties create mode 100755 ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources_en_GB.properties create mode 100755 ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources_fr.properties create mode 100644 ccm-cms-types-minutes/src/main/resources/META-INF/services/org.libreccm.modules.CcmModule create mode 100644 ccm-cms-types-minutes/src/main/resources/module-info/org.librecms.ccm-cms-types-minutes.properties create mode 100644 ccm-cms-types-minutes/src/test/java/org/librecms/contenttypes/minutes/AppTest.java diff --git a/ccm-cms-types-agenda/src/main/java/org/librecms/contenttypes/agenda/Agenda.java b/ccm-cms-types-agenda/src/main/java/org/librecms/contenttypes/agenda/Agenda.java index ce2807505..6cce1084e 100644 --- a/ccm-cms-types-agenda/src/main/java/org/librecms/contenttypes/agenda/Agenda.java +++ b/ccm-cms-types-agenda/src/main/java/org/librecms/contenttypes/agenda/Agenda.java @@ -29,6 +29,7 @@ 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; @@ -64,6 +65,7 @@ public class Agenda extends ContentItem implements Serializable { */ @Column(name = "AGENDADATE") @Temporal(javax.persistence.TemporalType.DATE) + @NotEmpty private Date agendaDate; /** @@ -103,11 +105,11 @@ public class Agenda extends ContentItem implements Serializable { //getter and setter: public Date getAgendaDate() { - return agendaDate; + return new Date(agendaDate.getTime()); } public void setAgendaDate(Date agendaDate) { - this.agendaDate = agendaDate; + this.agendaDate = new Date(agendaDate.getTime()); } public LocalizedString getLocation() { diff --git a/ccm-cms-types-bookmark/pom.xml b/ccm-cms-types-bookmark/pom.xml new file mode 100644 index 000000000..25cc3f446 --- /dev/null +++ b/ccm-cms-types-bookmark/pom.xml @@ -0,0 +1,326 @@ + + + + 4.0.0 + + + libreccm-parent + org.libreccm + 7.0.0-SNAPSHOT + + + + UTF-8 + ${maven.build.timestamp} + yyyy-MM-dd'T'HH:mm:ss'Z'Z + + + + org.librecms + ccm-cms-types-bookmark + 7.0.0-SNAPSHOT + + ccm-cms-types-bookmark + + + + javax + javaee-api + jar + provided + + + + org.libreccm + ccm-core + ${project.parent.version} + provided + + + + org.librecms + ccm-cms + ${project.parent.version} + provided + + + + org.hibernate + hibernate-entitymanager + + + + org.hibernate + hibernate-validator + + + + junit + junit + test + + + + org.hamcrest + hamcrest-core + test + + + org.hamcrest + hamcrest-library + test + + + + org.libreccm + ccm-testutils + ${project.parent.version} + test + + + + nl.jqno.equalsverifier + equalsverifier + test + + + + org.jboss.arquillian.junit + arquillian-junit-container + test + + + org.jboss.arquillian.extension + arquillian-persistence-dbunit + test + + + org.jboss.arquillian.extension + arquillian-transaction-impl-base + test + + + org.jboss.shrinkwrap.resolver + shrinkwrap-resolver-impl-maven + test + + + + com.h2database + h2 + test + + + + + + ccm-cms-types-bookmark + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.3 + + 1.7 + 1.7 + true + true + ${project.build.sourceEncoding} + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.18.1 + + org.libreccm.tests.categories.UnitTest + + + + + org.jacoco + jacoco-maven-plugin + 0.7.5.201505241946 + + + default-prepare-agent + + prepare-agent + + + + default-report + prepare-package + + report + + + + default-check + + check + + + + + BUNDLE + + + COMPLEXITY + COVEREDRATIO + 0.60 + + + + + + + + + + + de.jpdigital + hibernate4-ddl-maven-plugin + + + h2 + mysql5_innodb + oracle10g + postgresql9 + + + org.libreccm + + true + + + + + gen-ddl + + process-classes + + + + + + + + src/main/resources + true + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.3 + + true + true + + http://docs.oracle.com/javase/7/docs/api/ + http://docs.oracle.com/javaee/7/api/ + http://docs.jboss.org/hibernate/orm/4.3/javadocs/ + + private + true + UTF-8 + UTF-8 + UTF-8 + true + true + true + true + false + org.jboss.apiviz.APIviz + + org.jboss.apiviz + apiviz + 1.3.2.GA + + true + -sourceclasspath ${project.build.outputDirectory} + + + + + org.apache.maven.plugins + maven-jxr-plugin + 2.5 + + + org.apache.maven.plugins + maven-surefire-report-plugin + 2.18.1 + + + org.jacoco + jacoco-maven-plugin + 0.7.5.201505241946 + + + org.codehaus.mojo + findbugs-maven-plugin + 3.0.1 + + + + org.apache.maven.plugins + maven-pmd-plugin + 3.4 + + true + utf-8 + 1.7 + + /rulesets/java/basic.xml + /rulesets/java/braces.xml + /rulesets/java/clone.xml + /rulesets/java/codesize.xml + /rulesets/java/design.xml + /rulesets/java/empty.xml + /rulesets/java/finalizers.xml + /rulesets/java/imports.xml + /rulesets/java/javabeans.xml + /rulesets/java/junit.xml + /rulesets/java/naming.xml + /rulesets/java/optimizations.xml + /rulesets/java/strictexception.xml + /rulesets/java/strings.xml + /rulesets/java/sunsecure.xml + /rulesets/java/typeresolution.xml + /rulesets/java/unnecessary.xml + /rulesets/java/unusedcode.xml + + + + + org.codehaus.mojo + javancss-maven-plugin + 2.1 + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.8 + + + + dependencies + license + + + + + false + + + + + diff --git a/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Bookmark.java b/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Bookmark.java new file mode 100644 index 000000000..be4029d8f --- /dev/null +++ b/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Bookmark.java @@ -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 Alexander Konermann + * @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; + } + +} diff --git a/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/BookmarkConstants.java b/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/BookmarkConstants.java new file mode 100644 index 000000000..f23becfaf --- /dev/null +++ b/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/BookmarkConstants.java @@ -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 + } + +} diff --git a/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/BookmarkModule.java b/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/BookmarkModule.java new file mode 100644 index 000000000..5612b3d10 --- /dev/null +++ b/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/BookmarkModule.java @@ -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 + } + + +} diff --git a/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources.properties b/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources.properties new file mode 100755 index 000000000..4751efe86 --- /dev/null +++ b/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources.properties @@ -0,0 +1,2 @@ +cms.contenttypes.ui.bookmark.url=URL: +cms.contenttypes.bookmark.type_label=Bookmark diff --git a/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources_de.properties b/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources_de.properties new file mode 100755 index 000000000..5e03a1558 --- /dev/null +++ b/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources_de.properties @@ -0,0 +1,2 @@ +cms.contenttypes.ui.bookmark.url=URL: +cms.contenttypes.bookmark.type_label=Lesezeichen diff --git a/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources_en.properties b/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources_en.properties new file mode 100755 index 000000000..4751efe86 --- /dev/null +++ b/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources_en.properties @@ -0,0 +1,2 @@ +cms.contenttypes.ui.bookmark.url=URL: +cms.contenttypes.bookmark.type_label=Bookmark diff --git a/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources_fr.properties b/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources_fr.properties new file mode 100755 index 000000000..4751efe86 --- /dev/null +++ b/ccm-cms-types-bookmark/src/main/java/org/librecms/contenttypes/bookmark/Resources_fr.properties @@ -0,0 +1,2 @@ +cms.contenttypes.ui.bookmark.url=URL: +cms.contenttypes.bookmark.type_label=Bookmark diff --git a/ccm-cms-types-bookmark/src/main/resources/META-INF/services/org.libreccm.modules.CcmModule b/ccm-cms-types-bookmark/src/main/resources/META-INF/services/org.libreccm.modules.CcmModule new file mode 100644 index 000000000..88f9ea4d6 --- /dev/null +++ b/ccm-cms-types-bookmark/src/main/resources/META-INF/services/org.libreccm.modules.CcmModule @@ -0,0 +1 @@ +org.librecms.contenttypes.bookmark.Bookmark diff --git a/ccm-cms-types-bookmark/src/main/resources/module-info/org.librecms.ccm-cms-types-bookmark.properties b/ccm-cms-types-bookmark/src/main/resources/module-info/org.librecms.ccm-cms-types-bookmark.properties new file mode 100644 index 000000000..b9f3b36c8 --- /dev/null +++ b/ccm-cms-types-bookmark/src/main/resources/module-info/org.librecms.ccm-cms-types-bookmark.properties @@ -0,0 +1,4 @@ +groupId=${project.groupId} +artifactId=${project.artifactId} +version=${project.version} +build.date=${timestamp} diff --git a/ccm-cms-types-bookmark/src/test/java/org/librecms/contenttypes/bookmark/AppTest.java b/ccm-cms-types-bookmark/src/test/java/org/librecms/contenttypes/bookmark/AppTest.java new file mode 100644 index 000000000..25b511a36 --- /dev/null +++ b/ccm-cms-types-bookmark/src/test/java/org/librecms/contenttypes/bookmark/AppTest.java @@ -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 ); + } +} diff --git a/ccm-cms-types-event/pom.xml b/ccm-cms-types-event/pom.xml new file mode 100644 index 000000000..62eea7210 --- /dev/null +++ b/ccm-cms-types-event/pom.xml @@ -0,0 +1,326 @@ + + + + 4.0.0 + + + libreccm-parent + org.libreccm + 7.0.0-SNAPSHOT + + + + UTF-8 + ${maven.build.timestamp} + yyyy-MM-dd'T'HH:mm:ss'Z'Z + + + + org.librecms + ccm-cms-types-event + 7.0.0-SNAPSHOT + + ccm-cms-types-event + + + + javax + javaee-api + jar + provided + + + + org.libreccm + ccm-core + ${project.parent.version} + provided + + + + org.librecms + ccm-cms + ${project.parent.version} + provided + + + + org.hibernate + hibernate-entitymanager + + + + org.hibernate + hibernate-validator + + + + junit + junit + test + + + + org.hamcrest + hamcrest-core + test + + + org.hamcrest + hamcrest-library + test + + + + org.libreccm + ccm-testutils + ${project.parent.version} + test + + + + nl.jqno.equalsverifier + equalsverifier + test + + + + org.jboss.arquillian.junit + arquillian-junit-container + test + + + org.jboss.arquillian.extension + arquillian-persistence-dbunit + test + + + org.jboss.arquillian.extension + arquillian-transaction-impl-base + test + + + org.jboss.shrinkwrap.resolver + shrinkwrap-resolver-impl-maven + test + + + + com.h2database + h2 + test + + + + + + ccm-cms-types-event + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.3 + + 1.7 + 1.7 + true + true + ${project.build.sourceEncoding} + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.18.1 + + org.libreccm.tests.categories.UnitTest + + + + + org.jacoco + jacoco-maven-plugin + 0.7.5.201505241946 + + + default-prepare-agent + + prepare-agent + + + + default-report + prepare-package + + report + + + + default-check + + check + + + + + BUNDLE + + + COMPLEXITY + COVEREDRATIO + 0.60 + + + + + + + + + + + de.jpdigital + hibernate4-ddl-maven-plugin + + + h2 + mysql5_innodb + oracle10g + postgresql9 + + + org.libreccm + + true + + + + + gen-ddl + + process-classes + + + + + + + + src/main/resources + true + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.3 + + true + true + + http://docs.oracle.com/javase/7/docs/api/ + http://docs.oracle.com/javaee/7/api/ + http://docs.jboss.org/hibernate/orm/4.3/javadocs/ + + private + true + UTF-8 + UTF-8 + UTF-8 + true + true + true + true + false + org.jboss.apiviz.APIviz + + org.jboss.apiviz + apiviz + 1.3.2.GA + + true + -sourceclasspath ${project.build.outputDirectory} + + + + + org.apache.maven.plugins + maven-jxr-plugin + 2.5 + + + org.apache.maven.plugins + maven-surefire-report-plugin + 2.18.1 + + + org.jacoco + jacoco-maven-plugin + 0.7.5.201505241946 + + + org.codehaus.mojo + findbugs-maven-plugin + 3.0.1 + + + + org.apache.maven.plugins + maven-pmd-plugin + 3.4 + + true + utf-8 + 1.7 + + /rulesets/java/basic.xml + /rulesets/java/braces.xml + /rulesets/java/clone.xml + /rulesets/java/codesize.xml + /rulesets/java/design.xml + /rulesets/java/empty.xml + /rulesets/java/finalizers.xml + /rulesets/java/imports.xml + /rulesets/java/javabeans.xml + /rulesets/java/junit.xml + /rulesets/java/naming.xml + /rulesets/java/optimizations.xml + /rulesets/java/strictexception.xml + /rulesets/java/strings.xml + /rulesets/java/sunsecure.xml + /rulesets/java/typeresolution.xml + /rulesets/java/unnecessary.xml + /rulesets/java/unusedcode.xml + + + + + org.codehaus.mojo + javancss-maven-plugin + 2.1 + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.8 + + + + dependencies + license + + + + + false + + + + + diff --git a/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Event.java b/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Event.java new file mode 100644 index 000000000..cbf0006d5 --- /dev/null +++ b/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Event.java @@ -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. + *
+ *

+ * This class extends + * {@link org.librecms.contentsection.ContentItem content item} and adds + * extended attributes specific for an event:

+ *
+ *
lead
optional, standard text field, short description (summary), + * used as lead text
+ *
startDate
mandatory, date when it will begin
+ *
startTime
mandatory, time when it will begin
+ *
endDate
optional, date when it will end
+ *
endTime
optional, time when it will end
+ *
eventDate
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
+ *
location
optional, rich text field, description of location
+ *
mainContributor
optional, rich text field, configurable as + * hidden in the authoring kit
+ *
eventType
optional, standard text field, type of event, + * configurable as hidden in the authoring kit
+ *
mapLink
optional, standard text field, ling to a map, + * configurable as hidden in the authoring kit
+ *
cost
optional, standard text field, costs, configurable as + * hidden in the authoring kit
+ *
+ * + * @author Alexander Konermann + * @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; + } + +} diff --git a/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/EventConstants.java b/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/EventConstants.java new file mode 100644 index 000000000..ed933f41d --- /dev/null +++ b/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/EventConstants.java @@ -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 + } + +} diff --git a/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/EventModule.java b/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/EventModule.java new file mode 100644 index 000000000..e49e91ae2 --- /dev/null +++ b/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/EventModule.java @@ -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 + } + + +} diff --git a/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Resources.properties b/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Resources.properties new file mode 100755 index 000000000..804f24326 --- /dev/null +++ b/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Resources.properties @@ -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. diff --git a/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Resources_de.properties b/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Resources_de.properties new file mode 100755 index 000000000..a07f25f24 --- /dev/null +++ b/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Resources_de.properties @@ -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. diff --git a/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Resources_fr.properties b/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Resources_fr.properties new file mode 100755 index 000000000..170ccdbb1 --- /dev/null +++ b/ccm-cms-types-event/src/main/java/org/librecms/contenttypes/event/Resources_fr.properties @@ -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. diff --git a/ccm-cms-types-event/src/main/resources/META-INF/services/org.libreccm.modules.CcmModule b/ccm-cms-types-event/src/main/resources/META-INF/services/org.libreccm.modules.CcmModule new file mode 100644 index 000000000..05d21f1fd --- /dev/null +++ b/ccm-cms-types-event/src/main/resources/META-INF/services/org.libreccm.modules.CcmModule @@ -0,0 +1 @@ +org.librecms.contenttypes.event.Event diff --git a/ccm-cms-types-event/src/main/resources/module-info/org.librecms.ccm-cms-types-event.properties b/ccm-cms-types-event/src/main/resources/module-info/org.librecms.ccm-cms-types-event.properties new file mode 100644 index 000000000..b9f3b36c8 --- /dev/null +++ b/ccm-cms-types-event/src/main/resources/module-info/org.librecms.ccm-cms-types-event.properties @@ -0,0 +1,4 @@ +groupId=${project.groupId} +artifactId=${project.artifactId} +version=${project.version} +build.date=${timestamp} diff --git a/ccm-cms-types-event/src/test/java/org/librecms/contenttypes/event/AppTest.java b/ccm-cms-types-event/src/test/java/org/librecms/contenttypes/event/AppTest.java new file mode 100644 index 000000000..25b511a36 --- /dev/null +++ b/ccm-cms-types-event/src/test/java/org/librecms/contenttypes/event/AppTest.java @@ -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 ); + } +} diff --git a/ccm-cms-types-minutes/pom.xml b/ccm-cms-types-minutes/pom.xml new file mode 100644 index 000000000..43dbe88c9 --- /dev/null +++ b/ccm-cms-types-minutes/pom.xml @@ -0,0 +1,326 @@ + + + + 4.0.0 + + + libreccm-parent + org.libreccm + 7.0.0-SNAPSHOT + + + + UTF-8 + ${maven.build.timestamp} + yyyy-MM-dd'T'HH:mm:ss'Z'Z + + + + org.librecms + ccm-cms-types-minutes + 7.0.0-SNAPSHOT + + ccm-cms-types-minutes + + + + javax + javaee-api + jar + provided + + + + org.libreccm + ccm-core + ${project.parent.version} + provided + + + + org.librecms + ccm-cms + ${project.parent.version} + provided + + + + org.hibernate + hibernate-entitymanager + + + + org.hibernate + hibernate-validator + + + + junit + junit + test + + + + org.hamcrest + hamcrest-core + test + + + org.hamcrest + hamcrest-library + test + + + + org.libreccm + ccm-testutils + ${project.parent.version} + test + + + + nl.jqno.equalsverifier + equalsverifier + test + + + + org.jboss.arquillian.junit + arquillian-junit-container + test + + + org.jboss.arquillian.extension + arquillian-persistence-dbunit + test + + + org.jboss.arquillian.extension + arquillian-transaction-impl-base + test + + + org.jboss.shrinkwrap.resolver + shrinkwrap-resolver-impl-maven + test + + + + com.h2database + h2 + test + + + + + + ccm-cms-types-minutes + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.3 + + 1.7 + 1.7 + true + true + ${project.build.sourceEncoding} + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.18.1 + + org.libreccm.tests.categories.UnitTest + + + + + org.jacoco + jacoco-maven-plugin + 0.7.5.201505241946 + + + default-prepare-agent + + prepare-agent + + + + default-report + prepare-package + + report + + + + default-check + + check + + + + + BUNDLE + + + COMPLEXITY + COVEREDRATIO + 0.60 + + + + + + + + + + + de.jpdigital + hibernate4-ddl-maven-plugin + + + h2 + mysql5_innodb + oracle10g + postgresql9 + + + org.libreccm + + true + + + + + gen-ddl + + process-classes + + + + + + + + src/main/resources + true + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.3 + + true + true + + http://docs.oracle.com/javase/7/docs/api/ + http://docs.oracle.com/javaee/7/api/ + http://docs.jboss.org/hibernate/orm/4.3/javadocs/ + + private + true + UTF-8 + UTF-8 + UTF-8 + true + true + true + true + false + org.jboss.apiviz.APIviz + + org.jboss.apiviz + apiviz + 1.3.2.GA + + true + -sourceclasspath ${project.build.outputDirectory} + + + + + org.apache.maven.plugins + maven-jxr-plugin + 2.5 + + + org.apache.maven.plugins + maven-surefire-report-plugin + 2.18.1 + + + org.jacoco + jacoco-maven-plugin + 0.7.5.201505241946 + + + org.codehaus.mojo + findbugs-maven-plugin + 3.0.1 + + + + org.apache.maven.plugins + maven-pmd-plugin + 3.4 + + true + utf-8 + 1.7 + + /rulesets/java/basic.xml + /rulesets/java/braces.xml + /rulesets/java/clone.xml + /rulesets/java/codesize.xml + /rulesets/java/design.xml + /rulesets/java/empty.xml + /rulesets/java/finalizers.xml + /rulesets/java/imports.xml + /rulesets/java/javabeans.xml + /rulesets/java/junit.xml + /rulesets/java/naming.xml + /rulesets/java/optimizations.xml + /rulesets/java/strictexception.xml + /rulesets/java/strings.xml + /rulesets/java/sunsecure.xml + /rulesets/java/typeresolution.xml + /rulesets/java/unnecessary.xml + /rulesets/java/unusedcode.xml + + + + + org.codehaus.mojo + javancss-maven-plugin + 2.1 + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.8 + + + + dependencies + license + + + + + false + + + + + diff --git a/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Minutes.java b/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Minutes.java new file mode 100644 index 000000000..f03a3b43c --- /dev/null +++ b/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Minutes.java @@ -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 Alexander Konermann + * @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; + } + +} diff --git a/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/MinutesConstants.java b/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/MinutesConstants.java new file mode 100644 index 000000000..19a71dff4 --- /dev/null +++ b/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/MinutesConstants.java @@ -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 + } + +} diff --git a/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/MinutesModule.java b/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/MinutesModule.java new file mode 100644 index 000000000..99751d6d7 --- /dev/null +++ b/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/MinutesModule.java @@ -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 + } + + +} diff --git a/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources.properties b/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources.properties new file mode 100755 index 000000000..006728e83 --- /dev/null +++ b/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources.properties @@ -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 diff --git a/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources_de.properties b/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources_de.properties new file mode 100644 index 000000000..b4eb3447b --- /dev/null +++ b/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources_de.properties @@ -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 diff --git a/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources_en_GB.properties b/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources_en_GB.properties new file mode 100755 index 000000000..006728e83 --- /dev/null +++ b/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources_en_GB.properties @@ -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 diff --git a/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources_fr.properties b/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources_fr.properties new file mode 100755 index 000000000..a27609cea --- /dev/null +++ b/ccm-cms-types-minutes/src/main/java/org/librecms/contenttypes/minutes/Resources_fr.properties @@ -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 diff --git a/ccm-cms-types-minutes/src/main/resources/META-INF/services/org.libreccm.modules.CcmModule b/ccm-cms-types-minutes/src/main/resources/META-INF/services/org.libreccm.modules.CcmModule new file mode 100644 index 000000000..9214bc724 --- /dev/null +++ b/ccm-cms-types-minutes/src/main/resources/META-INF/services/org.libreccm.modules.CcmModule @@ -0,0 +1 @@ +org.librecms.contenttypes.minutes.Minutes diff --git a/ccm-cms-types-minutes/src/main/resources/module-info/org.librecms.ccm-cms-types-minutes.properties b/ccm-cms-types-minutes/src/main/resources/module-info/org.librecms.ccm-cms-types-minutes.properties new file mode 100644 index 000000000..b9f3b36c8 --- /dev/null +++ b/ccm-cms-types-minutes/src/main/resources/module-info/org.librecms.ccm-cms-types-minutes.properties @@ -0,0 +1,4 @@ +groupId=${project.groupId} +artifactId=${project.artifactId} +version=${project.version} +build.date=${timestamp} diff --git a/ccm-cms-types-minutes/src/test/java/org/librecms/contenttypes/minutes/AppTest.java b/ccm-cms-types-minutes/src/test/java/org/librecms/contenttypes/minutes/AppTest.java new file mode 100644 index 000000000..25b511a36 --- /dev/null +++ b/ccm-cms-types-minutes/src/test/java/org/librecms/contenttypes/minutes/AppTest.java @@ -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 ); + } +} diff --git a/pom.xml b/pom.xml index a6961d4dc..2c65f1690 100644 --- a/pom.xml +++ b/pom.xml @@ -50,6 +50,9 @@ ccm-cms-types-article ccm-cms-types-agenda ccm-cms-types-decisiontree + ccm-cms-types-bookmark + ccm-cms-types-event + ccm-cms-types-minutes