ccm-sci-publicpersonalprofile (SciPublicPersonalProfile) in ccm-cms-publicpersonalprofile (PublicPersonalProfile) umbenannt.

git-svn-id: https://svn.libreccm.org/ccm/trunk@1026 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2011-07-20 09:36:59 +00:00
parent f32d96ce69
commit bede2ff498
30 changed files with 229 additions and 252 deletions

View File

@ -0,0 +1,24 @@
<?xml version="1.0"?>
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-cms-publicpersonalprofile"
prettyName="OpenCCM Content Type"
version="6.6.1"
release="1"
webapp="ROOT">
<ccm:dependencies>
<ccm:requires name="ccm-core" version="6.6.0" release="ge"/>
<ccm:requires name="ccm-cms" version="6.6.0" release="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>
Aggreates informations about a SciMember item.
</ccm:description>
</ccm:application>

View File

@ -0,0 +1,27 @@
model com.arsdigita.cms.contenttypes;
import com.arsdigita.kernel.ACSObject;
import com.arsdigita.cms.*;
object type PublicPersonalProfile extends ContentPage {
String[0..1] profileUrl = ct_public_personal_profiles.profile_url VARCHAR(256);
Boolean[0..1] showPublicationList = ct_public_personal_profiles.show_publication_list BIT;
Boolean[0..1] showProjectList = ct_public_personal_profiles.show_project_list BIT;
reference key (ct_public_personal_profiles.profile_id);
}
association {
PublicPersonalProfile[0..n] profile = join cms_persons.person_id
to ct_public_personal_profile_owner_map.owner_id,
join ct_public_personal_profile_owner_map.profile_id
to ct_public_personal_profiles.profile_id;
GenericPerson[0..n] owner = join ct_public_personal_profiles.profile_id
to ct_public_personal_profile_owner_map.profile_id,
join ct_public_personal_profile_owner_map.owner_id
to cms_persons.person_id;
}

View File

@ -4,28 +4,28 @@
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd"> xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
<ctd:content-type <ctd:content-type
label="SciPublicPersonalProfile" label="PublicPersonalProfile"
description="Item which is used to create a public personal profile." description="Item which is used to create a public personal profile."
objectType="com.arsdigita.cms.contenttypes.SciPublicPersonalProfile" objectType="com.arsdigita.cms.contenttypes.PublicPersonalProfile"
classname="com.arsdigita.cms.contenttypes.SciPublicPersonalProfile"> classname="com.arsdigita.cms.contenttypes.PublicPersonalProfile">
<!-- <ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate">--> <!-- <ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate">-->
<ctd:authoring-kit createComponent="com.arsdigita.cms.contenttypes.ui.SciPublicPersonalProfileCreate"> <ctd:authoring-kit createComponent="com.arsdigita.cms.contenttypes.ui.PublicPersonalProfileCreate">
<ctd:authoring-step <ctd:authoring-step
labelKey="scipublicpersonalprofile.ui.profile_properties.title" labelKey="publicpersonalprofile.ui.profile_properties.title"
labelBundle="com.arsdigita.cms.contenttypes.ui.SciPublicPersonalProfileResources" labelBundle="com.arsdigita.cms.contenttypes.ui.PublicPersonalProfileResources"
descriptionKey="scipublicpersonalprofile.ui.profile_properties.title.description" descriptionKey="publicpersonalprofile.ui.profile_properties.title.description"
descriptionBundle="com.arsdigita.cms.contenttypes.ui.SciPublicPersonalProfileResources" descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicPersonalProfileResources"
component="com.arsdigita.cms.contenttypes.ui.SciPublicPersonalProfilePropertiesStep" component="com.arsdigita.cms.contenttypes.ui.PublicPersonalProfilePropertiesStep"
ordering="1"/> ordering="1"/>
<ctd:authoring-step <ctd:authoring-step
labelKey="scipublicpersonalprofile.ui.profile_nav.title" labelKey="publicpersonalprofile.ui.profile_nav.title"
labelBundle="com.arsdigita.cms.contenttypes.ui.SciPublicPersonalProfileResources" labelBundle="com.arsdigita.cms.contenttypes.ui.PublicPersonalProfileResources"
descriptionKey="scipublicpersonalprofile.ui.profile_nav.description" descriptionKey="publicpersonalprofile.ui.profile_nav.description"
descriptionBundle="com.arsdigita.cms.contenttypes.ui.SciPublicPersonalProfileResources" descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicPersonalProfileResources"
component="com.arsdigita.cms.contenttypes.ui.SciPublicPersonalProfileNavigationStep" component="com.arsdigita.cms.contenttypes.ui.PublicPersonalProfileNavigationStep"
ordering="2"/> ordering="2"/>
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/> <ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>

View File

@ -6,7 +6,7 @@
<xrd:context name="com.arsdigita.cms.dispatcher.SimpleXMLGenerator" > <xrd:context name="com.arsdigita.cms.dispatcher.SimpleXMLGenerator" >
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.SciPublicPersonalProfile" <xrd:adapter objectType="com.arsdigita.cms.contenttypes.PublicPersonalProfile"
extends="com.arsdigita.cms.ContentPage"> extends="com.arsdigita.cms.ContentPage">
<xrd:attributes rule="exclude"> <xrd:attributes rule="exclude">
<xrd:property name="/object/profileUrl"/> <xrd:property name="/object/profileUrl"/>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<registry>
<config class="com.arsdigita.cms.contenttypes.PublicPersonalProfileConfig"
storage="ccm-cms-publicpersonalprofile/profile.properties"/>
</registry>

View File

@ -0,0 +1,16 @@
<load>
<requires>
<table name="inits"/>
<table name="acs_objects"/>
<table name="cms_items"/>
<initalizer class="com.arsdigita.cms.Initializer"/>
</requires>
<provides>
<table name="ct_public_personal_profiles"/>
<initializer class="com.arsdigita.cms.contenttypes.PublicPersonalProfileInitializer"/>
</provides>
<scripts>
<schema directory="ccm-cms-publicpersonalprofile"/>
<data class="com.arsdigita.cms.contenttypes.PublicPersonalProfileLoader"/>
</scripts>
</load>

View File

@ -14,32 +14,32 @@ import com.arsdigita.util.Assert;
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$ * @version $Id$
*/ */
public class SciPublicPersonalProfile extends ContentPage { public class PublicPersonalProfile extends ContentPage {
public static final String OWNER = "owner"; public static final String OWNER = "owner";
public static final String PROFILE_URL = "profileUrl"; public static final String PROFILE_URL = "profileUrl";
public static final String BASE_DATA_OBJECT_TYPE = public static final String BASE_DATA_OBJECT_TYPE =
"com.arsdigita.cms.contenttypes.SciPublicPersonalProfile"; "com.arsdigita.cms.contenttypes.PublicPersonalProfile";
public SciPublicPersonalProfile() { public PublicPersonalProfile() {
this(BASE_DATA_OBJECT_TYPE); this(BASE_DATA_OBJECT_TYPE);
} }
public SciPublicPersonalProfile(BigDecimal id) public PublicPersonalProfile(BigDecimal id)
throws DataObjectNotFoundException { throws DataObjectNotFoundException {
this(new OID(BASE_DATA_OBJECT_TYPE, id)); this(new OID(BASE_DATA_OBJECT_TYPE, id));
} }
public SciPublicPersonalProfile(OID oid) public PublicPersonalProfile(OID oid)
throws DataObjectNotFoundException { throws DataObjectNotFoundException {
super(oid); super(oid);
} }
public SciPublicPersonalProfile(DataObject dobj) { public PublicPersonalProfile(DataObject dobj) {
super(dobj); super(dobj);
} }
public SciPublicPersonalProfile(String type) { public PublicPersonalProfile(String type) {
super(type); super(type);
} }

View File

@ -10,18 +10,20 @@ import com.arsdigita.util.parameter.Parameter;
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$ * @version $Id$
*/ */
public class SciPublicPersonalProfileConfig extends AbstractConfig { public class PublicPersonalProfileConfig extends AbstractConfig {
private final Parameter showUnfinishedParts; private final Parameter showUnfinishedParts;
private final Parameter personType; private final Parameter personType;
public SciPublicPersonalProfileConfig() { public PublicPersonalProfileConfig() {
showUnfinishedParts = showUnfinishedParts =
new BooleanParameter( new BooleanParameter(
"com.arsdigita.cms.contenttypes.SciPublicPersonalProfile.show_unfinished_parts", "com.arsdigita.cms.contenttypes.PublicPersonalProfile.show_unfinished_parts",
Parameter.REQUIRED, Parameter.REQUIRED,
Boolean.FALSE); Boolean.FALSE);
personType = new StringParameter("com.arsdigita.cms.contenttypes.PublicPersonalProfile.person_type", personType =
new StringParameter(
"com.arsdigita.cms.contenttypes.PublicPersonalProfile.person_type",
Parameter.REQUIRED, Parameter.REQUIRED,
"com.arsdigita.cms.contenttypes.GenericPerson"); "com.arsdigita.cms.contenttypes.GenericPerson");

View File

@ -0,0 +1,9 @@
com.arsdigita.cms.contenttypes.PublicPersonalProfile.show_unfinished_parts.title = Show parts of the PublicPersonalProfile which do not work yet.
com.arsdigita.cms.contenttypes.PublicPersonalProfile.show_unfinished_parts.purpose = Show parts of the PublicPersonalProfile which do not work yet.
com.arsdigita.cms.contenttypes.PublicPersonalProfile.show_unfinished_parts.example = false
com.arsdigita.cms.contenttypes.PublicPersonalProfile.show_unfinished_parts.format = [boolean]
com.arsdigita.cms.contenttypes.PublicPersonalProfile.person_type.title = Class to restrict the selectable persons to.
com.arsdigita.cms.contenttypes.PublicPersonalProfile.person_type.purpose = Class to restrict the selectable persons to.
com.arsdigita.cms.contenttypes.PublicPersonalProfile.person_type.example = com.arsdigita.cms.contenttypes.GenericPerson
com.arsdigita.cms.contenttypes.PublicPersonalProfile.person_type.format = [string]

View File

@ -7,25 +7,25 @@ import org.apache.log4j.Logger;
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$ * @version $Id$
*/ */
public class SciPublicPersonalProfileInitializer extends ContentTypeInitializer { public class PublicPersonalProfileInitializer extends ContentTypeInitializer {
private static final Logger logger = Logger.getLogger(SciPublicPersonalProfileInitializer.class); private static final Logger logger = Logger.getLogger(PublicPersonalProfileInitializer.class);
public SciPublicPersonalProfileInitializer() { public PublicPersonalProfileInitializer() {
super("ccm-sci-publicpersonalprofile.pdl.mf", super("ccm-cms-publicpersonalprofile.pdl.mf",
SciPublicPersonalProfile.BASE_DATA_OBJECT_TYPE); PublicPersonalProfile.BASE_DATA_OBJECT_TYPE);
} }
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[]{ return new String[]{
"/static/content-types/com/arsdigita/cms/contenttypes/SciPublicPersonalProfile.xsl" "/static/content-types/com/arsdigita/cms/contenttypes/PublicPersonalProfile.xsl"
}; };
} }
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciPublicPersonalProfile.xml"; return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/PublicPersonalProfile.xml";
} }
} }

View File

@ -5,15 +5,15 @@ package com.arsdigita.cms.contenttypes;
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$ * @version $Id$
*/ */
public class SciPublicPersonalProfileLoader extends AbstractContentTypeLoader { public class PublicPersonalProfileLoader extends AbstractContentTypeLoader {
public SciPublicPersonalProfileLoader() { public PublicPersonalProfileLoader() {
super(); super();
} }
private static final String[] TYPES = { private static final String[] TYPES = {
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/" "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/"
+ "SciPublicPersonalProfile.xml" + "PublicPersonalProfile.xml"
}; };
@Override @Override

View File

@ -20,8 +20,8 @@ import com.arsdigita.cms.ContentTypeCollection;
import com.arsdigita.cms.Folder; import com.arsdigita.cms.Folder;
import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.GenericPerson; import com.arsdigita.cms.contenttypes.GenericPerson;
import com.arsdigita.cms.contenttypes.SciPublicPersonalProfile; import com.arsdigita.cms.contenttypes.PublicPersonalProfile;
import com.arsdigita.cms.contenttypes.SciPublicPersonalProfileConfig; import com.arsdigita.cms.contenttypes.PublicPersonalProfileConfig;
import com.arsdigita.cms.ui.authoring.ApplyWorkflowFormSection; import com.arsdigita.cms.ui.authoring.ApplyWorkflowFormSection;
import com.arsdigita.cms.ui.authoring.CreationSelector; import com.arsdigita.cms.ui.authoring.CreationSelector;
import com.arsdigita.cms.ui.authoring.LanguageWidget; import com.arsdigita.cms.ui.authoring.LanguageWidget;
@ -39,17 +39,17 @@ import java.util.Date;
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$ * @version $Id$
*/ */
public class SciPublicPersonalProfileCreate extends PageCreate { public class PublicPersonalProfileCreate extends PageCreate {
private static final String SELECTED_PERSON = "selectedPerson"; private static final String SELECTED_PERSON = "selectedPerson";
private static final SciPublicPersonalProfileConfig config = private static final PublicPersonalProfileConfig config =
new SciPublicPersonalProfileConfig(); new PublicPersonalProfileConfig();
static { static {
config.load(); config.load();
} }
public SciPublicPersonalProfileCreate(final ItemSelectionModel itemModel, public PublicPersonalProfileCreate(final ItemSelectionModel itemModel,
final CreationSelector parent) { final CreationSelector parent) {
super(itemModel, parent); super(itemModel, parent);
} }
@ -67,10 +67,10 @@ public class SciPublicPersonalProfileCreate extends PageCreate {
add(new Label(GlobalizationUtil.globalize("cms.ui.language.field"))); add(new Label(GlobalizationUtil.globalize("cms.ui.language.field")));
add(new LanguageWidget(LANGUAGE)); add(new LanguageWidget(LANGUAGE));
add(new Label(SciPublicPersonalProfileGlobalizationUtil.globalize( add(new Label(PublicPersonalProfileGlobalizationUtil.globalize(
"scipublicpersonalprofile.ui.create.select_person"))); "publicpersonalprofile.ui.create.select_person")));
ParameterModel ownerModel = ParameterModel ownerModel =
new StringParameter(SciPublicPersonalProfile.OWNER); new StringParameter(PublicPersonalProfile.OWNER);
SingleSelect ownerSelect = new SingleSelect(ownerModel); SingleSelect ownerSelect = new SingleSelect(ownerModel);
ownerSelect.addValidationListener(new NotNullValidationListener()); ownerSelect.addValidationListener(new NotNullValidationListener());
@ -118,7 +118,7 @@ public class SciPublicPersonalProfileCreate extends PageCreate {
Folder folder = m_parent.getFolder(fse.getPageState()); Folder folder = m_parent.getFolder(fse.getPageState());
Assert.exists(folder); Assert.exists(folder);
String id = (String) fse.getFormData().get( String id = (String) fse.getFormData().get(
SciPublicPersonalProfile.OWNER); PublicPersonalProfile.OWNER);
GenericPerson owner = new GenericPerson(new BigDecimal(id)); GenericPerson owner = new GenericPerson(new BigDecimal(id));
@ -139,7 +139,7 @@ public class SciPublicPersonalProfileCreate extends PageCreate {
Assert.exists(section, ContentSection.class); Assert.exists(section, ContentSection.class);
String id = (String) fse.getFormData().get( String id = (String) fse.getFormData().get(
SciPublicPersonalProfile.OWNER); PublicPersonalProfile.OWNER);
GenericPerson owner = new GenericPerson(new BigDecimal(id)); GenericPerson owner = new GenericPerson(new BigDecimal(id));
String name = String.format("%s-profile", String name = String.format("%s-profile",
@ -159,7 +159,7 @@ public class SciPublicPersonalProfileCreate extends PageCreate {
bundle.setContentSection(m_parent.getContentSection(state)); bundle.setContentSection(m_parent.getContentSection(state));
bundle.save(); bundle.save();
SciPublicPersonalProfile profile = new SciPublicPersonalProfile(item. PublicPersonalProfile profile = new PublicPersonalProfile(item.
getOID()); getOID());
profile.setOwner(owner); profile.setOwner(owner);
profile.save(); profile.save();

View File

@ -7,10 +7,10 @@ import com.arsdigita.globalization.GlobalizedMessage;
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$ * @version $Id$
*/ */
public class SciPublicPersonalProfileGlobalizationUtil { public class PublicPersonalProfileGlobalizationUtil {
public static final String BUNDLE_NAME = public static final String BUNDLE_NAME =
"com.arsdigita.cms.contenttypes.ui.SciPublicPersonalProfileResources"; "com.arsdigita.cms.contenttypes.ui.PublicPersonalProfileResources";
public static GlobalizedMessage globalize(String key) { public static GlobalizedMessage globalize(String key) {
return new GlobalizedMessage(key, BUNDLE_NAME); return new GlobalizedMessage(key, BUNDLE_NAME);

View File

@ -22,32 +22,32 @@ import org.apache.log4j.Logger;
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$ * @version $Id$
*/ */
public class SciPublicPersonalProfileNavigationAddForm public class PublicPersonalProfileNavigationAddForm
extends BasicItemForm extends BasicItemForm
implements FormProcessListener, implements FormProcessListener,
FormInitListener { FormInitListener {
private static final Logger logger = private static final Logger logger =
Logger.getLogger( Logger.getLogger(
SciPublicPersonalProfileNavigationAddForm.class); PublicPersonalProfileNavigationAddForm.class);
private SciPublicPersonalProfileNavigationStep step; private PublicPersonalProfileNavigationStep step;
private ItemSearchWidget itemSearch; private ItemSearchWidget itemSearch;
private final String ITEM_SEARCH = "itemSearch"; private final String ITEM_SEARCH = "itemSearch";
private ItemSelectionModel itemModel; private ItemSelectionModel itemModel;
private SimpleEditStep editStep; private SimpleEditStep editStep;
public SciPublicPersonalProfileNavigationAddForm( public PublicPersonalProfileNavigationAddForm(
ItemSelectionModel itemModel, ItemSelectionModel itemModel,
SimpleEditStep editStep) { SimpleEditStep editStep) {
super("SciPublicPersonalProfileNavAddForm", itemModel); super("PublicPersonalProfileNavAddForm", itemModel);
this.itemModel = itemModel; this.itemModel = itemModel;
this.editStep = editStep; this.editStep = editStep;
} }
@Override @Override
public void addWidgets() { public void addWidgets() {
add(new Label((String) SciPublicPersonalProfileGlobalizationUtil. add(new Label((String) PublicPersonalProfileGlobalizationUtil.
globalize("scipublicpersonalprofile.ui.nav.select_nav_item"). globalize("publicpersonalprofile.ui.nav.select_nav_item").
localize())); localize()));
ParameterModel navItemModel = new StringParameter("navItemName"); ParameterModel navItemModel = new StringParameter("navItemName");
SingleSelect navItemSelect = new SingleSelect(navItemModel); SingleSelect navItemSelect = new SingleSelect(navItemModel);
@ -59,8 +59,8 @@ public class SciPublicPersonalProfileNavigationAddForm
navItemSelect.addOption(new Option(nav)); navItemSelect.addOption(new Option(nav));
} }
add(new Label((String) SciPublicPersonalProfileGlobalizationUtil. add(new Label((String) PublicPersonalProfileGlobalizationUtil.
globalize("scipublicpersonalprofile.ui.nav.select_target"). globalize("publicpersonalprofile.ui.nav.select_target").
localize())); localize()));
itemSearch = new ItemSearchWidget(ITEM_SEARCH); itemSearch = new ItemSearchWidget(ITEM_SEARCH);
add(this.itemSearch); add(this.itemSearch);

View File

@ -11,29 +11,29 @@ import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$ * @version $Id$
*/ */
public class SciPublicPersonalProfileNavigationStep extends SimpleEditStep { public class PublicPersonalProfileNavigationStep extends SimpleEditStep {
public static final String EDIT_NAV_SHEET_NAME = "editNav"; public static final String EDIT_NAV_SHEET_NAME = "editNav";
public SciPublicPersonalProfileNavigationStep( public PublicPersonalProfileNavigationStep(
final ItemSelectionModel itemModel, final ItemSelectionModel itemModel,
final AuthoringKitWizard parent) { final AuthoringKitWizard parent) {
this(itemModel, parent, null); this(itemModel, parent, null);
} }
public SciPublicPersonalProfileNavigationStep( public PublicPersonalProfileNavigationStep(
final ItemSelectionModel itemModel, final ItemSelectionModel itemModel,
final AuthoringKitWizard parent, final AuthoringKitWizard parent,
final String prefix) { final String prefix) {
super(itemModel, parent, prefix); super(itemModel, parent, prefix);
BasicItemForm editNavSheet = new SciPublicPersonalProfileNavigationAddForm(itemModel, this); BasicItemForm editNavSheet = new PublicPersonalProfileNavigationAddForm(itemModel, this);
add(EDIT_NAV_SHEET_NAME, add(EDIT_NAV_SHEET_NAME,
(String) SciPublicPersonalProfileGlobalizationUtil.globalize("scipublicpersonalprofile.ui.profile.nav_add").localize(), (String) PublicPersonalProfileGlobalizationUtil.globalize("publicpersonalprofile.ui.profile.nav_add").localize(),
new WorkflowLockedComponentAccess(editNavSheet, itemModel), new WorkflowLockedComponentAccess(editNavSheet, itemModel),
editNavSheet.getSaveCancelSection().getCancelButton()); editNavSheet.getSaveCancelSection().getCancelButton());
SciPublicPersonalProfileNavigationTable navTable = new SciPublicPersonalProfileNavigationTable(itemModel, this); PublicPersonalProfileNavigationTable navTable = new PublicPersonalProfileNavigationTable(itemModel, this);
setDisplayComponent(navTable); setDisplayComponent(navTable);
} }

View File

@ -22,39 +22,39 @@ import org.apache.log4j.Logger;
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$ * @version $Id$
*/ */
public class SciPublicPersonalProfileNavigationTable public class PublicPersonalProfileNavigationTable
extends Table extends Table
implements TableActionListener { implements TableActionListener {
private static final Logger logger = Logger.getLogger( private static final Logger logger = Logger.getLogger(
SciPublicPersonalProfileNavigationTable.class); PublicPersonalProfileNavigationTable.class);
private final String TABLE_COL_EDIT = "table_col_edit"; private final String TABLE_COL_EDIT = "table_col_edit";
private final String TABLE_COL_DEL = "table_col_del"; private final String TABLE_COL_DEL = "table_col_del";
private ItemSelectionModel itemModel; private ItemSelectionModel itemModel;
private SimpleEditStep editStep; private SimpleEditStep editStep;
public SciPublicPersonalProfileNavigationTable(ItemSelectionModel itemModel, public PublicPersonalProfileNavigationTable(ItemSelectionModel itemModel,
SimpleEditStep editStep) { SimpleEditStep editStep) {
super(); super();
this.itemModel = itemModel; this.itemModel = itemModel;
this.editStep = editStep; this.editStep = editStep;
setEmptyView(new Label(SciPublicPersonalProfileGlobalizationUtil. setEmptyView(new Label(PublicPersonalProfileGlobalizationUtil.
globalize("scipublicpersonalprofile.ui.nav.empty"))); globalize("publicpersonalprofile.ui.nav.empty")));
TableColumnModel colModel = getColumnModel(); TableColumnModel colModel = getColumnModel();
colModel.add(new TableColumn( colModel.add(new TableColumn(
0, 0,
SciPublicPersonalProfileGlobalizationUtil.globalize( PublicPersonalProfileGlobalizationUtil.globalize(
"scipublicpersonalprofile.ui.nav.target").localize(), "publicpersonalprofile.ui.nav.target").localize(),
TABLE_COL_EDIT)); TABLE_COL_EDIT));
colModel.add(new TableColumn( colModel.add(new TableColumn(
1, 1,
SciPublicPersonalProfileGlobalizationUtil.globalize( PublicPersonalProfileGlobalizationUtil.globalize(
"scipublicpersonalprofile.ui.nav.remove").localize(), "publicpersonalprofile.ui.nav.remove").localize(),
TABLE_COL_DEL)); TABLE_COL_DEL));
setModelBuilder(new SciPublicPersonalProfileNavigationTableModelBuilder( setModelBuilder(new PublicPersonalProfileNavigationTableModelBuilder(
itemModel)); itemModel));
colModel.get(0).setCellRenderer(new EditCellRenderer()); colModel.get(0).setCellRenderer(new EditCellRenderer());
@ -63,13 +63,13 @@ public class SciPublicPersonalProfileNavigationTable
addTableActionListener(this); addTableActionListener(this);
} }
private class SciPublicPersonalProfileNavigationTableModelBuilder private class PublicPersonalProfileNavigationTableModelBuilder
extends LockableImpl extends LockableImpl
implements TableModelBuilder { implements TableModelBuilder {
private ItemSelectionModel itemModel; private ItemSelectionModel itemModel;
public SciPublicPersonalProfileNavigationTableModelBuilder( public PublicPersonalProfileNavigationTableModelBuilder(
ItemSelectionModel itemModel) { ItemSelectionModel itemModel) {
this.itemModel = itemModel; this.itemModel = itemModel;
} }
@ -77,11 +77,11 @@ public class SciPublicPersonalProfileNavigationTable
@Override @Override
public TableModel makeModel(Table table, PageState state) { public TableModel makeModel(Table table, PageState state) {
table.getRowSelectionModel().clearSelection(state); table.getRowSelectionModel().clearSelection(state);
return new SciPublicPersonalProfileNavigationTableModel(table, state); return new PublicPersonalProfileNavigationTableModel(table, state);
} }
} }
private class SciPublicPersonalProfileNavigationTableModel private class PublicPersonalProfileNavigationTableModel
implements TableModel { implements TableModel {
private Table table; private Table table;
@ -91,7 +91,7 @@ public class SciPublicPersonalProfileNavigationTable
private int index = -1; private int index = -1;
private String mockNavItem; private String mockNavItem;
public SciPublicPersonalProfileNavigationTableModel(Table table, public PublicPersonalProfileNavigationTableModel(Table table,
PageState state) { PageState state) {
this.table = table; this.table = table;
} }
@ -117,8 +117,8 @@ public class SciPublicPersonalProfileNavigationTable
case 0: case 0:
return mockNav[index]; return mockNav[index];
case 1: case 1:
return SciPublicPersonalProfileGlobalizationUtil.globalize( return PublicPersonalProfileGlobalizationUtil.globalize(
"scipublicpersonalprofile.ui.nav.remove").localize(); "publicpersonalprofile.ui.nav.remove").localize();
default: default:
return null; return null;
} }

View File

@ -6,7 +6,7 @@ import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.SegmentedPanel; import com.arsdigita.bebop.SegmentedPanel;
import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.GenericPerson; import com.arsdigita.cms.contenttypes.GenericPerson;
import com.arsdigita.cms.contenttypes.SciPublicPersonalProfile; import com.arsdigita.cms.contenttypes.PublicPersonalProfile;
import com.arsdigita.domain.DomainObject; import com.arsdigita.domain.DomainObject;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
@ -19,11 +19,11 @@ import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$ * @version $Id$
*/ */
public class SciPublicPersonalProfilePropertiesStep extends SimpleEditStep { public class PublicPersonalProfilePropertiesStep extends SimpleEditStep {
public static final String EDIT_SHEET_NAME = "edit"; public static final String EDIT_SHEET_NAME = "edit";
public SciPublicPersonalProfilePropertiesStep( public PublicPersonalProfilePropertiesStep(
final ItemSelectionModel itemModel, final ItemSelectionModel itemModel,
final AuthoringKitWizard parent) { final AuthoringKitWizard parent) {
super(itemModel, parent); super(itemModel, parent);
@ -38,40 +38,40 @@ public class SciPublicPersonalProfilePropertiesStep extends SimpleEditStep {
EDIT_SHEET_NAME); EDIT_SHEET_NAME);
BasicPageForm editBasicSheet = BasicPageForm editBasicSheet =
new SciPublicPersonalProfilePropertyForm(itemModel, new PublicPersonalProfilePropertyForm(itemModel,
this); this);
basicProperties.add(EDIT_SHEET_NAME, basicProperties.add(EDIT_SHEET_NAME,
(String) SciPublicPersonalProfileGlobalizationUtil. (String) PublicPersonalProfileGlobalizationUtil.
globalize( globalize(
"scipublicpersonalprofile.ui.profile.edit_basic_properties"). "publicpersonalprofile.ui.profile.edit_basic_properties").
localize(), localize(),
new WorkflowLockedComponentAccess(editBasicSheet, new WorkflowLockedComponentAccess(editBasicSheet,
itemModel), itemModel),
editBasicSheet.getSaveCancelSection(). editBasicSheet.getSaveCancelSection().
getCancelButton()); getCancelButton());
basicProperties.setDisplayComponent(getSciPublicPersonalProfilePropertySheet( basicProperties.setDisplayComponent(getPublicPersonalProfilePropertySheet(
itemModel)); itemModel));
segmentedPanel.addSegment(new Label((String) SciPublicPersonalProfileGlobalizationUtil. segmentedPanel.addSegment(new Label((String) PublicPersonalProfileGlobalizationUtil.
globalize("scipublicpersonalprofile.ui.profile.basic_properties"). globalize("publicpersonalprofile.ui.profile.basic_properties").
localize()), basicProperties); localize()), basicProperties);
setDisplayComponent(segmentedPanel); setDisplayComponent(segmentedPanel);
} }
public static Component getSciPublicPersonalProfilePropertySheet( public static Component getPublicPersonalProfilePropertySheet(
ItemSelectionModel itemModel) { ItemSelectionModel itemModel) {
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet( DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(
itemModel); itemModel);
sheet.add(SciPublicPersonalProfileGlobalizationUtil.globalize( sheet.add(PublicPersonalProfileGlobalizationUtil.globalize(
"scipublicpersonalprofile.ui.owner"), "publicpersonalprofile.ui.owner"),
SciPublicPersonalProfile.OWNER, new OwnerFormatter()); PublicPersonalProfile.OWNER, new OwnerFormatter());
sheet.add(SciPublicPersonalProfileGlobalizationUtil.globalize( sheet.add(PublicPersonalProfileGlobalizationUtil.globalize(
"scipublicpersonalprofile.ui.profile_url"), "publicpersonalprofile.ui.profile_url"),
SciPublicPersonalProfile.PROFILE_URL); PublicPersonalProfile.PROFILE_URL);
return sheet; return sheet;
} }
@ -80,7 +80,7 @@ public class SciPublicPersonalProfilePropertiesStep extends SimpleEditStep {
DomainObjectPropertySheet.AttributeFormatter { DomainObjectPropertySheet.AttributeFormatter {
public String format(DomainObject obj, String attribute, PageState state) { public String format(DomainObject obj, String attribute, PageState state) {
SciPublicPersonalProfile profile = (SciPublicPersonalProfile) obj; PublicPersonalProfile profile = (PublicPersonalProfile) obj;
GenericPerson owner = profile.getOwner(); GenericPerson owner = profile.getOwner();

View File

@ -11,7 +11,7 @@ import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciPublicPersonalProfile; import com.arsdigita.cms.contenttypes.PublicPersonalProfile;
import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.BasicPageForm;
/** /**
@ -19,21 +19,21 @@ import com.arsdigita.cms.ui.authoring.BasicPageForm;
* @author Jens Pelzetter * @author Jens Pelzetter
* @version $Id$ * @version $Id$
*/ */
public class SciPublicPersonalProfilePropertyForm public class PublicPersonalProfilePropertyForm
extends BasicPageForm extends BasicPageForm
implements FormProcessListener, implements FormProcessListener,
FormInitListener { FormInitListener {
private SciPublicPersonalProfilePropertiesStep step; private PublicPersonalProfilePropertiesStep step;
public static final String ID = "SciPublicPersonalProfile_edit"; public static final String ID = "PublicPersonalProfile_edit";
public SciPublicPersonalProfilePropertyForm(ItemSelectionModel itemModel) { public PublicPersonalProfilePropertyForm(ItemSelectionModel itemModel) {
this(itemModel, null); this(itemModel, null);
} }
public SciPublicPersonalProfilePropertyForm( public PublicPersonalProfilePropertyForm(
ItemSelectionModel itemModel, ItemSelectionModel itemModel,
SciPublicPersonalProfilePropertiesStep step) { PublicPersonalProfilePropertiesStep step) {
super(ID, itemModel); super(ID, itemModel);
this.step = step; this.step = step;
} }
@ -42,10 +42,10 @@ public class SciPublicPersonalProfilePropertyForm
public void addWidgets() { public void addWidgets() {
super.addWidgets(); super.addWidgets();
add(new Label(SciPublicPersonalProfileGlobalizationUtil.globalize( add(new Label(PublicPersonalProfileGlobalizationUtil.globalize(
"scipublicpersonalprofile.ui.profile.url"))); "publicpersonalprofile.ui.profile.url")));
ParameterModel profileUrlParam = ParameterModel profileUrlParam =
new StringParameter(SciPublicPersonalProfile.PROFILE_URL); new StringParameter(PublicPersonalProfile.PROFILE_URL);
TextField profileUrl = new TextField(profileUrlParam); TextField profileUrl = new TextField(profileUrlParam);
add(profileUrl); add(profileUrl);
} }
@ -54,17 +54,17 @@ public class SciPublicPersonalProfilePropertyForm
public void init(FormSectionEvent fse) throws FormProcessException { public void init(FormSectionEvent fse) throws FormProcessException {
final PageState state = fse.getPageState(); final PageState state = fse.getPageState();
final FormData data = fse.getFormData(); final FormData data = fse.getFormData();
final SciPublicPersonalProfile profile = final PublicPersonalProfile profile =
(SciPublicPersonalProfile) super. (PublicPersonalProfile) super.
initBasicWidgets(fse); initBasicWidgets(fse);
data.put(SciPublicPersonalProfile.PROFILE_URL, profile.getProfileUrl()); data.put(PublicPersonalProfile.PROFILE_URL, profile.getProfileUrl());
} }
@Override @Override
public void process(FormSectionEvent fse) throws FormProcessException { public void process(FormSectionEvent fse) throws FormProcessException {
final SciPublicPersonalProfile profile = final PublicPersonalProfile profile =
(SciPublicPersonalProfile) processBasicWidgets( (PublicPersonalProfile) processBasicWidgets(
fse); fse);
final FormData data = fse.getFormData(); final FormData data = fse.getFormData();
final PageState state = fse.getPageState(); final PageState state = fse.getPageState();
@ -72,7 +72,7 @@ public class SciPublicPersonalProfilePropertyForm
if ((profile != null) if ((profile != null)
&& getSaveCancelSection().getSaveButton().isSelected(state)) { && getSaveCancelSection().getSaveButton().isSelected(state)) {
profile.setProfileUrl((String) data.get( profile.setProfileUrl((String) data.get(
SciPublicPersonalProfile.PROFILE_URL)); PublicPersonalProfile.PROFILE_URL));
profile.save(); profile.save();
} }

View File

@ -0,0 +1,9 @@
publicpersonalprofile.ui.profile.basic_properties=Basic properties
publicpersonalprofile.ui.profile.edit_basic_properties=Edit basic properties
publicpersonalprofile.ui.owner=Profile of
publicpersonalprofile.ui.profile_url=URL fragement
publicpersonalprofile.ui.nav.target=Navigation item
publicpersonalprofile.ui.nav.remove=Remove
publicpersonalprofile.ui.profile_properties.title=Basic properties
publicpersonalprofile.ui.profile_nav.title=Navigation
publicpersonalprofile.ui.profile.nav_add=Add item

View File

@ -0,0 +1,9 @@
publicpersonalprofile.ui.profile.basic_properties=Basiseigenschaften
publicpersonalprofile.ui.profile.edit_basic_properties=Basiseigenschaften bearbeiten
publicpersonalprofile.ui.owner=Profil von
publicpersonalprofile.ui.profile_url=URL Fragment
publicpersonalprofile.ui.nav.target=Navigationspunkt
publicpersonalprofile.ui.nav.remove=Entfernen
publicpersonalprofile.ui.profile_properties.title=Basiseigenschaften
publicpersonalprofile.ui.profile_nav.title=Navigation
publicpersonalprofile.ui.profile.nav_add=Navigationspunkt hinzuf\u00fcgen

View File

@ -6,13 +6,13 @@
xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0"
version="1.0"> version="1.0">
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SciPublicPersonalProfile']" mode="cms:CT_graphics" <xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.PublicPersonalProfile']" mode="cms:CT_graphics"
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_SciPublicPersonalProfile"> name="cms:CT_graphics_com_arsdigita_cms_contenttypes_PublicPersonalProfile">
<p><xsl:value-of select="./name"/></p> <p><xsl:value-of select="./name"/></p>
</xsl:template> </xsl:template>
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SciPublicPersonalProfile']" mode="cms:CT_text" <xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.PublicPersonalProfile']" mode="cms:CT_text"
name="cms:CT_text_com_arsdigita_cms_contenttypes_SciPublicPersonalProfile"> name="cms:CT_text_com_arsdigita_cms_contenttypes_PublicPersonalProfile">
<p><xsl:value-of select="./name"/></p> <p><xsl:value-of select="./name"/></p>
</xsl:template> </xsl:template>

View File

@ -309,10 +309,8 @@ public class ConfigRegistry {
private Properties getProperties(ClassLoader ldr, String resource) { private Properties getProperties(ClassLoader ldr, String resource) {
Properties props = new Properties(); Properties props = new Properties();
s_log.error(String.format(">>>Trying to get properties from '%s'...", resource));
InputStream is = ldr.getResourceAsStream(resource); InputStream is = ldr.getResourceAsStream(resource);
if (is != null) { if (is != null) {
s_log.error(">>>Create input stream successfully, resource exists...");
try { try {
props.load(is); props.load(is);
} catch (IOException e) { } catch (IOException e) {
@ -324,8 +322,6 @@ public class ConfigRegistry {
throw new UncheckedWrapperException(e); throw new UncheckedWrapperException(e);
} }
} }
} else {
s_log.error(">>>Resource does not exist.");
} }
return props; return props;
} }

View File

@ -1,32 +0,0 @@
<?xml version="1.0"?>
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-sci-publicpersonalprofile"
prettyName="OpenCCM Content Type"
version="6.6.1"
release="1"
webapp="ROOT">
<ccm:dependencies>
<ccm:requires name="ccm-core" version="6.6.0" release="ge"/>
<ccm:requires name="ccm-cms" version="6.6.0" release="ge"/>
<ccm:requires name="ccm-sci-types-organization" version="6.6.0" relation="ge"/>
<!--<ccm:requires name="ccm-sci-types-organizationwithpublications" version="6.6.0" relation="ge"/>-->
<ccm:requires name="ccm-sci-publications" version="6.6.0" 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>
Aggreates informations about a SciMember item. In the content center it provides
a form for editing the contact associates with the SciMember item. Also a form
is provided to link articles or other content items with a person. The view is
provided by an special content panel for SciMember which has to be added
to the template of the SciMember content type (an example JSP is provided
with this module).
</ccm:description>
</ccm:application>

View File

@ -1,27 +0,0 @@
model com.arsdigita.cms.contenttypes;
import com.arsdigita.kernel.ACSObject;
import com.arsdigita.cms.*;
object type SciPublicPersonalProfile extends ContentPage {
String[0..1] profileUrl = ct_sci_public_personal_profiles.profile_url VARCHAR(256);
Boolean[0..1] showPublicationList = ct_sci_public_personal_profiles.show_publication_list BIT;
Boolean[0..1] showProjectList = ct_sci_public_personal_profiles.show_project_list BIT;
reference key (ct_sci_public_personal_profiles.profile_id);
}
association {
SciPublicPersonalProfile[0..n] profile = join cms_persons.person_id
to ct_sci_public_personal_profile_owner_map.owner_id,
join ct_sci_public_personal_profile_owner_map.profile_id
to ct_sci_public_personal_profiles.profile_id;
GenericPerson[0..n] owner = join ct_sci_public_personal_profiles.profile_id
to ct_sci_public_personal_profile_owner_map.profile_id,
join ct_sci_public_personal_profile_owner_map.owner_id
to cms_persons.person_id;
}

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<registry>
<config class="com.arsdigita.cms.contenttypes.SciPublicPersonalProfileConfig"
storage="ccm-sci-publicpersonalprofile/profile.properties"/>
</registry>

View File

@ -1,26 +0,0 @@
<load>
<requires>
<table name="inits"/>
<table name="acs_objects"/>
<table name="cms_items"/>
<!-- <table name="ct_sciorga_organizations"/> -->
<!-- <table name="ct_sciorga_organizations_with_publications"/> -->
<!-- <table name="ct_sciorga_departments"/> -->
<table name="ct_sciorga_projects"/>
<table name="ct_publications"/>
<initalizer class="com.arsdigita.cms.Initializer"/>
<initalizer class="com.arsdigita.cms.contenttypes.PublicationInitializer"/>
<!-- <initalizer class="com.arsdigita.cms.contenttypes.SciOrganizationInitializer"/> -->
<!-- <initalizer class="com.arsdigita.cms.contenttypes.SciOrganizationWithPublicationsInitializer"/> -->
<!-- <initalizer class="com.arsdigita.cms.contenttypes.SciDepartmentInitializer"/> -->
<initalizer class="com.arsdigita.cms.contenttypes.SciProjectInitializer"/>
</requires>
<provides>
<table name="ct_sci_public_personal_profiles"/>
<initializer class="com.arsdigita.cms.contenttypes.SciPublicPersonalProfileInitializer"/>
</provides>
<scripts>
<schema directory="ccm-sci-publicpersonalprofile"/>
<data class="com.arsdigita.cms.contenttypes.SciPublicPersonalProfileLoader"/>
</scripts>
</load>

View File

@ -1,9 +0,0 @@
com.arsdigita.cms.contenttypes.SciPublicPersonalProfile.show_unfinished_parts.title = Show parts of the SciPublicPersonalProfile which do not work yet.
com.arsdigita.cms.contenttypes.SciPublicPersonalProfile.show_unfinished_parts.purpose = Show parts of the SciPublicPersonalProfile which do not work yet.
com.arsdigita.cms.contenttypes.SciPublicPersonalProfile.show_unfinished_parts.example = false
com.arsdigita.cms.contenttypes.SciPublicPersonalProfile.show_unfinished_parts.format = [boolean]
com.arsdigita.cms.contenttypes.SciPublicPersonalProfile.person_type.title = Class to restrict the selectable persons to.
com.arsdigita.cms.contenttypes.SciPublicPersonalProfile.person_type.purpose = Class to restrict the selectable persons to.
com.arsdigita.cms.contenttypes.SciPublicPersonalProfile.person_type.example = com.arsdigita.cms.contenttypes.GenericPerson
com.arsdigita.cms.contenttypes.SciPublicPersonalProfile.person_type.format = [string]

View File

@ -1,9 +0,0 @@
scipublicpersonalprofile.ui.profile.basic_properties=Basic properties
scipublicpersonalprofile.ui.profile.edit_basic_properties=Edit basic properties
scipublicpersonalprofile.ui.owner=Profile of
scipublicpersonalprofile.ui.profile_url=URL fragement
scipublicpersonalprofile.ui.nav.target=Navigation item
scipublicpersonalprofile.ui.nav.remove=Remove
scipublicpersonalprofile.ui.profile_properties.title=Basic properties
scipublicpersonalprofile.ui.profile_nav.title=Navigation
scipublicpersonalprofile.ui.profile.nav_add=Add item

View File

@ -1,12 +0,0 @@
# To change this template, choose Tools | Templates
# and open the template in the editor.
scipublicpersonalprofile.ui.profile.basic_properties=Basiseigenschaften
scipublicpersonalprofile.ui.profile.edit_basic_properties=Basiseigenschaften bearbeiten
scipublicpersonalprofile.ui.owner=Profil von
scipublicpersonalprofile.ui.profile_url=URL Fragment
scipublicpersonalprofile.ui.nav.target=Navigationspunkt
scipublicpersonalprofile.ui.nav.remove=Entfernen
scipublicpersonalprofile.ui.profile_properties.title=Basiseigenschaften
scipublicpersonalprofile.ui.profile_nav.title=Navigation
scipublicpersonalprofile.ui.profile.nav_add=Navigationspunkt hinzuf\u00fcgen