Another part of globalization of content types: Labels for publications module.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2762 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
0ab4e576e6
commit
4cdc5b3cd5
|
|
@ -71,6 +71,10 @@ public class Event extends GenericArticle {
|
|||
|
||||
private final static org.apache.log4j.Logger s_log =
|
||||
org.apache.log4j.Logger.getLogger(Event.class);
|
||||
/** Data object type for this domain object */
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.cms.contenttypes.Event";
|
||||
|
||||
/** PDL property name for lead (summary) */
|
||||
public static final String LEAD = "lead";
|
||||
/** PDL property name for event date */
|
||||
|
|
@ -90,8 +94,6 @@ public class Event extends GenericArticle {
|
|||
/** PDL property name for cost */
|
||||
public static final String COST = "cost";
|
||||
public static final String RECENT_EVENT = "com.arsdigita.cms.contenttypes.RecentEvent";
|
||||
/** Data object type for this domain object */
|
||||
public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.Event";
|
||||
private static final EventConfig s_config = new EventConfig();
|
||||
|
||||
static {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
|||
* Event contenttype package persistently into database.
|
||||
*
|
||||
* It uses the base class to create the database schema and the required
|
||||
* table entries for the contenttype.
|
||||
* table entries for the contenttype, just setting this content type specific
|
||||
* properties.
|
||||
*
|
||||
* @author Rafael H. Schloming <rhs@mit.edu>
|
||||
* @version $Revision: #6 $ $Date: 2004/08/17 $
|
||||
|
|
@ -40,14 +41,16 @@ private static final String[] TYPES = {
|
|||
};
|
||||
|
||||
/**
|
||||
* Provides the of Event contenttype property definitions
|
||||
* implementing the parent's class abstract method.
|
||||
* Provides the of Event contenttype property definitions implementing the
|
||||
* parent's class abstract method.
|
||||
*
|
||||
* The file defines the types name as displayed in content center
|
||||
* select box and the authoring steps. These are loaded into database.
|
||||
* In the file there are definitions of the type's name as displayed in
|
||||
* content center select box and the authoring steps. These are loaded into
|
||||
* database.
|
||||
*
|
||||
* @return String Atring Array of fully qualified file names
|
||||
*/
|
||||
@Override
|
||||
public String[] getTypes() {
|
||||
return TYPES;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,11 +62,9 @@ import java.util.ArrayList;
|
|||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* This class represents a content item.
|
||||
|
|
@ -190,6 +188,10 @@ import java.util.Set;
|
|||
*/
|
||||
public class ContentItem extends VersionedACSObject implements CustomCopy {
|
||||
|
||||
/** Internal logger instance to faciliate debugging. Enable logging output
|
||||
* by editing /WEB-INF/conf/log4j.properties int hte runtime environment
|
||||
* and set com.arsdigita.cms.ContentItem=DEBUG by uncommenting
|
||||
* or adding the line. */
|
||||
private static final Logger s_log = Logger.getLogger(ContentItem.class);
|
||||
private static final Logger s_logDenorm =
|
||||
Logger.getLogger(ContentItem.class.getName()
|
||||
|
|
|
|||
|
|
@ -68,6 +68,12 @@ public class ContentType extends ACSObject {
|
|||
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.cms.ContentType";
|
||||
/** The path content types are expected to store their type definition
|
||||
* file (usually [domainObjectBaseName].xml by convention). Any content
|
||||
* item should use this location unless there are good reasons for a
|
||||
* different location. */
|
||||
public static final String CONTENTTYPE_DEFINITIONFILE_PATH =
|
||||
"/WEB-INF/content-types/";
|
||||
public static final String OBJECT_TYPE = "associatedObjectType";
|
||||
/** The name or title of the content type, e.g. "File Storage Item" */
|
||||
public static final String LABEL = "label";
|
||||
|
|
@ -177,44 +183,66 @@ public class ContentType extends ACSObject {
|
|||
*/
|
||||
public GlobalizedMessage getLabel() {
|
||||
|
||||
GlobalizedMessage label;
|
||||
GlobalizedMessage label; // the the type's label to return
|
||||
|
||||
// We assume the name of the resource bundle is the same as the
|
||||
// ObjectType with "Resources" appended.
|
||||
// We assume the name of the ObjectType is the base for various
|
||||
// resources we need so we determine it first.
|
||||
String objectTypeName = getAssociatedObjectType();
|
||||
if (s_log.isDebugEnabled()) {
|
||||
s_log.debug(
|
||||
"Object Type is " + objectTypeName );
|
||||
}
|
||||
String bundleName = objectTypeName.concat("Resources");
|
||||
|
||||
// First try: check, if the resource file really exists, and if it does,
|
||||
// use it.
|
||||
String resourcePath = "/" + bundleName.replace(".","/")
|
||||
.concat(".properties");
|
||||
// First we'll try to locate the resource file assuming it is named
|
||||
// as the object type with resources.properties appended.
|
||||
String bundleResourcePath = "/".concat(objectTypeName.replace(".","/"))
|
||||
.concat("Resources.properties");
|
||||
if (s_log.isDebugEnabled()) {
|
||||
s_log.debug(
|
||||
"resource path is " + resourcePath );
|
||||
s_log.debug("resource path is " + bundleResourcePath );
|
||||
}
|
||||
if (this.getClass().getClassLoader().getResource(resourcePath)!=null) {
|
||||
// Property file exists, use it!
|
||||
// We assume the name of the key is the same as the ObjectType
|
||||
// minus the domain part ("com.arsdigita.") and staring with "cms"
|
||||
// and ".type_label" appended
|
||||
int keyBegin = objectTypeName.indexOf("cms");
|
||||
String labelKey = objectTypeName.substring(keyBegin)
|
||||
// Alternatively we may try the content item's definition file. Just
|
||||
// guessing its name here.
|
||||
String typeResourcePath = CONTENTTYPE_DEFINITIONFILE_PATH
|
||||
.concat(objectTypeName.replace(".","/"))
|
||||
.concat(".xml");
|
||||
|
||||
// We assume the name of the key in resource bundle is the same as
|
||||
// the ObjectType minus the domain part ("com.arsdigita.")
|
||||
// and starting with "cms" and suffix ".type_label" appended
|
||||
String labelKey = objectTypeName.substring(objectTypeName.indexOf("cms"))
|
||||
.concat(".type_label")
|
||||
.toLowerCase();
|
||||
|
||||
// First try: check, if the resource file really exists, and if it does,
|
||||
// use it.
|
||||
if (this.getClass().getClassLoader().getResource(bundleResourcePath)!=null) {
|
||||
// Property file exists, use it!
|
||||
String bundleName = objectTypeName.concat("Resources");
|
||||
// Create the globalized label
|
||||
label = new GlobalizedMessage(labelKey, bundleName);
|
||||
} else {
|
||||
// No property file found, try to use the item's definition file
|
||||
if (this.getClass().getClassLoader()
|
||||
.getResource(typeResourcePath)!=null) {
|
||||
// item definition file found. use it's
|
||||
// determine the bundle from attribute "descriptionBundle"
|
||||
// which should provide an item specific description (but
|
||||
// unfortunately due to lazy programmers not always does).
|
||||
// As a proper example:
|
||||
// /WEB-INF/content-types/com.arsditita.cms.contenttypes.Event.xml
|
||||
String bundleName = "REPLACE ME"; // REPLACE ME!
|
||||
|
||||
label = new GlobalizedMessage(labelKey, bundleName);
|
||||
|
||||
} else {
|
||||
// Giving up!
|
||||
|
||||
// As a fall back use the (not globalized) "name" of the type as
|
||||
// stored in the database to display the type to the user. Is is
|
||||
// used as the "key" in a GloablizedMessage, which it is definitely
|
||||
// not. But GlobalizedMessage displayse the key if it could not be
|
||||
// not. But GlobalizedMessage displays the key if it could not be
|
||||
// found in a resource file.
|
||||
label = new GlobalizedMessage(getName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -226,9 +254,9 @@ public class ContentType extends ACSObject {
|
|||
* 'names' a content type and is not localizible. It is stored in the
|
||||
* database and a symbolic name for the formal ID. It may contain any
|
||||
* characters but is preferable an english term. Examples are "FAQ item" or
|
||||
* "Article" or "Multipart Aricle". It has to be unique system-wide.
|
||||
* "Article" or "Multipart Article". It has to be unique system-wide.
|
||||
*
|
||||
* @return The label
|
||||
* @return The name (ie. may be used as a non-localized label)
|
||||
*/
|
||||
public String getName() {
|
||||
return (String) get(LABEL);
|
||||
|
|
@ -242,7 +270,7 @@ public class ContentType extends ACSObject {
|
|||
* stored under 'label', when globliation was not an issue.
|
||||
* The Method is primarly used in the initial loading step.
|
||||
*
|
||||
* @param name The label
|
||||
* @param name The name
|
||||
*/
|
||||
public void setName(String name) {
|
||||
set(LABEL, name);
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ import org.xml.sax.Attributes;
|
|||
import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
/**
|
||||
* This is a helper tool for loading data for the RelationAttributes (Database Driven Enums)
|
||||
* into the database in a loader of a module. This helper class uses a XML format for loading
|
||||
* the enum data, which looks like this:
|
||||
* This is a helper tool for loading data for the RelationAttributes (Database
|
||||
* Driven Enums) into the database in a loader of a module. This helper class
|
||||
* uses a XML format for loading the enum data, which looks like this:
|
||||
*
|
||||
* <pre>
|
||||
* <ddenums>
|
||||
|
|
@ -40,27 +40,35 @@ import org.xml.sax.helpers.DefaultHandler;
|
|||
* </ddenums>
|
||||
* </pre>
|
||||
*
|
||||
* The root element is {@code <ddenums>} which can appear only once per file. The {@code <ddenums} can have multiple
|
||||
* {@code <ddenum>} elements as child elements. The {@code <ddenum> element has one attribute, {@code name} which contains
|
||||
* the name of the enumeration. Each {@code <ddenum>} may have multiple {@code<entry>} child elements. The
|
||||
* {@code <entry>} element has three attributes.
|
||||
* The root element is {@code <ddenums>} which can appear only once per file.
|
||||
* The {@code <ddenums} can have multiple {@code <ddenum>} elements as child
|
||||
* elements. The {@code <ddenum> element has one attribute, {@code name} which
|
||||
* contains the name of the enumeration. Each {@code <ddenum>} may have multiple
|
||||
* {@code<entry>} child elements. The {@code <entry>} element has three attributes.
|
||||
*
|
||||
* <dl>
|
||||
* <dt>{@code key}</dt><dd>The key of the entry. This attribute is mandatory.</dd>
|
||||
* <dt>{@code lang}</dt><dd>The language of the entry. This attribute is mandatory. The combination of {@code key}
|
||||
* <dt>{@code lang}</dt><dd>The language of the entry. This attribute is
|
||||
* mandatory. The combination of {@code key}
|
||||
* and {@code lang} should be unique.</dd>
|
||||
* <dt>{@code id}</dt><dd>This attribute is optional and contains the database id of the entry if necessary. The
|
||||
* <dt>{@code id}</dt><dd>This attribute is optional and contains the
|
||||
* database id of the entry if necessary. The
|
||||
* value is maybe ignored by this import tool.</dd>
|
||||
* </dl>
|
||||
*
|
||||
* Each entry has at least a {@code <value>} element as child. The {@code <value>} element contains the value of the
|
||||
* enum entry. Optionally there can also be can description element containing a description of the entry.
|
||||
* Each entry has at least a {@code <value>} element as child. The {@code <value>}
|
||||
* element contains the value of the enum entry. Optionally there can also be
|
||||
* an description element containing a description of the entry.
|
||||
*
|
||||
* @author Jens Pelzetter <jens@jp-digital.de>
|
||||
* @version $Id$
|
||||
*/
|
||||
public class RelationAttributeImportTool {
|
||||
|
||||
/** Internal logger instance to faciliate debugging. Enable logging output
|
||||
* by editing /WEB-INF/conf/log4j.properties int hte runtime environment
|
||||
* and set com.arsdigita.cms.RelationAttributeImportTool=DEBUG
|
||||
* by uncommenting or adding the line. */
|
||||
private final static Logger LOGGER = Logger.getLogger(RelationAttributeImportTool.class);
|
||||
|
||||
public void loadData(final String fileName) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ import com.arsdigita.persistence.Session;
|
|||
import com.arsdigita.runtime.ScriptContext;
|
||||
import com.arsdigita.util.Assert;
|
||||
import com.arsdigita.util.UncheckedWrapperException;
|
||||
// import com.arsdigita.workflow.simple.TaskCollection;
|
||||
import com.arsdigita.workflow.simple.WorkflowTemplate;
|
||||
import com.arsdigita.xml.XML;
|
||||
import java.io.BufferedReader;
|
||||
|
|
@ -54,7 +53,7 @@ import org.apache.log4j.Logger;
|
|||
* Specifically, it provides type loading functionality in the "run" method
|
||||
* that can be used by content types to reduce code duplication.
|
||||
*
|
||||
* NOTE: Implementing clases may need to define and use configuration parameters
|
||||
* NOTE: Implementing classes may need to define and use configuration parameters
|
||||
* to adjust things at load time. These MUST be part of Loader class
|
||||
* implementation and itself and can not be delegated to a Config object
|
||||
* (derived from AbstractConfig). They will (and can) not be persisted into an
|
||||
|
|
@ -63,7 +62,7 @@ import org.apache.log4j.Logger;
|
|||
* @author Rafael H. Schloming <rhs@mit.edu>
|
||||
* @author Sören Bernstein <quasi@quasiweb.de>
|
||||
* @version $Revision: #754 $ $Date: 2005/09/02 $ $Author: pboy $
|
||||
**/
|
||||
*/
|
||||
public abstract class AbstractContentTypeLoader extends PackageLoader {
|
||||
|
||||
/** Internal logger instance to faciliate debugging. Enable logging output
|
||||
|
|
@ -74,6 +73,12 @@ public abstract class AbstractContentTypeLoader extends PackageLoader {
|
|||
AbstractContentTypeLoader.class);
|
||||
|
||||
/**
|
||||
* The run method is invoked to execute the loader step. Before calling
|
||||
* this method any required parameters registered by the noargs
|
||||
* constructer should be set.
|
||||
*
|
||||
* Overwrites the parent's class abstract method adding the tast specific
|
||||
* createTypes() method.
|
||||
*
|
||||
* @param ctx
|
||||
*/
|
||||
|
|
@ -96,7 +101,9 @@ public abstract class AbstractContentTypeLoader extends PackageLoader {
|
|||
* @param ctx
|
||||
*/
|
||||
private void createTypes(ScriptContext ctx) {
|
||||
|
||||
XMLContentTypeHandler handler = new XMLContentTypeHandler();
|
||||
// Retrieve the content type definition file(s)
|
||||
String[] contentTypes = getTypes();
|
||||
for (String contentType : contentTypes) {
|
||||
XML.parseResource(contentType, handler);
|
||||
|
|
@ -104,8 +111,8 @@ public abstract class AbstractContentTypeLoader extends PackageLoader {
|
|||
|
||||
List types = handler.getContentTypes();
|
||||
Session ssn = ctx.getSession();
|
||||
DataCollection sections = ssn.retrieve(
|
||||
ContentSection.BASE_DATA_OBJECT_TYPE);
|
||||
DataCollection sections = ssn.retrieve(ContentSection
|
||||
.BASE_DATA_OBJECT_TYPE);
|
||||
|
||||
while (sections.next()) {
|
||||
ContentSection section = (ContentSection)
|
||||
|
|
@ -145,7 +152,8 @@ public abstract class AbstractContentTypeLoader extends PackageLoader {
|
|||
final ContentType type,
|
||||
final LifecycleDefinition ld,
|
||||
final WorkflowTemplate wf) {
|
||||
ContentTypeLifecycleDefinition.updateLifecycleDefinition(section, type,
|
||||
ContentTypeLifecycleDefinition.updateLifecycleDefinition(section,
|
||||
type,
|
||||
ld);
|
||||
|
||||
ContentTypeWorkflowTemplate.updateWorkflowTemplate(section, type, wf);
|
||||
|
|
@ -154,9 +162,18 @@ public abstract class AbstractContentTypeLoader extends PackageLoader {
|
|||
/**
|
||||
* Provides a list of contenttype property definitions.
|
||||
*
|
||||
* The file defines the types name as displayed in content center
|
||||
* select box and the authoring steps. These are loaded into database.
|
||||
* In the file there are definitions of the type's name as displayed in
|
||||
* content center select box and the authoring steps. These are loaded into
|
||||
* database.
|
||||
*
|
||||
* It is a XML file and by convention named after the content type or the
|
||||
* module's base name which implements one or more content types. It is
|
||||
* usually something like
|
||||
* <pre>
|
||||
* "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Event.xml"
|
||||
* </pre>
|
||||
* The path is fixed by convention and the name is the same as the
|
||||
* content types's.
|
||||
* Must be implemented by each content type loader to provide its
|
||||
* specific definition files.
|
||||
* @return
|
||||
|
|
@ -185,12 +202,13 @@ public abstract class AbstractContentTypeLoader extends PackageLoader {
|
|||
*
|
||||
* <p>If this returns an empty list, then the content type will be loaded
|
||||
* into the section specified by {@link
|
||||
* com.arsdigita.cms.ContentSectionConfig#getDefaultContentSection()}.</p>
|
||||
* com.arsdigita.cms.ContentSectionConfig#get
|
||||
* @return DefaultContentSection()}.</p>
|
||||
*
|
||||
* <p>The default implementation returns an empty list.</p>
|
||||
*
|
||||
* @post return != null
|
||||
**/
|
||||
*/
|
||||
protected List getContentSections() {
|
||||
return java.util.Collections.EMPTY_LIST;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ import com.arsdigita.util.parameter.CompoundParameterReader;
|
|||
import com.arsdigita.util.parameter.ParameterReader;
|
||||
|
||||
/**
|
||||
* Base class which loaders of all modules extend.
|
||||
* Base class which loaders of all modules will extend.
|
||||
*
|
||||
* @author Rafael H. Schloming <rhs@mit.edu>
|
||||
* @version $Id: PackageLoader.java 2070 2010-01-28 08:47:41Z pboy $
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public abstract class AbstractScript extends AbstractParameterContext
|
|||
* constructer should be set.
|
||||
*
|
||||
* @param context the context in which to run the script
|
||||
**/
|
||||
*/
|
||||
|
||||
public abstract void run(ScriptContext context);
|
||||
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ public class Councillor extends Person {
|
|||
set(SURGERY_DETAILS, surgeryDetails);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBaseDataObjectType() {
|
||||
return BASE_DATA_OBJECT_TYPE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
package com.arsdigita.london.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.TextAsset;
|
||||
// import com.arsdigita.cms.TextPage;
|
||||
import com.arsdigita.cms.contenttypes.GenericArticle;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
import com.arsdigita.persistence.OID;
|
||||
|
||||
|
|
@ -25,7 +25,8 @@ import com.arsdigita.persistence.OID;
|
|||
*
|
||||
* @version $Revision: #5 $ $Date: 2004/04/08 $
|
||||
**/
|
||||
public class Person extends TextPage {
|
||||
// Originally inherited from TextPage which has been ironed out.
|
||||
public class Person extends GenericArticle {
|
||||
|
||||
private final static org.apache.log4j.Logger s_log =
|
||||
org.apache.log4j.Logger.getLogger(Person.class);
|
||||
|
|
@ -51,15 +52,18 @@ public class Person extends TextPage {
|
|||
super(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return (String)get(DESCRIPTION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDescription(String description) {
|
||||
set(DESCRIPTION, description);
|
||||
}
|
||||
|
||||
public static final int SUMMARY_LENGTH = 200;
|
||||
@Override
|
||||
public String getSearchSummary() {
|
||||
return com.arsdigita.util.StringUtils.truncateString(getDescription(),
|
||||
SUMMARY_LENGTH,
|
||||
|
|
@ -93,6 +97,7 @@ public class Person extends TextPage {
|
|||
asset.setText(body);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBaseDataObjectType() {
|
||||
return BASE_DATA_OBJECT_TYPE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import com.arsdigita.cms.ItemSelectionModel;
|
|||
import com.arsdigita.cms.ui.CMSDHTMLEditor;
|
||||
import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
|
||||
|
||||
import com.arsdigita.coventry.cms.contenttypes.Councillor;
|
||||
import com.arsdigita.london.contenttypes.Councillor;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.coventry.cms.contenttypes.ui;
|
||||
package com.arsdigita.london.contenttypes.ui;
|
||||
|
||||
|
||||
import com.arsdigita.bebop.Component;
|
||||
|
|
@ -24,8 +24,7 @@ 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.cms.util.GlobalizationUtil ;
|
||||
import com.arsdigita.coventry.cms.contenttypes.Councillor;
|
||||
import com.arsdigita.london.contenttypes.Councillor;
|
||||
|
||||
/**
|
||||
* Authoring step to edit the simple attributes of the Councillor content type (and
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.coventry.cms.contenttypes.ui;
|
||||
package com.arsdigita.london.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.bebop.FormProcessException;
|
||||
import com.arsdigita.bebop.Label;
|
||||
|
|
@ -29,10 +29,10 @@ import com.arsdigita.bebop.parameters.TrimmedStringParameter;
|
|||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.ui.CMSDHTMLEditor;
|
||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||
import com.arsdigita.cms.ui.authoring.NameValidationListener;
|
||||
//import com.arsdigita.cms.ui.authoring.NameValidationListener;
|
||||
import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
|
||||
|
||||
import com.arsdigita.coventry.cms.contenttypes.Person;
|
||||
import com.arsdigita.london.contenttypes.Person;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -75,6 +75,9 @@ public class PersonEditForm extends BasicPageForm
|
|||
}
|
||||
|
||||
protected void addWidgets() {
|
||||
|
||||
// Should be refactored to use super.addWidgets first to add the
|
||||
// Standard widgets in a standard way!
|
||||
add(new Label("Name:"));
|
||||
TextField titleWidget = new TextField(new TrimmedStringParameter(TITLE));
|
||||
titleWidget.addValidationListener(new NotNullValidationListener());
|
||||
|
|
@ -89,7 +92,7 @@ public class PersonEditForm extends BasicPageForm
|
|||
|
||||
add(new Label("URL:"));
|
||||
TextField nameWidget = new TextField(new TrimmedStringParameter(NAME));
|
||||
nameWidget.addValidationListener(new NameValidationListener());
|
||||
// nameWidget.addValidationListener(new NameValidationListener());
|
||||
nameWidget.setOnFocus("defaulting = false");
|
||||
nameWidget.setOnBlur(
|
||||
"if (this.value == '') " +
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.coventry.cms.contenttypes.ui;
|
||||
package com.arsdigita.london.contenttypes.ui;
|
||||
|
||||
|
||||
import com.arsdigita.bebop.Component;
|
||||
|
|
@ -24,7 +24,7 @@ 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.coventry.cms.contenttypes.Person;
|
||||
import com.arsdigita.london.contenttypes.Person;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ package com.arsdigita.cms.contentassets.ui;
|
|||
|
||||
import com.arsdigita.bebop.FormData;
|
||||
import com.arsdigita.bebop.FormProcessException;
|
||||
import com.arsdigita.bebop.Label;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.event.FormInitListener;
|
||||
import com.arsdigita.bebop.event.FormProcessListener;
|
||||
|
|
@ -38,7 +37,8 @@ import com.arsdigita.cms.ui.authoring.BasicItemForm;
|
|||
* @author Jens Pelzetter <jens@jp-digital.de>
|
||||
* @version $Id$
|
||||
*/
|
||||
public class SciPublicationsAboutDiscussesForm extends BasicItemForm implements FormProcessListener,
|
||||
public class SciPublicationsAboutDiscussesForm extends BasicItemForm
|
||||
implements FormProcessListener,
|
||||
FormInitListener {
|
||||
|
||||
private ItemSearchWidget itemSearch;
|
||||
|
|
|
|||
|
|
@ -43,14 +43,16 @@ public class SciPublicationsAboutDiscussesStep extends SimpleEditStep {
|
|||
final String prefix) {
|
||||
super(itemModel, parent, prefix);
|
||||
|
||||
final BasicItemForm addDiscussedSheet = new SciPublicationsAboutDiscussesForm(itemModel);
|
||||
final BasicItemForm addDiscussedSheet =
|
||||
new SciPublicationsAboutDiscussesForm(itemModel);
|
||||
add(ADD_DISCUSSED,
|
||||
SciPublicationsAboutGlobalizationUtil.globalize(
|
||||
"com.arsdigita.cms.contentassets.about.discusses.add"),
|
||||
new WorkflowLockedComponentAccess(addDiscussedSheet, itemModel),
|
||||
addDiscussedSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
final SciPublicationsAboutDiscussesTable discussedTable = new SciPublicationsAboutDiscussesTable(itemModel);
|
||||
final SciPublicationsAboutDiscussesTable discussedTable =
|
||||
new SciPublicationsAboutDiscussesTable(itemModel);
|
||||
setDisplayComponent(discussedTable);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ public class PersonalProjects implements ContentGenerator {
|
|||
config.load();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generateContent(final Element parent,
|
||||
final GenericPerson person,
|
||||
final PageState state,
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.articleInCollectedVolume_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.Publication.Resources"
|
||||
descriptionKey="publications.ui.articleInCollectedVolume.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.ArticleInCollectedVolumePropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.articleInJournal_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
descriptionKey="publications.ui.articleInJournal.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.ArticleInJournalPropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.collectedVolume_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
descriptionKey="publications.ui.collectedVolume.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.CollectedVolumePropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.expertise_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
descriptionKey="publications.ui.expertise.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.ExpertisePropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.greyLiterature_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
descriptionKey="publications.ui.greyLiterature.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.GreyLiteraturePropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.inProceedings_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
descriptionKey="publications.ui.inProceedings.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.InProceedingsPropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.InternetArticle_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
descriptionKey="publications.ui.internetArticle.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.InternetArticlePropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.journal_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationResources"
|
||||
descriptionKey="publications.ui.journal.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.JournalPropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.monograph_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
descriptionKey="publications.ui.monograph.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttpyes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttpyes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.MonographPropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.proceedings_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
descriptionKey="publications.ui.proceedings.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.ProceedingsPropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.publication_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
descriptionKey="publications.ui.publication_properties.title.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.PublicationPropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.publication_with_publishers_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
descriptionKey="publications.ui.publication_with_publisher.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.PublicationWithPublisherPropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.publisher_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
descriptionKey="publications.ui.publisher.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.PublisherPropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.review_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
descriptionKey="publications.ui.review.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.ReviewPropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.series_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
descriptionKey="publications.ui.series.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.SeriesPropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.unPublished_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
descriptionKey="publications.ui.unPublished.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.UnPublishedPropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<ctd:authoring-step
|
||||
labelKey="publications.ui.workingPaper_properties.title"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
labelBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
descriptionKey="publications.ui.workingPaper.basic_properties.description"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.PublicationsResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.WorkingPaperPropertiesStep"
|
||||
ordering="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -417,3 +417,21 @@ publications.ui.publication.language=Language of publication
|
|||
publications.ui.series.number=Volume of series
|
||||
person.ui.publications.header=Publications with {0} as author
|
||||
person.ui.publications.header.alias_of=(Alias of {0})
|
||||
cms.contenttypes.ArticleInCollectedVolume.type_label=Publication / Article in Collected Volume
|
||||
cms.contenttypes.ArticleInJournal.type_label=Publication / Article in Journal
|
||||
cms.contenttypes.CollectedVolume.type_label=Publication / Collected Volume
|
||||
cms.contenttypes.Expertise.type_label=Publication / Expertise
|
||||
cms.contenttypes.GreyLiterature.type_label=Publication / Grey Literature
|
||||
cms.contenttypes.InProceedings.type_label=Publication / In Proceedings
|
||||
cms.contenttypes.InternetArticle.type_label=Publication / Internet Article
|
||||
cms.contenttypes.Journal.type_label=Publication / Journal
|
||||
cms.contenttypes.Monograph.type_label=Publication / Monograph
|
||||
cms.contenttypes.Proceedings.type_label=Publication / Proceedings
|
||||
cms.contenttypes.Publication.type_label=Publication
|
||||
cms.contenttypes.PublicationWithPublisher.type_label=Publication with Publisher
|
||||
cms.contenttypes.Publisher.type_label=Publisher
|
||||
cms.contenttypes.Review.type_label=Publication / Review
|
||||
cms.contenttypes.SciAuthor.type_label=Publication / Author
|
||||
cms.contenttypes.Series.type_label=Publication / Series
|
||||
cms.contenttypes.UnPublished.type_label=Publication / Unpublished
|
||||
cms.contenttypes.WorkingPaper.type_label=Publication / Working Paper
|
||||
|
|
@ -416,3 +416,21 @@ publications.ui.publication.language=Sprache der Publikation
|
|||
publications.ui.series.number=Band der Reihe
|
||||
person.ui.publications.header=Publikationen mit {0} als Autorin/Autor
|
||||
person.ui.publications.header.alias_of=\ (Alias von {0})
|
||||
cms.contenttypes.ArticleInCollectedVolume.type_label=Publkation / Sammelbandbeitrag
|
||||
cms.contenttypes.ArticleInJournal.type_label=Publikation / Zeitschriftenbeitrag
|
||||
cms.contenttypes.CollectedVolume.type_label=Publication / Collected Volume
|
||||
cms.contenttypes.Expertise.type_label=Publikation / Gutachten
|
||||
cms.contenttypes.GreyLiterature.type_label=Publikation / Graue Literatur
|
||||
cms.contenttypes.InProceedings.type_label=Publikation / Beitrag in Tagungsband
|
||||
cms.contenttypes.InternetArticle.type_label=Publikation / Internet Artikel
|
||||
cms.contenttypes.Journal.type_label=Publikation / Zeitschrift
|
||||
cms.contenttypes.Monograph.type_label=Publikation / Monographie
|
||||
cms.contenttypes.Proceedings.type_label=Publikation / Tagungsband
|
||||
cms.contenttypes.Publication.type_label=Publikation
|
||||
cms.contenttypes.PublicationWithPublisher.type_label=Publication with Publisher
|
||||
cms.contenttypes.Publisher.type_label=Verlag
|
||||
cms.contenttypes.Review.type_label=Publication / Rezension
|
||||
cms.contenttypes.SciAuthor.type_label=Publikation / AutorIn
|
||||
cms.contenttypes.Series.type_label=Publikation / Serie
|
||||
cms.contenttypes.UnPublished.type_label=Publikation / Unver\u00f6ffentlicht
|
||||
cms.contenttypes.WorkingPaper.type_label=Publikation / Arbeitspapier
|
||||
|
|
@ -27,7 +27,7 @@ import com.arsdigita.globalization.GlobalizedMessage;
|
|||
public class PublicationGlobalizationUtil {
|
||||
|
||||
public static final String BUNDLE_NAME =
|
||||
"com.arsdigita.cms.contenttypes.ui.PublicationResources";
|
||||
"com.arsdigita.cms.contenttypes.ui.PublicationsResources";
|
||||
|
||||
public static GlobalizedMessage globalize(String key) {
|
||||
return new GlobalizedMessage(key, BUNDLE_NAME);
|
||||
|
|
|
|||
|
|
@ -39,8 +39,10 @@ public class Loader extends PackageLoader implements ThemeDirectorConstants {
|
|||
|
||||
private static final Logger s_log = Logger.getLogger(Loader.class);
|
||||
|
||||
@Override
|
||||
public void run(final ScriptContext ctx) {
|
||||
new KernelExcursion() {
|
||||
@Override
|
||||
public void excurse() {
|
||||
setEffectiveParty(Kernel.getSystemParty());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue