- Neuer Content-Typ ccm-cms-types-simpleorganization (Ticket #587)
- Falschen Eintrag in ccm-cms-types-organization/src/ccm-cms-types-organization.config entfernt (Ticket #1102) git-svn-id: https://svn.libreccm.org/ccm/trunk@1611 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
af807b85ff
commit
ae8f7d1999
|
|
@ -1,7 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<registry>
|
<registry>
|
||||||
<!-- NOTHING to config here ???
|
|
||||||
<config class="com.arsdigita.cms.contenttypes.SciOrganizationConfig"
|
|
||||||
storage="ccm-sci-types-organization/SciOrganization.properties"/>
|
|
||||||
-->
|
|
||||||
</registry>
|
</registry>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
|
||||||
|
name="ccm-cms-types-simpleorganization"
|
||||||
|
prettyName="Simple contenttype which exposed GenericOrganizationalUnit"
|
||||||
|
version = "6.6.6"
|
||||||
|
release="1"
|
||||||
|
webapp="ROOT">
|
||||||
|
|
||||||
|
<ccm:dependencies>
|
||||||
|
<ccm:requires name="ccm-core" version="6.6.3" relation="ge"/>
|
||||||
|
<ccm:requires name="ccm-cms" version="6.6.7" relation="ge"/>
|
||||||
|
</ccm:dependencies>
|
||||||
|
<ccm:directories>
|
||||||
|
<ccm:directory name="pdl"/>
|
||||||
|
<ccm:directory name="sql"/>
|
||||||
|
<ccm:directory name="src"/>
|
||||||
|
</ccm:directories>s
|
||||||
|
<ccm:contacts>
|
||||||
|
<ccm:contact uri="http://www.scientificcms.org" type="website"/>
|
||||||
|
<ccm:contact uri="mailto:info@scientificcms.org" type="support"/>
|
||||||
|
</ccm:contacts>
|
||||||
|
<ccm:description>
|
||||||
|
Exposed GenericOrganizationalUnit
|
||||||
|
</ccm:description>
|
||||||
|
</ccm:application>
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
model com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import com.arsdigita.kernel.ACSObject;
|
||||||
|
import com.arsdigita.cms.*;
|
||||||
|
|
||||||
|
object type SimpleOrganization extends GenericOrganizationalUnit {
|
||||||
|
reference key (ct_simpleorganizations.organization_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
object type SimpleOrganizationBundle extends GenericOrganizationalUnitBundle {
|
||||||
|
reference key (ct_simpleorganization_bundles.bundle_id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?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="SimpleOrganization"
|
||||||
|
description="Exposed GenericOrganizationalUnit"
|
||||||
|
objectType="com.arsdigita.cms.contenttypes.SimpleOrganization"
|
||||||
|
classname="com.arsdigita.cms.contenttypes.SimpleOrganization">
|
||||||
|
|
||||||
|
<ctd:authoring-kit createComponent="com.arsdigita.cms.contenttypes.ui.SimpleOrganizationCreate">
|
||||||
|
|
||||||
|
<ctd:authoring-step
|
||||||
|
labelKey="sciorganization.ui.simpleorganization_properties.title"
|
||||||
|
labelBundle="com.arsdigita.cms.contenttypes.ui.SimpleOrganizationResources"
|
||||||
|
descriptionKey="sciorganization.ui.simpleorganization_properties.title"
|
||||||
|
descriptionBundle="com.arsdigita.cms.contenttypes.ui.SimpleOrganizationResources"
|
||||||
|
component="com.arsdigita.cms.contenttypes.ui.SimpleOrganizationPropertiesStep"
|
||||||
|
ordering="1"/>
|
||||||
|
|
||||||
|
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
|
||||||
|
|
||||||
|
</ctd:authoring-kit>
|
||||||
|
|
||||||
|
</ctd:content-type>
|
||||||
|
|
||||||
|
</ctd:content-types>
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?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.SimpleOrganization" extends="com.arsdigita.cms.ContentPage">
|
||||||
|
</xrd:adapter>
|
||||||
|
</xrd:context>
|
||||||
|
|
||||||
|
</xrd:adapters>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<registry>
|
||||||
|
</registry>
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<load>
|
||||||
|
<requires>
|
||||||
|
<table name="inits"/>
|
||||||
|
<table name="acs_objects"/>
|
||||||
|
<table name="cms_items"/>
|
||||||
|
<initializer class="com.arsdigita.cms.Initializer"/>
|
||||||
|
</requires>
|
||||||
|
<provides>
|
||||||
|
<table name="ct_simpleorganizations"/>
|
||||||
|
<initializer class="com.arsdigita.cms.contenttypes.SimpleOrganizationInitializer"/>
|
||||||
|
</provides>
|
||||||
|
<scripts>
|
||||||
|
<schema directory="ccm-cms-types-simpleorganization"/>
|
||||||
|
<data class="com.arsdigita.cms.contenttypes.SimpleOrganizationLoader"/>
|
||||||
|
</scripts>
|
||||||
|
</load>
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
|
import com.arsdigita.persistence.DataObject;
|
||||||
|
import com.arsdigita.persistence.OID;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
public class SimpleOrganization extends GenericOrganizationalUnit {
|
||||||
|
|
||||||
|
public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.SimpleOrganization";
|
||||||
|
|
||||||
|
public SimpleOrganization() {
|
||||||
|
super(BASE_DATA_OBJECT_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SimpleOrganization(final BigDecimal id) throws DataObjectNotFoundException {
|
||||||
|
this(new OID(BASE_DATA_OBJECT_TYPE, id));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SimpleOrganization(final OID oid) throws DataObjectNotFoundException {
|
||||||
|
super(oid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SimpleOrganization(final DataObject dobj) {
|
||||||
|
super(dobj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SimpleOrganization(final String type) {
|
||||||
|
super(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import com.arsdigita.cms.ContentItem;
|
||||||
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
|
import com.arsdigita.persistence.DataObject;
|
||||||
|
import com.arsdigita.persistence.OID;
|
||||||
|
import com.arsdigita.util.Assert;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
public class SimpleOrganizationBundle extends GenericOrganizationalUnitBundle {
|
||||||
|
|
||||||
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
|
"com.arsdigita.cms.contenttypes.SimpleOrganizationBundle";
|
||||||
|
|
||||||
|
public SimpleOrganizationBundle(final ContentItem primary) {
|
||||||
|
super(BASE_DATA_OBJECT_TYPE);
|
||||||
|
|
||||||
|
Assert.exists(primary, ContentItem.class);
|
||||||
|
|
||||||
|
setDefaultLanguage(primary.getLanguage());
|
||||||
|
setContentType(primary.getContentType());
|
||||||
|
addInstance(primary);
|
||||||
|
|
||||||
|
setName(primary.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
public SimpleOrganizationBundle(final OID oid)
|
||||||
|
throws DataObjectNotFoundException {
|
||||||
|
super(oid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SimpleOrganizationBundle(final BigDecimal id)
|
||||||
|
throws DataObjectNotFoundException {
|
||||||
|
super(new OID(BASE_DATA_OBJECT_TYPE, id));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SimpleOrganizationBundle(final DataObject dobj) {
|
||||||
|
super(dobj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SimpleOrganizationBundle(final String type) {
|
||||||
|
super(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SimpleOrganization getOrganization() {
|
||||||
|
return (SimpleOrganization) getPrimaryInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
public SimpleOrganization getOrganization(final String language) {
|
||||||
|
return (SimpleOrganization) getInstance(language);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
public class SimpleOrganizationInitializer extends ContentTypeInitializer {
|
||||||
|
|
||||||
|
public SimpleOrganizationInitializer() {
|
||||||
|
super("ccm-cms-types-simpleorganization.pdl.mf",
|
||||||
|
SimpleOrganization.BASE_DATA_OBJECT_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getStylesheets() {
|
||||||
|
return new String[]{INTERNAL_THEME_TYPES_DIR + "SimpleOrganization.xsl"};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTraversalXML() {
|
||||||
|
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SimpleOrganization.xml";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
public class SimpleOrganizationLoader extends AbstractContentTypeLoader {
|
||||||
|
|
||||||
|
public SimpleOrganizationLoader() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final String[] TYPES = {
|
||||||
|
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SimpleOrganization.xml"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getTypes() {
|
||||||
|
return TYPES;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.cms.ContentItem;
|
||||||
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitBundle;
|
||||||
|
import com.arsdigita.cms.contenttypes.SimpleOrganizationBundle;
|
||||||
|
import com.arsdigita.cms.ui.authoring.CreationSelector;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
public class SimpleOrganizationCreate extends GenericOrganizationalUnitCreate {
|
||||||
|
|
||||||
|
public SimpleOrganizationCreate(final ItemSelectionModel itemModel,
|
||||||
|
final CreationSelector parent) {
|
||||||
|
super(itemModel, parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected GenericOrganizationalUnitBundle createBundle(
|
||||||
|
final ContentItem primary) {
|
||||||
|
return new SimpleOrganizationBundle(primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.Component;
|
||||||
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
public class SimpleOrganizationPropertiesStep extends GenericOrganizationalUnitPropertiesStep {
|
||||||
|
|
||||||
|
public static final String EDIT_SHEET_NAME = "edit";
|
||||||
|
|
||||||
|
public SimpleOrganizationPropertiesStep(final ItemSelectionModel itemModel,
|
||||||
|
final AuthoringKitWizard parent) {
|
||||||
|
super(itemModel, parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void createEditSheet(final ItemSelectionModel itemModel) {
|
||||||
|
final BasicPageForm editSheet = new SimpleOrganizationPropertyForm(
|
||||||
|
itemModel, this);
|
||||||
|
add(EDIT_SHEET_NAME,
|
||||||
|
"Edit",
|
||||||
|
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
||||||
|
editSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Component getSimpleOrganizationPropertySheet(
|
||||||
|
final ItemSelectionModel itemModel) {
|
||||||
|
final Component sheet = GenericOrganizationalUnitPropertiesStep.
|
||||||
|
getGenericOrganizationalUnitPropertySheet(itemModel);
|
||||||
|
|
||||||
|
return sheet;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.FormProcessException;
|
||||||
|
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
public class SimpleOrganizationPropertyForm extends GenericOrganizationalUnitPropertyForm {
|
||||||
|
|
||||||
|
private SimpleOrganizationPropertiesStep m_step;
|
||||||
|
public static final String ID = "SimpleOrganization_edit";
|
||||||
|
|
||||||
|
public SimpleOrganizationPropertyForm(final ItemSelectionModel itemModel) {
|
||||||
|
this(itemModel, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SimpleOrganizationPropertyForm(
|
||||||
|
final ItemSelectionModel itemModel,
|
||||||
|
final SimpleOrganizationPropertiesStep step) {
|
||||||
|
super(itemModel, step);
|
||||||
|
m_step = step;
|
||||||
|
addSubmissionListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addWidgets() {
|
||||||
|
super.addWidgets();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(final FormSectionEvent fse) throws FormProcessException {
|
||||||
|
super.init(fse);
|
||||||
|
super.initBasicWidgets(fse);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void process(final FormSectionEvent fse) throws FormProcessException {
|
||||||
|
super.process(fse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
sciorganization.ui.simpleorganization_properties.title=Basic properties
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
sciorganization.ui.simpleorganization_properties.title=Basiseigenschaften
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<!DOCTYPE stylesheet [
|
||||||
|
<!ENTITY nbsp " " ><!-- 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.SimpleOrganization']" mode="cms:CT_graphics"
|
||||||
|
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_SimpleOrganization">
|
||||||
|
<p><xsl:value-of select="./name"/></p>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SimpleOrganization']" mode="cms:CT_text"
|
||||||
|
name="cms:CT_text_com_arsdigita_cms_contenttypes_SimpleOrganization">
|
||||||
|
<p><xsl:value-of select="./name"/></p>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
Loading…
Reference in New Issue