Verschiedene kleinere Korrekturen, unter anderem versuchte der SiteProxyLoader noch die mehr vorhandene siteproxy-item.jsp zu finden.

git-svn-id: https://svn.libreccm.org/ccm/trunk@1222 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2011-11-03 11:44:48 +00:00
parent e4d037885e
commit 5df0e51cb0
5 changed files with 159 additions and 153 deletions

View File

@ -37,7 +37,9 @@ import com.arsdigita.persistence.SessionManager;
import com.arsdigita.util.Assert;
import com.arsdigita.util.UncheckedWrapperException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.TooManyListenersException;
/**
@ -81,8 +83,7 @@ public class PublicPersonalProfileCreate extends PageCreate {
ownerSelect.addPrintListener(new PrintListener() {
public void prepare(final PrintEvent event) {
final SingleSelect ownerSelect = (SingleSelect) event.
getTarget();
final SingleSelect ownerSelect = (SingleSelect) event.getTarget();
String personType = config.getPersonType();
if ((personType == null) || (personType.isEmpty())) {
@ -104,13 +105,26 @@ public class PublicPersonalProfileCreate extends PageCreate {
persons.addFilter("profile is null");
persons.addFilter(String.format("version = '%s'",
ContentItem.DRAFT));
persons.addOrder("surname asc");
persons.addOrder("givenname asc");
persons.addOrder("language asc");
ownerSelect.addOption(new Option("", ""));
//Store the parent ids of processed items to remove double entries.
final List<BigDecimal> processed = new ArrayList<BigDecimal>();
while (persons.next()) {
GenericPerson person =
(GenericPerson) DomainObjectFactory.
newInstance(persons.getDataObject());
(GenericPerson) DomainObjectFactory.newInstance(persons.getDataObject());
if (processed.contains(person.getParent().getID())) {
continue;
} else {
ownerSelect.addOption(new Option(
person.getID().toString(), person.getFullName()));
person.getID().toString(),
String.format("%s (%s)",
person.getFullName(),
person.getLanguage())));
processed.add(person.getParent().getID());
}
}
}
});
@ -145,8 +159,7 @@ public class PublicPersonalProfileCreate extends PageCreate {
PublicPersonalProfile.OWNER);
if ((id == null) || id.trim().isEmpty()) {
fse.getFormData().addError(PublicPersonalProfileGlobalizationUtil.
globalize("publicpersonalprofile.ui.person.required"));
fse.getFormData().addError(PublicPersonalProfileGlobalizationUtil.globalize("publicpersonalprofile.ui.person.required"));
return;
}

View File

@ -19,14 +19,8 @@
package com.arsdigita.cms.contenttypes;
// import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
import com.arsdigita.cms.ContentType;
import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.lifecycle.LifecycleDefinition;
import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.ResourceParameter;
// import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.workflow.simple.WorkflowTemplate;
import java.io.InputStream;
// import java.net.MalformedURLException;
@ -48,7 +42,7 @@ public class SiteProxyLoader extends AbstractContentTypeLoader {
/**
* SiteProxyLoader Constructor
*/
public SiteProxyLoader() {
/*public SiteProxyLoader() {
m_template = new ResourceParameter
("com.arsdigita.cms.contenttypes.siteproxy.defaulttemplate",
Parameter.REQUIRED,
@ -56,7 +50,7 @@ public class SiteProxyLoader extends AbstractContentTypeLoader {
"/siteproxy-item.jsp");
register(m_template);
}
}*/
public String[] getTypes() {
return TYPES;

View File

@ -114,8 +114,7 @@ public abstract class DomainObjectTraversal {
Assert.exists(context, String.class);
if (s_log.isDebugEnabled()) {
s_log.debug("Removing adapter " + " for object type " + type.
getQualifiedName() + " in context " + context);
s_log.debug("Removing adapter " + " for object type " + type.getQualifiedName() + " in context " + context);
}
s_adapters.remove(new AdapterKey(type, context));
@ -207,8 +206,7 @@ public abstract class DomainObjectTraversal {
tmpType = tmpType.getSupertype();
}
if (adapter == null) {
s_log.warn("Could not find adapter for object type " + type.
getQualifiedName() + " in context " + context);
s_log.warn("Could not find adapter for object type " + type.getQualifiedName() + " in context " + context);
}
return adapter;
}
@ -222,8 +220,7 @@ public abstract class DomainObjectTraversal {
*/
public void walk(final DomainObject obj,
final String context) {
final DomainObjectTraversalAdapter adapter = findAdapter(obj.
getObjectType(),
final DomainObjectTraversalAdapter adapter = findAdapter(obj.getObjectType(),
context);
if (adapter == null) {
final String errorMsg = "No adapter for object " + obj.getOID()
@ -293,8 +290,7 @@ public abstract class DomainObjectTraversal {
prop,
context)) {
if (s_log.isDebugEnabled()) {
s_log.debug("Not processing " + appendToPath(path, prop.
getName()) + " in object " + oid + " and context "
s_log.debug("Not processing " + appendToPath(path, prop.getName()) + " in object " + oid + " and context "
+ context + " with adapter " + adapter.getClass().
getName());
}
@ -333,8 +329,7 @@ public abstract class DomainObjectTraversal {
// see #25808 - this hack prevents the content field of cms_files
// (which is a blob) from being queried when all we need is a
// list of the files on an item..
if (prop.getName().equals("fileAttachments") && !Domain.
getConfig().queryBlobContentForFileAttachments()) {
if (prop.getName().equals("fileAttachments") && !Domain.getConfig().queryBlobContentForFileAttachments()) {
// make true a config
DataQuery fileAttachmentsQuery =
SessionManager.getSession().retrieveQuery(
@ -412,8 +407,7 @@ public abstract class DomainObjectTraversal {
beginAssociation(obj, path, prop);
DataAssociationCursor daCursor =
((DataAssociation) propValue).
getDataAssociationCursor();
((DataAssociation) propValue).getDataAssociationCursor();
while (daCursor.next()) {
walkDataAssociation(adapter,
@ -433,7 +427,8 @@ public abstract class DomainObjectTraversal {
String context,
String propName,
DataAssociationCursor daCursor) {
s_log.debug("Processing data assoication cursor...");
s_log.debug(String.format("Processing data assoication cursor for object '%s'...",
obj.getOID().toString()));
DataObject link = daCursor.getLink();
DomainObject linkObj = null;
if (link != null) {

View File

@ -210,6 +210,12 @@ public class DataCollectionRenderer extends LockableImpl {
ACSObject object = null;
if (m_specializeObjects) {
object = (ACSObject) DomainObjectFactory.newInstance(dobj);
if (object == null) {
s_log.error(String.format("Failed to specialize object with with id %s. Skiping object.", dobj.getOID().toString()));
continue;
} else {
s_log.error("Specializing successful.");
}
}
Element item = Navigation.newElement("item");
@ -223,8 +229,7 @@ public class DataCollectionRenderer extends LockableImpl {
Iterator properties = m_properties.iterator();
while (properties.hasNext()) {
DataCollectionPropertyRenderer property = (DataCollectionPropertyRenderer) properties.
next();
DataCollectionPropertyRenderer property = (DataCollectionPropertyRenderer) properties.next();
property.render(objects, item);
}
@ -295,8 +300,7 @@ public class DataCollectionRenderer extends LockableImpl {
// Quasimodo: BEGIN
// Add attributes for date and time
Locale negLocale = com.arsdigita.globalization.GlobalizationHelper.
getNegotiatedLocale();
Locale negLocale = com.arsdigita.globalization.GlobalizationHelper.getNegotiatedLocale();
DateFormat dateFormatter = DateFormat.getDateInstance(
DateFormat.MEDIUM, negLocale);
DateFormat timeFormatter = DateFormat.getTimeInstance(