ResarchReport Contenttype

git-svn-id: https://svn.libreccm.org/ccm/trunk@1920 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2012-11-10 19:08:00 +00:00
parent 5f588035da
commit e0ffd9fd30
39 changed files with 435 additions and 7 deletions

View File

@ -0,0 +1,25 @@
<?xml version="1.0"?>
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-sci-publications-researchreport"
prettyName="SciPublications ResearchReport"
version="6.6.3"
release="1"
webapp="ROOT">
<ccm:dependencies>
<ccm:requires name="ccm-core" version="6.6.4" relation="ge"/>
<ccm:requires name="ccm-cms" version="6.6.7" relation="ge"/>
<ccm:requires name="ccm-sci-publications" version="6.6.3" relation="ge"/>
</ccm:dependencies>
<ccm:directories>
<ccm:directory name="pdl"/>
<ccm:directory name="sql"/>
<ccm:directory name="src"/>
</ccm:directories>
<ccm:contacts>
<ccm:contact uri="http://www.redhat.com/software/rhea" type="website"/>
<ccm:contact uri="mailto:rhea@redhat.com" type="support"/>
</ccm:contacts>
<ccm:description>
Additional content type Research Report for the ccm-sci-publications module.
</ccm:description>
</ccm:application>

View File

@ -0,0 +1,3 @@
@ ddl/oracle-se/create.sql
@ ddl/oracle-se/deferred.sql

View File

@ -0,0 +1,29 @@
//
// Copyright (C) 2012 Jens Pelzetter
//
// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
//
model com.arsdigita.cms.contenttypes;
import com.arsdigita.cms.ContentPage;
// PDL definition for a working paper
object type ResearchReport extends UnPublished {
reference key (ct_researchreport.researchreport_id);
}

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
<ctd:content-type
label="SciPublications/ResearchReport"
description="Base type for Research reports"
objectType="com.arsdigita.cms.contenttypes.ResearchReport"
classname="com.arsdigita.cms.contenttypes.ResearchReport">
<ctd:authoring-kit createComponent="com.arsdigita.cms.contenttypes.ui.UnPublishedCreate">
<ctd:authoring-step
labelKey="publications.ui.workingPaper_properties.title"
labelBundle="com.arsdigita.cms.contenttypes.ui.ResearchReportResources"
descriptionKey="publications.ui.researchreport.basic_properties.description"
descriptionBundle="com.arsdigita.cms.contenttypes.ui.ResearchReportResources"
component="com.arsdigita.cms.contenttypes.ui.ResearchReportPropertiesStep"
ordering="1"/>
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
</ctd:authoring-kit>
</ctd:content-type>
</ctd:content-types>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<xrd:adapters
xmlns:xrd="http://xmlns.redhat.com/schemas/waf/xml-renderer-rules"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://rhea.redhat.com/schemas/waf/xml-renderer-rules xml-renderer-rules.xsd">
<xrd:context name="com.arsdigita.cms.dispatcher.SimpleXMLGenerator" >
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.ResearchReport"
extends="com.arsdigita.cms.contenttypes.Publication">
<xrd:associations rule="include">
<xrd:property name="/object/organization"/>
</xrd:associations>
</xrd:adapter>
</xrd:context>
</xrd:adapters>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<registry>
<!-- Nothing yet -->
</registry>

View File

@ -0,0 +1,18 @@
<load>
<requires>
<table name="inits"/>
<table name="acs_objects"/>
<table name="cms_items"/>
<table name="ct_publications"/>
<initializer class="com.arsdigita.cms.Initializer"/>
<initializer class="com.arsdigita.cms.contenttypes.UnPublishedInitializer"/>
</requires>
<provides>
<table name="ct_researchreport"/>
<initializer class="com.arsdigita.cms.contenttypes.ResearchReportInitializer"/>
</provides>
<scripts>
<schema directory="ccm-sci-publications-researchreport"/>
<data class="com.arsdigita.cms.contenttypes.ResearchReportLoader"/>
</scripts>
</load>

View File

@ -0,0 +1,54 @@
/*
* Copyright (c) 2012 Jens Pelzetter,
* ScientificCMS Team, http://www.scientificcms.org
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes;
import com.arsdigita.persistence.DataObject;
import com.arsdigita.persistence.OID;
import java.math.BigDecimal;
/**
*
* @author Jens Pelzetter <jens@jp-digital.de>
* @version $Id$
*/
public class ResearchReport extends UnPublished {
public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.ResearchReport";
public ResearchReport() {
this(BASE_DATA_OBJECT_TYPE);
}
public ResearchReport(final BigDecimal id) {
this(new OID(BASE_DATA_OBJECT_TYPE, id));
}
public ResearchReport(final OID oid) {
super(oid);
}
public ResearchReport(final DataObject dataObject) {
super(dataObject);
}
public ResearchReport(final String type) {
super(type);
}
}

View File

@ -0,0 +1,42 @@
/*
* Copyright (c) 2012 Jens Pelzetter,
* ScientificCMS Team, http://www.scientificcms.org
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes;
/**
*
* @author Jens Pelzetter <jens@jp-digital.de>
* @version $Id$
*/
public class ResearchReportInitializer extends ContentTypeInitializer {
public ResearchReportInitializer() {
super("ccm-sci-publications-researchreport.pdl.mf", ResearchReport.BASE_DATA_OBJECT_TYPE);
}
@Override
public String[] getStylesheets() {
return new String[]{INTERNAL_THEME_TYPES_DIR + "sci/ResearchReport.xsl"};
}
@Override
public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/ResearchReport.xml";
}
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (c) 2012 Jens Pelzetter,
* ScientificCMS Team, http://www.scientificcms.org
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes;
/**
*
* @author Jens Pelzetter <jens@jp-digital.de>
* @version $Id$
*/
public class ResearchReportLoader extends AbstractContentTypeLoader {
private static final String[] TYPES = {"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ResearchReport.xml"};
public ResearchReportLoader() {
super();
}
public String[] getTypes() {
return TYPES;
}
}

View File

@ -0,0 +1,69 @@
/*
* Copyright (c) 2012 Jens Pelzetter,
* ScientificCMS Team, http://www.scientificcms.org
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.bebop.Label;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicPageForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
/**
*
* @author Jens Pelzetter <jens@jp-digital.de>
* @version $Id$
*/
public class ResearchReportPropertiesStep extends UnPublishedPropertiesStep {
public ResearchReportPropertiesStep(final ItemSelectionModel itemModel, final AuthoringKitWizard parent) {
super(itemModel, parent);
}
public static Component getResearchReportPropertiesSheet(final ItemSelectionModel itemModel) {
final DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) getUnPublishedPropertySheet(itemModel);
return sheet;
}
@Override
protected void addBasicProperties(final ItemSelectionModel itemModel, final AuthoringKitWizard parent) {
final SimpleEditStep basicProperties = new SimpleEditStep(itemModel, parent, EDIT_SHEET_NAME);
final BasicPageForm editBasicSheet = new ResearchReportPropertyForm(itemModel, this);
basicProperties.add(
EDIT_SHEET_NAME,
(String) PublicationGlobalizationUtil.globalize("publications.ui.publication.edit_basic_sheet").
localize(),
new WorkflowLockedComponentAccess(editBasicSheet, itemModel),
editBasicSheet.getSaveCancelSection().getCancelButton());
basicProperties.setDisplayComponent(getResearchReportPropertiesSheet(itemModel));
getSegmentedPanel().addSegment(
new Label((String) PublicationGlobalizationUtil.
globalize("publications.ui.publication.basic_properties").localize()),
basicProperties);
}
}

View File

@ -0,0 +1,62 @@
/*
* Copyright (c) 2012 Jens Pelzetter,
* ScientificCMS Team, http://www.scientificcms.org
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.event.FormInitListener;
import com.arsdigita.bebop.event.FormProcessListener;
import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.event.FormSubmissionListener;
import com.arsdigita.cms.ItemSelectionModel;
/**
*
* @author Jens Pelzetter <jens@jp-digital.de>
*/
public class ResearchReportPropertyForm extends UnPublishedPropertyForm implements FormInitListener,
FormProcessListener,
FormSubmissionListener{
public static final String ID = "ResearchReportEdit";
public ResearchReportPropertyForm(final ItemSelectionModel itemModel) {
this(itemModel, null);
}
public ResearchReportPropertyForm(final ItemSelectionModel itemModel, ResearchReportPropertiesStep step) {
super(itemModel, step);
addSubmissionListener(this);
}
// @Override
// protected void addWidgets() {
// super.addWidgets();
// }
// @Override
// public void init(final FormSectionEvent fse) throws FormProcessException {
// super.init(fse);
// }
// @Override
// public void process(final FormSectionEvent fse) throws FormProcessException {
// super.process(fse);
// }
}

View File

@ -0,0 +1,5 @@
# To change this template, choose Tools | Templates
# and open the template in the editor.
publications.ui.workingPaper_properties.title=Basic properties
publications.ui.researchreport.basic_properties.description=Basic properties

View File

@ -0,0 +1,5 @@
# To change this template, choose Tools | Templates
# and open the template in the editor.
publications.ui.workingPaper_properties.title=Basiseigenschaften
publications.ui.researchreport.basic_properties.description=Basiseigenschaften

View File

@ -0,0 +1,19 @@
<!DOCTYPE stylesheet [
<!ENTITY nbsp "&#160;" ><!-- no-break space = non-breaking space, U+00A0 ISOnum -->
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:cms="http://www.arsdigita.com/cms/1.0"
version="1.0">
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.ResearchReport']" mode="cms:CT_graphics"
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_ResearchReport">
<p><xsl:value-of select="./name"/></p>
</xsl:template>
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.ResearchReport']" mode="cms:CT_text"
name="cms:CT_text_com_arsdigita_cms_contenttypes_ResearchReport">
<p><xsl:value-of select="./name"/></p>
</xsl:template>
</xsl:stylesheet>

View File

@ -6,8 +6,8 @@
release="1" release="1"
webapp="ROOT"> webapp="ROOT">
<ccm:dependencies> <ccm:dependencies>
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/> <ccm:requires name="ccm-core" version="6.6.4" relation="ge"/>
<ccm:requires name="ccm-cms" version="6.6.6" relation="ge"/> <ccm:requires name="ccm-cms" version="6.6.7" relation="ge"/>
</ccm:dependencies> </ccm:dependencies>
<ccm:directories> <ccm:directories>
<ccm:directory name="pdl"/> <ccm:directory name="pdl"/>

View File

@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2010 Jens Pelzetter, * Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen * ScientificCMS Team, http://www.scientificcms.org
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * modify it under the terms of the GNU Lesser General Public License
@ -26,6 +26,7 @@ import java.math.BigDecimal;
/** /**
* *
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$
*/ */
public class WorkingPaper extends UnPublished { public class WorkingPaper extends UnPublished {

View File

@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2010 Jens Pelzetter, * Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen * ScientificCMS Team, http://www.scientificcms.org
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * modify it under the terms of the GNU Lesser General Public License

View File

@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2010 Jens Pelzetter, * Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen * ScientificCMS Team, http://www.scientificcms.org
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * modify it under the terms of the GNU Lesser General Public License
@ -22,6 +22,7 @@ package com.arsdigita.cms.contenttypes;
/** /**
* *
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$
*/ */
public class WorkingPaperLoader extends AbstractContentTypeLoader { public class WorkingPaperLoader extends AbstractContentTypeLoader {

View File

@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2010 Jens Pelzetter, * Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen * ScientificCMS Team, http://www.scientificcms.org
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * modify it under the terms of the GNU Lesser General Public License
@ -35,6 +35,7 @@ import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
/** /**
* *
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$
*/ */
public class WorkingPaperPropertiesStep extends UnPublishedPropertiesStep { public class WorkingPaperPropertiesStep extends UnPublishedPropertiesStep {

View File

@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2010 Jens Pelzetter, * Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen * ScientificCMS Team, http://www.scientificcms.org
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * modify it under the terms of the GNU Lesser General Public License
@ -33,6 +33,7 @@ import com.arsdigita.cms.contenttypes.WorkingPaper;
/** /**
* *
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$
*/ */
public class WorkingPaperPropertyForm public class WorkingPaperPropertyForm
extends UnPublishedPropertyForm extends UnPublishedPropertyForm