Folgende Änderungen, Ergänzungen etc:

- JavaDoc für ccm-sci-types-organization
- SciMember Type zu ccm-sci-types-organization hinzugefügt (abgeleitet von GenericPerson)
- GenericOrganizationalUnitPersonAddForm so angepasst, dass der Typ der anzuzeigenden Personen beschränkt werden kann (durch überschreiben einer Methode)
- CLI-Tool zum importieren von RelationAttributes als Übergangslösung, bis es eine GUI gibt.


git-svn-id: https://svn.libreccm.org/ccm/trunk@571 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2010-10-14 12:40:48 +00:00
parent cbc5154f03
commit da30758724
94 changed files with 2910 additions and 107 deletions

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-cms-relationattributeimporter"
prettyName="RelationAttribute Importer"
version="6.6.0"
release="1"
webapp="ROOT">
<ccm:dependencies>
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/>
<ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/>
<ccm:requires name="ccm-ldn-util" version="6.6.0" relation="ge"/>
</ccm:dependencies>
<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>
Tool to import RelationAttributes.
</ccm:description>
</ccm:application>

View File

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

View File

@ -0,0 +1,12 @@
<load>
<requires>
<table name="cms_items"/>
<initializer class="com.arsdigita.london.util.Initializer"/>
</requires>
<provides>
<initializer class="com.arsdigita.cms.relationattributeimporter.Initializer"/>
</provides>
<scripts>
<data class="com.arsdigita.cms.relationattributeimporter.Loader"/>
</scripts>
</load>

View File

@ -0,0 +1,35 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.relationattributeimporter;
import com.arsdigita.runtime.CompoundInitializer;
/**
* Initializer for the ccm-cms-relationattributeimporter application.
*
* @author Jens Pelzetter
*/
public class Initializer extends CompoundInitializer {
public Initializer() {
//Nothing yet.
}
}

View File

@ -0,0 +1,36 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.relationattributeimporter;
import com.arsdigita.loader.PackageLoader;
import com.arsdigita.runtime.ScriptContext;
/**
* Loader for the ccm-cms-relationattribute application.
*
* @author Jens Pelzetter
*/
public class Loader extends PackageLoader {
public void run(final ScriptContext ctx) {
//Nothing yet.
}
}

View File

@ -0,0 +1,79 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.relationattributeimporter;
/**
* A bean used to keep the information of {@link RelationAttribute} while
* parsing the XML file.
*
* @author Jens Pelzetter
*/
public class RelAttrBean {
private String attribute;
private String key;
private String lang;
private String name;
private String description;
public RelAttrBean() {
}
public String getAttribute() {
return attribute;
}
public void setAttribute(String attribute) {
this.attribute = attribute;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getLang() {
return lang;
}
public void setLang(String lang) {
this.lang = lang;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}

View File

@ -0,0 +1,175 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.relationattributeimporter;
import com.arsdigita.cms.RelationAttribute;
import com.arsdigita.cms.RelationAttributeInterface;
import com.arsdigita.london.util.Transaction;
import com.arsdigita.packaging.Program;
import java.io.File;
import java.io.IOException;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.apache.commons.cli.CommandLine;
import org.xml.sax.SAXException;
/**
* <p>
* A simple import tool for {@link RelationAttribute}s. This tool imports the
* relation attributes from a simple XML file, which looks like this:
* </p>
* <pre>
* &lt;?xml version="1.0"?&gt;
* &lt;relationAttributes&gt;
* &lt;relationAttribute&gt;
* &lt;attribute&gt;...&lt;/attribute&gt;
* &lt;key&gt;...&lt;/key&gt;
* &lt;lang&gt;...&lt;/lang&gt;
* &lt;name&gt;...&lt;/name&gt;
* &lt;description&gt;...&lt;/description&gt;
* &lt;/relationAttribute&gt;
* &lt;/relationAttributes&gt;
* </pre>
* <p>
* The tool can be invoked using the ccm-run command. One parameter, the file
* to import is needed. With tools-ng and ECDC, the line for calling the
* <code>RelationAttributeImporter</code> would like the following:
* </p>
* <pre>
* ant -Dccm.classname="com.arsdigita.cms.relationattributeimporter.RelationAttributeImporter" -Dccm.parameters="/path/to/relation/attribute/file.xml" ccm-ru
* </pre>
* <p>
* You have to add the <code>RelationAttributeImporter</code> to add to your
* environment, of course.
* </p>
*
* @author Jens Pelzetter
* @see RelationAttribute
* @see RelationAttributeInterface
*/
public class RelationAttributeImporter extends Program {
public RelationAttributeImporter() {
super("Relation Attribute Importer", "0.1.0", "FILE");
}
public RelationAttributeImporter(boolean startup) {
super("Relation Attribute Importer", "0.1.0", "FILE", startup);
}
@Override
protected void doRun(CommandLine cmdLine) {
final String[] args;
File relAttrFile;
SAXParserFactory saxFactory;
SAXParser saxParser = null;
RelationAttributeParser parser;
args = cmdLine.getArgs();
if (args.length != 1) {
help(System.err);
System.exit(-1);
}
System.out.printf("Using file %s.", args[0]);
relAttrFile = new File(args[0]);
if (!relAttrFile.exists()) {
System.err.printf("ERROR: File %s does not exist.", args[0]);
System.exit(-1);
}
if (!relAttrFile.isFile()) {
System.err.printf("ERROR: Path %s does not point to a file.",
args[0]);
System.exit(-1);
}
saxFactory = SAXParserFactory.newInstance();
try {
saxParser = saxFactory.newSAXParser();
} catch (ParserConfigurationException ex) {
System.err.printf("Error creating SAXParser: %s", ex.getMessage());
ex.printStackTrace();
System.exit(-1);
} catch (SAXException ex) {
System.err.printf("Error creating SAXParser: %s", ex.getMessage());
ex.printStackTrace();
System.exit(-1);
}
parser = new RelationAttributeParser();
try {
saxParser.parse(relAttrFile, parser);
} catch (SAXException ex) {
System.err.printf("Error parsing file %s: %s",
args[0],
ex.getMessage());
ex.printStackTrace();
System.exit(-1);
} catch (IOException ex) {
System.err.printf("Error parsing file %s: %s",
args[0], ex.getMessage());
ex.printStackTrace();
System.exit(-1);
}
System.out.println(
"Parsed XML file successfully. Creating ACSObjects...");
for (int i = 0; i < parser.getRelAttrs().size(); i++) {
System.out.printf("%d of %d...", (i + 1), parser.getRelAttrs().size());
createACSObject(parser.getRelAttrs().get(i), i);
}
}
/**
* The method creates the {@link RelationAttribute} object from the data
* retrieved from the XML file and stores the object in the database.
*
* @param relAttr
* @param index
*/
private void createACSObject(final RelAttrBean relAttr, int index) {
/*System.out.printf("\tattribute = %s\n", relAttr.getAttribute());
System.out.printf("\tkey = %s\n", relAttr.getKey());
System.out.printf("\tlang = %s\n", relAttr.getLang());
System.out.printf("\tname = %s\n", relAttr.getName());
System.out.printf("\tdescription = %s\n", relAttr.getDescription());*/
Transaction transaction = new Transaction() {
@Override
public void doRun() {
RelationAttribute attr;
attr = new RelationAttribute();
attr.setAttribute(relAttr.getAttribute());
attr.setKey(relAttr.getKey());
attr.setLanguage(relAttr.getLang());
attr.setName(relAttr.getName());
attr.setDescription(relAttr.getDescription());
System.out.print("Saving...");
attr.save();
}
};
transaction.run();
System.out.println("Done\n");
}
public final static void main(String[] args) {
new RelationAttributeImporter().run(args);
}
}

View File

@ -0,0 +1,176 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.relationattributeimporter;
import java.util.ArrayList;
import java.util.List;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.xml.sax.helpers.DefaultHandler;
/**
* Parser for the XML file. This parser uses the SAX-Parser from the Java
* Standard API.
*
* @author Jens Pelzetter
*/
public class RelationAttributeParser extends DefaultHandler {
private RelAttrBean currentRelAttr;
/**
* A buffer
*/
private StringBuilder buffer;
private boolean relAttrOpen;
private boolean attrOpen;
private boolean keyOpen;
private boolean langOpen;
private boolean nameOpen;
private boolean descOpen;
private List<RelAttrBean> relAttrs;
public RelationAttributeParser() {
relAttrs = new ArrayList<RelAttrBean>();
relAttrOpen = false;
attrOpen = false;
keyOpen = false;
langOpen = false;
nameOpen = false;
descOpen = false;
}
@Override
public void startDocument() throws SAXException {
System.out.println("Relation attribute document begin...");
}
@Override
public void endDocument() throws SAXException {
System.out.println("Relation attribute document end.");
}
@Override
public void startElement(String uri,
String localName,
String qName,
Attributes attributes) throws SAXException {
System.out.printf("DEBUG: uri = %s\n", uri);
System.out.printf("DEBUG: localName = %s\n", localName);
System.out.printf("DEBUG: qName = %s\n", qName);
buffer = new StringBuilder();
if ("relationAttributes".equals(qName)) {
//Nothing to do
} else if ("relationAttribute".equals(qName)) {
relAttrOpen = true;
currentRelAttr = new RelAttrBean();
} else if ("attribute".equals(qName)) {
attrOpen = true;
} else if ("key".equals(qName)) {
keyOpen = true;
} else if ("lang".equals(qName)) {
langOpen = true;
} else if ("name".equals(qName)) {
nameOpen = true;
} else if ("description".equals(qName)) {
descOpen = true;
} else {
System.err.printf(
"Warning: Encountered unexpected element %s. Ignoring.\n",
qName);
}
}
@Override
public void endElement(String uri,
String localName,
String qName) throws SAXException {
if ("relationAttributes".equals(qName)) {
//Nothing to do
} else if ("relationAttribute".equals(qName)) {
relAttrs.add(currentRelAttr);
currentRelAttr = null;
relAttrOpen = false;
} else if ("attribute".equals(qName)) {
System.out.printf("buffer = %s\n", buffer.toString());
currentRelAttr.setAttribute(buffer.toString());
attrOpen = false;
} else if ("key".equals(qName)) {
currentRelAttr.setKey(buffer.toString());
keyOpen = false;
} else if ("lang".equals(qName)) {
currentRelAttr.setLang(buffer.toString());
langOpen = false;
} else if ("name".equals(qName)) {
currentRelAttr.setName(buffer.toString());
nameOpen = false;
} else if ("description".equals(qName)) {
currentRelAttr.setDescription(buffer.toString());
descOpen = false;
} else {
System.err.printf(
"Warning: Encountered unexpected element %s. Ignoring.\n",
qName);
}
}
@Override
public void characters(char[] ch,
int start,
int length) throws SAXException {
System.out.printf("Parsing characters %d to %d...\n", start, (start + length));
for (int i = start; i < (start + length); i++) {
char character;
character = ch[i];
buffer.append(character);
}
}
@Override
public void warning(SAXParseException ex) {
System.err.println(saxMsg(ex));
}
@Override
public void error(SAXParseException ex) {
System.err.println(saxMsg(ex));
}
@Override
public void fatalError(SAXParseException ex) {
System.err.println(saxMsg(ex));
}
protected List<RelAttrBean> getRelAttrs() {
return relAttrs;
}
private String saxMsg(SAXParseException ex) {
String msg;
msg = String.format(
"SAX parser reported an error at line %d, column %d: %s",
ex.getLineNumber(),
ex.getColumnNumber(),
ex.getMessage());
return msg;
}
}

View File

@ -36,9 +36,9 @@ object type GenericContact extends ContentPage {
object type GenericContactEntry extends ContentItem {
String [1..1] key = cms_contactEntries.key VARCHAR(100);
String [0..1] description = cms_contactEntries.description VARCHAR(100);
String [1..1] value = cms_contactEntries.value VARCHAR(100);
String[1..1] key = cms_contactEntries.key VARCHAR(100);
String[0..1] description = cms_contactEntries.description VARCHAR(100);
String[1..1] value = cms_contactEntries.value VARCHAR(100);
reference key ( cms_contactEntries.contactentry_id );

View File

@ -23,7 +23,6 @@ import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.SaveCancelSection;
import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.form.TextField;
import com.arsdigita.bebop.parameters.NotNullValidationListener;
@ -37,7 +36,6 @@ import com.arsdigita.cms.contenttypes.GenericPerson;
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
import com.arsdigita.cms.ui.ItemSearchWidget;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import org.apache.log4j.Logger;
/**
* Form for adding related persons the an organization.
@ -46,24 +44,20 @@ import org.apache.log4j.Logger;
*/
public class GenericOrganizationalUnitPersonAddForm extends BasicItemForm {
private static final Logger s_log = Logger.getLogger(
GenericOrganizationalUnitPersonAddForm.class);
private GenericOrganizationalUnitPersonPropertiesStep m_step;
private ItemSearchWidget m_itemSearch;
private SaveCancelSection m_saveCancelSection;
private final String ITEM_SEARCH = "orgaunitPerson";
private ItemSelectionModel m_itemModel;
private final String ITEM_SEARCH = "orgaunitPerson";
public GenericOrganizationalUnitPersonAddForm(ItemSelectionModel itemModel) {
super("PersonAddForm", itemModel);
super("PersonAddForm", itemModel);
}
@Override
protected void addWidgets() {
add(new Label((String) ContenttypesGlobalizationUtil.globalize(
"cms.contenttypes.ui.genericorgaunit.select_person").localize()));
this.m_itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType.
findByAssociatedObjectType(GenericPerson.BASE_DATA_OBJECT_TYPE));
findByAssociatedObjectType(getPersonType()));
add(this.m_itemSearch);
add(new Label(ContenttypesGlobalizationUtil.globalize(
@ -74,9 +68,9 @@ public class GenericOrganizationalUnitPersonAddForm extends BasicItemForm {
/*SingleSelect roleSelect = new SingleSelect(roleParam);
roleSelect.addValidationListener(new NotNullValidationListener());
roleSelect.addOption(
new Option("",
new Label((String) ContenttypesGlobalizationUtil.
globalize("cms.ui.select_one").localize())));
new Option("",
new Label((String) ContenttypesGlobalizationUtil.
globalize("cms.ui.select_one").localize())));
add(roleSelect);*/
TextField role = new TextField(roleParam);
@ -86,7 +80,6 @@ public class GenericOrganizationalUnitPersonAddForm extends BasicItemForm {
@Override
public void init(FormSectionEvent fse) {
FormData data = fse.getFormData();
PageState state = fse.getPageState();
setVisible(state, true);
@ -107,4 +100,8 @@ public class GenericOrganizationalUnitPersonAddForm extends BasicItemForm {
init(fse);
}
protected String getPersonType() {
return GenericPerson.class.getName();
}
}

View File

@ -46,17 +46,18 @@ public class GenericOrganizationalUnitPersonPropertiesStep
ItemSelectionModel itemModel,
AuthoringKitWizard parent,
String prefix) {
super(itemModel, parent, prefix);
BasicItemForm addPersonSheet = new GenericOrganizationalUnitPersonAddForm(itemModel);
super(itemModel, parent, prefix);
BasicItemForm addPersonSheet =
new GenericOrganizationalUnitPersonAddForm(itemModel);
add(ADD_PERSON_SHEET_NAME,
(String) ContenttypesGlobalizationUtil.globalize(
(String) ContenttypesGlobalizationUtil.globalize(
"cms.contenttypes.ui.genericorgaunit.add_person").localize(),
new WorkflowLockedComponentAccess(addPersonSheet, itemModel),
addPersonSheet.getSaveCancelSection().getCancelButton());
new WorkflowLockedComponentAccess(addPersonSheet, itemModel),
addPersonSheet.getSaveCancelSection().getCancelButton());
GenericOrganizationalUnitPersonsTable personsTable = new GenericOrganizationalUnitPersonsTable(itemModel);
GenericOrganizationalUnitPersonsTable personsTable = new GenericOrganizationalUnitPersonsTable(
itemModel);
setDisplayComponent(personsTable);
}
}

View File

@ -40,7 +40,8 @@ public class GenericPersonPropertiesStep extends SimpleEditStep {
public static final String EDIT_SHEET_NAME = "edit";
public GenericPersonPropertiesStep(ItemSelectionModel itemModel, AuthoringKitWizard parent) {
public GenericPersonPropertiesStep(ItemSelectionModel itemModel,
AuthoringKitWizard parent) {
super(itemModel, parent);
/* Use a Segmented Panel for the multiple parts of data */
@ -49,17 +50,26 @@ public class GenericPersonPropertiesStep extends SimpleEditStep {
setDefaultEditKey(EDIT_SHEET_NAME);
/* A new SimpleEditStep */
SimpleEditStep basicProperties = new SimpleEditStep(itemModel, parent, EDIT_SHEET_NAME);
SimpleEditStep basicProperties = new SimpleEditStep(itemModel, parent,
EDIT_SHEET_NAME);
/* Create the edit component for this SimpleEditStep and the corresponding link */
BasicPageForm editBasicSheet = new GenericPersonPropertyForm(itemModel, this);
basicProperties.add(EDIT_SHEET_NAME, (String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.edit_basic_properties").localize(), new WorkflowLockedComponentAccess(editBasicSheet, itemModel), editBasicSheet.getSaveCancelSection().getCancelButton());
BasicPageForm editBasicSheet = new GenericPersonPropertyForm(itemModel,
this);
basicProperties.add(EDIT_SHEET_NAME, (String) ContenttypesGlobalizationUtil.
globalize("cms.contenttypes.ui.person.edit_basic_properties").
localize(), new WorkflowLockedComponentAccess(editBasicSheet,
itemModel), editBasicSheet.
getSaveCancelSection().getCancelButton());
/* Set the displayComponent for this step */
basicProperties.setDisplayComponent(getGenericPersonPropertySheet(itemModel));
basicProperties.setDisplayComponent(getGenericPersonPropertySheet(
itemModel));
/* Add the SimpleEditStep to the segmented panel */
segmentedPanel.addSegment(new Label((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.basic_properties").localize()), basicProperties);
segmentedPanel.addSegment(new Label((String) ContenttypesGlobalizationUtil.
globalize("cms.contenttypes.ui.person.basic_properties").
localize()), basicProperties);
// GenericPersonContactPropertiesStep contactProperties = new GenericPersonContactPropertiesStep(itemModel, parent);
@ -70,66 +80,87 @@ public class GenericPersonPropertiesStep extends SimpleEditStep {
}
public static Component getGenericPersonPropertySheet(ItemSelectionModel itemModel) {
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
public static Component getGenericPersonPropertySheet(
ItemSelectionModel itemModel) {
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(
itemModel);
sheet.add((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.surname").localize(), GenericPerson.SURNAME);
sheet.add((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.givenname").localize(), GenericPerson.GIVENNAME);
sheet.add((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.titlepre").localize(), GenericPerson.TITLEPRE);
sheet.add((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.titlepost").localize(), GenericPerson.TITLEPOST);
sheet.add((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.birthdate").localize(),
GenericPerson.BIRTHDATE,
new DomainObjectPropertySheet.AttributeFormatter() {
sheet.add((String) ContenttypesGlobalizationUtil.globalize(
"cms.contenttypes.ui.person.surname").localize(),
GenericPerson.SURNAME);
sheet.add((String) ContenttypesGlobalizationUtil.globalize(
"cms.contenttypes.ui.person.givenname").localize(),
GenericPerson.GIVENNAME);
sheet.add((String) ContenttypesGlobalizationUtil.globalize(
"cms.contenttypes.ui.person.titlepre").localize(),
GenericPerson.TITLEPRE);
sheet.add((String) ContenttypesGlobalizationUtil.globalize(
"cms.contenttypes.ui.person.titlepost").localize(),
GenericPerson.TITLEPOST);
sheet.add((String) ContenttypesGlobalizationUtil.globalize(
"cms.contenttypes.ui.person.birthdate").localize(),
GenericPerson.BIRTHDATE,
new DomainObjectPropertySheet.AttributeFormatter() {
public String format(DomainObject item,
String attribute,
PageState state) {
//ContentPage page = (ContentPage) item;
GenericPerson person = (GenericPerson) item;
if (person.getBirthdate() != null) {
return DateFormat.getDateInstance(DateFormat.LONG).format(person.getBirthdate());
} else {
return (String) ContenttypesGlobalizationUtil.globalize("cms.ui.unknown").localize();
}
}
});
public String format(DomainObject item,
String attribute,
PageState state) {
//ContentPage page = (ContentPage) item;
GenericPerson person = (GenericPerson) item;
if (person.getBirthdate() != null) {
return DateFormat.getDateInstance(DateFormat.LONG).format(person.
getBirthdate());
} else {
return (String) ContenttypesGlobalizationUtil.globalize(
"cms.ui.unknown").localize();
}
}
});
sheet.add((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.gender").localize(),
GenericPerson.GENDER,
new DomainObjectPropertySheet.AttributeFormatter() {
sheet.add((String) ContenttypesGlobalizationUtil.globalize(
"cms.contenttypes.ui.person.gender").localize(),
GenericPerson.GENDER,
new DomainObjectPropertySheet.AttributeFormatter() {
public String format(DomainObject item,
String attribute,
PageState state) {
//ContentPage page = (ContentPage) item;
GenericPerson person = (GenericPerson) item;
if (person.getGender() != null) {
return (String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.gender." + person.getGender().toLowerCase()).localize();
} else {
return (String) ContenttypesGlobalizationUtil.globalize("cms.ui.unknown").localize();
}
}
});
public String format(DomainObject item,
String attribute,
PageState state) {
//ContentPage page = (ContentPage) item;
GenericPerson person = (GenericPerson) item;
if (person.getGender() != null) {
return (String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.gender." + person.
getGender().toLowerCase()).localize();
} else {
return (String) ContenttypesGlobalizationUtil.globalize(
"cms.ui.unknown").localize();
}
}
});
if (!ContentSection.getConfig().getHideLaunchDate()) {
sheet.add((String) ContenttypesGlobalizationUtil.globalize("cms.ui.authoring.page_launch_date").localize(),
ContentPage.LAUNCH_DATE,
new DomainObjectPropertySheet.AttributeFormatter() {
sheet.add((String) ContenttypesGlobalizationUtil.globalize(
"cms.ui.authoring.page_launch_date").localize(),
ContentPage.LAUNCH_DATE,
new DomainObjectPropertySheet.AttributeFormatter() {
public String format(DomainObject item,
String attribute,
PageState state) {
ContentPage page = (ContentPage) item;
if (page.getLaunchDate() != null) {
return DateFormat.getDateInstance(DateFormat.LONG).format(page.getLaunchDate());
} else {
return (String) ContenttypesGlobalizationUtil.globalize("cms.ui.unknown").localize();
}
}
});
public String format(DomainObject item,
String attribute,
PageState state) {
ContentPage page = (ContentPage) item;
if (page.getLaunchDate() != null) {
return DateFormat.getDateInstance(DateFormat.LONG).
format(page.getLaunchDate());
} else {
return (String) ContenttypesGlobalizationUtil.globalize(
"cms.ui.unknown").localize();
}
}
});
}
sheet.add((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.description").localize(), GenericPerson.DESCRIPTION);
sheet.add((String) ContenttypesGlobalizationUtil.globalize(
"cms.contenttypes.ui.person.description").localize(),
GenericPerson.DESCRIPTION);
return sheet;
}
}

View File

@ -0,0 +1,12 @@
model com.arsdigita.cms.contenttypes;
import com.arsdigita.kernel.ACSObject;
import com.arsdigita.cms.*;
object type SciMember extends GenericPerson {
Boolean[0..1] formerMember = ct_sciorga_members.formerMember BIT;
Boolean[0..1] associatedMember = ct_sciorga_members.associatedMember BIT;
reference key ( ct_sciorga_members.member_id );
}

View File

@ -0,0 +1,37 @@
<?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="SciMember"
description="Base type for members of scientific orgnizations"
objectType="com.arsdigita.cms.contenttypes.SciMember"
classname="com.arsdigita.cms.contenttypes.SciMember">
<ctd:authoring-kit createComponent="com.arsdigita.cms.contenttypes.ui.GenericPersonCreate">
<ctd:authoring-step
labelKey="cms.contenttypes.shared.basic_properties.title"
labelBundle="com.arsdigita.cms.ui.CMSResources"
descriptionKey="cms.contenttypes.shared.basic_properties.description"
descriptionBundle="com.arsdigita.cms.ui.CMSResources"
component="com.arsdigita.cms.contenttypes.ui.SciMemberPropertiesStep"
ordering="1"/>
<ctd:authoring-step
labelKey="person.authoring.contact_properties.title"
labelBundle="com.arsdigita.cms.contenttypes.ContenttypesResources"
descriptionKey="person.authoring.contact_properties.description"
descriptionBundle="com.arsdigita.cms.contenttypes.ContenttypesResources"
component="com.arsdigita.cms.contenttypes.ui.GenericPersonContactPropertiesStep"
ordering="2"/>
<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,17 @@
<?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.SciMember"
extends="com.arsdigita.cms.ContentPage">
<xrd:associations rule="include">
<xrd:property name="/object/contacts"/>
</xrd:associations>
</xrd:adapter>
</xrd:context>
</xrd:adapters>

View File

@ -6,17 +6,20 @@
<initializer class="com.arsdigita.cms.Initializer"/>
</requires>
<provides>
<table name="ct_sciorganizations"/>
<table name="ct_scidepartments"/>
<table name="ct_sciprojects"/>
<table name="ct_sciorga_organizations"/>
<table name="ct_sciorga_departments"/>
<table name="ct_sciorga_projects"/>
<table name="ct_sciorga_members"/>
<initializer class="com.arsdigita.cms.contenttypes.SciOrganizationInitializer"/>
<initializer class="com.arsdigita.cms.contenttypes.SciDepartmentInitializer"/>
<initializer class="com.arsdigita.cms.contenttypes.SciProjectInitializer"/>
<initializer class="com.arsdigita.cms.contenttypes.SciMemberInitializer"/>
</provides>
<scripts>
<schema directory="ccm-sci-types-organization"/>
<data class="com.arsdigita.cms.contenttypes.SciOrganizationLoader"/>
<data class="com.arsdigita.cms.contenttypes.SciDepartmentLoader"/>
<data class="com.arsdigita.cms.contenttypes.SciProjectLoader"/>
<data class="com.arsdigita.cms.contenttypes.SciMemberLoader"/>
</scripts>
</load>

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.domain.DataObjectNotFoundException;
@ -8,13 +27,47 @@ import com.arsdigita.util.Assert;
import java.math.BigDecimal;
/**
* <p>
* A class for representing departments of an organization. Adds two
* associations to {@link GenericOrganizationalUnit}:
* </p>
* <ul>
* <li>Subdepartments</li>
* <li>Projects</li>
* </ul>
* <p>
* The <em>subdepartments</em> association links one instance of this class
* with another.
* The <em>projects</em> association links an department with projects.
* </p>
* <p>
* Also, there are two additional fields:
* </p>
* <ul>
* <li>shortDescription</li>
* <li>description</li>
* </ul>
* <p>
* <em>shortDescription</em> takes a short text (maximum length 500 characters)
* about the department. For more detailed description, the <em>description</em>
* field can be used.
* </p>
* <p>
* There is an
* <a href="doc-files/ccm-sci-types-organization_entities.png">UML digram</a>
* with an overview of the content types and their associations. Please not that
* the diagram show a design sketch and not the actually implemented classes.
* </p>
*
* @author Jens Pelzetter
* @see GenericOrganizationalUnit
* @see SciOrganization
* @see SciProject
*/
public class SciDepartment extends GenericOrganizationalUnit {
public static final String DEPARTMENT_SHORT_DESCRIPTION =
"departmentShortDescription";
"departmentShortDescription";
public static final String DEPARTMENT_DESCRIPTION = "departmentDescription";
public static final String ORGANIZATION = "organization";
public static final String SUPER_DEPARTMENT = "superDepartment";
@ -72,6 +125,14 @@ public class SciDepartment extends GenericOrganizationalUnit {
}
public SciDepartment getSuperDepartment() {
/*This is some sort of hack because if we define the
* relation in PDL with a multiplicity of 0..1 for the super department
* part, CCM crashes when trying to publish the item. So we have to
* define both parts of the association with 0..n in PDL. But we don't
* want more than one superior department per department. So we are
* retrieving the data collection and get the first element of it, and
* return this.
*/
DataCollection collection;
collection = (DataCollection) get(SUPER_DEPARTMENT);
@ -89,6 +150,11 @@ public class SciDepartment extends GenericOrganizationalUnit {
}
public void setSuperDepartment(SciDepartment department) {
/* Similar hack as in getSuperDepartment() above. Here, we are
* retrieving the data collection, removing the first (and only item)
* and put the new one in it.
*
*/
SciDepartment oldSuperDepartment;
oldSuperDepartment = getSuperDepartment();

View File

@ -1,8 +1,28 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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 org.apache.log4j.Logger;
/**
* Initializer for {@link SciDepartment}.
*
* @author Jens Pelzetter
*/

View File

@ -1,6 +1,26 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
/**
* Loader for {@link SciDepartment}.
*
* @author Jens Pelzetter
*/

View File

@ -25,8 +25,11 @@ import com.arsdigita.persistence.DataObject;
import org.apache.log4j.Logger;
/**
* Special domain collection for the projects of an department.
*
* @author Jens Pelzetter
* @see SciDepartment
* @see SciProject
*/
public class SciDepartmentProjectsCollection extends DomainCollection {

View File

@ -25,8 +25,10 @@ import com.arsdigita.persistence.DataObject;
import org.apache.log4j.Logger;
/**
* Special domain collection for the subdepartments of a department.
*
* @author Jens Pelzetter
* @see SciDepartment
*/
public class SciDepartmentSubDepartmentsCollection extends DomainCollection {

View File

@ -0,0 +1,93 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.domain.DataObjectNotFoundException;
import com.arsdigita.persistence.DataObject;
import com.arsdigita.persistence.OID;
import java.math.BigDecimal;
/**
* <p>
* Specialized variant of {@link GenericPerson} for members of scientific
* organizations. Adds two fields to the fields of <code>GenericPerson</code>:
* </p>
* <dl>
* <dt><code>associatedMember</code></dt>
* <dd>Is the member an associated member?</dd>
* <dt><code>formerMember</code></dt>
* <dd>Is the member a former member?</dd>
* </ul>
*
* @author Jens Pelzetter
*/
public class SciMember extends GenericPerson {
public static final String ASSOCIATED_MEBER = "associatedMember";
public static final String FORMER_MEMBER = "formerMember";
public static final String BASE_DATA_OBJECT_TYPE =
"com.arsdigita.cms.contenttypes.SciMember";
private static final SciOrganizationConfig s_config =
new SciOrganizationConfig();
static {
s_config.load();
}
public SciMember() {
this(BASE_DATA_OBJECT_TYPE);
}
public SciMember(BigDecimal id) throws DataObjectNotFoundException {
this(new OID(BASE_DATA_OBJECT_TYPE, id));
}
public SciMember(OID oid) throws DataObjectNotFoundException {
super(oid);
}
public SciMember(DataObject dobj) {
super(dobj);
}
public SciMember(String type) {
super(type);
}
public static SciOrganizationConfig getConfig() {
return s_config;
}
public Boolean isFormerMember() {
return (Boolean )get(FORMER_MEMBER);
}
public void setFormerMember(Boolean formerMember) {
set(FORMER_MEMBER, formerMember);
}
public Boolean isAssociatedMember() {
return (Boolean) get(ASSOCIATED_MEBER);
}
public void setAssoicatedMember(Boolean associatedMember) {
set(ASSOCIATED_MEBER, associatedMember);
}
}

View File

@ -0,0 +1,45 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
/**
* Initializer for {@link SciMember}
*
* @author Jens Pelzetter
*/
public class SciMemberInitializer extends ContentTypeInitializer {
public SciMemberInitializer() {
super("empty.pdl.mf", SciMember.BASE_DATA_OBJECT_TYPE);
}
@Override
public String[] getStylesheets() {
return new String[]{
"/static/content-types/com/arsdigita/cms/contenttypes/SciMember.xsl"
};
}
@Override
public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciMember.xml";
}
}

View File

@ -0,0 +1,36 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
/**
* Loader for {@link SciMember}
*
* @author Jens Pelzetter
*/
public class SciMemberLoader extends AbstractContentTypeLoader {
private static final String[] TYPES = {
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciMember.xml"};
@Override
public String[] getTypes() {
return TYPES;
}
}

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.domain.DataObjectNotFoundException;
@ -8,8 +27,36 @@ import com.arsdigita.util.Assert;
import java.math.BigDecimal;
/**
* <p>
* A class for representing departments of an organization. Adds two
* associations to {@link GenericOrganizationalUnit}:
* </p>
* <ul>
* <li>departments</li>
* <li>projects</li>
* </ul>
* <p>
* The <em>departments</em> association is used to link an organization with
* its departments. The <em>project</em> association can be used to link an
* organization with projects.
* </p>
* <p>
* Also, two fields are added. The <code>shortDescription</code> takes a string
* of 500 characters for a short description of the organization. An detailed
* description of the organization can be put into the <code>description</code>
* field.
* </p>
* <p>
* There is an
* <a href="doc-files/ccm-sci-types-organization_entities.png">UML digram</a>
* with an overview of the content types and their associations. Please not that
* the diagram show a design sketch and not the actually implemented classes.
* </p>
*
* @author Jens Pelzetter
* @see GenericOrganizationalUnit
* @see SciDepartment
* @see SciProject^
*/
public class SciOrganization extends GenericOrganizationalUnit {
@ -50,7 +97,7 @@ public class SciOrganization extends GenericOrganizationalUnit {
super(type);
}
public static final SciOrganizationConfig getConfig() {
public static SciOrganizationConfig getConfig() {
return s_config;
}

View File

@ -5,6 +5,7 @@ import com.arsdigita.util.parameter.BooleanParameter;
import com.arsdigita.util.parameter.Parameter;
/**
* Configuration class for the complete ccm-sci-types-organization-module.
*
* @author Jens Pelzetter
*/

View File

@ -25,8 +25,11 @@ import com.arsdigita.persistence.DataObject;
import org.apache.log4j.Logger;
/**
* Special domain collection for the departments of an organization.
*
* @author Jens Pelzetter
* @see SciOrganization
* @see SciDepartment
*/
public class SciOrganizationDepartmentsCollection extends DomainCollection {

View File

@ -1,8 +1,28 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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 org.apache.log4j.Logger;
/**
* Initalizer for {@link SciOrganization}
*
* @author Jens Pelzetter
*/

View File

@ -1,6 +1,26 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
/**
* Loader for {@link SciOrganization}
*
* @author Jens Pelzetter
*/
@ -10,6 +30,7 @@ public class SciOrganizationLoader extends AbstractContentTypeLoader {
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciOrganization.xml"
};
@Override
public String[] getTypes() {
return TYPES;
}

View File

@ -25,8 +25,11 @@ import com.arsdigita.persistence.DataObject;
import org.apache.log4j.Logger;
/**
* Special domain collection for the projects of an organization.
*
* @author Jens Pelzetter
* @see SciOrganization
* @see SciProject
*/
public class SciOrganizationProjectsCollection extends DomainCollection {

View File

@ -28,8 +28,39 @@ import java.math.BigDecimal;
import java.util.Date;
/**
* <p>
* The class represents a (scientific) project. It extends
* {@link GenericOrganizationalUnit} and adds a relation for subprojects and
* some fields for additional information:
* </p>
* <dl>
* <dt><code>projectBegin</code></dt>
* <dd>The begin of the project</dd>
* <dt><code>projectEnd</code></dt>
* <dd>The end of the project</dd>
* <dt><code>shortDescription</code></dt>
* <dd>A short description (500 characters) of the project</dd>
* <dt><code>description</code></dt>
* <dd>A description of the project/<dd>
* <dt><code>funding</code><dt>
* <dd>A text about the funding of the project</dd>
* </dl>
* <p>
* Also, the class has some methods the access the associations defined by
* {@link SciOrganization} and {@link SciDepartment} with
* <code>SciProject</code>.
* </p>
* <p>
* There is an
* <a href="doc-files/ccm-sci-types-organization_entities.png">UML digram</a>
* with an overview of the content types and their associations. Please not that
* the diagram show a design sketch and not the actually implemented classes.
* </p>
*
* @author Jens Pelzetter
* @see GenericOrganizationalUnit
* @see SciOrganization
* @see SciDepartment
*/
public class SciProject extends GenericOrganizationalUnit {

View File

@ -25,6 +25,7 @@ import com.arsdigita.persistence.DataObject;
import org.apache.log4j.Logger;
/**
* Special domain collection for the departments involved in a project.
*
* @author Jens Pelzetter
*/

View File

@ -1,8 +1,28 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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 org.apache.log4j.Logger;
/**
* Initializer for {@link SciProject}.
*
* @author Jens Pelzetter
*/

View File

@ -1,6 +1,26 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
/**
* Loader for {@link SciProject}
*
* @author Jens Pelzetter
*/

View File

@ -25,6 +25,7 @@ import com.arsdigita.persistence.DataObject;
import org.apache.log4j.Logger;
/**
* Special domain collection for the organization involved in a project.
*
* @author Jens Pelzetter
*/

View File

@ -25,6 +25,7 @@ import com.arsdigita.persistence.DataObject;
import org.apache.log4j.Logger;
/**
* Special domain collection for the suprojects of a project.
*
* @author Jens Pelzetter
*/

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -16,8 +35,10 @@ import com.arsdigita.cms.ui.CMSDHTMLEditor;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
/**
* Edit form for the description of a SciDepartment.
*
* @author Jens Pelzetter
* @see SciDepartment
*/
public class SciDepartmentDescriptionEditForm
extends BasicItemForm

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
@ -10,8 +29,10 @@ import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
/**
* EditStep for the description of a SciDepartment.
*
* @author Jens Pelzetter
* @see SciDepartment
*/
public class SciDepartmentDescriptionStep extends SimpleEditStep {

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.PageState;
@ -6,8 +25,11 @@ import com.arsdigita.cms.contenttypes.SciDepartment;
import com.arsdigita.globalization.GlobalizedMessage;
/**
* Upload form for the description of a SciDepartment.
*
* @author Jens Pelzetter
* @see SciDepartment
* @see AbstractTextUploadForm
*/
public class SciDepartmentDescriptionUploadForm extends AbstractTextUploadForm {

View File

@ -0,0 +1,47 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.contenttypes.SciMember;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciDepartment;
/**
* Form for adding members to a SciDepartment. This form overwrites
* the {@link GenericOrganizationalUnitPersonAddForm#getPersonType()}
* to limit the selectable type for adding to {@link SciMember}.
*
* @author Jens Pelzetter
* @see SciDepartment
* @see SciMember
* @see GenericOrganizationalUnitPersonAddForm
*/
public class SciDepartmentMemberAddForm
extends GenericOrganizationalUnitPersonAddForm {
public SciDepartmentMemberAddForm(ItemSelectionModel itemModel) {
super(itemModel);
}
@Override
protected String getPersonType() {
return SciMember.class.getName();
}
}

View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
/**
* Edit step for adding members to a SciDepartment.
*
* @author Jens Pelzetter
*/
public class SciDepartmentMemberStep extends SimpleEditStep {
private static final String ADD_MEMBER_SHEET_NAME = "addMember";
public SciDepartmentMemberStep(ItemSelectionModel itemModel,
AuthoringKitWizard parent) {
this(itemModel, parent, null);
}
public SciDepartmentMemberStep(ItemSelectionModel itemModel,
AuthoringKitWizard parent,
String prefix) {
super(itemModel, parent, prefix);
BasicItemForm addMemberSheet =
new SciDepartmentMemberAddForm(itemModel);
add(ADD_MEMBER_SHEET_NAME,
(String) SciOrganizationGlobalizationUtil.globalize(
"sciorganization.ui.department.add_member").localize(),
new WorkflowLockedComponentAccess(addMemberSheet, itemModel),
addMemberSheet.getSaveCancelSection().getCancelButton());
GenericOrganizationalUnitPersonsTable memberTable = new GenericOrganizationalUnitPersonsTable(
itemModel);
setDisplayComponent(memberTable);
}
}

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -15,8 +34,11 @@ import com.arsdigita.cms.ui.ItemSearchWidget;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
/**
* Form for setting the superior organization of an SciDepartment.
*
* @author Jens Pelzetter
* @see SciDepartment
* @see SciOrganization
*/
public class SciDepartmentOrganizationForm
extends BasicItemForm

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
@ -20,8 +39,11 @@ import com.arsdigita.cms.dispatcher.Utilities;
import com.arsdigita.util.LockableImpl;
/**
* Sheet for showing the superior organization of a SciDepartment.
*
* @author Jens Pelzetter
* @see SciDepartment
* @see SciOrganization
*/
public class SciDepartmentOrganizationSheet
extends Table
@ -117,7 +139,7 @@ public class SciDepartmentOrganizationSheet
return m_orga.getTitle();
case 1:
return SciOrganizationGlobalizationUtil.globalize(
"sciorganization.ui.departemnt.organzation.remove");
"sciorganization.ui.department.organization.remove");
default:
return null;
}

View File

@ -1,14 +1,38 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciDepartment;
import com.arsdigita.cms.contenttypes.SciOrganization;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
/**
* Step for setting the superior organization of a SciDepartment.
*
* @author Jens Pelzetter
* @see SciDepartment
* @see SciOrganization
*/
public class SciDepartmentOrganizationStep extends SimpleEditStep {

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -15,8 +34,11 @@ import com.arsdigita.cms.ui.ItemSearchWidget;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
/**
* Form for linking an {@link SciDepartment} with a {@link SciProject}.
*
* @author Jens Pelzetter
* @see SciDepartment
* @see SciProject
*/
public class SciDepartmentProjectAddForm
extends BasicItemForm

View File

@ -1,14 +1,38 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciDepartment;
import com.arsdigita.cms.contenttypes.SciProject;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
/**
* Step for linking {@link SciDepartment}s with {@link SciProject}s.
*
* @author Jens Pelzetter
* @see SciDepartment
* @see SciProject
*/
public class SciDepartmentProjectsStep extends SimpleEditStep {

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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 java.math.BigDecimal;
@ -23,8 +42,11 @@ import com.arsdigita.cms.dispatcher.Utilities;
import com.arsdigita.util.LockableImpl;
/**
* Table for showing all {@link SciProject}s linked with a {@link SciDepartment}
*
* @author Jens Pelzetter
* @see SciDepartment
* @see SciProject
*/
public class SciDepartmentProjectsTable
extends Table

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
@ -12,8 +31,10 @@ import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
/**
* Step for editing a {@link SciDepartment}.
*
* @author Jens Pelzetter
* @see SciDepartment
*/
public class SciDepartmentPropertiesStep
extends GenericOrganizationalUnitPropertiesStep {
@ -71,13 +92,13 @@ public class SciDepartmentPropertiesStep
if (!config.getDepartmentAddContactHide()) {
addStep(new GenericOrganizationalUnitContactPropertiesStep(itemModel,
parent),
"cms.contenttypes.ui.orgaunit.contact");
"sciorganization.ui.department.contacts");
}
if (!config.getDepartmentAddPersonHide()) {
addStep(new GenericOrganizationalUnitPersonPropertiesStep(itemModel,
parent),
"cms.contenttypes.ui.orgaunit.persons");
addStep(new SciDepartmentMemberStep(itemModel,
parent),
"sciorganization.ui.department.members");
}
if (!config.getDepartmentAddSubDepartmentHide()) {

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -13,8 +32,10 @@ import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciDepartment;
/**
* Form for editing the basic properties of a {@link SciDepartment}.
*
* @author Jens Pelzetter
* @see SciDepartment
*/
public class SciDepartmentPropertyForm
extends GenericOrganizationalUnitPropertyForm

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -14,8 +33,10 @@ import com.arsdigita.cms.ui.ItemSearchWidget;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
/**
* Form for adding subdepartments to a {@link SciDepartment}.
*
* @author Jens Pelzetter
* @see SciDepartment
*/
public class SciDepartmentSubDepartmentAddForm
extends BasicItemForm

View File

@ -1,14 +1,36 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciDepartment;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
/**
* Step for adding subdepartments to a {@link SciDepartment}.
*
* @author Jens Pelzetter
* @see SciDepartment
*/
public class SciDepartmentSubDepartmentsStep extends SimpleEditStep {
@ -28,7 +50,7 @@ public class SciDepartmentSubDepartmentsStep extends SimpleEditStep {
new SciDepartmentSubDepartmentAddForm(itemModel);
add(ADD_SUBDEPARTMENT_SHEET_NAME,
(String) SciOrganizationGlobalizationUtil.globalize(
"sciorganization.ui.organization.add_subdepartment").localize(),
"sciorganization.ui.department.add_subdepartment").localize(),
new WorkflowLockedComponentAccess(addSubDepartmentSheet, itemModel),
addSubDepartmentSheet.getSaveCancelSection().getCancelButton());

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
@ -21,8 +40,10 @@ import com.arsdigita.util.LockableImpl;
import java.math.BigDecimal;
/**
* Table for showing the subdepartments of a {@link SciDepartment}.
*
* @author Jens Pelzetter
* @see SciDepartment
*/
public class SciDepartmentSubDepartmentsTable
extends Table

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -14,8 +33,10 @@ import com.arsdigita.cms.ui.ItemSearchWidget;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
/**
* Form for setting the superior department of a {@link SciDepartment}.
*
* @author Jens Pelzetter
* @see SciDepartment
*/
public class SciDepartmentSuperDepartmentForm
extends BasicItemForm

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
@ -19,8 +38,10 @@ import com.arsdigita.cms.dispatcher.Utilities;
import com.arsdigita.util.LockableImpl;
/**
* Sheet for showing the superior department of a {@link SciDepartment}.
*
* @author Jens Pelzetter
* @see SciDepartment
*/
public class SciDepartmentSuperDepartmentSheet
extends Table

View File

@ -1,14 +1,36 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciDepartment;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
/**
* Step for setting the superior department of a {@link SciDepartment}.
*
* @author Jens Pelzetter
* @see SciDepartment
*/
public class SciDepartmentSuperDepartmentStep extends SimpleEditStep {

View File

@ -0,0 +1,56 @@
package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.GenericPerson;
import com.arsdigita.cms.contenttypes.SciMember;
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;
/**
* Step for editing the basic properties of an {@link SciMember}.
*
* @author Jens Pelzetter
* @see SciMember
* @see GenericPerson
*/
public class SciMemberPropertiesStep extends SimpleEditStep {
public static final String EDIT_SHEET_NAME = "edit";
public SciMemberPropertiesStep(ItemSelectionModel itemModel,
AuthoringKitWizard parent) {
super(itemModel, parent);
BasicPageForm editSheet;
editSheet = new SciMemberPropertyForm(itemModel, this);
add(EDIT_SHEET_NAME,
(String) SciOrganizationGlobalizationUtil.globalize(
"sciorganization.ui.member.edit_basic_properties").localize(),
new WorkflowLockedComponentAccess(editSheet, itemModel),
editSheet.getSaveCancelSection().getCancelButton());
setDisplayComponent(getSciMemberPropertySheet(itemModel));
}
public static Component getSciMemberPropertySheet(
ItemSelectionModel itemModel) {
DomainObjectPropertySheet sheet;
sheet = (DomainObjectPropertySheet) GenericPersonPropertiesStep.
getGenericPersonPropertySheet(itemModel);
sheet.add(SciOrganizationGlobalizationUtil.globalize(
"sciorganization.ui.member.associatedMember"),
SciMember.ASSOCIATED_MEBER);
sheet.add(SciOrganizationGlobalizationUtil.globalize(
"sciorganization.ui.member.formerMember"),
SciMember.FORMER_MEMBER);
return sheet;
}
}

View File

@ -0,0 +1,112 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.event.FormInitListener;
import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.event.FormSubmissionListener;
import com.arsdigita.bebop.form.CheckboxGroup;
import com.arsdigita.bebop.form.Option;
import com.arsdigita.bebop.parameters.ArrayParameter;
import com.arsdigita.bebop.parameters.BooleanParameter;
import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.GenericPerson;
import com.arsdigita.cms.contenttypes.SciMember;
/**
* Form for editing the basic properties of a {@link SciMember}. This form
* extends the form for editing the basic properties of {@link GenericPerson}.
*
* @author Jens Pelzetter
* @see SciMember
* @see GenericPerson
* @see GenericPersonPropertyForm
*/
public class SciMemberPropertyForm
extends GenericPersonPropertyForm
implements FormInitListener,
FormSubmissionListener {
private SciMemberPropertiesStep m_step;
public SciMemberPropertyForm(ItemSelectionModel itemModel) {
this(itemModel, null);
}
public SciMemberPropertyForm(ItemSelectionModel itemModel,
SciMemberPropertiesStep step) {
super(itemModel);
m_step = step;
}
@Override
protected void addWidgets() {
super.addWidgets();
add(new Label(SciOrganizationGlobalizationUtil.globalize(
"sciorganization.ui.member.associatedMember")));
ParameterModel isAssociated = new BooleanParameter(
SciMember.ASSOCIATED_MEBER);
ArrayParameter associatedParam = new ArrayParameter(isAssociated);
CheckboxGroup associated = new CheckboxGroup(associatedParam);
associated.addOption(new Option(""));
add(associated);
add(new Label(SciOrganizationGlobalizationUtil.globalize(
"sciorganization.ui.member.formerMember")));
ParameterModel isFormer = new BooleanParameter(SciMember.FORMER_MEMBER);
ArrayParameter formerParam = new ArrayParameter(isFormer);
CheckboxGroup former = new CheckboxGroup(formerParam);
former.addOption(new Option(""));
add(former);
}
@Override
public void init(FormSectionEvent fse) {
super.init(fse);
FormData data = fse.getFormData();
SciMember member = (SciMember) super.initBasicWidgets(fse);
data.put(SciMember.ASSOCIATED_MEBER, member.isAssociatedMember());
data.put(SciMember.FORMER_MEMBER, member.isFormerMember());
}
@Override
public void process(FormSectionEvent fse) {
super.process(fse);
FormData data = fse.getFormData();
SciMember member = (SciMember) super.processBasicWidgets(fse);
if ((member != null) && getSaveCancelSection().getSaveButton().
isSelected(fse.getPageState())) {
member.setAssoicatedMember((Boolean) data.get(SciMember.ASSOCIATED_MEBER));
member.setFormerMember((Boolean) data.get(SciMember.FORMER_MEMBER));
member.save();
init(fse);
}
}
}

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -15,8 +34,11 @@ import com.arsdigita.cms.ui.ItemSearchWidget;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
/**
* Form for linking {@link SciOrganization}s with {@link SciDepartment}s.
*
* @author Jens Pelzetter
* @see SciOrganization
* @see SciDepartment
*/
public class SciOrganizationDepartmentAddForm
extends BasicItemForm

View File

@ -1,14 +1,38 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciDepartment;
import com.arsdigita.cms.contenttypes.SciOrganization;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
/**
* Step for adding {@link SciDepartment}s to a {@link SciOrganization}.
*
* @author Jens Pelzetter
* @see SciDepartment
* @see SciOrganization
*/
public class SciOrganizationDepartmentsStep extends SimpleEditStep {

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
@ -22,8 +41,12 @@ import com.arsdigita.util.LockableImpl;
import java.math.BigDecimal;
/**
* Table for showing the {@link SciDepartment}s linked to a
* {@link SciOrganization}.
*
* @author Jens Pelzetter
* @see SciOrganization
* @see SciDepartment
*/
public class SciOrganizationDepartmentsTable
extends Table

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -16,8 +35,10 @@ import com.arsdigita.cms.ui.CMSDHTMLEditor;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
/**
* Form for editing the description of a {@link SciOrganization}.
*
* @author Jens Pelzetter
* @see SciOrganization
*/
public class SciOrganizationDescriptionEditForm
extends BasicItemForm

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
@ -10,8 +29,10 @@ import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
/**
* Step for editing the description of a {@link SciOrganization}.
*
* @author Jens Pelzetter
* @see SciOrganization
*/
public class SciOrganizationDescriptionStep extends SimpleEditStep {

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.PageState;
@ -6,8 +25,11 @@ import com.arsdigita.cms.contenttypes.SciOrganization;
import com.arsdigita.globalization.GlobalizedMessage;
/**
* Form for uploading the description of a {@link SciOrganization}.
*
* @author Jens Pelzetter
* @see SciOrganization
* @see AbstractTextUploadForm
*/
public class SciOrganizationDescriptionUploadForm
extends AbstractTextUploadForm {

View File

@ -1,14 +1,34 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.globalization.GlobalizedMessage;
/**
* GlobalizationUtil for the ccm-sci-types-organization module.
*
* @author Jens Pelzetter
*/
public class SciOrganizationGlobalizationUtil {
public static final String BUNDLE_NAME = "com.arsdigita.cms.contenttypes.ui.OrganizationResources";
public static final String BUNDLE_NAME = "com.arsdigita.cms.contenttypes.ui.SciOrganizationResources";
public static GlobalizedMessage globalize(String key) {
return new GlobalizedMessage(key, BUNDLE_NAME);

View File

@ -0,0 +1,50 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.contenttypes.SciMember;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.GenericPerson;
import com.arsdigita.cms.contenttypes.SciOrganization;
/**
* Form for linking members with a {@link SciOrganization}. The form overwrites
* the {@link GenericOrganizationalUnitPersonAddForm#getPersonType()} to limit
* the selectable person type to {@link SciMember}.
*
* @author Jens Pelzetter
* @see SciOrganization
* @see SciMember
* @see GenericPerson
* @see GenericOrganizationalUnitPersonAddForm
*/
public class SciOrganizationMemberAddForm
extends GenericOrganizationalUnitPersonAddForm {
public SciOrganizationMemberAddForm(ItemSelectionModel itemModel) {
super(itemModel);
}
@Override
protected String getPersonType() {
return SciMember.class.getName();
}
}

View File

@ -0,0 +1,66 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciMember;
import com.arsdigita.cms.contenttypes.SciOrganization;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
/**
* Step for adding and removing member form a {@link SciOrganization}.
*
* @author Jens Pelzetter
* @see SciOrganizationMemberAddForm
* @see SciMember
* @see SciOrganization
*/
public class SciOrganizationMemberStep extends SimpleEditStep {
private static final String ADD_MEMBER_SHEET_NAME = "addMember";
public SciOrganizationMemberStep(ItemSelectionModel itemModel,
AuthoringKitWizard parent) {
this(itemModel, parent, null);
}
public SciOrganizationMemberStep(ItemSelectionModel itemModel,
AuthoringKitWizard parent,
String prefix) {
super(itemModel, parent, prefix);
BasicItemForm addMemberSheet =
new SciOrganizationMemberAddForm(itemModel);
add(ADD_MEMBER_SHEET_NAME,
(String) SciOrganizationGlobalizationUtil.globalize(
"sciorganization.ui.orgnization.add_member").localize(),
new WorkflowLockedComponentAccess(addMemberSheet, itemModel),
addMemberSheet.getSaveCancelSection().getCancelButton());
GenericOrganizationalUnitPersonsTable memberTable = new GenericOrganizationalUnitPersonsTable(
itemModel);
setDisplayComponent(memberTable);
}
}

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -15,8 +34,12 @@ import com.arsdigita.cms.ui.ItemSearchWidget;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
/**
* Form for linking projects with a {@link SciOrganization}.
*
* @author Jens Pelzetter
* @see SciOrganizationProjectAddForm
* @see SciOrganization
* @see SciProject
*/
public class SciOrganizationProjectAddForm
extends BasicItemForm

View File

@ -1,14 +1,40 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciOrganization;
import com.arsdigita.cms.contenttypes.SciProject;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
/**
* Step for adding and removing links from a {@link SciOrganization} to a
* {@link SciProject}.
*
* @author Jens Pelzetter
* @see SciOrganizationProjectAddForm
* @see SciOrganization
* @see SciProject
*/
public class SciOrganizationProjectsStep extends SimpleEditStep {

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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 java.math.BigDecimal;
@ -23,8 +42,12 @@ import com.arsdigita.cms.dispatcher.Utilities;
import com.arsdigita.util.LockableImpl;
/**
* Table for showing the links between a {@link SciOrganization} and
* {@link SciProject}s.
*
* @author Jens Pelzetter
* @see SciOrganization
* @see SciProject
*/
public class SciOrganizationProjectsTable
extends Table

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.Label;
@ -10,6 +29,7 @@ import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
/**
* Step for editing the basic properties of a {@link SciOrganization}.
*
* @author Jens Pelzetter
*/
@ -60,13 +80,13 @@ public class SciOrganizationPropertiesStep
if (!config.getOrganizationAddContactHide()) {
addStep(new GenericOrganizationalUnitContactPropertiesStep(itemModel,
parent),
"cms.contenttypes.ui.orgaunit.contact");
"sciorganization.ui.organization.contacts");
}
if (!config.getOrganizationAddPersonHide()) {
addStep(new GenericOrganizationalUnitPersonPropertiesStep(itemModel,
parent),
"cms.contenttypes.ui.orgaunit.persons");
addStep(new SciOrganizationMemberStep(itemModel,
parent),
"sciorganization.ui.organization_members");
}
if (!config.getOrganizationAddDepartmentHide()) {

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -14,6 +33,7 @@ import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciOrganization;
/**
* Form for editing the basic properties of a {@link SciOrganization}.
*
* @author Jens Pelzetter
*/

View File

@ -0,0 +1,108 @@
sciorganization.ui.project.subprojects.none=No subprojects found
sciorganization.ui.project.subproject=Subproject
sciorganization.ui.project.subproject.remove=Remove subproject
sciorganization.ui.project.subproject.up=Up
sciorganization.ui.project.subproject.down=Down
sciorganization.ui.project.subproject.confirm_remove=Are you sure to remove this department?
sciorganization.ui.project.select_subproject=Select project to add as subproject
sciorganization.ui.member.edit_basic_properties=Edit basic properties
sciorganization.ui.member.associatedMember=Associated member?
sciorganization.ui.member.formerMember=Former member?
sciorganization.ui.project.edit_desc=Edit description
sciorganization.ui.project.upload_desc=Upload description
sciorganization.ui.project.desc=Project description
sciorganization.ui.project.funding=Funding
sciorganization.ui.organization.add_department=Add department
sciorganization.ui.department.add_project=Add project
sciorganization.ui.organization.add_project=Add project
sciorganization.ui.department.edit_basic_properties=Edit basic properties
sciorganization.ui.department.basic_properties=Basic properties
sciorganization.ui.organization.edit_basic_sheet=Basic properties
sciorganization.ui.organization.basic_properties=Basic properties
sciorganization.ui.project.begin=Start of project
sciorganization.ui.project.end=End of project
sciorganization.ui.project.shortdesc=Short description
sciorganization.ui.project.edit_basic_sheet=Basic properties
sciorganization.ui.project.basic_properties=Basis properties
sciorganization.ui.department.add_subdepartment=Add subdepartment
sciorganization.ui.organization.departments.none=No departments found
sciorganization.ui.organization.department=Department
sciorganization.ui.organization.department.remove=Remove department
sciorganization.ui.organization.department.up=Up
sciorganization.ui.organization.department.down=Down
sciorganization.ui.organization.department.confirm_remove=Are you sure to remove this department?
sciorganization.ui.department.projects.none=No projects found
sciorganization.ui.department.project=Project
sciorganization.ui.department.project.remove=Remove project
sciorganization.ui.department.project.up=Up
sciorganization.ui.department.project.down=Down
sciorganization.ui.department.project.confirm_remove=Are you sure to remove this project?
sciorganization.ui.organization.select_department=Select department to add
sciorganization.ui.organization.projects.none=No projects found
sciorganization.ui.organization.project=Project
sciorganization.ui.organization.project.remove=Remove project
sciorganization.ui.organization.project.up=Up
sciorganization.ui.organization.project.down=Down
sciorganization.ui.organization.project.confirm_remove=Are you sure to remove this project?
sciorganization.ui.project.addSubProject=Add subproject
sciorganization.ui.department.select_project=Select project to add
sciorganization.ui.organization.select_project=Select project to add
sciorganization.ui.department.subdepartments.none=No subdepartments found
sciorganization.ui.department.subdepartment=Subdepartment
sciorganization.ui.department.subdepartment.remove=Remove subdepartment
sciorganization.ui.department.subdepartment.up=Up
sciorganization.ui.department.subdepartment.down=Down
sciorganization.ui.department.subdepartment.confirm_remove=Are you sure to remove this subdepartment?
sciorganizations.ui.department.shortdescription=Short description
sciorganizations.ui.organization.shortdescription=Short description
sciorganization.ui.department.select_subdepartment=Select subdepartment to add
sciorganization.ui.department.add_member=Add member
sciorganizations.ui.project.shortdesc=Short description
sciorganization.ui.project.addDepartment=Add involved department
sciorganization.ui.project.addOrga=Add involved organization
sciorganization.ui.project.departments.none=No involved departments found
sciorganization.ui.project.department=Involved department
sciorganization.ui.project.department.remove=Remove involved department
sciorganization.ui.project.department.up=Up
sciorganization.ui.project.department.down=Down
sciorganization.ui.project.organization.confirm_remove=Are you sure to remove this involved organization?
sciorganization.ui.project.select_organization=Select organization to add
sciorganization.ui.project.organization.none=No involved organizations found
sciorganization.ui.project.organization=Involved organization
sciorganization.ui.project.organization.remove=Remove involved organization
sciorganization.ui.project.organization.up=Up
sciorganization.ui.project.organization.down=Down
sciorganization.ui.project.select_department=Select department to add
sciorganization.ui.project.superproject_none=No superior project found
sciorganization.ui.project.superproject=Superior project
sciorganization.ui.project.superproject.remove=Remove superior project
sciorganization.ui.project.superproject.confirm_remove=Are you sure to remove this superior project?
sciorganization.ui.department.select_superdepartment=Superior department
sciorganization.ui.project.setSuperProject=Set superior project
sciorganization.ui.project.description.upload=Upload project description
sciorganization.ui.project.description.upload.mimetype=Type of file
sciorganization.ui.organization.edit_desc=Edit description
sciorganization.ui.organization.upload_desc=Upload description
sciorganization.ui.organization.desc=Description
sciorganization.ui.organization.description=Description
sciorganization.ui.organization.description.upload=Upload description
sciorganization.ui.organization.description.upload.mimetype=Type of file
sciorganization.ui.project.select_superproject=Select superior project
sciorganization.ui.department.setSuperDepartment=Set superior project
sciorganization.ui.department.superdepartment_none=No superior department found
sciorganization.ui.department.superdepartment=Superior department
sciorganization.ui.department.superdepartment.remove=Remove superior department
sciorganization.ui.department.superdepartment.confirm_remove=Are you sure to remove the superior department?
sciorganization.ui.department.setOrganization=Set organization
sciorganization.ui.department.select_organization=Select organization
sciorganization.ui.department.organization_none=No assigned organization found
sciorganization.ui.department.organization=Organization
sciorganization.ui.department.organization.remove=Remove assigned organization
sciorganization.ui.department.organization.confirm_remove=Are you sure sure to remove to assigned organization?
sciorganization.ui.department.edit_desc=Edit description
sciorganization.ui.department.upload_desc=Upload description
sciorganization.ui.department.desc=Description
sciorganization.ui.department.description=Description
sciorganization.ui.department.description.upload=Upload description
sciorganization.ui.department.description.upload.mimetype=Type of file
sciorganization.ui.orgnization.add_member=Add member

View File

@ -0,0 +1,108 @@
sciorganization.ui.project.subprojects.none=Keine Unterprojekte gefunden
sciorganization.ui.project.subproject=Unterprojekt
sciorganization.ui.project.subproject.remove=Unterprojekt entfernen
sciorganization.ui.project.subproject.up=Hoch
sciorganization.ui.project.subproject.down=Runter
sciorganization.ui.project.subproject.confirm_remove=Wollen sie dieses Unterprojekt wirklich entfernen?
sciorganization.ui.project.select_subproject=Projekt zum Hinzuf\u00fcgen als Unterprojekt ausw\u00e4hlen
sciorganization.ui.member.edit_basic_properties=Basiseigenschaften bearbeiten
sciorganization.ui.member.associatedMember=Assoziertes Mitglied?
sciorganization.ui.member.formerMember=Ehemaliges Mitglied?
sciorganization.ui.project.edit_desc=Beschreibung bearbeiten
sciorganization.ui.project.upload_desc=Beschreibung hochladen
sciorganization.ui.project.desc=Projektbeschreibung
sciorganization.ui.project.funding=Finanzierung
sciorganization.ui.organization.add_department=Abteilung hinzuf\u00fcgen
sciorganization.ui.department.add_project=Projekt hinzuf\u00fcgen
sciorganization.ui.organization.add_project=Projekt hinzuf\u00fcgen
sciorganization.ui.department.edit_basic_properties=Basiseigenschaften bearbeiten
sciorganization.ui.department.basic_properties=Basiseigenschaften
sciorganization.ui.organization.edit_basic_sheet=Basiseigenschaften
sciorganization.ui.organization.basic_properties=Basiseigenschaften
sciorganization.ui.project.begin=Begin des Projektes
sciorganization.ui.project.end=Ende des Projektes
sciorganization.ui.project.shortdesc=Kurzbeschreibung
sciorganization.ui.project.edit_basic_sheet=Basiseigenschaften
sciorganization.ui.project.basic_properties=Basiseigenschaften
sciorganization.ui.department.add_subdepartment=Unterabteilung hinzuf\u00fcgen
sciorganization.ui.organization.departments.none=Keine Abteilungen gefunden
sciorganization.ui.organization.department=Abteilung
sciorganization.ui.organization.department.remove=Abteilung entfernen
sciorganization.ui.organization.department.up=Hoch
sciorganization.ui.organization.department.down=Runter
sciorganization.ui.organization.department.confirm_remove=Wollen sie diese Abteilung wirklich entfernen?
sciorganization.ui.department.projects.none=Keine Projekte gefunden
sciorganization.ui.department.project=Projekt
sciorganization.ui.department.project.remove=Projekt entfernen
sciorganization.ui.department.project.up=Hoch
sciorganization.ui.department.project.down=Runter
sciorganization.ui.department.project.confirm_remove=Wollen sie dieses Projekt wirklich entfernen?
sciorganization.ui.organization.select_department=Abteilung zum hinzuf\u00fcgen ausw\u00e4hlen
sciorganization.ui.organization.projects.none=Keine Projekte gefunden
sciorganization.ui.organization.project=Projekt
sciorganization.ui.organization.project.remove=Projekt entfernen
sciorganization.ui.organization.project.up=Hoch
sciorganization.ui.organization.project.down=Runter
sciorganization.ui.organization.project.confirm_remove=Wollen sie dieses Projekt wirklich entfernen?
sciorganization.ui.project.addSubProject=Unterprojekt hinzuf\u00fcgen
sciorganization.ui.department.select_project=Projekt zum hinzuf\u00fcgen ausw\u00e4hlen
sciorganization.ui.organization.select_project=Projekt zum hinzuf\u00fcgen ausw\u00e4hlen
sciorganization.ui.department.subdepartments.none=Keine Unterabteilungen gefunden
sciorganization.ui.department.subdepartment=Unterabteilung
sciorganization.ui.department.subdepartment.remove=Unterabteilung entfernen
sciorganization.ui.department.subdepartment.up=Hoch
sciorganization.ui.department.subdepartment.down=Runter
sciorganization.ui.department.subdepartment.confirm_remove=Wollen sie diese Unterabteilung wirklich entfernen
sciorganizations.ui.department.shortdescription=Kurzbeschreibung
sciorganizations.ui.organization.shortdescription=Kurzbeschreibung
sciorganization.ui.department.select_subdepartment=Unterabteilung zum hinzuf\u00fcgen ausw\u00e4hlen
sciorganization.ui.department.add_member=Mitglied ausw\u00e4hlen
sciorganizations.ui.project.shortdesc=Kurzbeschreibung
sciorganization.ui.project.addDepartment=Beteiligte Abteilung hinzuf\u00fcgen
sciorganization.ui.project.addOrga=Beteiligte Organization hinzuf\u00fcgen
sciorganization.ui.project.departments.none=Keine beteiligen Abteilungen gefunden
sciorganization.ui.project.department=Beteiligte Abteilung
sciorganization.ui.project.department.remove=Beteiligte Abteilung entfernen
sciorganization.ui.project.department.up=Hoch
sciorganization.ui.project.department.down=Runter
sciorganization.ui.project.organization.confirm_remove=Wollen diese beteiligte Organization wirklich entfernen?
sciorganization.ui.project.select_organization=Organisation zum hinzuf\u00fcgen ausw\u00e4hlen
sciorganization.ui.project.organization.none=Keine beteiligten Organisationen gefunden
sciorganization.ui.project.organization=Beteiligte Organisation
sciorganization.ui.project.organization.remove=Beteiligte Organisation entfernen
sciorganization.ui.project.organization.up=Hoch
sciorganization.ui.project.organization.down=Runter
sciorganization.ui.project.select_department=Abteilung zum hinzuf\u00fcgen ausw\u00e4hlen
sciorganization.ui.project.superproject_none=Kein \u00fcbergeordnetes Projekt gefunden
sciorganization.ui.project.superproject=\u00dcbergeordnetes Projekt
sciorganization.ui.project.superproject.remove=\u00dcbergeordnetes Projekt entfernen
sciorganization.ui.project.superproject.confirm_remove=Wollen sie dieses \u00fcbergeordnete projekt wirklich entfernen?
sciorganization.ui.department.select_superdepartment=\u00dcbergeordnete Abteilung
sciorganization.ui.project.setSuperProject=\u00dcbergeordnetes Projekt setzen
sciorganization.ui.project.description.upload=Projektbeschreibung hochladen
sciorganization.ui.project.description.upload.mimetype=Dateityp
sciorganization.ui.organization.edit_desc=Beschreibung bearbeiten
sciorganization.ui.organization.upload_desc=Beschreibung hochladen
sciorganization.ui.organization.desc=Beschreibung
sciorganization.ui.organization.description=Beschreibung
sciorganization.ui.organization.description.upload=Beschriebung hochladen
sciorganization.ui.organization.description.upload.mimetype=Dateityp
sciorganization.ui.project.select_superproject=\u00dcbergeordnetes Projekt ausw\u00e4hlen
sciorganization.ui.department.setSuperDepartment=\u00dcbergeordnetes Projekt setzen
sciorganization.ui.department.superdepartment_none=Keine \u00fcbergeordnete Abteilung gefunden
sciorganization.ui.department.superdepartment=\u00dcbergeordnete Abteilung
sciorganization.ui.department.superdepartment.remove=\u00dcbergeordnete Abteilung entfernen
sciorganization.ui.department.superdepartment.confirm_remove=Wollen sie die \u00fcbergeordnete Abteilung wirklich entfernen?
sciorganization.ui.department.setOrganization=Organization setzen
sciorganization.ui.department.select_organization=Organization ausw\u00e4hlen
sciorganization.ui.department.organization_none=Keine zugeordnete Organization gefunden
sciorganization.ui.department.organization=Organisation
sciorganization.ui.department.organization.remove=Zugeordnete Organisation entfernen
sciorganization.ui.department.organization.confirm_remove=Wollen sie zugeordnete Organisation wirklich entfernen?
sciorganization.ui.department.edit_desc=Beschreibung bearbeiten
sciorganization.ui.department.upload_desc=Beschreibung hochladen
sciorganization.ui.department.desc=Beschreibung
sciorganization.ui.department.description=Beschreibung
sciorganization.ui.department.description.upload=Beschreibung hochladen
sciorganization.ui.department.description.upload.mimetype=Dateityp
sciorganization.ui.orgnization.add_member=Mitglied hinzuf\u00fcgen

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -15,6 +34,8 @@ import com.arsdigita.cms.ui.ItemSearchWidget;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
/**
* Form for adding a link between a {@link SciProject} and a
* {@link SciDepartment}.
*
* @author Jens Pelzetter
*/

View File

@ -1,12 +1,35 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciDepartment;
import com.arsdigita.cms.contenttypes.SciProject;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
/**
* Step for adding and removing links between a {@link SciProject} and a
* {@link SciDepartment}.
*
* @author Jens Pelzetter
*/

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
@ -22,6 +41,8 @@ import com.arsdigita.util.LockableImpl;
import java.math.BigDecimal;
/**
* Table for showing the links between a {@link SciProject} and a
* {@link SciDepartment}.
*
* @author Jens Pelzetter
*/

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -16,6 +35,7 @@ import com.arsdigita.cms.ui.CMSDHTMLEditor;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
/**
* Form for editing the description of a {@link SciProject}.
*
* @author Jens Pelzetter
*/
@ -31,7 +51,7 @@ public class SciProjectDescriptionEditForm
@Override
protected void addWidgets() {
add(new Label(SciOrganizationGlobalizationUtil.globalize(
"sciorganizazion.ui.project.description")));
"sciorganization.ui.project.description")));
ParameterModel descParam = new StringParameter(
SciProject.PROJECT_DESCRIPTION);
TextArea desc;
@ -47,7 +67,7 @@ public class SciProjectDescriptionEditForm
if (!SciProject.getConfig().getProjectFundingHide()) {
add(new Label(SciOrganizationGlobalizationUtil.globalize(
"sciorganizazion.ui.project.funding")));
"sciorganization.ui.project.funding")));
ParameterModel fundingParam = new StringParameter(
SciProject.FUNDING);
TextArea funding;

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
@ -10,6 +29,7 @@ import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
/**
* Step for editing the description of a {@link SciProject}.
*
* @author Jens Pelzetter
*/

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.PageState;
@ -6,6 +25,7 @@ import com.arsdigita.cms.contenttypes.SciProject;
import com.arsdigita.globalization.GlobalizedMessage;
/**
* Form for uploading the description of a {@link SciProject}.
*
* @author Jens Pelzetter
*/

View File

@ -0,0 +1,43 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.contenttypes.SciMember;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciProject;
/**
* Form for adding a link between a {@link SciProject} and a {@link SciMember}.
*
* @author Jens Pelzetter
*/
public class SciProjectMemberAddForm
extends GenericOrganizationalUnitPersonAddForm {
public SciProjectMemberAddForm(
ItemSelectionModel itemModel) {
super(itemModel);
}
@Override
protected String getPersonType() {
return SciMember.class.getName();
}
}

View File

@ -0,0 +1,60 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciProject;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
/**
* Step for adding and removing member to and from a {@link SciProject}.
*
* @author Jens Pelzetter
*/
public class SciProjectMemberStep extends SimpleEditStep {
private static final String ADD_MEMBER_SHEET_NAME = "addMember";
public SciProjectMemberStep(ItemSelectionModel itemModel,
AuthoringKitWizard parent) {
this(itemModel, parent, null);
}
public SciProjectMemberStep(ItemSelectionModel itemModel,
AuthoringKitWizard parent,
String prefix) {
super(itemModel, parent, prefix);
BasicItemForm addMemberSheet =
new SciProjectMemberAddForm(itemModel);
add(ADD_MEMBER_SHEET_NAME,
(String) SciOrganizationGlobalizationUtil.globalize(
"sciorganization.ui.department.add_member").localize(),
new WorkflowLockedComponentAccess(addMemberSheet, itemModel),
addMemberSheet.getSaveCancelSection().getCancelButton());
GenericOrganizationalUnitPersonsTable memberTable = new GenericOrganizationalUnitPersonsTable(
itemModel);
setDisplayComponent(memberTable);
}
}

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -15,6 +34,8 @@ import com.arsdigita.cms.ui.ItemSearchWidget;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
/**
* Form for adding a link between a {@link SciProject} and a
* {@link SciOrganization}.
*
* @author Jens Pelzetter
*/

View File

@ -1,12 +1,35 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciOrganization;
import com.arsdigita.cms.contenttypes.SciProject;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
/**
* Step for adding and removing links between a {@link SciProject} and
* {@link SciOrganization}s.
*
* @author Jens Pelzetter
*/

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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 java.math.BigDecimal;
@ -24,6 +43,8 @@ import com.arsdigita.cms.dispatcher.Utilities;
import com.arsdigita.util.LockableImpl;
/**
* Table for showing the links between a {@link SciProject} and
* {@link SciOrganization}s.
*
* @author Jens Pelzetter
*/

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
@ -12,6 +31,7 @@ import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
/**
* Step for editing the basic properties of a {@link SciProject}.
*
* @author Jens Pelzetter
*/
@ -79,17 +99,15 @@ public class SciProjectPropertiesStep
if (!config.getProjectAddContactHide()) {
addStep(new GenericOrganizationalUnitContactPropertiesStep(itemModel,
parent),
"cms.contenttypes.ui.orgaunit.contact");
"sciorganization.ui.project.contacts");
}
if (!config.getProjectAddPersonHide()) {
addStep(new GenericOrganizationalUnitPersonPropertiesStep(itemModel,
parent),
"cms.contenttypes.ui.orgaunit.persons");
addStep(new SciProjectMemberStep(itemModel,
parent),
"sciorganization.ui.project.members");
}
//super.addSteps(itemModel, parent);
if (!config.getProjectSetSuperProjectHide()) {
addStep(new SciProjectSuperProjectStep(itemModel,
parent),

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -18,6 +37,7 @@ import java.util.Calendar;
import java.util.GregorianCalendar;
/**
* Form for editing the basic properties of a {@link SciProject}.
*
* @author Jens Pelzetter
*/
@ -59,7 +79,7 @@ public class SciProjectPropertyForm
add(end);
add(new Label(SciOrganizationGlobalizationUtil.globalize(
"sciorganizations.ui.projectshortdesc")));
"sciorganizations.ui.project.shortdesc")));
ParameterModel shortDescParam = new StringParameter(
SciProject.PROJECT_SHORT_DESCRIPTION);
TextArea shortDesc = new TextArea(shortDescParam);

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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 java.math.BigDecimal;
@ -22,6 +41,7 @@ import com.arsdigita.cms.dispatcher.Utilities;
import com.arsdigita.util.LockableImpl;
/**
* Table of showing the subprojects of a {@link SciProject}.
*
* @author Jens Pelzetter
*/

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -14,6 +33,7 @@ import com.arsdigita.cms.ui.ItemSearchWidget;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
/**
* Form for adding a subproject to a {@link SciProject}.
*
* @author Jens Pelzetter
*/

View File

@ -1,6 +1,26 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciProject;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
@ -8,6 +28,7 @@ import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import org.apache.log4j.Logger;
/**
* Step for adding and removing subprojects to and from a {@link SciProject}.
*
* @author Jens Pelzetter
*/

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.FormData;
@ -14,6 +33,7 @@ import com.arsdigita.cms.ui.ItemSearchWidget;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
/**
* Form for setting the superior project of a {@link SciProject}.
*
* @author Jens Pelzetter
*/

View File

@ -1,3 +1,22 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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;
@ -20,6 +39,7 @@ import com.arsdigita.cms.dispatcher.Utilities;
import com.arsdigita.util.LockableImpl;
/**
* Sheet for showing the superior project of a {@link SciProject}.
*
* @author Jens Pelzetter
*/

View File

@ -1,12 +1,33 @@
/*
* Copyright (c) 2010 Jens Pelzetter,
* for the Center of Social Politics of the University of Bremen
*
* 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.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.SciProject;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
/**
* Step for setting the superior project of a {@link SciProject}.
*
* @author Jens Pelzetter
*/

View File

@ -0,0 +1,20 @@
<!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.SciMember']"
mode="cms:CT_graphics"
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_SciMember">
<p><xsl:value-of select="./name"/></p>
</xsl:template>
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SciMember']" mode="cms:CT_text"
name="cms:CT_text_com_arsdigita_cms_contenttypes_SciMember">
<p><xsl:value-of select="./name"/></p>
</xsl:template>
</xsl:stylesheet>