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-94f89814c4dfmaster
parent
e4d037885e
commit
5df0e51cb0
|
|
@ -37,7 +37,9 @@ import com.arsdigita.persistence.SessionManager;
|
||||||
import com.arsdigita.util.Assert;
|
import com.arsdigita.util.Assert;
|
||||||
import com.arsdigita.util.UncheckedWrapperException;
|
import com.arsdigita.util.UncheckedWrapperException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
import java.util.TooManyListenersException;
|
import java.util.TooManyListenersException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -81,8 +83,7 @@ public class PublicPersonalProfileCreate extends PageCreate {
|
||||||
ownerSelect.addPrintListener(new PrintListener() {
|
ownerSelect.addPrintListener(new PrintListener() {
|
||||||
|
|
||||||
public void prepare(final PrintEvent event) {
|
public void prepare(final PrintEvent event) {
|
||||||
final SingleSelect ownerSelect = (SingleSelect) event.
|
final SingleSelect ownerSelect = (SingleSelect) event.getTarget();
|
||||||
getTarget();
|
|
||||||
|
|
||||||
String personType = config.getPersonType();
|
String personType = config.getPersonType();
|
||||||
if ((personType == null) || (personType.isEmpty())) {
|
if ((personType == null) || (personType.isEmpty())) {
|
||||||
|
|
@ -104,13 +105,26 @@ public class PublicPersonalProfileCreate extends PageCreate {
|
||||||
persons.addFilter("profile is null");
|
persons.addFilter("profile is null");
|
||||||
persons.addFilter(String.format("version = '%s'",
|
persons.addFilter(String.format("version = '%s'",
|
||||||
ContentItem.DRAFT));
|
ContentItem.DRAFT));
|
||||||
|
persons.addOrder("surname asc");
|
||||||
|
persons.addOrder("givenname asc");
|
||||||
|
persons.addOrder("language asc");
|
||||||
ownerSelect.addOption(new Option("", ""));
|
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()) {
|
while (persons.next()) {
|
||||||
GenericPerson person =
|
GenericPerson person =
|
||||||
(GenericPerson) DomainObjectFactory.
|
(GenericPerson) DomainObjectFactory.newInstance(persons.getDataObject());
|
||||||
newInstance(persons.getDataObject());
|
if (processed.contains(person.getParent().getID())) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
ownerSelect.addOption(new Option(
|
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);
|
PublicPersonalProfile.OWNER);
|
||||||
|
|
||||||
if ((id == null) || id.trim().isEmpty()) {
|
if ((id == null) || id.trim().isEmpty()) {
|
||||||
fse.getFormData().addError(PublicPersonalProfileGlobalizationUtil.
|
fse.getFormData().addError(PublicPersonalProfileGlobalizationUtil.globalize("publicpersonalprofile.ui.person.required"));
|
||||||
globalize("publicpersonalprofile.ui.person.required"));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,14 +19,8 @@
|
||||||
package com.arsdigita.cms.contenttypes;
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
// import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
// 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.parameter.ResourceParameter;
|
||||||
// import com.arsdigita.util.UncheckedWrapperException;
|
// import com.arsdigita.util.UncheckedWrapperException;
|
||||||
import com.arsdigita.workflow.simple.WorkflowTemplate;
|
|
||||||
import java.io.InputStream;
|
|
||||||
// import java.net.MalformedURLException;
|
// import java.net.MalformedURLException;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -48,7 +42,7 @@ public class SiteProxyLoader extends AbstractContentTypeLoader {
|
||||||
/**
|
/**
|
||||||
* SiteProxyLoader Constructor
|
* SiteProxyLoader Constructor
|
||||||
*/
|
*/
|
||||||
public SiteProxyLoader() {
|
/*public SiteProxyLoader() {
|
||||||
m_template = new ResourceParameter
|
m_template = new ResourceParameter
|
||||||
("com.arsdigita.cms.contenttypes.siteproxy.defaulttemplate",
|
("com.arsdigita.cms.contenttypes.siteproxy.defaulttemplate",
|
||||||
Parameter.REQUIRED,
|
Parameter.REQUIRED,
|
||||||
|
|
@ -56,7 +50,7 @@ public class SiteProxyLoader extends AbstractContentTypeLoader {
|
||||||
"/siteproxy-item.jsp");
|
"/siteproxy-item.jsp");
|
||||||
|
|
||||||
register(m_template);
|
register(m_template);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
public String[] getTypes() {
|
public String[] getTypes() {
|
||||||
return TYPES;
|
return TYPES;
|
||||||
|
|
|
||||||
|
|
@ -114,8 +114,7 @@ public abstract class DomainObjectTraversal {
|
||||||
Assert.exists(context, String.class);
|
Assert.exists(context, String.class);
|
||||||
|
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug("Removing adapter " + " for object type " + type.
|
s_log.debug("Removing adapter " + " for object type " + type.getQualifiedName() + " in context " + context);
|
||||||
getQualifiedName() + " in context " + context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
s_adapters.remove(new AdapterKey(type, context));
|
s_adapters.remove(new AdapterKey(type, context));
|
||||||
|
|
@ -207,8 +206,7 @@ public abstract class DomainObjectTraversal {
|
||||||
tmpType = tmpType.getSupertype();
|
tmpType = tmpType.getSupertype();
|
||||||
}
|
}
|
||||||
if (adapter == null) {
|
if (adapter == null) {
|
||||||
s_log.warn("Could not find adapter for object type " + type.
|
s_log.warn("Could not find adapter for object type " + type.getQualifiedName() + " in context " + context);
|
||||||
getQualifiedName() + " in context " + context);
|
|
||||||
}
|
}
|
||||||
return adapter;
|
return adapter;
|
||||||
}
|
}
|
||||||
|
|
@ -222,8 +220,7 @@ public abstract class DomainObjectTraversal {
|
||||||
*/
|
*/
|
||||||
public void walk(final DomainObject obj,
|
public void walk(final DomainObject obj,
|
||||||
final String context) {
|
final String context) {
|
||||||
final DomainObjectTraversalAdapter adapter = findAdapter(obj.
|
final DomainObjectTraversalAdapter adapter = findAdapter(obj.getObjectType(),
|
||||||
getObjectType(),
|
|
||||||
context);
|
context);
|
||||||
if (adapter == null) {
|
if (adapter == null) {
|
||||||
final String errorMsg = "No adapter for object " + obj.getOID()
|
final String errorMsg = "No adapter for object " + obj.getOID()
|
||||||
|
|
@ -293,8 +290,7 @@ public abstract class DomainObjectTraversal {
|
||||||
prop,
|
prop,
|
||||||
context)) {
|
context)) {
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug("Not processing " + appendToPath(path, prop.
|
s_log.debug("Not processing " + appendToPath(path, prop.getName()) + " in object " + oid + " and context "
|
||||||
getName()) + " in object " + oid + " and context "
|
|
||||||
+ context + " with adapter " + adapter.getClass().
|
+ context + " with adapter " + adapter.getClass().
|
||||||
getName());
|
getName());
|
||||||
}
|
}
|
||||||
|
|
@ -333,8 +329,7 @@ public abstract class DomainObjectTraversal {
|
||||||
// see #25808 - this hack prevents the content field of cms_files
|
// see #25808 - this hack prevents the content field of cms_files
|
||||||
// (which is a blob) from being queried when all we need is a
|
// (which is a blob) from being queried when all we need is a
|
||||||
// list of the files on an item..
|
// list of the files on an item..
|
||||||
if (prop.getName().equals("fileAttachments") && !Domain.
|
if (prop.getName().equals("fileAttachments") && !Domain.getConfig().queryBlobContentForFileAttachments()) {
|
||||||
getConfig().queryBlobContentForFileAttachments()) {
|
|
||||||
// make true a config
|
// make true a config
|
||||||
DataQuery fileAttachmentsQuery =
|
DataQuery fileAttachmentsQuery =
|
||||||
SessionManager.getSession().retrieveQuery(
|
SessionManager.getSession().retrieveQuery(
|
||||||
|
|
@ -412,8 +407,7 @@ public abstract class DomainObjectTraversal {
|
||||||
beginAssociation(obj, path, prop);
|
beginAssociation(obj, path, prop);
|
||||||
|
|
||||||
DataAssociationCursor daCursor =
|
DataAssociationCursor daCursor =
|
||||||
((DataAssociation) propValue).
|
((DataAssociation) propValue).getDataAssociationCursor();
|
||||||
getDataAssociationCursor();
|
|
||||||
|
|
||||||
while (daCursor.next()) {
|
while (daCursor.next()) {
|
||||||
walkDataAssociation(adapter,
|
walkDataAssociation(adapter,
|
||||||
|
|
@ -433,7 +427,8 @@ public abstract class DomainObjectTraversal {
|
||||||
String context,
|
String context,
|
||||||
String propName,
|
String propName,
|
||||||
DataAssociationCursor daCursor) {
|
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();
|
DataObject link = daCursor.getLink();
|
||||||
DomainObject linkObj = null;
|
DomainObject linkObj = null;
|
||||||
if (link != null) {
|
if (link != null) {
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,12 @@ public class DataCollectionRenderer extends LockableImpl {
|
||||||
ACSObject object = null;
|
ACSObject object = null;
|
||||||
if (m_specializeObjects) {
|
if (m_specializeObjects) {
|
||||||
object = (ACSObject) DomainObjectFactory.newInstance(dobj);
|
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");
|
Element item = Navigation.newElement("item");
|
||||||
|
|
@ -223,8 +229,7 @@ public class DataCollectionRenderer extends LockableImpl {
|
||||||
|
|
||||||
Iterator properties = m_properties.iterator();
|
Iterator properties = m_properties.iterator();
|
||||||
while (properties.hasNext()) {
|
while (properties.hasNext()) {
|
||||||
DataCollectionPropertyRenderer property = (DataCollectionPropertyRenderer) properties.
|
DataCollectionPropertyRenderer property = (DataCollectionPropertyRenderer) properties.next();
|
||||||
next();
|
|
||||||
property.render(objects, item);
|
property.render(objects, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -295,8 +300,7 @@ public class DataCollectionRenderer extends LockableImpl {
|
||||||
|
|
||||||
// Quasimodo: BEGIN
|
// Quasimodo: BEGIN
|
||||||
// Add attributes for date and time
|
// Add attributes for date and time
|
||||||
Locale negLocale = com.arsdigita.globalization.GlobalizationHelper.
|
Locale negLocale = com.arsdigita.globalization.GlobalizationHelper.getNegotiatedLocale();
|
||||||
getNegotiatedLocale();
|
|
||||||
DateFormat dateFormatter = DateFormat.getDateInstance(
|
DateFormat dateFormatter = DateFormat.getDateInstance(
|
||||||
DateFormat.MEDIUM, negLocale);
|
DateFormat.MEDIUM, negLocale);
|
||||||
DateFormat timeFormatter = DateFormat.getTimeInstance(
|
DateFormat timeFormatter = DateFormat.getTimeInstance(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue