Lokalisierung und Resource Bundles vervollständigt.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2175 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
0a59971906
commit
e44bbd4b28
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.arsdigita.cms;
|
||||
|
||||
import com.arsdigita.globalization.MixedResourceBundle;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author pb
|
||||
*/
|
||||
public class CMSResources extends MixedResourceBundle {
|
||||
|
||||
public CMSResources() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
|
@ -13,8 +13,6 @@ cms.instantiationexception=Instantiation Exception:
|
|||
cms.nosuchmethodexception=No-Such-Method Exception:
|
||||
cms.templates=Templates
|
||||
cms.title=Title
|
||||
no=No
|
||||
yes=Yes
|
||||
mime_type_jsp=JSP
|
||||
mime_type_xsl=XSL
|
||||
|
||||
|
|
@ -49,7 +47,6 @@ cms.contenttypes.link_to_map=Link to Map:
|
|||
cms.contenttypes.location=Location:
|
||||
cms.contenttypes.main_contributor=Main Contributor:
|
||||
cms.contenttypes.minutes_type_not_registered=Minutes type not registered
|
||||
cms.contenttypes.news_date=Date:
|
||||
cms.contenttypes.newsitem_type_not_registered=NewsItem type not registered
|
||||
cms.contenttypes.no_content_section=No content section
|
||||
cms.contenttypes.no_section=No section
|
||||
|
|
@ -64,7 +61,7 @@ cms.contenttypes.start_date=Start Date:
|
|||
cms.contenttypes.start_time=Start Time:
|
||||
cms.contenttypes.subjectitems=SubjectItems:
|
||||
cms.contenttypes.summary=Description:
|
||||
cms.contenttypes.title=Title:
|
||||
cms.contenttypes.title=Page Title:
|
||||
cms.contenttypes.template.body_text.title=Body text
|
||||
cms.contenttypes.template.body_text.description=Edit the body text
|
||||
cms.contenttypes.shared.assign_categories.title=Assign Categories
|
||||
|
|
@ -113,7 +110,7 @@ cms.contenttypes.ui.lead_line=Description:
|
|||
cms.contenttypes.ui.link_to_map=Link to Map:
|
||||
cms.contenttypes.ui.location=Location:
|
||||
cms.contenttypes.ui.main_contributor=Main Contributor:
|
||||
cms.contenttypes.ui.name=Name:
|
||||
cms.contenttypes.ui.name=Name (URL stub):
|
||||
cms.contenttypes.ui.opening_times=Opening Times:
|
||||
cms.contenttypes.ui.person_specification=Person Specification:
|
||||
cms.contenttypes.ui.ref_code=Ref. Code:
|
||||
|
|
@ -371,14 +368,12 @@ cms.ui.authoring.invalid_create_component=Creation component for parent content
|
|||
cms.ui.authoring.missing_content_type=Missing content type
|
||||
cms.ui.authoring.missing_item_id=Missing item id
|
||||
cms.ui.authoring.name=Name:
|
||||
cms.ui.authoring.name_url=Name (URL):
|
||||
cms.ui.authoring.no_asset=No asset
|
||||
cms.ui.authoring.no_content_types_were_found=No content types were found
|
||||
cms.ui.authoring.no_current_wizard=No current wizard
|
||||
cms.ui.authoring.none=<i>none</i>
|
||||
cms.ui.authoring.not_implemented=Not Implemented
|
||||
cms.ui.authoring.page_launch_date=Launch Date:
|
||||
cms.ui.authoring.page_title=Page Title:
|
||||
cms.ui.authoring.remove_image=Remove image
|
||||
cms.ui.authoring.select_an_existing_image=Select an existing image
|
||||
cms.ui.authoring.sql_error_in_getting_byte_content=SQL Error in getting byte content!
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.arsdigita.cms;
|
||||
|
||||
import com.arsdigita.globalization.MixedResourceBundle;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author pb
|
||||
*/
|
||||
public class CMSResources_de extends MixedResourceBundle {
|
||||
|
||||
public CMSResources_de() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
|
@ -6,15 +6,13 @@ cms.cannot_create_xml_document=Kann XML Dokument nicht erstellen
|
|||
cms.cant_promote_folders=Can't promote folders
|
||||
cms.classnotfoundexception=ClassNotFoundException:
|
||||
cms.illegalaccessexception=IllegalAccessException:
|
||||
cms.image.erroneous_jpeg_marker_length=Erroneous JPEG marker length
|
||||
cms.image.expected_soi_marker_first=Expected SOI marker first
|
||||
cms.image.erroneous_jpeg_marker_length=Fehlerhafte L\u00e4nge des JPEG marker
|
||||
cms.image.expected_soi_marker_first=Zuerst den SOI marker erwartet
|
||||
cms.image.not_a_jpeg_file=Keine JPEG Datei
|
||||
cms.instantiationexception=Ausnahmebedinung bei Instantiierung:
|
||||
cms.nosuchmethodexception=NoSuchMethodException:
|
||||
cms.templates=Vorlagen
|
||||
cms.title=Titel
|
||||
no=Nein
|
||||
yes=Ja
|
||||
mime_type_jsp=JSP
|
||||
mime_type_xsl=XSL
|
||||
|
||||
|
|
@ -49,7 +47,6 @@ cms.contenttypes.link_to_map=Karte (Link)\:
|
|||
cms.contenttypes.location=Ort:
|
||||
cms.contenttypes.main_contributor=Hauptredner\:
|
||||
cms.contenttypes.minutes_type_not_registered=Inhaltstyp Minutes nicht registriert
|
||||
cms.contenttypes.news_date=Datum:
|
||||
cms.contenttypes.newsitem_type_not_registered=Inhaltstyp NewsItem nicht registriert
|
||||
cms.contenttypes.no_content_section=Kein Inhaltsabschnitt
|
||||
cms.contenttypes.no_section=Kein Abschnitt
|
||||
|
|
@ -113,7 +110,7 @@ cms.contenttypes.ui.lead_line=Beschreibung (Lead Zeile):
|
|||
cms.contenttypes.ui.link_to_map=Lageplan:
|
||||
cms.contenttypes.ui.location=Ort:
|
||||
cms.contenttypes.ui.main_contributor=Hauptredner\:
|
||||
cms.contenttypes.ui.name=Name:
|
||||
cms.contenttypes.ui.name=Name (als Teil-URL):
|
||||
cms.contenttypes.ui.opening_times=\u00d6ffnungszeiten\:
|
||||
cms.contenttypes.ui.person_specification=Person Specification:
|
||||
cms.contenttypes.ui.ref_code=Ref. Code:
|
||||
|
|
@ -292,7 +289,7 @@ cms.ui.min_launch=Kleinstes Startdatum
|
|||
cms.ui.my_workspace=Mein Portal
|
||||
cms.ui.name=Name
|
||||
cms.ui.name_prompt=Name:
|
||||
cms.ui.need_category_map_privilege=Need categorize items privilege on that category
|
||||
cms.ui.need_category_map_privilege=Es wird die Berechtigung zur Kategorisierung von Dokumenten ben\u00f6tigt.
|
||||
cms.ui.new_folder=Neuen Ordner erstellen
|
||||
cms.ui.new_item=Neues Element
|
||||
cms.ui.no=Nein
|
||||
|
|
@ -367,13 +364,11 @@ cms.ui.authoring.invalid_create_component=Creation component for parent content
|
|||
cms.ui.authoring.missing_content_type=Dokumenttyp fehlt
|
||||
cms.ui.authoring.missing_item_id=Fehlende Item-ID
|
||||
cms.ui.authoring.name=Name:
|
||||
cms.ui.authoring.name_url=Name (URL):
|
||||
cms.ui.authoring.no_asset=Kein Asset
|
||||
cms.ui.authoring.no_content_types_were_found=Keine Inhaltstypen gefunden
|
||||
cms.ui.authoring.no_current_wizard=No current wizard
|
||||
cms.ui.authoring.not_implemented=Nicht implementiert
|
||||
cms.ui.authoring.page_launch_date=Ver\u00f6ffentlichungsdatum:
|
||||
cms.ui.authoring.page_title=Titel der Seite:
|
||||
cms.ui.authoring.remove_image=Bild entfernen
|
||||
cms.ui.authoring.select_an_existing_image=Vorhandenes Bild ausw\u00c4hlen
|
||||
cms.ui.authoring.sql_error_in_getting_byte_content=SQL Fehler beim Holen von Bin\u00e4rinhalt!
|
||||
|
|
@ -382,7 +377,7 @@ cms.ui.authoring.steps=Authoring steps
|
|||
cms.ui.authoring.submission_cancelled=Submission Cancelled
|
||||
cms.ui.authoring.text_type=Text Type:
|
||||
cms.ui.authoring.this_article_does_not_have_an_image=Dieser Artikel hat kein Bild.
|
||||
cms.ui.authoring.title=Titel:
|
||||
cms.ui.authoring.title=Titel der Seite:
|
||||
cms.ui.authoring.unable_to_load_file=Datei konnte nicht geladen werden:
|
||||
cms.ui.authoring.upload_a_new_image=Neues Bild hochladen
|
||||
cms.ui.authoring.upload_image=Bild hochladen:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.arsdigita.cms;
|
||||
|
||||
import com.arsdigita.globalization.MixedResourceBundle;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author pb
|
||||
*/
|
||||
public class CMSResources_en_GB extends MixedResourceBundle {
|
||||
|
||||
public CMSResources_en_GB() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.arsdigita.cms;
|
||||
|
||||
import com.arsdigita.globalization.MixedResourceBundle;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author pb
|
||||
*/
|
||||
public class CMSResources_fr extends MixedResourceBundle {
|
||||
|
||||
public CMSResources_fr() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
|
@ -53,7 +53,7 @@ cms.contenttypes.ui.job_description=Description du poste
|
|||
cms.contenttypes.ui.lead=Fil conducteur
|
||||
cms.contenttypes.ui.lead_line=Ligne de t\u00eate
|
||||
cms.contenttypes.ui.link_to_map=Lien vers la carte
|
||||
cms.contenttypes.ui.name=Nom
|
||||
cms.contenttypes.ui.name=Nom (URL)
|
||||
cms.contenttypes.ui.opening_times=Heures d'ouverture
|
||||
cms.contenttypes.ui.person_specification=D\u00e9tails concernant la personne
|
||||
cms.contenttypes.ui.ref_code=Code de r\u00e9f\u00e9rence
|
||||
|
|
@ -65,7 +65,7 @@ cms.contenttypes.ui.services_provided=Services propos\u00e9s
|
|||
cms.contenttypes.ui.summary=R\u00e9sum\u00e9
|
||||
cms.contenttypes.ui.summary=R\u00e9sum\u00e9
|
||||
cms.contenttypes.ui.there_are_no_events=Il n'y a aucun \u00e9venement
|
||||
cms.contenttypes.ui.title=Titre
|
||||
cms.contenttypes.ui.title=Titre de la page
|
||||
cms.contenttypes.ui.view_image=voir l'image
|
||||
|
||||
# Package com.arsdigita.cms.dispatcher
|
||||
|
|
@ -216,13 +216,11 @@ cms.ui.authoring.invalid_create_component=TRANSLATE THIS: Creation component for
|
|||
cms.ui.authoring.missing_content_type=Type de contenu manquant
|
||||
cms.ui.authoring.missing_item_id=Identifiant de l'\u00e9l\u00e9ment manquant
|
||||
cms.ui.authoring.name=Nom
|
||||
cms.ui.authoring.name_url=Nom (URL)
|
||||
cms.ui.authoring.no_asset=TRANSLATE THIS: No asset (cms.ui.authoring.no_asset)
|
||||
cms.ui.authoring.no_content_types_were_found=Pas de type de contenu trouv\u00e9
|
||||
cms.ui.authoring.no_current_wizard=TRANSLATE THIS: No current wizard (cms.ui.authoring.no_current_wizard)
|
||||
cms.ui.authoring.not_implemented=Non Impl\u00e9ment\u00e9
|
||||
cms.ui.authoring.page_launch_date=Date de lancement
|
||||
cms.ui.authoring.page_title=Titre de la page
|
||||
cms.ui.authoring.remove_image=Supprimer l'image
|
||||
cms.ui.authoring.select_an_existing_image=S\u00e9lectionner une image existante
|
||||
cms.ui.authoring.sql_error_in_getting_byte_content=Erreur SQL en r\u00e9cup\u00e9rant le contenu
|
||||
|
|
@ -530,8 +528,6 @@ cms.ui.workflow.you_are_assigned_to_this_item=Vous \u00eates assign\u00e9 \u00e0
|
|||
cms.ui.workflow.your_active_tasks=Vos t\u00e2ches actives
|
||||
cms.ui.workflows=Workflows
|
||||
cms.ui.you_do_not_have_sufficient_privileges_to_access_this_page=Vous n'\u00eates pas autoris\u00e9 \u00e0 voir cette page.
|
||||
no=Non
|
||||
yes=Oui
|
||||
cms.contenttypes.ui.address.uri=URL (TRANSLATE THIS cms.contenttypes.ui.address.uri)
|
||||
cms.contenttypes.ui.address.email.desc=Means of contacting someone at this address (TRANSLATE THIS cms.contenttypes.ui.address.email.desc)
|
||||
cms.contenttypes.ui.address.uri.desc=A URL to find more information about this Address (TRANSLATE THIS cms.contenttypes.ui.address.uri.desc)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ import com.arsdigita.bebop.FormSection;
|
|||
import com.arsdigita.bebop.Label;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.SaveCancelSection;
|
||||
import com.arsdigita.bebop.event.FormCancelListener;
|
||||
import com.arsdigita.bebop.event.FormInitListener;
|
||||
import com.arsdigita.bebop.event.FormProcessListener;
|
||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||
|
|
@ -41,6 +40,7 @@ import com.arsdigita.cms.Folder;
|
|||
import com.arsdigita.cms.ItemCollection;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.persistence.DataQuery;
|
||||
import com.arsdigita.persistence.SessionManager;
|
||||
import com.arsdigita.xml.Element;
|
||||
|
|
@ -157,10 +157,10 @@ public abstract class BasicItemForm
|
|||
// it breaks URLs & potentially overwrites the user's
|
||||
// customizations.
|
||||
|
||||
//jensp 2011-01-28: For some content types it is maybe useful to change
|
||||
//the label of this field to something other than 'title'. This can now
|
||||
//be done by overwriting the getTitleLabel() method.
|
||||
//add(new Label(GlobalizationUtil.globalize("cms.ui.authoring.page_title")));
|
||||
// For some content types it is maybe useful to change the label of the
|
||||
// title field to something different than 'title'.
|
||||
// This can nowbe done by overwriting the getTitleLabel() method.
|
||||
// (jensp 2011-01-28)
|
||||
add(new Label(getTitleLabel()));
|
||||
TextField titleWidget = new TextField(new TrimmedStringParameter(TITLE));
|
||||
titleWidget.addValidationListener(new NotNullValidationListener());
|
||||
|
|
@ -172,10 +172,10 @@ public abstract class BasicItemForm
|
|||
+ ".value = urlize(this.value) }");
|
||||
add(titleWidget);
|
||||
|
||||
//jensp 2011-01-28: For some content types it is maybe useful to change
|
||||
//the label of this field to something other than 'title'. This can now
|
||||
//be done by overwriting the getNameLabel() method.
|
||||
//add(new Label(GlobalizationUtil.globalize("cms.ui.authoring.name_url")));
|
||||
// For some content types it is maybe useful to change the label of
|
||||
// the name (or URL) field to something different than 'name (url)'.
|
||||
// This can now be accomplished by overwriting the getNameLabel() method.
|
||||
// (jensp 2011-01-28)
|
||||
add(new Label(getNameLabel()));
|
||||
TextField nameWidget = new TextField(new TrimmedStringParameter(NAME));
|
||||
nameWidget.addValidationListener(new NameValidationListener());
|
||||
|
|
@ -409,10 +409,8 @@ public abstract class BasicItemForm
|
|||
*
|
||||
* @return (Content for the) Label for the title field as string
|
||||
*/
|
||||
protected String getTitleLabel() {
|
||||
return (String) GlobalizationUtil.globalize(
|
||||
"cms.ui.authoring.page_title").
|
||||
localize();
|
||||
protected GlobalizedMessage getTitleLabel() {
|
||||
return GlobalizationUtil.globalize("cms.contenttypes.ui.title");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -422,8 +420,7 @@ public abstract class BasicItemForm
|
|||
*
|
||||
* @return (Content for the) Label for the name field as string
|
||||
*/
|
||||
protected String getNameLabel() {
|
||||
return (String) GlobalizationUtil.globalize("cms.ui.authoring.name_url").
|
||||
localize();
|
||||
protected GlobalizedMessage getNameLabel() {
|
||||
return GlobalizationUtil.globalize("cms.contenttypes.ui.name");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ import java.util.EventListener;
|
|||
* @author Uday Mathur
|
||||
* @version $Id: FormInitListener.java 287 2005-02-22 00:29:02Z sskracic $
|
||||
*/
|
||||
|
||||
public interface FormInitListener extends EventListener {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -55,10 +55,12 @@ public class StringParameter extends ParameterModel {
|
|||
return transformSingleValue(request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object unmarshal(String encoded) {
|
||||
return encoded;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class getValueClass() {
|
||||
return String.class;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,6 +113,9 @@ public class MessageCatalog extends DomainObject implements java.io.Serializable
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
protected void initialize() {
|
||||
super.initialize();
|
||||
|
|
@ -134,6 +137,7 @@ public class MessageCatalog extends DomainObject implements java.io.Serializable
|
|||
* @return String The fully qualified name of the base data object type
|
||||
* for the MessageCatalog DataObject.
|
||||
*/
|
||||
@Override
|
||||
public String getBaseDataObjectType() {
|
||||
return BASE_DATA_OBJECT_TYPE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.arsdigita.globalization;
|
||||
|
||||
import com.arsdigita.kernel.Kernel;
|
||||
import com.arsdigita.kernel.KernelExcursion;
|
||||
// import com.arsdigita.london.util.Transaction;
|
||||
import com.arsdigita.util.cmd.Program;
|
||||
|
||||
import org.apache.commons.cli.CommandLine;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author pb
|
||||
*/
|
||||
public class MessageCatalogAddResource extends Program {
|
||||
|
||||
/** A logger instance to assist debugging. */
|
||||
private static final Logger s_log =
|
||||
Logger.getLogger(MessageCatalogAddResource.class);
|
||||
|
||||
/**
|
||||
* Default Constructor
|
||||
*/
|
||||
public MessageCatalogAddResource() {
|
||||
super("Add Resource Bundle to MesageCatalog",
|
||||
"1.0.0",
|
||||
"Fulle qualified bundle name");
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method to read a property file and convert it to a MessageCatalog
|
||||
* entry.
|
||||
*
|
||||
* @param bundleFile String with bundle's fully qualified file name
|
||||
*/
|
||||
private static void create(String bundleFile) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param cmdLine
|
||||
*/
|
||||
protected void doRun(final CommandLine cmdLine) {
|
||||
/* new Transaction() {
|
||||
public void doRun() {
|
||||
new KernelExcursion() {
|
||||
public void excurse() {
|
||||
setEffectiveParty(Kernel.getSystemParty());
|
||||
String[] args = cmdLine.getArgs();
|
||||
if (args.length == 3) {
|
||||
String bundleName = args[0];
|
||||
// String navTitle = args[1];
|
||||
// String domainKey = args[2];
|
||||
if (bundleName != null && bundleName.length() != 0
|
||||
// && navTitle != null && navTitle.length() != 0
|
||||
// && domainKey != null && domainKey.length() != 0)
|
||||
) {
|
||||
create(bundleName);
|
||||
} else {
|
||||
help(System.err);
|
||||
System.exit(1);
|
||||
}
|
||||
} else {
|
||||
help(System.err);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
}.run();
|
||||
}
|
||||
}.run(); */
|
||||
}
|
||||
|
||||
/**
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
new MessageCatalogAddResource().run(args);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ import org.apache.log4j.Logger;
|
|||
* How to use (rough reconstruction from code)
|
||||
* - for each *.properties file create a child of this class with the same(!) name
|
||||
* in the same package (subdirecgory)
|
||||
* - for each language-specific *.proerties file create a child of this class
|
||||
* - for each language-specific *.properties file create a child of this class
|
||||
* with the same(1) name
|
||||
* - Example:
|
||||
* <ul> <li>HelloWorldResources.class</li>
|
||||
|
|
|
|||
|
|
@ -78,7 +78,9 @@ public class DublinCoreItem extends ContentItem {
|
|||
}
|
||||
|
||||
// DataObject field constants
|
||||
public static final String DC_OWNER = "dcOwner";
|
||||
|
||||
/* Constant for the content item this dc object is owned by (associated with) */
|
||||
public static final String DCMI_OWNER = "dcOwner";
|
||||
|
||||
public static final String DC_AUDIENCE = "dcAudience";
|
||||
public static final String DC_CONTRIBUTOR = "dcContributor";
|
||||
|
|
@ -140,6 +142,14 @@ public class DublinCoreItem extends ContentItem {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a new empty Dublin Core meta data object and associate it with
|
||||
* the given content item.
|
||||
*
|
||||
* @param owner content item object to associate the new DCES object with
|
||||
* @return the new DCMI object, associated with the given content item
|
||||
* object but otherwise empty.
|
||||
*/
|
||||
public static DublinCoreItem create(ContentItem owner) {
|
||||
DublinCoreItem item = new DublinCoreItem();
|
||||
item.setOwner(owner);
|
||||
|
|
@ -148,10 +158,17 @@ public class DublinCoreItem extends ContentItem {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve a Dublin Core meta data object by its owner (a content item)
|
||||
* from the database and instantiate a new Dublin Core object.
|
||||
*
|
||||
* @param owner the content item object for which we look for meta data
|
||||
* @return a DublinCoreItem object
|
||||
*/
|
||||
public static DublinCoreItem findByOwner(ContentItem owner) {
|
||||
DataCollection items = SessionManager.getSession()
|
||||
.retrieve(BASE_DATA_OBJECT_TYPE);
|
||||
items.addEqualsFilter(DC_OWNER + "." + ACSObject.ID,
|
||||
items.addEqualsFilter(DCMI_OWNER + "." + ACSObject.ID,
|
||||
owner.getID());
|
||||
|
||||
if (items.next()) {
|
||||
|
|
@ -163,11 +180,11 @@ public class DublinCoreItem extends ContentItem {
|
|||
}
|
||||
|
||||
protected void setOwner(ContentItem owner) {
|
||||
setAssociation(DC_OWNER, owner);
|
||||
setAssociation(DCMI_OWNER, owner);
|
||||
}
|
||||
|
||||
public ContentItem getOwner() {
|
||||
DataObject dobj = (DataObject)get(DC_OWNER);
|
||||
DataObject dobj = (DataObject)get(DCMI_OWNER);
|
||||
Assert.exists(dobj, DataObject.class);
|
||||
return (ContentItem)DomainObjectFactory.newInstance(dobj);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,27 +15,36 @@
|
|||
|
||||
package com.arsdigita.london.cms.dublin.ui;
|
||||
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||
|
||||
/***
|
||||
* Dublin Core authoring kit editing step.
|
||||
*
|
||||
* Main entry point into authoring functionality as defined in
|
||||
* DublinCoreInitializer. It just overwrites the constructor to create a page
|
||||
* to display the current values and a page to edit the modifiable properties.
|
||||
* DublinCoreAddform
|
||||
*
|
||||
* @author slater@arsdigita.com
|
||||
*
|
||||
* Form for editing/adding a dublinCoreItem's information
|
||||
*
|
||||
*
|
||||
* must call setDisplayComponent();
|
||||
* must call addComponent() 0 or more times;
|
||||
*
|
||||
* @author slater@arsdigita.com
|
||||
*/
|
||||
public class DublinCoreEdit extends SimpleEditStep {
|
||||
|
||||
/**
|
||||
* Constructor, invokes super class and creates two page elements to display
|
||||
* all properties and another one to edit the modifiable ones.
|
||||
*
|
||||
* @param itemModel
|
||||
* @param parent
|
||||
*/
|
||||
public DublinCoreEdit(ItemSelectionModel itemModel,
|
||||
AuthoringKitWizard parent) {
|
||||
|
||||
super(itemModel, parent);
|
||||
|
||||
|
||||
|
|
@ -43,8 +52,10 @@ public class DublinCoreEdit extends SimpleEditStep {
|
|||
DublinCoreSummary display = new DublinCoreSummary(itemModel);
|
||||
|
||||
setDisplayComponent(display);
|
||||
add("edit", "edit",
|
||||
add("edit",
|
||||
"edit",
|
||||
new WorkflowLockedComponentAccess(edit, itemModel),
|
||||
edit.getCancelButton());
|
||||
edit.getCancelButton()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ public abstract class DublinCoreFormSection extends FormSection
|
|||
|
||||
private Widget m_ccn_portal_instance;
|
||||
|
||||
// private TextField m_contributor;
|
||||
// private TextField m_contributor; // obviously not used anywhere, nevertheless
|
||||
// a db field! Not part of the UI
|
||||
private Widget m_coverageSpatial;
|
||||
|
||||
private TextField m_coveragePostcode;
|
||||
|
|
@ -229,8 +230,7 @@ public abstract class DublinCoreFormSection extends FormSection
|
|||
|
||||
protected Widget createControlledList(String name, String key) {
|
||||
if (s_log.isDebugEnabled()) {
|
||||
s_log
|
||||
.debug("Creating controlled list with " + name + " key "
|
||||
s_log.debug("Creating controlled list with " + name + " key "
|
||||
+ key);
|
||||
}
|
||||
Domain domain = null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue