Integrated r1968, r1973, r1974: Postgresql 8.3 compatibility; various formatting and documentation.
git-svn-id: https://svn.libreccm.org/ccm/trunk@273 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
95aa6afb5b
commit
3a54653bb7
|
|
@ -20,7 +20,7 @@ query getContentItemExpiredBeforeInSection {
|
|||
where
|
||||
m.item_id = o.object_id and
|
||||
m.cycle_id = l.cycle_id and
|
||||
l.has_ended = 0 and
|
||||
l.has_ended = '0' and
|
||||
:endDateTime >= l.end_date_time and
|
||||
i.item_id = o.object_id and
|
||||
i.section_id = :sectionId and
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ query getLifecycleStart {
|
|||
where
|
||||
m.item_id = o.object_id and
|
||||
m.cycle_id = l.cycle_id and
|
||||
l.has_begun = 0 and
|
||||
l.has_begun = '0' and
|
||||
:startDateTime >= l.start_date_time
|
||||
} map {
|
||||
objectId = o.object_id;
|
||||
|
|
@ -87,7 +87,7 @@ query getLifecycleEnd {
|
|||
where
|
||||
m.item_id = o.object_id and
|
||||
m.cycle_id = l.cycle_id and
|
||||
l.has_ended = 0 and
|
||||
l.has_ended = '0' and
|
||||
:endDateTime >= l.end_date_time
|
||||
} map {
|
||||
objectId = o.object_id;
|
||||
|
|
@ -117,7 +117,7 @@ query getPhaseStart {
|
|||
where
|
||||
m.item_id = o.object_id and
|
||||
m.cycle_id = p.cycle_id and
|
||||
p.has_begun = 0 and
|
||||
p.has_begun = '0' and
|
||||
:startDateTime >= p.start_date_time
|
||||
} map {
|
||||
objectId = o.object_id;
|
||||
|
|
@ -149,7 +149,7 @@ query getPhaseEnd {
|
|||
where
|
||||
m.item_id = o.object_id and
|
||||
m.cycle_id = p.cycle_id and
|
||||
p.has_ended = 0 and
|
||||
p.has_ended = '0' and
|
||||
:endDateTime >= p.end_date_time
|
||||
} map {
|
||||
objectId = o.object_id;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ query getEnabledUserTasks {
|
|||
BigDecimal lockingUserID;
|
||||
String taskType;
|
||||
String taskTypeClass;
|
||||
Integer status;
|
||||
String status;
|
||||
String processLabel;
|
||||
do {
|
||||
select cw_tasks.task_id,
|
||||
|
|
@ -56,11 +56,11 @@ query getEnabledUserTasks {
|
|||
cms_items.name,
|
||||
cms_pages.title,
|
||||
CASE WHEN (cw_user_tasks.locking_user_id = :userId) then
|
||||
1
|
||||
'1'
|
||||
WHEN (cw_user_tasks.locking_user_id is null) then
|
||||
2
|
||||
'2'
|
||||
ELSE
|
||||
3
|
||||
'3'
|
||||
END as status,
|
||||
cw_user_tasks.locking_user_id,
|
||||
cw_tasks_proc.label as processLabel
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ query getEnabledUserTasks {
|
|||
BigDecimal lockingUserID;
|
||||
String taskType;
|
||||
String taskTypeClass;
|
||||
Integer status;
|
||||
String status;
|
||||
String processLabel;
|
||||
do {
|
||||
select cw_tasks.task_id,
|
||||
|
|
@ -56,11 +56,11 @@ query getEnabledUserTasks {
|
|||
cms_items.name,
|
||||
cms_pages.title,
|
||||
CASE WHEN (cw_user_tasks.locking_user_id = :userId) then
|
||||
1
|
||||
'1'
|
||||
WHEN (cw_user_tasks.locking_user_id is null) then
|
||||
2
|
||||
'2'
|
||||
ELSE
|
||||
3
|
||||
'3'
|
||||
END as status,
|
||||
cw_user_tasks.locking_user_id,
|
||||
cw_tasks_proc.label as processLabel
|
||||
|
|
|
|||
|
|
@ -56,10 +56,6 @@ import org.apache.log4j.Logger;
|
|||
* @version $Id: ContentBundle.java 967 2005-10-28 18:08:42Z sskracic $
|
||||
*/
|
||||
public class ContentBundle extends ContentItem {
|
||||
public static final String versionId =
|
||||
"$Id: ContentBundle.java 967 2005-10-28 18:08:42Z sskracic $" +
|
||||
"$Author: sskracic $" +
|
||||
"$DateTime: $";
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(ContentBundle.class);
|
||||
|
||||
|
|
|
|||
|
|
@ -159,8 +159,8 @@ public class UserHomeFolderMap extends ACSObject {
|
|||
|
||||
public static UserHomeFolderMap findUserHomeFolderMap(User user, ContentSection section) {
|
||||
DataCollection maps = SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE);
|
||||
maps.addEqualsFilter(USER_ID,user.getID().toString());
|
||||
maps.addEqualsFilter(SECTION_ID,section.getID().toString());
|
||||
maps.addEqualsFilter(USER_ID, user.getID());
|
||||
maps.addEqualsFilter(SECTION_ID, section.getID());
|
||||
|
||||
UserHomeFolderMap map = null;
|
||||
if ( maps.next() ) {
|
||||
|
|
|
|||
|
|
@ -51,10 +51,6 @@ import java.util.StringTokenizer;
|
|||
* @version $Id: MultilingualItemResolver.java 1795 2009-02-07 10:47:32Z pboy $
|
||||
*/
|
||||
public class MultilingualItemResolver extends AbstractItemResolver implements ItemResolver {
|
||||
public static final String versionId =
|
||||
"$Id: MultilingualItemResolver.java 1795 2009-02-07 10:47:32Z pboy $" +
|
||||
"$Author: pboy $" +
|
||||
"$DateTime: 2004/08/17 23:15:09 $";
|
||||
|
||||
private static final Logger s_log = Logger.getLogger
|
||||
(MultilingualItemResolver.class);
|
||||
|
|
@ -720,11 +716,7 @@ public class MultilingualItemResolver extends AbstractItemResolver implements It
|
|||
// will have deal with 'foo' folder.
|
||||
|
||||
String name = index > 0 ? url.substring(0, index) : "";
|
||||
parentFolder =
|
||||
// really object identity? Don't think so
|
||||
// name != "" ? (Folder) parentFolder.getItem(URLEncoder.encode(name), true)
|
||||
// : parentFolder;
|
||||
name.isEmpty() ? parentFolder
|
||||
parentFolder = "".equals(name) ? parentFolder
|
||||
: (Folder) parentFolder.getItem(URLEncoder.encode(name), true);
|
||||
url = index + 1 < len ? url.substring(index + 1) : "";
|
||||
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ public class Initializer implements com.arsdigita.initializer.Initializer {
|
|||
// start thread for monitoring queue
|
||||
int startupDelay = getInteger(QUEUE_POLL_STARTUP_DELAY).intValue();
|
||||
int pollDelay = getInteger(QUEUE_POLL_DELAY).intValue();
|
||||
QueueManager.startWatchingQueue(startupDelay, pollDelay);
|
||||
// QueueManager.startWatchingQueue(startupDelay, pollDelay);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -217,9 +217,9 @@ public class QueueManager implements Runnable {
|
|||
* @pre ! item instanceof ContainerItem
|
||||
***/
|
||||
public static void queuePublish(ContentItem item) {
|
||||
Assert.truth( !(item instanceof ContentBundle),
|
||||
Assert.isTrue( !(item instanceof ContentBundle),
|
||||
"Cannot queue content bundle " + item );
|
||||
Assert.truth(item.isLiveVersion(), "Item is not live");
|
||||
Assert.isTrue(item.isLiveVersion(), "Item is not live");
|
||||
if (s_log.isInfoEnabled()) {
|
||||
s_log.info("Queue publish task for " + item.getID());
|
||||
}
|
||||
|
|
@ -330,11 +330,11 @@ public class QueueManager implements Runnable {
|
|||
s_log.info("Queue move task for " + liveItem.getID());
|
||||
}
|
||||
|
||||
Assert.truth(liveItem != null && liveItem.isLiveVersion(),
|
||||
Assert.isTrue(liveItem != null && liveItem.isLiveVersion(),
|
||||
"Item is not live");
|
||||
Assert.truth(source != null && source.isLiveVersion(),
|
||||
Assert.isTrue(source != null && source.isLiveVersion(),
|
||||
"Source is not live");
|
||||
Assert.truth(destination != null && destination.isLiveVersion(),
|
||||
Assert.isTrue(destination != null && destination.isLiveVersion(),
|
||||
"Destination is not live");
|
||||
|
||||
// for move put itemId as destination folder ID, for parent_id source
|
||||
|
|
@ -346,9 +346,9 @@ public class QueueManager implements Runnable {
|
|||
}
|
||||
|
||||
private static void queue(ContentItem item, String task) {
|
||||
Assert.truth( !(item instanceof ContentBundle),
|
||||
Assert.isTrue( !(item instanceof ContentBundle),
|
||||
"Cannot queue content bundle " + item );
|
||||
Assert.truth(item.isLiveVersion(), "Item is not live");
|
||||
Assert.isTrue(item.isLiveVersion(), "Item is not live");
|
||||
|
||||
ACSObject parent = item.getParent();
|
||||
BigDecimal parentID = null;
|
||||
|
|
@ -447,6 +447,9 @@ public class QueueManager implements Runnable {
|
|||
* middle of processing a block of entries.
|
||||
*/
|
||||
public static void stopWatchingQueue() {
|
||||
if (s_log.isInfoEnabled()) {
|
||||
s_log.info("Going to stop queue processing.");
|
||||
}
|
||||
s_keepWatchingQueue = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,13 +76,9 @@ import javax.servlet.ServletException;
|
|||
* separate item selection model is updated.
|
||||
*
|
||||
* @author <a href="mailto:lutter@arsdigita.com">David Lutterkort</a>
|
||||
* @version $Revision: #22 $ $DateTime: 2004/08/17 23:15:09 $
|
||||
* @version $Id: FolderBrowser.java 1540 2007-03-26 20:44:49Z apevec $
|
||||
*/
|
||||
public class FolderBrowser extends Table {
|
||||
public static final String versionId =
|
||||
"$Id: FolderBrowser.java 1540 2007-03-26 20:44:49Z apevec $" +
|
||||
"$Author: apevec $" +
|
||||
"$DateTime: 2004/08/17 23:15:09 $";
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(FolderBrowser.class);
|
||||
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ public class PermissionManager {
|
|||
|
||||
Filter f = query.addFilter(" exists ( com.arsdigita.kernel.permissions."
|
||||
+ queryName + " and RAW["
|
||||
+ permission.getPrivilegeDescriptor().getColumnName() + " = 1 ])");
|
||||
+ permission.getPrivilegeDescriptor().getColumnName() + " = '1' ])");
|
||||
f.set("objectID", permission.getACSObjectOID().get("id"));
|
||||
f.set("partyID", constructAccessList(permission.getPartyOID()));//.get("id"));
|
||||
|
||||
|
|
@ -541,7 +541,7 @@ public class PermissionManager {
|
|||
Filter f = factory.simple(
|
||||
" exists ( com.arsdigita.kernel.permissions.PartyPermissionFilterQuery"
|
||||
+ " and RAW[dogc.pd_object_id] = " + propertyName
|
||||
+ " and RAW[" + privilege.getColumnName() + "] = 1)");
|
||||
+ " and RAW[" + privilege.getColumnName() + "] = '1')");
|
||||
f.set("partyID", constructAccessList(partyOID));//partyOID.get("id"));
|
||||
return f;
|
||||
}
|
||||
|
|
@ -557,7 +557,7 @@ public class PermissionManager {
|
|||
Filter f = factory.simple(
|
||||
" exists ( com.arsdigita.kernel.permissions.ObjectPermissionFilterQuery"
|
||||
+ " and RAW[dgm.pd_member_id] = " + propertyName
|
||||
+ " and RAW[" + privilege.getColumnName() + "] = 1)");
|
||||
+ " and RAW[" + privilege.getColumnName() + "] = '1')");
|
||||
f.set("objectID", objectOID.get("id"));
|
||||
return f;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import org.apache.log4j.Logger;
|
|||
* by all domain init methods, followed by all legacy init methods.
|
||||
*
|
||||
* @author Rafael H. Schloming <rhs@mit.edu>
|
||||
* @version $Revision: #6 $ $Date: 2004/08/16 $
|
||||
* @version $Id: CompoundInitializer.java 287 2005-02-22 00:29:02Z sskracic $
|
||||
**/
|
||||
|
||||
public class CompoundInitializer implements Initializer {
|
||||
|
|
@ -42,8 +42,6 @@ public class CompoundInitializer implements Initializer {
|
|||
private static final Logger s_log =
|
||||
Logger.getLogger(CompoundInitializer.class);
|
||||
|
||||
public final static String versionId = "$Id: CompoundInitializer.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $";
|
||||
|
||||
private Logger m_log;
|
||||
|
||||
private final List m_inits = new ArrayList();
|
||||
|
|
|
|||
|
|
@ -35,10 +35,6 @@ package com.arsdigita.runtime;
|
|||
* @version $Id: Initializer.java 287 2005-02-22 00:29:02Z sskracic $
|
||||
*/
|
||||
public interface Initializer {
|
||||
public final static String versionId =
|
||||
"$Id: Initializer.java 287 2005-02-22 00:29:02Z sskracic $" +
|
||||
"$Author: sskracic $" +
|
||||
"$DateTime: 2004/08/16 18:10:38 $";
|
||||
|
||||
/**
|
||||
* Initializes the object-relational mapping metadata by loading
|
||||
|
|
|
|||
|
|
@ -103,15 +103,20 @@ public class ApplicationFileServlet extends BaseApplicationServlet {
|
|||
private String m_templatePath;
|
||||
private ApplicationFileResolver m_resolver;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param config
|
||||
* @throws ServletException
|
||||
*/
|
||||
public void init(ServletConfig config)
|
||||
throws ServletException {
|
||||
super.init(config);
|
||||
|
||||
m_templatePath = config.getInitParameter("template-path");
|
||||
Assert.exists(m_templatePath, String.class);
|
||||
Assert.truth(m_templatePath.startsWith("/"),
|
||||
Assert.isTrue(m_templatePath.startsWith("/"),
|
||||
"template-path starts with '/'");
|
||||
Assert.truth(!m_templatePath.endsWith("/"),
|
||||
Assert.isTrue(!m_templatePath.endsWith("/"),
|
||||
"template-path does not end with '/'");
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -60,10 +60,6 @@ import org.apache.log4j.Logger;
|
|||
* @version $Id: BaseServlet.java 738 2005-09-01 12:36:52Z sskracic $
|
||||
*/
|
||||
public abstract class BaseServlet extends HttpServlet {
|
||||
public static final String versionId =
|
||||
"$Id: BaseServlet.java 738 2005-09-01 12:36:52Z sskracic $" +
|
||||
"$Author: sskracic $" +
|
||||
"$DateTime: 2004/08/16 18:10:38 $";
|
||||
|
||||
private static Logger s_log = Logger.getLogger(BaseServlet.class);
|
||||
|
||||
|
|
|
|||
|
|
@ -17,10 +17,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* !!! WORK IN PROGRESS !!!
|
||||
* NOT READY for prime time yet
|
||||
*/
|
||||
package com.arsdigita.web;
|
||||
|
||||
import com.arsdigita.runtime.CCMResourceManager;
|
||||
|
|
@ -33,6 +29,7 @@ import javax.servlet.ServletContextEvent;
|
|||
import javax.servlet.ServletContextListener;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.apache.log4j.PropertyConfigurator;
|
||||
|
||||
/**
|
||||
|
|
@ -137,7 +134,8 @@ public class CCMApplicationContextListener implements ServletContextListener {
|
|||
|
||||
// do nothing at the moment
|
||||
|
||||
s_log.info("CCM Application shutdown.");
|
||||
s_log.info("CCM Application shut down.");
|
||||
LogManager.shutdown();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -42,12 +42,9 @@ import org.apache.log4j.Logger;
|
|||
*
|
||||
* @author Rafael Schloming <rhs@mit.edu>
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
* @version $Id: Web.java 738 2005-09-01 12:36:52Z sskracic $
|
||||
*/
|
||||
public class Web {
|
||||
public static final String versionId =
|
||||
"$Id: Web.java 738 2005-09-01 12:36:52Z sskracic $" +
|
||||
"$Author: sskracic $" +
|
||||
"$DateTime: 2004/08/16 18:10:38 $";
|
||||
|
||||
public static final String ROOT_WEBAPP = "ROOT";
|
||||
|
||||
|
|
@ -137,8 +134,8 @@ public class Web {
|
|||
* @return the servlet context matching uri, or null
|
||||
*/
|
||||
public static final ServletContext getServletContext(String uri) {
|
||||
Assert.truth(uri.startsWith("/"), "uri must start with /");
|
||||
Assert.truth(uri.endsWith("/"), "uri must end with /");
|
||||
Assert.isTrue(uri.startsWith("/"), "uri must start with /");
|
||||
Assert.isTrue(uri.endsWith("/"), "uri must end with /");
|
||||
return (ServletContext)s_contexts.get(uri);
|
||||
}
|
||||
|
||||
|
|
@ -149,7 +146,7 @@ public class Web {
|
|||
static final void registerServletContext(String uri,
|
||||
ServletContext ctx) {
|
||||
s_log.debug("Mapping " + ctx + " to " + uri);
|
||||
Assert.truth(s_contexts.get(uri) == null,
|
||||
Assert.isTrue(s_contexts.get(uri) == null,
|
||||
"a context mapping exists at " + uri);
|
||||
s_contexts.put(uri, ctx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
</xsl:if>
|
||||
</script>
|
||||
|
||||
<!-- DE Lade die externe JavaScript-Datei für Xinha -->
|
||||
<!-- DE Lade die externe JavaScript-Datei fuer Xinha -->
|
||||
<script type="text/javascript" src="{@editor_src}"/>
|
||||
|
||||
<!-- DE Lade die angegebene Konfiguration -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue