CCM NG: added contenttypes externallink,faqitem,newsitem,glossaryitem
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@3746 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
c433cadaae
commit
a84c6ad626
|
|
@ -1,5 +1,20 @@
|
|||
/*
|
||||
* Add your license here, for example LGPL
|
||||
* 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.externallink;
|
||||
|
||||
|
|
@ -10,13 +25,69 @@ import org.hibernate.envers.Audited;
|
|||
import org.librecms.contentsection.ContentItem;
|
||||
|
||||
import java.io.Serializable;
|
||||
import javax.persistence.Column;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
import org.libreccm.l10n.LocalizedString;
|
||||
|
||||
/**
|
||||
* This content type represents an redirect to an external link or an other
|
||||
* resource identified by an URL.
|
||||
*
|
||||
* The item stores a description text about the link/resource and an URL.
|
||||
*
|
||||
* @author <a href="mailto:konerman@tzi.de">Alexander Konermann</a>
|
||||
* @version 25/11/2015
|
||||
*/
|
||||
@Entity
|
||||
@Audited
|
||||
@Table(name = "${type_name}", schema = DB_SCHEMA)
|
||||
public class Externallink extends ContentItem implements Serializable {
|
||||
|
||||
@Column(name = "URL")
|
||||
private LocalizedString url;
|
||||
|
||||
@Column(name = "COMMENT")
|
||||
private LocalizedString comment;
|
||||
|
||||
@Column(name = "SHOWCOMMENT")
|
||||
private boolean SHOWCOMMENT;
|
||||
|
||||
@Column(name = "TARGETNEWWINDOW")
|
||||
private boolean TargetNewWindow;
|
||||
|
||||
//Getter and setter:
|
||||
public LocalizedString getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(LocalizedString url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public LocalizedString getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setComment(LocalizedString comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public boolean isSHOWCOMMENT() {
|
||||
return SHOWCOMMENT;
|
||||
}
|
||||
|
||||
public void setSHOWCOMMENT(boolean SHOWCOMMENT) {
|
||||
this.SHOWCOMMENT = SHOWCOMMENT;
|
||||
}
|
||||
|
||||
public boolean isTargetNewWindow() {
|
||||
return TargetNewWindow;
|
||||
}
|
||||
|
||||
public void setTargetNewWindow(boolean TargetNewWindow) {
|
||||
this.TargetNewWindow = TargetNewWindow;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
* 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.externallink;
|
||||
|
||||
public class ExternallinkConstants {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,20 @@
|
|||
/**
|
||||
* Add your license here, for example LGPL
|
||||
/*
|
||||
* 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.externallink;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,20 @@
|
|||
/*
|
||||
* Add your license here, for example LGPL
|
||||
* 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.faqitem;
|
||||
|
||||
|
|
@ -7,15 +22,60 @@ import org.hibernate.envers.Audited;
|
|||
import org.librecms.contentsection.ContentItem;
|
||||
|
||||
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 static org.librecms.contenttypes.faqitem.FAQitemConstants.*;
|
||||
|
||||
/**
|
||||
* This content type represents a FAQitem.
|
||||
*
|
||||
* @author <a href="mailto:konerman@tzi.de">Alexander Konermann</a>
|
||||
* @version 25/11/2015
|
||||
*/
|
||||
@Entity
|
||||
@Audited
|
||||
@Table(name = "${type_name}", schema = DB_SCHEMA)
|
||||
public class FAQitem extends ContentItem implements Serializable {
|
||||
|
||||
@Column(name = "QUESTION")
|
||||
@NotEmpty
|
||||
private LocalizedString question;
|
||||
|
||||
@Column(name = "ANSWER")
|
||||
@NotEmpty
|
||||
private LocalizedString answer;
|
||||
|
||||
@Column(name = "SECTIONNAME")
|
||||
private LocalizedString sectionName;
|
||||
|
||||
//Getter and setter:
|
||||
public LocalizedString getQuestion() {
|
||||
return question;
|
||||
}
|
||||
|
||||
public void setQuestion(LocalizedString question) {
|
||||
this.question = question;
|
||||
}
|
||||
|
||||
public LocalizedString getAnswer() {
|
||||
return answer;
|
||||
}
|
||||
|
||||
public void setAnswer(LocalizedString answer) {
|
||||
this.answer = answer;
|
||||
}
|
||||
|
||||
public LocalizedString getSectionName() {
|
||||
return sectionName;
|
||||
}
|
||||
|
||||
public void setSectionName(LocalizedString sectionName) {
|
||||
this.sectionName = sectionName;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
* 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.faqitem;
|
||||
|
||||
public class FAQitemConstants {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,20 @@
|
|||
/**
|
||||
* Add your license here, for example LGPL
|
||||
/*
|
||||
* 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.faqitem;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,20 @@
|
|||
/*
|
||||
* Add your license here, for example LGPL
|
||||
* 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.glossaryitem;
|
||||
|
||||
|
|
@ -9,13 +24,36 @@ import org.hibernate.envers.Audited;
|
|||
import org.librecms.contentsection.ContentItem;
|
||||
|
||||
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 GlossaryItem.
|
||||
*
|
||||
* @author <a href="mailto:konerman@tzi.de">Alexander Konermann</a>
|
||||
* @version 25/11/2015
|
||||
*/
|
||||
@Entity
|
||||
@Audited
|
||||
@Table(name = "${type_name}", schema = DB_SCHEMA)
|
||||
public class Glossaryitem extends ContentItem implements Serializable {
|
||||
|
||||
@Column(name = "DEFINITION")
|
||||
@NotEmpty
|
||||
private LocalizedString definition;
|
||||
|
||||
//Getter and setter:
|
||||
public LocalizedString getDefinition() {
|
||||
return definition;
|
||||
}
|
||||
|
||||
public void setDefinition(LocalizedString definition) {
|
||||
this.definition = definition;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
* 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.glossaryitem;
|
||||
|
||||
public class GlossaryitemConstants {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,20 @@
|
|||
/**
|
||||
* Add your license here, for example LGPL
|
||||
/*
|
||||
* 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.glossaryitem;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,20 @@
|
|||
/*
|
||||
* Add your license here, for example LGPL
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.librecms.contenttypes.newsitem;
|
||||
|
||||
|
|
@ -10,13 +25,71 @@ import org.hibernate.envers.Audited;
|
|||
import org.librecms.contentsection.ContentItem;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import javax.persistence.Column;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
import org.libreccm.l10n.LocalizedString;
|
||||
|
||||
/**
|
||||
* This content type represents a newsitem.
|
||||
*
|
||||
* @author <a href="mailto:konerman@tzi.de">Alexander Konermann</a>
|
||||
* @version 25/11/2015
|
||||
*/
|
||||
@Entity
|
||||
@Audited
|
||||
@Table(name = "${type_name}", schema = DB_SCHEMA)
|
||||
public class Newsitem extends ContentItem implements Serializable {
|
||||
|
||||
/**
|
||||
* The tease/lead paragraph for the news item
|
||||
*/
|
||||
@Column(name = "LEAD")
|
||||
private LocalizedString lead;
|
||||
|
||||
/**
|
||||
* The date for the news item
|
||||
*/
|
||||
@Column(name = "NEWSDATE")
|
||||
@Temporal(javax.persistence.TemporalType.DATE)
|
||||
private Date newsDate;
|
||||
|
||||
/**
|
||||
* True, if it is a Homepage
|
||||
*/
|
||||
@Column(name = "ISHOMEPAGE")
|
||||
@NotEmpty
|
||||
private boolean isHompage;
|
||||
|
||||
|
||||
//Getter and setter:
|
||||
public LocalizedString getLead() {
|
||||
return lead;
|
||||
}
|
||||
|
||||
public void setLead(LocalizedString lead) {
|
||||
this.lead = lead;
|
||||
}
|
||||
|
||||
public Date getNewsDate() {
|
||||
return newsDate;
|
||||
}
|
||||
|
||||
public void setNewsDate(Date newsDate) {
|
||||
this.newsDate = newsDate;
|
||||
}
|
||||
|
||||
public boolean isIsHompage() {
|
||||
return isHompage;
|
||||
}
|
||||
|
||||
public void setIsHompage(boolean isHompage) {
|
||||
this.isHompage = isHompage;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.librecms.contenttypes.newsitem;
|
||||
|
||||
public class NewsitemConstants {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,20 @@
|
|||
/**
|
||||
* Add your license here, for example LGPL
|
||||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.librecms.contenttypes.newsitem;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue