incoroirating APLAWS patches:
r1655 | chrisg23 | 2007-09-18 13:16:54 +0200 (Di, 18 Sep 2007) Sourceforge patch 1793047 - prevent attempt to transform xml if we java code has put an error in the response before generating any xml ------------------------------------------------------------------------ r1656 | chrisg23 | 2007-09-18 14:40:39 +0200 (Di, 18 Sep 2007) Undo change in r1370 - BaseDocument doesn't need to implement comparable as it is implemented in SearchResult (part of ccm-ldn-search) to enable merged results to be sorted ------------------------------------------------------------------------ r1657 | chrisg23 | 2007-09-18 14:43:10 +0200 (Di, 18 Sep 2007) Make the static prepare utility method public ------------------------------------------------------------------------ r1658 | chrisg23 | 2007-09-18 14:46:04 +0200 (Di, 18 Sep 2007) Sourceforge patch 1793018 - utility to get stable urls programatically ------------------------------------------------------------------------ r1659 | chrisg23 | 2007-09-18 14:52:36 +0200 (Di, 18 Sep 2007) Make pdl attribute name constants public so they may be referenced elsewhere in persistence API calls ------------------------------------------------------------------------ r1660 | chrisg23 | 2007-09-18 15:05:43 +0200 (Di, 18 Sep 2007) Sourceforge patch 1793021 - output id attribute on bebop selects if it has been set in the java code ------------------------------------------------------------------------ git-svn-id: https://svn.libreccm.org/ccm/trunk@25 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
5b735f5dd6
commit
e1cf71ad56
|
|
@ -278,6 +278,9 @@ public class PageTransformer implements PresentationManager {
|
||||||
final HttpServletRequest req,
|
final HttpServletRequest req,
|
||||||
final HttpServletResponse resp,
|
final HttpServletResponse resp,
|
||||||
final Map params) {
|
final Map params) {
|
||||||
|
if (resp.isCommitted()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (Assert.isEnabled()) {
|
if (Assert.isEnabled()) {
|
||||||
Assert.exists(doc, Document.class);
|
Assert.exists(doc, Document.class);
|
||||||
Assert.exists(req, HttpServletRequest.class);
|
Assert.exists(req, HttpServletRequest.class);
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,6 @@ import java.net.URL;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A BaseDocument provides a base implementation of the
|
* A BaseDocument provides a base implementation of the
|
||||||
* Document interface. Query engine implementations should
|
* Document interface. Query engine implementations should
|
||||||
|
|
@ -43,7 +41,7 @@ import org.apache.log4j.Logger;
|
||||||
*
|
*
|
||||||
* @see com.arsdigita.search.Document
|
* @see com.arsdigita.search.Document
|
||||||
*/
|
*/
|
||||||
public class BaseDocument implements Document, Comparable {
|
public class BaseDocument implements Document {
|
||||||
|
|
||||||
private URL m_url;
|
private URL m_url;
|
||||||
private OID m_oid;
|
private OID m_oid;
|
||||||
|
|
@ -59,8 +57,6 @@ public class BaseDocument implements Document, Comparable {
|
||||||
|
|
||||||
private BigDecimal m_score;
|
private BigDecimal m_score;
|
||||||
|
|
||||||
static Logger s_log = Logger.getLogger(BaseDocument.class);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new document;
|
* Creates a new document;
|
||||||
*
|
*
|
||||||
|
|
@ -308,30 +304,4 @@ public class BaseDocument implements Document, Comparable {
|
||||||
return m_contentSection;
|
return m_contentSection;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Implements Comparable interface to allow ordering of search results
|
|
||||||
* by score descending where database ordering is not used
|
|
||||||
* (e.g. merged remote searches).
|
|
||||||
*
|
|
||||||
* @param obj
|
|
||||||
* @return int
|
|
||||||
* @throws java.lang.NullPointerException
|
|
||||||
* @throws java.lang.ClassCastException
|
|
||||||
*/
|
|
||||||
public int compareTo(Object obj) {
|
|
||||||
if (obj == null) {
|
|
||||||
throw new NullPointerException();
|
|
||||||
}
|
|
||||||
|
|
||||||
BaseDocument otherDocument = (BaseDocument) obj;
|
|
||||||
|
|
||||||
s_log.debug("This score: " + getScore() + ", other score: "
|
|
||||||
+ otherDocument.getScore() + ", result: "
|
|
||||||
+ otherDocument.getScore().compareTo(getScore())
|
|
||||||
+ " (old result: "
|
|
||||||
+ getScore().compareTo(otherDocument.getScore()) + ")");
|
|
||||||
|
|
||||||
|
|
||||||
return otherDocument.getScore().compareTo(getScore());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ final class Utilities {
|
||||||
* more general
|
* more general
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static final String prepare(String input) {
|
public static final String prepare(String input) {
|
||||||
Perl5Compiler compiler = new Perl5Compiler();
|
Perl5Compiler compiler = new Perl5Compiler();
|
||||||
Perl5Matcher matcher = new Perl5Matcher();
|
Perl5Matcher matcher = new Perl5Matcher();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2007 Chris Gilbert. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* 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.web;
|
||||||
|
|
||||||
|
import com.arsdigita.domain.DomainObject;
|
||||||
|
import com.arsdigita.util.Assert;
|
||||||
|
|
||||||
|
public class Util {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* retrieve a fully qualified stable url for the specified
|
||||||
|
* domain object without any context
|
||||||
|
*
|
||||||
|
* Full qualification is required in order to avoid getting
|
||||||
|
* redirect urls within the context of ccm
|
||||||
|
*/
|
||||||
|
public static String getRedirectURL(DomainObject object) {
|
||||||
|
return getRedirectURL(object,null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* retrieve a fully qualified stable url for the specified
|
||||||
|
* domain object in the given context
|
||||||
|
*
|
||||||
|
* Full qualification is required in order to avoid getting
|
||||||
|
* redirect urls within the context of ccm
|
||||||
|
*/
|
||||||
|
public static String getRedirectURL(DomainObject object, String context) {
|
||||||
|
Assert.exists(object);
|
||||||
|
|
||||||
|
ParameterMap params = new ParameterMap();
|
||||||
|
params.setParameter("oid", object.getOID());
|
||||||
|
if (context != null) {
|
||||||
|
params.setParameter("context", context);
|
||||||
|
}
|
||||||
|
URL url = URL.there("/redirect", params);
|
||||||
|
|
||||||
|
return url.getServerURI() + url.getPathInfo() + "?" + url.getQueryString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -73,12 +73,12 @@ public class UserTask extends Task implements Assignable {
|
||||||
|
|
||||||
public static final String ASSIGNED_USERS = "assignedUsers";
|
public static final String ASSIGNED_USERS = "assignedUsers";
|
||||||
public static final String ASSIGNED_GROUPS = "assignedGroups";
|
public static final String ASSIGNED_GROUPS = "assignedGroups";
|
||||||
private static final String LOCKING_USER_ID = "lockingUserId";
|
public static final String LOCKING_USER_ID = "lockingUserId";
|
||||||
private static final String IS_LOCKED = "isLocked";
|
public static final String IS_LOCKED = "isLocked";
|
||||||
private static final String DUE_DATE = "dueDate";
|
public static final String DUE_DATE = "dueDate";
|
||||||
private static final String START_DATE = "startDate";
|
public static final String START_DATE = "startDate";
|
||||||
private static final String DURATION_MINUTES = "durationMinutes";
|
public static final String DURATION_MINUTES = "durationMinutes";
|
||||||
private static final String NOTIFICATION_SENDER_ID = "notificationSenderID";
|
public static final String NOTIFICATION_SENDER_ID = "notificationSenderID";
|
||||||
|
|
||||||
public static final int DEFAULT_DURATION = 1440;
|
public static final int DEFAULT_DURATION = 1440;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
<xsl:template match="bebop:select"
|
<xsl:template match="bebop:select"
|
||||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0">
|
xmlns:bebop="http://www.arsdigita.com/bebop/1.0">
|
||||||
<select name="{@name}">
|
<select name="{@name}">
|
||||||
<xsl:for-each select="@disabled|@size|@title|@*[starts-with(name(), 'on')]">
|
<xsl:for-each select="@disabled|@size|@title|@id|@*[starts-with(name(), 'on')]">
|
||||||
<xsl:attribute name="{name()}">
|
<xsl:attribute name="{name()}">
|
||||||
<xsl:value-of select="."/>
|
<xsl:value-of select="."/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue