Weitere Old Initializer ausgebaut.

ACHTUNG:

In ~/bundle/cfg/integration.properties muss geaendert werden:

waf.pagemap.root=navigation/
waf.pagemap.workspace=navigation/
waf.pagemap.login_redirect=content/content-center-redirect.jsp

in

core.ui.pagemap.root_page_url=navigation/
core.ui.pagemap.workspace_url=navigation/
core.ui.pagemap.user_redirect_url=content/content-center-redirect.jsp

Ansonsten gibt es gleich beim Aufruf der ersten Seite ein Resource Not Fount.


git-svn-id: https://svn.libreccm.org/ccm/trunk@742 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2011-02-10 08:46:11 +00:00
parent 48b8c77d0e
commit 8ffa7bddc1
51 changed files with 1477 additions and 696 deletions

View File

@ -26,7 +26,7 @@ import com.arsdigita.cms.CMS;
import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.dispatcher.Utilities; import com.arsdigita.cms.dispatcher.Utilities;
import com.arsdigita.cms.util.GlobalizationUtil; import com.arsdigita.cms.util.GlobalizationUtil;
import com.arsdigita.kernel.security.LegacyInitializer; import com.arsdigita.ui.UI;
import com.arsdigita.xml.Element; import com.arsdigita.xml.Element;
/** /**
@ -44,8 +44,7 @@ public class ContentSectionNavbar extends CMSContainer {
setClassAttr("section"); setClassAttr("section");
String wsUrl = String wsUrl = UI.getWorkspaceURL();
"/" + LegacyInitializer.getURL(LegacyInitializer.WORKSPACE_PAGE_KEY);
String csUrl = Utilities.getWorkspaceURL(); String csUrl = Utilities.getWorkspaceURL();
m_navbar = new DimensionalNavbar(); m_navbar = new DimensionalNavbar();

View File

@ -22,7 +22,8 @@ import com.arsdigita.bebop.DimensionalNavbar;
import com.arsdigita.bebop.Link; import com.arsdigita.bebop.Link;
import com.arsdigita.cms.dispatcher.Utilities; import com.arsdigita.cms.dispatcher.Utilities;
import com.arsdigita.globalization.GlobalizedMessage; import com.arsdigita.globalization.GlobalizedMessage;
import com.arsdigita.kernel.security.LegacyInitializer; // import com.arsdigita.kernel.security.LegacyInitializer;
import com.arsdigita.ui.UI;
/** /**
* Delimited dimensional navbar. * Delimited dimensional navbar.
@ -39,8 +40,10 @@ public class GlobalNavbar extends DimensionalNavbar {
// FIXME: Write online help, for the time being offer no link // FIXME: Write online help, for the time being offer no link
// add(new Link("Help", "help")); // add(new Link("Help", "help"));
//String signOutURL = Utilities.getWebappContext() + "/" +
// LegacyInitializer.getURL(LegacyInitializer.LOGOUT_PAGE_KEY);
String signOutURL = Utilities.getWebappContext() + "/" + String signOutURL = Utilities.getWebappContext() + "/" +
LegacyInitializer.getURL(LegacyInitializer.LOGOUT_PAGE_KEY); UI.getLogoutPageURL();
add(new Link((String) globalize("cms.ui.sign_out").localize(), add(new Link((String) globalize("cms.ui.sign_out").localize(),
signOutURL)); signOutURL));

View File

@ -22,7 +22,7 @@ import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.SimpleComponent; import com.arsdigita.bebop.SimpleComponent;
import com.arsdigita.cms.CMS; import com.arsdigita.cms.CMS;
import com.arsdigita.cms.dispatcher.Utilities; import com.arsdigita.cms.dispatcher.Utilities;
import com.arsdigita.kernel.security.LegacyInitializer; import com.arsdigita.ui.UI;
import com.arsdigita.web.URL; import com.arsdigita.web.URL;
import com.arsdigita.xml.Element; import com.arsdigita.xml.Element;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@ -47,11 +47,12 @@ class GlobalNavigation extends SimpleComponent {
GlobalNavigation() { GlobalNavigation() {
m_centerPath = Utilities.getWorkspaceURL(); m_centerPath = Utilities.getWorkspaceURL();
m_wspcPath = path(LegacyInitializer.WORKSPACE_PAGE_KEY); m_wspcPath = UI.getWorkspaceURL();
m_signOutPath = path(LegacyInitializer.LOGOUT_PAGE_KEY); m_signOutPath = UI.getLogoutPageURL();
m_helpPath = "/nowhere"; // We don't have this yet XXX. m_helpPath = "/nowhere"; // We don't have this yet XXX.
} }
@Override
public void generateXML(final PageState state, final Element parent) { public void generateXML(final PageState state, final Element parent) {
if (isVisible(state)) { if (isVisible(state)) {
final HttpServletRequest sreq = state.getRequest(); final HttpServletRequest sreq = state.getRequest();
@ -71,10 +72,6 @@ class GlobalNavigation extends SimpleComponent {
} }
} }
private static String path(final String key) {
return "/" + LegacyInitializer.getURL(key);
}
private static Element link(final HttpServletRequest sreq, private static Element link(final HttpServletRequest sreq,
final Element parent, final Element parent,
final String name, final String name,

View File

@ -161,7 +161,7 @@ public class SecurityPropertyEditor extends PropertyEditor {
addSecurityListener(section); addSecurityListener(section);
} else { } else {
throw new IllegalArgumentException( throw new IllegalArgumentException(
"The ComponentAccess object did not contain a form section."); "The ComponentAccess object did not contain a form section.");
} }
} }

View File

@ -1,13 +1,13 @@
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">
<jsp:directive.page import="com.arsdigita.kernel.security.LegacyInitializer"/> <jsp:directive.page import="com.arsdigita.ui.UI"/>
<jsp:directive.page import="com.arsdigita.web.URL"/> <jsp:directive.page import="com.arsdigita.web.URL"/>
<jsp:directive.page import="com.arsdigita.web.RedirectSignal"/> <jsp:directive.page import="com.arsdigita.web.RedirectSignal"/>
<jsp:directive.page extends="com.arsdigita.web.BaseJSP"/>
<jsp:directive.page import="com.arsdigita.cms.ContentSection"/> <jsp:directive.page import="com.arsdigita.cms.ContentSection"/>
<jsp:directive.page import="com.arsdigita.cms.ContentSectionCollection"/> <jsp:directive.page import="com.arsdigita.cms.ContentSectionCollection"/>
<jsp:directive.page import="com.arsdigita.cms.SecurityManager"/> <jsp:directive.page import="com.arsdigita.cms.SecurityManager"/>
<jsp:directive.page import="com.arsdigita.cms.dispatcher.Utilities"/> <jsp:directive.page import="com.arsdigita.cms.dispatcher.Utilities"/>
<jsp:directive.page extends="com.arsdigita.web.BaseJSP"/>
<jsp:scriptlet> <jsp:scriptlet>
ContentSectionCollection sections = ContentSection.getAllSections(); ContentSectionCollection sections = ContentSection.getAllSections();
@ -26,7 +26,7 @@
if (hasAccess) { if (hasAccess) {
url = Utilities.getWorkspaceURL(); url = Utilities.getWorkspaceURL();
} else { } else {
url = LegacyInitializer.getFullURL(LegacyInitializer.WORKSPACE_PAGE_KEY, request); url = UI.getWorkspaceURL(request);
} }
throw new RedirectSignal(URL.there(request, url), false); throw new RedirectSignal(URL.there(request, url), false);

View File

@ -27,8 +27,8 @@ import com.arsdigita.util.Assert;
import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.util.UncheckedWrapperException;
/** /**
* The parent of all Bebop Link classes, this class represents a URL * The parent of all Bebop Link classes, this class represents a URL on a page.
* on a page. It may contain a label, an image, or any other component. * It may contain a label, an image, or any other component.
* *
* <p> The following table lists all Bebop Link classes and suggests * <p> The following table lists all Bebop Link classes and suggests
* when they might be used. * when they might be used.
@ -60,7 +60,9 @@ import com.arsdigita.util.UncheckedWrapperException;
* </tr> * </tr>
* <tr> * <tr>
* <td>{@link ActionLink}</td> * <td>{@link ActionLink}</td>
* <td>Sets its own control event and runs its own {@link com.arsdigita.bebop.event.ActionListener}s. When the link is clicked, the code in the Listener's <tt>actionPerformed</tt> method runs.</td> * <td>Sets its own control event and runs its own
* {@link com.arsdigita.bebop.event.ActionListener}s. When the link is clicked,
* the code in the Listener's <tt>actionPerformed</tt> method runs.</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>{@link ToggleLink}</td> * <td>{@link ToggleLink}</td>
@ -90,16 +92,34 @@ public abstract class BaseLink extends TextStylable
private String m_sConfirmMsg = ""; private String m_sConfirmMsg = "";
/**
* Constructor
*
* @param child label component, text, image, etc.
* @param url
*/
public BaseLink(Component child, String url) { public BaseLink(Component child, String url) {
super(); super();
m_url = url; m_url = url;
m_child = child; m_child = child;
} }
/**
* Constructor.
*
* @param label as text
* @param url
*/
public BaseLink(String label, String url) { public BaseLink(String label, String url) {
this(new Label(label), url); this(new Label(label), url);
} }
/**
* Constructor.
*
* @param child
* @param l
*/
public BaseLink(Component child, PrintListener l) { public BaseLink(Component child, PrintListener l) {
this(child, ""); this(child, "");
try { try {
@ -110,10 +130,21 @@ public abstract class BaseLink extends TextStylable
} }
} }
/**
* Constructor.
*
* @param label
* @param l
*/
public BaseLink(String label, PrintListener l) { public BaseLink(String label, PrintListener l) {
this(new Label(label), l); this(new Label(label), l);
} }
/**
* Constructor.
*
* @param l
*/
public BaseLink(PrintListener l) { public BaseLink(PrintListener l) {
this("", l); this("", l);
} }

View File

@ -28,8 +28,8 @@ import com.arsdigita.web.ParameterMap;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* A URL on a page. May contain a label, an image, * A URL on a page. May contain a label, an image, or any other component.
* or any other component. A Link is a BaseLink that manages URL variables. * A Link is a BaseLink that manages URL variables.
* *
* <p> <b>Example:</b> The common usage for a Link component is * <p> <b>Example:</b> The common usage for a Link component is
* illustrated in the code fragment below: * illustrated in the code fragment below:
@ -63,9 +63,9 @@ public class Link extends BaseLink {
protected final String TYPE_LINK = "link"; protected final String TYPE_LINK = "link";
/** /**
* <p>Passing this value to {@link #setTargetFrame setTargetFrame} * <p>Passing this value to {@link #setTargetFrame setTargetFrame} will
* will create a link that opens a new browser window whenever it * create a link that opens a new browser window whenever it is clicked.
* is clicked.</p> *</p>
* *
* @see #setTargetFrame * @see #setTargetFrame
*/ */
@ -77,18 +77,19 @@ public class Link extends BaseLink {
} }
/** /**
* <p>The <tt>Component</tt> parameter in this constructor is * Constructor.
* usually a {@link Label} or {@link Image}.</p> *
* <p>The <tt>Component</tt> parameter in this constructor is usually a
* {@link Label} or {@link Image}.</p>
* *
* <p>Starting with release 5.2, this method prefixes the * <p>Starting with release 5.2, this method prefixes the passed-in url with
* passed-in <code>url</code> with the path to the CCM dispatcher. * the path to the CCM dispatcher. Code using this constructor should not
* Code using this constructor should not prefix <code>url</code> * prefix <code>url</code> with the webapp context path or the dispatcher
* with the webapp context path or the dispatcher servlet * servlet path.</p>
* path.</p>
* *
* <p>The vast majority of CCM UI code expects to link through the * <p>The vast majority of CCM UI code expects to link through the dispatcher.
* dispatcher. Code that does not should use the * Code that does not should use the <code>Link</code> constructor taking
* <code>Link</code> constructor taking a <code>URL</code>.</p> * a <code>URL</code>.</p>
* *
* @see #Link(String,URL) * @see #Link(String,URL)
*/ */
@ -99,12 +100,11 @@ public class Link extends BaseLink {
} }
/** /**
* Constructors with <tt>PrintListener</tt> parameters * Constructors with <tt>PrintListener</tt> parameters allow for a
* allow for a {@link PrintListener} to be set for * {@link PrintListener} to be set for the Link, without the need
* the Link, without the need to make a separate call to * to make a separate call to the <tt>addPrintListener</tt> method.
* the <tt>addPrintListener</tt> method. PrintListeners * PrintListeners are a convenient way to alter underlying Link
* are a convenient way to alter underlying Link attributes * attributes such as Link text or target URL within a locked page
* such as Link text or target URL within a locked page
* on a per request basis. * on a per request basis.
*/ */
public Link(Component child, PrintListener l) { public Link(Component child, PrintListener l) {
@ -113,12 +113,30 @@ public class Link extends BaseLink {
init(); init();
} }
/**
* Constructors with <tt>PrintListener</tt> parameters allow for a
* {@link PrintListener} to be set for the Link, without the need to make a
* separate call to the <tt>addPrintListener</tt> method. PrintListeners
* are a convenient way to alter underlying Link attributes such as Link
* text or target URL within a locked page on a per request basis.
*/
public Link(String label, PrintListener l) { public Link(String label, PrintListener l) {
super(label,l); super(label,l);
init(); init();
} }
/**
* Constructors with <tt>PrintListener</tt> parameters
* allow for a {@link PrintListener} to be set for
* the Link, without the need to make a separate call to
* the <tt>addPrintListener</tt> method. PrintListeners
* are a convenient way to alter underlying Link attributes
* such as Link text or target URL within a locked page
* on a per request basis.
*/
public Link(PrintListener l) { public Link(PrintListener l) {
super(l); super(l);
@ -126,9 +144,9 @@ public class Link extends BaseLink {
} }
/** /**
* <p>This constructor is a common one for a Link component, as it * <p>This constructor is a common one for a Link component, as it allows
* allows for the Link text and the target URL to be set at the * for the Link text and the target URL to be set at the same time during
* same time during construction.</p> * construction.</p>
* *
* <p>Starting with release 5.2, this method prefixes the * <p>Starting with release 5.2, this method prefixes the
* passed-in <code>url</code> with the path to the CCM dispatcher. * passed-in <code>url</code> with the path to the CCM dispatcher.
@ -149,11 +167,10 @@ public class Link extends BaseLink {
} }
/** /**
* <p>Constructs a Link using a <code>URL</code>. When this * <p>Constructs a Link using a <code>URL</code>. When this constructor is
* constructor is used, the method {@link #setVar(String,String)} * used, the method {@link #setVar(String,String)} and its deprecated
* and its deprecated equivalent have no effect on the resulting * equivalent have no effect on the resulting hyperlink. Instead, use the
* hyperlink. Instead, use the <code>ParameterMap</code> argument * <code>ParameterMap</code> argument to <code>URL</code>.</p>
* to <code>URL</code>.</p>
* *
* @see com.arsdigita.web.URL * @see com.arsdigita.web.URL
* @see com.arsdigita.web.ParameterMap * @see com.arsdigita.web.ParameterMap

View File

@ -31,10 +31,10 @@ import org.apache.log4j.Logger;
import org.xml.sax.helpers.DefaultHandler; import org.xml.sax.helpers.DefaultHandler;
/** /**
* Common base class for a generic URL-to-Bebop-Page dispatching * Common base class for a generic URL-to-Bebop-Page dispatching pattern.
* pattern. This class may be used directly by applications, or it * This class may be used directly by applications, or it may be subclassed
* may be subclassed to be coded with a specific map or to override * to be coded with a specific map or to override the map lookup for certain
* the map lookup for certain sets of URLs. * sets of URLs.
* *
* @version $Id: BebopMapDispatcher.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: BebopMapDispatcher.java 287 2005-02-22 00:29:02Z sskracic $
*/ */

View File

@ -86,6 +86,7 @@ public class Initializer extends CompoundInitializer {
new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl")))); new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl"))));
add(new com.arsdigita.ui.Initializer()); add(new com.arsdigita.ui.Initializer());
add(new com.arsdigita.kernel.Initializer());
add(new com.arsdigita.kernel.security.Initializer()); add(new com.arsdigita.kernel.security.Initializer());
add(new com.arsdigita.portal.Initializer()); add(new com.arsdigita.portal.Initializer());
add(new com.arsdigita.search.Initializer()); add(new com.arsdigita.search.Initializer());

View File

@ -35,28 +35,40 @@ init com.arsdigita.globalization.LegacyInitializer {
defaultCharset = "UTF-8"; defaultCharset = "UTF-8";
} }
init com.arsdigita.kernel.Initializer {}
init com.arsdigita.kernel.security.LegacyInitializer {
securityHelperClass = "com.arsdigita.kernel.security.DefaultSecurityHelper";
sessionTrackingMethod = "cookie";
excludedExtensions = { ".jpg", ".gif", ".png", ".pdf" };
// Should get integrated into the same configuration file as parameter
// waf.debug, i.e. ccm-core/kernel.properties.
init com.arsdigita.webdevsupport.Initializer {
active = false;
} }
// /////////////////////////////////////////////////////////////////
//
// Initializer definitely replaced by new initialization system
//
// /////////////////////////////////////////////////////////////////
// Move configuration options to enterprise.init.nolongerInUse
// init com.arsdigita.kernel.LegacyInitializer {}
// -init com.arsdigita.kernel.security.LegacyInitializer {
// - securityHelperClass = "com.arsdigita.kernel.security.DefaultSecurityHelper";
// - sessionTrackingMethod = "cookie";
// -
// - excludedExtensions = { ".jpg", ".gif", ".png", ".pdf" };
// -
// -}
// Set to true when using intermedia search // Set to true when using intermedia search
//-init com.arsdigita.mimetypes.LegacyMimeTypeInitializer { //-init com.arsdigita.mimetypes.LegacyMimeTypeInitializer {
//- INSOFilterEnabled = false; //- INSOFilterEnabled = false;
//-} //-}
// Should get integrated into the same configuration file as parameter
// waf.debug, i.e. ccm-core/kernel.properties.
init com.arsdigita.webdevsupport.Initializer {
active = false;
}
// init com.arsdigita.toolbox.CharsetEncodingProviderInitializer { } // init com.arsdigita.toolbox.CharsetEncodingProviderInitializer { }
@ -141,15 +153,6 @@ init com.arsdigita.webdevsupport.Initializer {
// }; // };
// } // }
// /////////////////////////////////////////////////////////////////
//
// Initializer definitely replaced by new initialization system
//
// /////////////////////////////////////////////////////////////////
// Move configuration options to enterprise.init.nolongerInUse
// no longer used - old versioning system? // no longer used - old versioning system?
// init com.arsdigita.versioning.Initializer { } // init com.arsdigita.versioning.Initializer { }

View File

@ -26,13 +26,26 @@ import javax.servlet.ServletException;
import javax.servlet.UnavailableException; import javax.servlet.UnavailableException;
import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServlet;
// ////////////////////////////////////////////////////////////////////////
//
// Presumably outdated - part of the old enterprise.ini based initializer
// system.
// Not used in web.xml now and superseded by the new initializer system and
// its legacy init method.
//
// ////////////////////////////////////////////////////////////////////////
/** /**
* Bootstraps the ACS by calling the initializers in the enterprise.init file. * Bootstraps the ACS by calling the initializers in the enterprise.init file.
* *
* @author Raphael Schloming (rhs@mit.edu) * @author Raphael Schloming (rhs@mit.edu)
* @version $Id: InitializerServlet.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: InitializerServlet.java 287 2005-02-22 00:29:02Z sskracic $
* @deprecated without direct replacement. Not used anymore
*/ */
public class InitializerServlet extends HttpServlet { public class InitializerServlet extends HttpServlet {
private Script m_ini = null; private Script m_ini = null;

View File

@ -233,7 +233,6 @@ public class MapDispatcher implements Dispatcher {
public void requireTrailingSlash(String url) { } public void requireTrailingSlash(String url) { }
/** /**
*
* Initializes URL-to-Page/Dispatcher/Servlet mappings from a file. * Initializes URL-to-Page/Dispatcher/Servlet mappings from a file.
* *
* Format of the file is XML: * Format of the file is XML:
@ -322,12 +321,14 @@ public class MapDispatcher implements Dispatcher {
m_buffer = new StringBuffer(); m_buffer = new StringBuffer();
} }
@Override
public void characters(char[] ch, int start, int len) { public void characters(char[] ch, int start, int len) {
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
m_buffer.append(ch[start + i]); m_buffer.append(ch[start + i]);
} }
} }
@Override
public void endElement(String uri, String localName, String qname) { public void endElement(String uri, String localName, String qname) {
if (qname.equals("url")) { if (qname.equals("url")) {
m_url = m_buffer.toString().trim(); m_url = m_buffer.toString().trim();

View File

@ -10,8 +10,12 @@
Automatically manage data model upgrade process. Automatically manage data model upgrade process.
</p> </p>
<p> <p>
As of APLAWS 1.0.5 / CCM 6.5 seems to no loner in use. Configuration file: WEB-INF/resources/core-dmi.xml
</p>
<p>
As of APLAWS 1.0.5 / CCM 6.5 seems to no longer in use.
</p> </p>
</body> </body>

View File

@ -277,9 +277,11 @@ public class GlobalizedMessage {
} }
/** /**
* <p> * <p>For debugging, not for localizing!</p>
* For debugging, not for localizing. *
* </p> * If you need a String, use an additional localize() to get an object
* and cast it to String. e.g.
* String label = (String) GlobalizedMessage(key,bundleName).localize();
* *
* @return The contents in String form for debugging. * @return The contents in String form for debugging.
*/ */

View File

@ -1,5 +1,4 @@
/* /*
* Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * modify it under the terms of the GNU Lesser General Public License
@ -16,98 +15,106 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.kernel; package com.arsdigita.kernel;
import com.arsdigita.domain.DomainObject; import com.arsdigita.domain.DomainObject;
import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.domain.DomainObjectInstantiator;
import com.arsdigita.initializer.Configuration;
import com.arsdigita.kernel.PackageInstance;
import com.arsdigita.kernel.permissions.PrivilegeDescriptor; import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.DataObject;
import com.arsdigita.persistence.SessionManager; import com.arsdigita.runtime.DomainInitEvent;
import com.arsdigita.persistence.TransactionContext; import com.arsdigita.runtime.GenericInitializer;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* Initializes the Kernel and bootstraps the rest of the system. * Initializes the kernel subpackage recurringly each system boot.
* *
* @version $Revision: #39 $ $Date: 2004/08/16 $ * @author pb
* @version $Id: Initializer.java 1169 2006-06-14 13:08:25Z fabrice $
*/ */
public class Initializer extends BaseInitializer { public class Initializer extends GenericInitializer {
private static final Logger s_log = Logger.getLogger(Initializer.class); /** Creates a s_logging category with name = to the full name of class */
public static final Logger s_log = Logger.getLogger(Initializer.class);
private Configuration m_conf = new Configuration();
public Configuration getConfiguration() { /**
return m_conf; * Implementation of the {@link Initializer#init(DomainInitEvent)}
} * method.
*
* @param evt The domain init event.
*/
@Override
public void init(DomainInitEvent evt) {
s_log.debug("kernel security domain init begin.");
protected void doStartup() { // Steps carried over from the old style initializer / enterprise.ini
setupDomainFactory();
setupURLService();
TransactionContext txn = SessionManager.getSession() /* ** ACSObject ** */
.getTransactionContext();
txn.beginTxn();
// Initialize privilege descriptors used in permissions service
s_log.debug("Initializing privilege descriptors...");
PrivilegeDescriptor.initialize();
s_log.debug("Done.");
txn.commitTxn();
}
private void setupDomainFactory() {
DomainObjectInstantiator instantiator;
/*** ACSObject ***/
// register instantiator for ACSObject data object type // register instantiator for ACSObject data object type
instantiator = new ACSObjectInstantiator(); // OLD Initializer code
DomainObjectFactory.registerInstantiator(ACSObject.BASE_DATA_OBJECT_TYPE, // instantiator = new ACSObjectInstantiator();
instantiator); // DomainObjectFactory.registerInstantiator(ACSObject.BASE_DATA_OBJECT_TYPE,
// instantiator);
evt.getFactory().registerInstantiator
(ACSObject.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() );
/*** Party ***/ /* ** Party ** */
// We use the same instantiator as for ACSObject because party is // We use the same instantiator as for ACSObject because party is
// abstract so we don't need to override doNewInstance(). // abstract so we don't need to override doNewInstance().
DomainObjectFactory.registerInstantiator(Party.BASE_DATA_OBJECT_TYPE, //DomainObjectFactory.registerInstantiator(Party.BASE_DATA_OBJECT_TYPE,
instantiator); // instantiator);
evt.getFactory().registerInstantiator
(Party.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() );
/*** User ***/ /* ** User ** */
instantiator = new ACSObjectInstantiator() { evt.getFactory().registerInstantiator
public DomainObject doNewInstance(DataObject dataObject) { (User.BASE_DATA_OBJECT_TYPE,
return new User(dataObject); new ACSObjectInstantiator() {
} @Override
}; public DomainObject doNewInstance(DataObject dobj) {
DomainObjectFactory.registerInstantiator return new User(dobj);
(User.BASE_DATA_OBJECT_TYPE, instantiator); }
} );
/*** Group ***/ /* ** Group ** */
instantiator = new ACSObjectInstantiator() { // OLD IOnitializer code
public DomainObject doNewInstance(DataObject dataObject) { // instantiator = new ACSObjectInstantiator() {
return new Group(dataObject); // public DomainObject doNewInstance(DataObject dataObject) {
} // return new Group(dataObject);
}; // }
DomainObjectFactory.registerInstantiator(Group.BASE_DATA_OBJECT_TYPE, // };
instantiator); // DomainObjectFactory.registerInstantiator(Group.BASE_DATA_OBJECT_TYPE,
// instantiator);
evt.getFactory().registerInstantiator
(Group.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() {
@Override
public DomainObject doNewInstance(DataObject dobj) {
return new Group(dobj);
}
} );
/*** Role ***/ /*** Role ***/
instantiator = new DomainObjectInstantiator() { // instantiator = new DomainObjectInstantiator() {
public DomainObject doNewInstance(DataObject dataObject) { // public DomainObject doNewInstance(DataObject dataObject) {
return new Role(dataObject); // return new Role(dataObject);
} // }
}; // };
DomainObjectFactory.registerInstantiator(Role.BASE_DATA_OBJECT_TYPE, // DomainObjectFactory.registerInstantiator(Role.BASE_DATA_OBJECT_TYPE,
instantiator); // instantiator);
} evt.getFactory().registerInstantiator
(Role.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() {
@Override
public DomainObject doNewInstance(DataObject dobj) {
return new Role(dobj);
}
} );
/* Register URLFinders with the URLService */ /* Register URLFinders with the URLService */
private void setupURLService() {
// PackageInstance is the only kernel object type for which kernel // PackageInstance is the only kernel object type for which kernel
// can provide a URLFinder. Other object types could have // can provide a URLFinder. Other object types could have
// finders registered for them by other initializers (in UI packages). // finders registered for them by other initializers (in UI packages).
@ -115,9 +122,23 @@ public class Initializer extends BaseInitializer {
// the site map. // the site map.
URLService.registerFinder(PackageInstance.BASE_DATA_OBJECT_TYPE, URLService.registerFinder(PackageInstance.BASE_DATA_OBJECT_TYPE,
new GenericURLFinder("")); new GenericURLFinder(""));
// READ-ONLY operation, during initializing a transaction should not
// requirred.
//TransactionContext txn = SessionManager.getSession()
// .getTransactionContext();
//txn.beginTxn();
s_log.debug("Initializing privilege descriptors...");
// Initialize privilege descriptors used in permissions service
// Recurring task, reads from database and stores in an internal Map
// field.
PrivilegeDescriptor.initialize();
s_log.debug("Done.");
//txn.commitTxn();
s_log.debug("kernel security domain init completed");
} }
protected void doShutdown() {
// Empty
}
} }

View File

@ -0,0 +1,127 @@
/*
* Copyright (C) 2001-2004 Red Hat Inc. 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.kernel;
import com.arsdigita.domain.DomainObject;
import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.domain.DomainObjectInstantiator;
import com.arsdigita.initializer.Configuration;
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
import com.arsdigita.persistence.DataObject;
import com.arsdigita.persistence.SessionManager;
import com.arsdigita.persistence.TransactionContext;
import org.apache.log4j.Logger;
/**
* Initializes the Kernel and bootstraps the rest of the system.
*
* @version $Revision: #39 $ $Date: 2004/08/16 $
* @version $Id: Initializer.java 1169 2006-06-14 13:08:25Z fabrice $
*/
public class LegacyInitializer extends BaseInitializer {
private static final Logger s_log = Logger.getLogger(LegacyInitializer.class);
private Configuration m_conf = new Configuration();
public Configuration getConfiguration() {
return m_conf;
}
protected void doStartup() {
// MOVED to new type Initializer
// setupDomainFactory();
// setupURLService();
TransactionContext txn = SessionManager.getSession()
.getTransactionContext();
txn.beginTxn();
s_log.debug("Initializing privilege descriptors...");
// Initialize privilege descriptors used in permissions service
// Recurring task, reads from database and stores in an internal Map
// field.
PrivilegeDescriptor.initialize();
s_log.debug("Done.");
txn.commitTxn();
}
private void setupDomainFactory() {
DomainObjectInstantiator instantiator;
/*** ACSObject ***/
// register instantiator for ACSObject data object type
instantiator = new ACSObjectInstantiator();
DomainObjectFactory.registerInstantiator(ACSObject.BASE_DATA_OBJECT_TYPE,
instantiator);
/*** Party ***/
// We use the same instantiator as for ACSObject because party is
// abstract so we don't need to override doNewInstance().
DomainObjectFactory.registerInstantiator(Party.BASE_DATA_OBJECT_TYPE,
instantiator);
/*** User ***/
instantiator = new ACSObjectInstantiator() {
public DomainObject doNewInstance(DataObject dataObject) {
return new User(dataObject);
}
};
DomainObjectFactory.registerInstantiator
(User.BASE_DATA_OBJECT_TYPE, instantiator);
/*** Group ***/
instantiator = new ACSObjectInstantiator() {
public DomainObject doNewInstance(DataObject dataObject) {
return new Group(dataObject);
}
};
DomainObjectFactory.registerInstantiator(Group.BASE_DATA_OBJECT_TYPE,
instantiator);
/*** Role ***/
instantiator = new DomainObjectInstantiator() {
public DomainObject doNewInstance(DataObject dataObject) {
return new Role(dataObject);
}
};
DomainObjectFactory.registerInstantiator(Role.BASE_DATA_OBJECT_TYPE,
instantiator);
}
/* Register URLFinders with the URLService */
private void setupURLService() {
// PackageInstance is the only kernel object type for which kernel
// can provide a URLFinder. Other object types could have
// finders registered for them by other initializers (in UI packages).
// For PackageInstance, urls are determined from the mount points on
// the site map.
URLService.registerFinder(PackageInstance.BASE_DATA_OBJECT_TYPE,
new GenericURLFinder(""));
}
protected void doShutdown() {
// Empty
}
}

View File

@ -39,11 +39,10 @@ import org.apache.log4j.Logger;
* *
* @author Phong Nguyen * @author Phong Nguyen
* @version 1.0 * @version 1.0
* @version $Id: Party.java 738 2005-09-01 12:36:52Z sskracic $
**/ **/
public abstract class Party extends ACSObject { public abstract class Party extends ACSObject {
public static final String versionId = "$Id: Party.java 738 2005-09-01 12:36:52Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $";
private static final Logger s_log = Logger.getLogger( Party.class ); private static final Logger s_log = Logger.getLogger( Party.class );
/** /**
@ -55,6 +54,7 @@ public abstract class Party extends ACSObject {
public static final String BASE_DATA_OBJECT_TYPE = public static final String BASE_DATA_OBJECT_TYPE =
"com.arsdigita.kernel.Party"; "com.arsdigita.kernel.Party";
@Override
protected String getBaseDataObjectType() { protected String getBaseDataObjectType() {
return BASE_DATA_OBJECT_TYPE; return BASE_DATA_OBJECT_TYPE;
} }
@ -143,6 +143,7 @@ public abstract class Party extends ACSObject {
* *
* @see ACSObject#getDisplayName() * @see ACSObject#getDisplayName()
*/ */
@Override
public String getDisplayName() { public String getDisplayName() {
return getName(); return getName();
} }

View File

@ -328,6 +328,7 @@ public class PrivilegeDescriptor {
/** /**
* Initializes the PrivilegeDescriptor's internal cache of privileges. * Initializes the PrivilegeDescriptor's internal cache of privileges.
* Reads privileges from database and stores in the internal Map s_privs.
* Called from the kernel initializer. * Called from the kernel initializer.
*/ */
public static void initialize() { public static void initialize() {

View File

@ -18,6 +18,8 @@
*/ */
package com.arsdigita.kernel.security; package com.arsdigita.kernel.security;
import com.arsdigita.ui.UI;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/** /**
@ -40,13 +42,14 @@ public class DefaultSecurityHelper implements SecurityHelper {
return req.isSecure(); return req.isSecure();
} }
private static String[] allowedPages = new String[] { // NOT USED anymore, see method requiresLogin() belows.
LegacyInitializer.LOGIN_PAGE_KEY, // private static String[] allowedPages = new String[] {
LegacyInitializer.LOGOUT_PAGE_KEY, // LegacyInitializer.LOGIN_PAGE_KEY,
LegacyInitializer.COOKIES_PAGE_KEY, // LegacyInitializer.LOGOUT_PAGE_KEY,
LegacyInitializer.RECOVER_PAGE_KEY, // LegacyInitializer.COOKIES_PAGE_KEY,
LegacyInitializer.EXPIRED_PAGE_KEY, // LegacyInitializer.RECOVER_PAGE_KEY,
}; // LegacyInitializer.EXPIRED_PAGE_KEY,
// };
/** /**
* Determines whether the current request requires that the user be * Determines whether the current request requires that the user be
@ -83,6 +86,7 @@ public class DefaultSecurityHelper implements SecurityHelper {
* @return the full URL of the login page. * @return the full URL of the login page.
**/ **/
public String getLoginURL(HttpServletRequest req) { public String getLoginURL(HttpServletRequest req) {
return LegacyInitializer.getFullURL(LegacyInitializer.LOGIN_PAGE_KEY, req); // return LegacyInitializer.getFullURL(LegacyInitializer.LOGIN_PAGE_KEY, req);
return UI.getLoginPageURL();
} }
} }

View File

@ -25,14 +25,9 @@ import com.arsdigita.runtime.GenericInitializer;
import com.arsdigita.util.URLRewriter; import com.arsdigita.util.URLRewriter;
import java.util.Arrays; import java.util.Arrays;
//import java.util.ArrayList;
//import java.util.HashMap;
//import java.util.Iterator;
import java.util.List; import java.util.List;
//import java.util.Map;
import javax.security.auth.login.LoginException; import javax.security.auth.login.LoginException;
//import javax.servlet.http.HttpServletRequest;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@ -55,6 +50,7 @@ public class Initializer extends GenericInitializer {
* *
* @param evt The domain init event. * @param evt The domain init event.
*/ */
@Override
public void init(DomainInitEvent evt) { public void init(DomainInitEvent evt) {
s_log.debug("kernel security domain init begin."); s_log.debug("kernel security domain init begin.");
@ -66,9 +62,9 @@ public class Initializer extends GenericInitializer {
URLRewriter.addParameterProvider(new SecurityParameterProvider()); URLRewriter.addParameterProvider(new SecurityParameterProvider());
// Step 2: // Step 2:
// TODO: Implement an equivalant to loadExcludedExtensions() of // Implement an equivalant to loadExcludedExtensions() of
// LegacyInitializer to set the list of ExludecExtensions in Util! // LegacyInitializer to set the list of ExludecExtensions
// Avoid any reference to the config object in Util. // Implemented in Util!
// Step 3: // Step 3:
// Set the SecurityHelper class to be used. // Set the SecurityHelper class to be used.
@ -89,7 +85,7 @@ public class Initializer extends GenericInitializer {
// Step 4: // Step 4:
// LoadPageMap / handling of URL's. Not an initializer task. // LoadPageMap / handling of URL's. Not an initializer task.
// Has to be handled anywhere else (e.g. com arsdigita.ui) // Moved to com arsdigita.ui.UI
// Step 5: // Step 5:
loadLoginConfig(); loadLoginConfig();

View File

@ -20,7 +20,7 @@ package com.arsdigita.kernel.security;
// import com.arsdigita.util.URLRewriter; // import com.arsdigita.util.URLRewriter;
import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.SiteNode; // import com.arsdigita.kernel.SiteNode;
import com.arsdigita.initializer.Configuration; import com.arsdigita.initializer.Configuration;
import com.arsdigita.initializer.InitializationException; import com.arsdigita.initializer.InitializationException;
@ -31,7 +31,7 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
// import javax.security.auth.login.LoginException; // import javax.security.auth.login.LoginException;
import javax.servlet.http.HttpServletRequest; // import javax.servlet.http.HttpServletRequest;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@ -298,39 +298,39 @@ public class LegacyInitializer
return (String)s_pageMap.get(key); return (String)s_pageMap.get(key);
} }
/** // /**
* Returns the absolute URL associated with the given key. This is the // * Returns the absolute URL associated with the given key. This is the
* root URL for the system (the mount point) prepended to the result of // * root URL for the system (the mount point) prepended to the result of
* getURL(key). // * getURL(key).
* // *
* @return the absolute URL associated with the given key, or null // * @return the absolute URL associated with the given key, or null
* if it does not exist. // * if it does not exist.
* // *
* @see #getURL(String) // * @see #getURL(String)
**/ // **/
public static String getFullURL(String key, HttpServletRequest req) { // public static String getFullURL(String key, HttpServletRequest req) {
String root = getRootURL(req); // String root = getRootURL(req);
String url = getURL(key); // String url = getURL(key);
//
if (s_log.isDebugEnabled()) { // if (s_log.isDebugEnabled()) {
s_log.debug("Root is " + root + ", url is " + url); // s_log.debug("Root is " + root + ", url is " + url);
} // }
//
// if ((root == null) || (key == null)) {
// return null;
// }
// return root + url;
// }
if ((root == null) || (key == null)) { // private static String getRootURL(HttpServletRequest req) {
return null;
}
return root + url;
}
private static String getRootURL(HttpServletRequest req) {
// XXX this isn't safe since you aren't neccessarily // XXX this isn't safe since you aren't neccessarily
// calling it from the root webapp - so we can't // calling it from the root webapp - so we can't
// blindly prepend the context path from the current // blindly prepend the context path from the current
// request. // request.
//return SiteNode.getRootSiteNode().getURL(req); //return SiteNode.getRootSiteNode().getURL(req);
return SiteNode.getRootSiteNode().getURL(); // return SiteNode.getRootSiteNode().getURL();
} // }
// private void loadLoginConfig() throws InitializationException { // private void loadLoginConfig() throws InitializationException {
// javax.security.auth.login.Configuration.setConfiguration // javax.security.auth.login.Configuration.setConfiguration

View File

@ -53,15 +53,18 @@ public class SecurityConfig extends AbstractConfig {
private static String s_systemAdministratorEmailAddress = null; private static String s_systemAdministratorEmailAddress = null;
/** Size of secret key in bytes. **/
public static int SECRET_KEY_BYTES = 16;
/** The class name of the SecurityHelper implementation. Must implement /** The class name of the SecurityHelper implementation. Must implement
SecurityHelper interface */ SecurityHelper interface */
private final Parameter m_securityHelperClass = new SpecificClassParameter private final Parameter m_securityHelperClass = new SpecificClassParameter
("waf.security_helper_class", Parameter.REQUIRED, ("waf.security_helper_class", Parameter.REQUIRED,
com.arsdigita.kernel.security.DefaultSecurityHelper.class, com.arsdigita.kernel.security.DefaultSecurityHelper.class,
com.arsdigita.kernel.security.SecurityHelper.class); com.arsdigita.kernel.security.SecurityHelper.class);
/** This parameter is obsolete. */ // /** This parameter is obsolete. */
private final Parameter m_sessionTrackingMethod = new StringParameter // private final Parameter m_sessionTrackingMethod = new StringParameter
("waf.session_tracking_method", Parameter.REQUIRED, "cookie"); // ("waf.session_tracking_method", Parameter.REQUIRED, "cookie");
/** List of extensions excluded from authentication cookies. /** List of extensions excluded from authentication cookies.
* Authentication is checked for all requests, but requests with one of * Authentication is checked for all requests, but requests with one of
* these extensions will never cause a new cookie to be set. * these extensions will never cause a new cookie to be set.
@ -69,38 +72,50 @@ public class SecurityConfig extends AbstractConfig {
private final Parameter m_excludedExtensions = new StringArrayParameter private final Parameter m_excludedExtensions = new StringArrayParameter
("waf.excluded_extensions", Parameter.REQUIRED, ("waf.excluded_extensions", Parameter.REQUIRED,
new String[] { ".jpg", ".gif", ".png", ".pdf" } ); new String[] { ".jpg", ".gif", ".png", ".pdf" } );
/** Key for the root page of the site. */
private final Parameter m_rootPage = new StringParameter // /////////////////////////////////////////////////////////////////////////////
("waf.pagemap.root", Parameter.REQUIRED, "register/"); // This section completely moved to com.arsdigita.ui.UIConfig.
/** Key for the login page. */ // Configuration is not an Initializer task.
private final Parameter m_loginPage = new StringParameter // Retained here during transition, should be removed when completed (2011-02)
("waf.pagemap.login", Parameter.REQUIRED, "register/"); // /////////////////////////////////////////////////////////////////////////////
/** Key for the new user page. */
private final Parameter m_newUserPage = new StringParameter // /** Key for the root page of the site. */
("waf.pagemap.newuser", Parameter.REQUIRED, "register/new-user"); // private final Parameter m_rootPage = new StringParameter
/** Key for the logout page. */ // ("waf.pagemap.root", Parameter.REQUIRED, "register/");
private final Parameter m_logoutPage = new StringParameter // /** Key for the login page. */
("waf.pagemap.logout", Parameter.REQUIRED, "register/logout"); // private final Parameter m_loginPage = new StringParameter
/** Key for the explain-cookies page. */ // ("waf.pagemap.login", Parameter.REQUIRED, "register/");
private final Parameter m_cookiesPage = new StringParameter // /** Key for the new user page. */
("waf.pagemap.cookies", Parameter.REQUIRED, "register/explain-persistent-cookies"); // private final Parameter m_newUserPage = new StringParameter
/** Key for the change-password page. **/ // ("waf.pagemap.newuser", Parameter.REQUIRED, "register/new-user");
private final Parameter m_changePage = new StringParameter // /** Key for the logout page. */
("waf.pagemap.change", Parameter.REQUIRED, "register/change-password"); // private final Parameter m_logoutPage = new StringParameter
/** Key for the recover-password page. **/ // ("waf.pagemap.logout", Parameter.REQUIRED, "register/logout");
private final Parameter m_recoverPage = new StringParameter // /** Key for the explain-cookies page. */
("waf.pagemap.recover", Parameter.REQUIRED, "register/recover-password"); // private final Parameter m_cookiesPage = new StringParameter
/** Key for the login-expired page. */ // ("waf.pagemap.cookies", Parameter.REQUIRED,
private final Parameter m_expiredPage = new StringParameter // "register/explain-persistent-cookies");
("waf.pagemap.expired", Parameter.REQUIRED, "register/login-expired"); // /** Key for the change-password page. **/
private final Parameter m_workspacePage = new StringParameter // private final Parameter m_changePage = new StringParameter
("waf.pagemap.workspace", Parameter.REQUIRED, "pvt/"); // ("waf.pagemap.change", Parameter.REQUIRED, "register/change-password");
private final Parameter m_loginRedirectPage = new StringParameter // /** Key for the recover-password page. **/
("waf.pagemap.login_redirect", Parameter.REQUIRED, "pvt/"); // private final Parameter m_recoverPage = new StringParameter
private final Parameter m_permissionPage = new StringParameter // ("waf.pagemap.recover", Parameter.REQUIRED, "register/recover-password");
("waf.pagemap.permission", Parameter.REQUIRED, "permissions/"); // /** Key for the login-expired page. */
private final Parameter m_permSinglePage = new StringParameter // private final Parameter m_expiredPage = new StringParameter
("waf.pagemap.perm_single", Parameter.REQUIRED, "permissions/one"); // ("waf.pagemap.expired", Parameter.REQUIRED, "register/login-expired");
// private final Parameter m_workspacePage = new StringParameter
// ("waf.pagemap.workspace", Parameter.REQUIRED, "pvt/");
// private final Parameter m_loginRedirectPage = new StringParameter
// ("waf.pagemap.login_redirect", Parameter.REQUIRED, "pvt/");
// private final Parameter m_permissionPage = new StringParameter
// ("waf.pagemap.permission", Parameter.REQUIRED, "permissions/");
// private final Parameter m_permSinglePage = new StringParameter
// ("waf.pagemap.perm_single", Parameter.REQUIRED, "permissions/one");
// ////////////////////////////////////////////////////////////////////////////
private final Parameter m_cookieDurationMinutes = new IntegerParameter private final Parameter m_cookieDurationMinutes = new IntegerParameter
("waf.pagemap.cookies_duration_minutes", Parameter.OPTIONAL, null); ("waf.pagemap.cookies_duration_minutes", Parameter.OPTIONAL, null);
private final Parameter m_cookieDomain = new StringParameter private final Parameter m_cookieDomain = new StringParameter
@ -131,24 +146,25 @@ public class SecurityConfig extends AbstractConfig {
*/ */
public SecurityConfig() { public SecurityConfig() {
register(m_securityHelperClass); register(m_securityHelperClass);
register(m_sessionTrackingMethod); // register(m_sessionTrackingMethod);
register(m_excludedExtensions); register(m_excludedExtensions);
register(m_rootPage); // MOVED, see above
register(m_loginPage); // register(m_rootPage);
register(m_newUserPage); // register(m_loginPage);
register(m_logoutPage); // register(m_newUserPage);
register(m_cookiesPage); // register(m_logoutPage);
register(m_changePage); // register(m_cookiesPage);
register(m_recoverPage); // register(m_changePage);
register(m_expiredPage); // register(m_recoverPage);
register(m_workspacePage); // register(m_expiredPage);
register(m_loginRedirectPage); // register(m_workspacePage);
register(m_permissionPage); // register(m_loginRedirectPage);
register(m_permSinglePage); // register(m_permissionPage);
// register(m_permSinglePage);
register(m_cookieDomain); register(m_cookieDomain);
register(m_loginConfig); register(m_loginConfig);
register(m_cookieDurationMinutes); register(m_cookieDurationMinutes);
register(m_adminEmail); register(m_adminEmail);
register(m_autoRegistrationOn); register(m_autoRegistrationOn);
@ -184,13 +200,13 @@ public class SecurityConfig extends AbstractConfig {
return (Class) get(m_securityHelperClass); return (Class) get(m_securityHelperClass);
} }
/** // /**
* Obsolete! // * Obsolete!
* @return // * @return
*/ // */
public final String getSessionTrackingMethod() { // public final String getSessionTrackingMethod() {
return (String) get(m_sessionTrackingMethod); // return (String) get(m_sessionTrackingMethod);
} // }
/** /**
* *
@ -200,42 +216,45 @@ public class SecurityConfig extends AbstractConfig {
return Arrays.asList( (String[]) get(m_excludedExtensions)); return Arrays.asList( (String[]) get(m_excludedExtensions));
} }
String getRootPage() { // MOVED, see above
return (String) get(m_rootPage); // String getRootPage() {
} // return (String) get(m_rootPage);
String getLoginPage() { // }
return (String) get(m_loginPage); // String getLoginPage() {
} // return (String) get(m_loginPage);
String getNewUserPage() { // }
return (String) get(m_newUserPage); // String getNewUserPage() {
} // return (String) get(m_newUserPage);
String getLogoutPage() { // }
return (String) get(m_logoutPage); // String getLogoutPage() {
} // return (String) get(m_logoutPage);
String getCookiesPage() { // }
return (String) get(m_cookiesPage); // String getCookiesPage() {
} // return (String) get(m_cookiesPage);
String getChangePage() { // }
return (String) get(m_changePage); // String getChangePage() {
} // return (String) get(m_changePage);
String getRecoverPage() { // }
return (String) get(m_recoverPage); // String getRecoverPage() {
} // return (String) get(m_recoverPage);
String getExpiredPage() { // }
return (String) get(m_expiredPage); // String getExpiredPage() {
} // return (String) get(m_expiredPage);
String getWorkspacePage() { // }
return (String) get(m_workspacePage); // String getWorkspacePage() {
} // return (String) get(m_workspacePage);
public String getLoginRedirectPage() { // }
return (String) get(m_loginRedirectPage); // public String getLoginRedirectPage() {
} // return (String) get(m_loginRedirectPage);
String getPermissionPage() { // }
return (String) get(m_permissionPage); // String getPermissionPage() {
} // return (String) get(m_permissionPage);
String getPermSinglePage() { // }
return (String) get(m_permSinglePage); // String getPermSinglePage() {
} // return (String) get(m_permSinglePage);
// }
// ///////////////////////////////////////////////////////////////////////////
public String getCookieDomain() { public String getCookieDomain() {
return (String) get(m_cookieDomain); return (String) get(m_cookieDomain);
} }
@ -259,7 +278,8 @@ public class SecurityConfig extends AbstractConfig {
private static synchronized String getSystemAdministratorEmailAddress() { private static synchronized String getSystemAdministratorEmailAddress() {
if (s_systemAdministratorEmailAddress == null) { if (s_systemAdministratorEmailAddress == null) {
ObjectPermissionCollection perms = PermissionService.getGrantedUniversalPermissions(); ObjectPermissionCollection perms =
PermissionService.getGrantedUniversalPermissions();
perms.addEqualsFilter("granteeIsUser", Boolean.TRUE); perms.addEqualsFilter("granteeIsUser", Boolean.TRUE);
perms.clearOrder(); perms.clearOrder();
perms.addOrder("granteeID"); perms.addOrder("granteeID");

View File

@ -1,51 +1,3 @@
waf.pagemap.root.title=Root Page
waf.pagemap.root.purpose=Enter the relative URL for top-level page
waf.pagemap.root.example=register/
waf.pagemap.root.format=[string]
waf.pagemap.login.title=Login Page
waf.pagemap.login.purpose=Enter the relative URL for the Login page
waf.pagemap.login.example=register/
waf.pagemap.login.format=[string]
waf.pagemap.newuser.title=New User Page
waf.pagemap.newuser.purpose=Enter the relative URL for the New User Page
waf.pagemap.newuser.example=register/new-user
waf.pagemap.newuser.format=[string]
waf.pagemap.logout.title=Logout Page
waf.pagemap.logout.purpose=Enter the relative URL for the Logout Page
waf.pagemap.logout.example=register/logout
waf.pagemap.logout.format=[string]
waf.pagemap.cookies.title=Cookies Explanation Page
waf.pagemap.cookies.purpose=Enter the relative URL for the Cookies explanation page
waf.pagemap.cookies.example=register/explain-persistent-cookies
waf.pagemap.cookies.format=[string]
waf.pagemap.change.title=Change Password Page
waf.pagemap.change.purpose=Enter the relative URL for the Change Password Page
waf.pagemap.change.example=register/change-password
waf.pagemap.change.format=[string]
waf.pagemap.recover.title=Recover Password Page
waf.pagemap.recover.purpose=Enter the relative URL for the Recover Password Page
waf.pagemap.recover.example=register/recover-password
waf.pagemap.recover.format=[string]
waf.pagemap.expired.title=Expired Login Page
waf.pagemap.expired.purpose=Enter the relative URL for the expired login message
waf.pagemap.expired.example=register/login-expired
waf.pagemap.expired.format=[string]
waf.pagemap.workspace.title=Workspace Page
waf.pagemap.workspace.purpose=Enter the relative URL for the Workspace Page
waf.pagemap.workspace.example=pvt/
waf.pagemap.workspace.format=[string]
waf.pagemap.login_redirect.title=Login Redirect Page
waf.pagemap.login_redirect.purpose=Enter the relative URL for redirect upon login
waf.pagemap.login_redirect.example=pvt/
waf.pagemap.login_redirect.format=[string]
waf.pagemap.permission.title=Permissions Page
waf.pagemap.permission.purpose=Enter the relative URL for the main Permissions administration page
waf.pagemap.permission.example=permissions/
waf.pagemap.permission.format=[string]
waf.pagemap.perm_single.title=Single object Permissions Page
waf.pagemap.perm_single.purpose=Enter the relative URL for the Single Object permissons administration page
waf.pagemap.perm_single.example=permissions/one
waf.pagemap.perm_single.format=[string]
waf.login_config.title=Login Configuration waf.login_config.title=Login Configuration
waf.login_config.purpose=Enter JAAS login configuration, using the syntax described in Javadoc for com.arsdigita.kernel.security.LoginConfig waf.login_config.purpose=Enter JAAS login configuration, using the syntax described in Javadoc for com.arsdigita.kernel.security.LoginConfig
waf.login_config.example=Request:com.arsdigita.kernel.security.AdminLoginModule:sufficient,Register:com.arsdigita.kernel.security.LocalLoginModule:requisite waf.login_config.example=Request:com.arsdigita.kernel.security.AdminLoginModule:sufficient,Register:com.arsdigita.kernel.security.LocalLoginModule:requisite
@ -63,6 +15,57 @@ waf.auto_registration_on.purpose=New users get automatically redirected to the c
waf.auto_registration_on.example=true waf.auto_registration_on.example=true
waf.auto_registration_on.format=true|false waf.auto_registration_on.format=true|false
waf.user_ban_on.title=User Ban waf.user_ban_on.title=User Ban
waf.user_ban_on.purpose=Check on each access if user has been banned from the site. waf.user_ban_on.purpose=Check on each access if user has been banned from the site.
waf.user_ban_on.example=false waf.user_ban_on.example=false
waf.user_ban_on.format=true|false waf.user_ban_on.format=true|false
# Moved to com.arsdigita.ui.UIConfig (2011-02).
# Retained here for easy reference during transition phase
# waf.pagemap.root.title=Root Page
# waf.pagemap.root.purpose=Enter the relative URL for top-level page
# waf.pagemap.root.example=register/
# waf.pagemap.root.format=[string]
# waf.pagemap.login.title=Login Page
# waf.pagemap.login.purpose=Enter the relative URL for the Login page
# waf.pagemap.login.example=register/
# waf.pagemap.login.format=[string]
# waf.pagemap.newuser.title=New User Page
# waf.pagemap.newuser.purpose=Enter the relative URL for the New User Page
# waf.pagemap.newuser.example=register/new-user
# waf.pagemap.newuser.format=[string]
# waf.pagemap.logout.title=Logout Page
# waf.pagemap.logout.purpose=Enter the relative URL for the Logout Page
# waf.pagemap.logout.example=register/logout
# waf.pagemap.logout.format=[string]
# waf.pagemap.cookies.title=Cookies Explanation Page
# waf.pagemap.cookies.purpose=Enter the relative URL for the Cookies explanation page
# waf.pagemap.cookies.example=register/explain-persistent-cookies
# waf.pagemap.cookies.format=[string]
# waf.pagemap.change.title=Change Password Page
# waf.pagemap.change.purpose=Enter the relative URL for the Change Password Page
# waf.pagemap.change.example=register/change-password
# waf.pagemap.change.format=[string]
# waf.pagemap.recover.title=Recover Password Page
# waf.pagemap.recover.purpose=Enter the relative URL for the Recover Password Page
# waf.pagemap.recover.example=register/recover-password
# waf.pagemap.recover.format=[string]
# waf.pagemap.expired.title=Expired Login Page
# waf.pagemap.expired.purpose=Enter the relative URL for the expired login message
# waf.pagemap.expired.example=register/login-expired
# waf.pagemap.expired.format=[string]
# waf.pagemap.workspace.title=Workspace Page
# waf.pagemap.workspace.purpose=Enter the relative URL for the Workspace Page
# waf.pagemap.workspace.example=pvt/
# waf.pagemap.workspace.format=[string]
# waf.pagemap.login_redirect.title=Login Redirect Page
# waf.pagemap.login_redirect.purpose=Enter the relative URL for redirect upon login
# waf.pagemap.login_redirect.example=pvt/
# waf.pagemap.login_redirect.format=[string]
# waf.pagemap.permission.title=Permissions Page
# waf.pagemap.permission.purpose=Enter the relative URL for the main Permissions administration page
# waf.pagemap.permission.example=permissions/
# waf.pagemap.permission.format=[string]
# waf.pagemap.perm_single.title=Single object Permissions Page
# waf.pagemap.perm_single.purpose=Enter the relative URL for the Single Object permissons administration page
# waf.pagemap.perm_single.example=permissions/one
# waf.pagemap.perm_single.format=[string]

View File

@ -54,7 +54,7 @@ final class Store implements KeyStorage {
Store() {} Store() {}
static byte[] newKey() { static byte[] newKey() {
byte[] key = new byte[LegacyInitializer.SECRET_KEY_BYTES]; byte[] key = new byte[SecurityConfig.SECRET_KEY_BYTES];
new SecureRandom().nextBytes(key); new SecureRandom().nextBytes(key);
return key; return key;
} }
@ -107,9 +107,9 @@ final class Store implements KeyStorage {
throw new IllegalStateException throw new IllegalStateException
("the store is null"); ("the store is null");
} }
if ( m_secret.length != LegacyInitializer.SECRET_KEY_BYTES ) { if ( m_secret.length != SecurityConfig.SECRET_KEY_BYTES ) {
throw new IllegalArgumentException throw new IllegalArgumentException
("wrong length. expected=" + LegacyInitializer.SECRET_KEY_BYTES + ("wrong length. expected=" + SecurityConfig.SECRET_KEY_BYTES +
", but got " + m_secret.length); ", but got " + m_secret.length);
} }
return m_secret; return m_secret;

View File

@ -56,6 +56,8 @@ import org.apache.log4j.Logger;
* *
* *
* <p><b>Subject to change!</b></p> * <p><b>Subject to change!</b></p>
*
* A similiar task is performed by com.arsdigita.util.ResourceManager
* *
* @author Justin Ross &lt;jross@redhat.com&gt; * @author Justin Ross &lt;jross@redhat.com&gt;
* rewritten by * rewritten by

View File

@ -0,0 +1,458 @@
/*
*
* 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.ui;
import javax.servlet.http.HttpServletRequest;
import org.apache.log4j.Logger;
/**
* <p>A central location for commonly used UI services and their accessories.</p>
*
*
* @author pb
*/
public abstract class UI {
/** Private loggin instance. */
private static final Logger s_log = Logger.getLogger(UI.class);
/** The UI XML namespace. */
public static final String UI_XML_NS = "http://www.arsdigita.com/ui/1.0";
private static final UIConfig s_config = UIConfig.getConfig();
/** (Relative) URL for systems public top level page. */
// In old LegacyInitializer ROOT_PAGE_KEY =pagemap.root= register/ | portal/
private static final String s_rootPageURL = s_config.getRootPage();
/** (Relative) URL for systems login page. */
private static final String s_loginURL = s_config.getLogin();
/** (Relative) URL for systems logout page. */
private static final String s_logoutURL = s_config.getLogout();
/**
* */
private static final String s_userRedirectURL = s_config.getUserRedirect();
/** (Relative) URL for workspace page. */
private static final String s_workspaceURL = s_config.getWorkspace();
/** Root URL */
// This address used to be determinded by
// SiteNode.getRootSiteNode().getURL();
// It provides a sitenode without a name an without any parent, i.e. "/"
// There is no information whether the context path (in case we are not
// installed as root application (context) of the servlet(!) container).
// It does obviously NOT include the constant prefix, generated by the
// new dispatcher.
//
// Previously an variant had been used:
// SiteNode.getRootSiteNode().getURL(request);
// but according to a developers comment the latter is not save:
// "this isn't safe since you aren't neccessarily calling it from
// the root webapp - so we can't blindly prepend the context path
// from the current request."
//
// Sitenode is deprecated, web.Application should be used instead. But here
// there is no application to invoke, but we need the root part of the URL
// for a page to be prepended to its address. This depends on the
// installation, not on the request or the specific application.
//
// XXX must be generated from an installation config record.
private static final String s_rootURL = "/";
/**
* Provides a handle to the UI config record.
*
* @return Instance of UIConfig
*/
public static UIConfig getConfig() {
return s_config;
}
/**
* Provides an absolute URL (leading slash) into the system top-level page.
* It is relative to document root without any constant prefix if there is
* one configured.
*
* XXX This implementation starts with a leading slash and ends with a slash.
* In previous configurations String urls began without a slash in order
* to be able to provide a full URL which also contains the context part.
* Since version 5.2 the context part is handled by (new) dispatcher.
* Therefore the request parameter is not ignored! This variant is retained
* for backwards compatibility only.
* The leading slash it API change! It's impacts have tp be checked. (2011-02)
*
* @return URL for top-level page as String
*/
// In old LegacyInitializer ROOT_PAGE_KEY = pagemap.root = register/
// (usually modif. to portal/nav)
public static String getRootPageURL(HttpServletRequest req) {
if (s_log.isDebugEnabled()) {
s_log.debug("Root is " + s_rootURL + ", url is " + s_rootPageURL);
}
if ((s_rootURL == null) || (s_rootPageURL == null)) {
return null;
}
return s_rootURL + s_rootPageURL;
}
/**
* Provides an absolute URL (leading slash) into the system top-level page.
* It is relative to document root without any constant prefix if there is
* one configured.
*
* XXX This implementation starts with a leading slash and ends with a slash.
* In previous configurations String urls began without a slash in order
* to be able to provide a full URL which also contains the context part.
* Since version 5.2 the context part is handled by (new) dispatcher.
* The leading slash it API change! It's impacts have tp be checked. (2011-02)
*
* @return URL for top-level page as String
*/
// In old LegacyInitializer ROOT_PAGE_KEY = register/ (modif. to portal/nav)
public static String getRootPageURL() {
if (s_log.isDebugEnabled()) {
s_log.debug("Root is " + s_rootURL + ", url is " + s_rootPageURL);
}
if ((s_rootURL == null) || (s_rootPageURL == null)) {
return null;
}
return s_rootURL + s_rootPageURL;
// return s_rootPageURL;
}
/**
* Provides an absolute URL (leading slash) into the system login page.
* It is relative to document root without any constant prefix if there is
* one configured.
*
* XXX This implementation starts with a leading slash and ends with a slash.
* In previous configurations String urls began without a slash in order
* to be able to provide a full URL which also contains the context part.
* Since version 5.2 the context part is handled by (new) dispatcher.
* The leading slash it API change! It's impacts have tp be checked. (2011-02)
*
* @return URL for login page as String
*/
// In old LegacyInitializer
// LOGIN_PAGE_KEY = page.kernel.login = register/
public static String getLoginPageURL() {
return s_rootURL + s_loginURL;
}
/**
* Provides an absolute URL (leading slash) for a login expired info page.
* It is relative to document root without any constant prefix if there is
* one configured.
*
* XXX This implementation starts with a leading slash and ends with a slash.
* In previous configurations String urls began without a slash in order
* to be able to provide a full URL which also contains the context part.
* Since version 5.2 the context part is handled by (new) dispatcher.
* The leading slash it API change! It's impacts have tp be checked. (2011-02)
*
* @return url String for new user registration page as String
*/
// In old LegacyInitializer
// EXPIRED_PAGE_KEY =page.kernel.expired=register/login-expired/
public static String getLoginExpiredPageURL() {
return s_rootURL + s_loginURL + "login-expired/";
}
/**
* Provides an absolute URL (leading slash) for a cookie explanation page.
* It is relative to document root without any constant prefix if there is
* one configured.
*
* XXX This implementation starts with a leading slash and ends with a slash.
* In previous configurations String urls began without a slash in order
* to be able to provide a full URL which also contains the context part.
* Since version 5.2 the context part is handled by (new) dispatcher.
* The leading slash it API change! It's impacts have tp be checked. (2011-02)
*
* @return url String for new user registration page as String
*/
// In old LegacyInitializer
//COOKIES_PAGE_KEY =page.kernel.cookies=register/explain-persistent-cookies/
public static String getCookiesExplainPageURL() {
return s_rootURL + s_loginURL + "explain-persistent-cookies/";
}
/**
* Provides an absolute URL (leading slash) for a password recovery page.
* It is relative to document root without any constant prefix if there is
* one configured.
*
* XXX This implementation starts with a leading slash and ends with a slash.
* In previous configurations String urls began without a slash in order
* to be able to provide a full URL which also contains the context part.
* Since version 5.2 the context part is handled by (new) dispatcher.
* The leading slash it API change! It's impacts have tp be checked. (2011-02)
*
* @return url String for new user registration page as String
*/
// In old LegacyInitializer
// RECOVER_PAGE_KEY =page.kernel.recover = register/recover-password/
public static String getRecoverPasswordPageURL() {
return s_rootURL + s_loginURL + "recover-password/";
}
/**
* Provides an absolute URL (leading slash) to a user profile editig page.
* It is relative to document root without any constant prefix if there is
* one configured.
*
* XXX This implementation starts with a leading slash and ends with a slash.
* In previous configurations String urls began without a slash in order
* to be able to provide a full URL which also contains the context part.
* Since version 5.2 the context part is handled by (new) dispatcher.
* The leading slash it API change! It's impacts have tp be checked. (2011-02)
*
* @return url String for new user registration page as String
*/
// In old LegacyInitializer
// EDIT_PAGE_KEY = page.kernel.edit = register/edit-profile/
public static String getEditUserProfilePageURL() {
return s_rootURL + s_loginURL + "edit-profile/";
}
/**
* Provides an absolute URL (leading slash) for an edit (change) password
* page. It is relative to document root without any constant prefix if
* there is one configured.
*
* XXX This implementation starts with a leading slash and ends with a slash.
* In previous configurations String urls began without a slash in order
* to be able to provide a full URL which also contains the context part.
* Since version 5.2 the context part is handled by (new) dispatcher. The
* leading slash it API change! It's impacts have to be checked. (2011-02)
*
* @return url String for new user registration page as String
*/
// In old LegacyInitializer
// CHANGE_PAGE_KEY = page.kernel.change = register/change-password/
public static String getChangePasswordPageURL() {
return s_rootURL + s_loginURL + "change-password/";
}
/**
* Provides an absolute URL (leading slash) to an optional new user
* registration page (accessible only if activated). It is relative to
* document root without any constant prefix if there is one configured.
*
* XXX This implementation starts with a leading slash and ends with a slash.
* In previous configurations String urls began without a slash in order
* to be able to provide a full URL which also contains the context part.
* Since version 5.2 the context part is handled by (new) dispatcher.
* The leading slash it API change! It's impacts have tp be checked. (2011-02)
*
* @return url String for new user registration page as String
*/
// In old LegacyInitializer
// NEWUSER_PAGE_KEY = page.kernel.newuser = register/new-user/
public static String getNewUserPageURL() {
return s_rootURL + s_loginURL + "new-user/";
}
/**
* Provides an absolute URL (leading slash) for the system logout page. It
* is relative to document root without any constant prefix if there is one
* configured.
*
* XXX This implementation starts with a leading slash and ends with a slash.
* In previous configurations String urls began without a slash in order
* to be able to provide a full URL which also contains the context part.
* Since version 5.2 the context part is handled by (new) dispatcher.
* The leading slash it API change! It's impacts have tp be checked. (2011-02)
*
* @return URL for logout page as String
*/
// In old LegacyInitializer
// LOGOUT_PAGE_KEY =page.kernel.logout=register/logout/
public static String getLogoutPageURL() {
return s_rootURL + s_logoutURL;
}
/**
* Provides the absolute URL of a page, which redirects an incomming request
* based on some clients property, usually whether the user is logged in,
* either to a general public page or to a user (client) specific page.
*
* It is relative to document root including leading slash but without any
* constant prefix if there is one configured.
*
* It is used by the ccm index page (home/start page) ~/index.jsp. By default
* it is configured as "pvt/" which redirects to a user specific home page
* if the initial incomming request comes from a logged in user.
* Applications may configure a different page according to their specific
* purposes. e.g ccm-cms provides a page content/content-center-redirect.jsp
* which redirects a user to the content-center if logged in.
*
* XXX This implementation starts with a leading slash and ends with a slash.
* In previous configurations String urls began without a slash in order
* to be able to provide a full URL which also contains the context part.
* Since version 5.2 the context part is handled by (new) dispatcher.
* Previous implementation of this method signature (no parameter) returned
* an url without leading slash.
* The leading slash it API change! It's impacts have tp be checked. (2011-02)
*
* @return full URL of a user redirect page, may be null
*/
// In old LegacyInitializer
// LOGIN_REDIRECT_PAGE_KEY =page.kernel.login.redirect=pvt/
// (usually modified to "content/content-center-redirect-page.jsp")
public static String getUserRedirectURL() {
if (s_log.isDebugEnabled()) {
s_log.debug("Root is " + s_rootURL + ", url is " + s_userRedirectURL);
}
if ((s_rootURL == null) || (s_userRedirectURL == null)) {
return null;
}
return s_rootURL + s_userRedirectURL;
}
/**
* Provides the absolute URL of a page, which redirects an incomming request
* based on some clients property, usually whether the user is logged in,
* either to a general public page or to a user (client) specific page.
*
* It is relative to document root including leading slash but without any
* constant prefix if there is one configured.
*
* It is used by the ccm index page (home/start page) ~/index.jsp. By default
* it is configured as "pvt/" which redirects to a user specific home page
* if the initial incomming request comes from a logged in user.
* Applications may configure a different page according to their specific
* purposes. e.g ccm-cms provides a page content/content-center-redirect.jsp
* which redirects a user to the content-center if logged in.
*
* XXX This implementation starts with a leading slash and ends with a slash.
* In previous configurations String urls began without a slash in order
* to be able to provide a full URL which also contains the context part.
* Since version 5.2 the context part is handled by (new) dispatcher.
* Previous implementation of this method signature (HTTPServletRequest)
* returned an url to a registration redirect page either starting with a
* slash for root context or the context path part. HTTPServletRequest is
* no longer significant here and method signature retained here for
* backwards compatibility only.
*
* @param req HttpServletRequest, may be used to determin the context of
* the current thread (application), currently not used and
* introduced here for backwards compatibility
* @return full URL of a user redirect page, may be null
*/
// see comment at top about getRootURL(req) for details!
// In old LegacyInitializer
// LOGIN_REDIRECT_PAGE_KEY =page.kernel.login.redirect=pvt/
// (usually modified to "content/content-center-redirect-page.jsp")
public static String getUserRedirectURL(HttpServletRequest req) {
if (s_log.isDebugEnabled()) {
s_log.debug("Root is " + s_rootURL + ", url is " + s_userRedirectURL);
}
if ((s_rootURL == null) || (s_userRedirectURL == null)) {
return null;
}
return s_rootURL + s_userRedirectURL;
}
/**
* Provides the absolute URL for the system workspace page. It is relative
* to document root including leading slash but without any constant prefix
* if there is one configured.
*
* It is used by the user redirection page (see above) as redirection target
* if no logged in user exists or no user specific page is configured. By
* default it is configured as "pvt/" as well. An installation usually
* defines a different page according to their specific purposes, e.g.
* portal or navigation.
*
* XXX This implementation starts with a leading slash and ends with a slash.
* In previous configurations String urls began without a slash in order
* to be able to provide a full URL which also contains the context part.
* Since version 5.2 the context part is handled by (new) dispatcher.
* Previous implementation of this method signature (no parameter) returned
* an url without leading slash.
* The leading slash it API change! It's impacts have tp be checked. (2011-02)
*
* @return URL for workspace page as String
*/
// In old LegacyInitializer
// WORKSPACE_PAGE_KEY = page.kernel.workspace=pvt/ (mod- t0 portal/nav)
public static String getWorkspaceURL() {
if (s_log.isDebugEnabled()) {
s_log.debug("Root is " + s_rootURL + ", url is " + s_workspaceURL);
}
if ((s_rootURL == null) || (s_workspaceURL == null)) {
return null;
}
return s_rootURL + s_workspaceURL;
}
/**
* Provides the absolute URL for the system workspace page.
* It is relative to document root including leading slash but without any
* constant prefix if there is one configured.
*
* It is used by the user redirection page (see above) as redirection target
* if no logged in user exists or no user specific page is configured. By
* default it is configured as "pvt/" as well. An installation usually
* defines a different page according to their specific purposes, e.g.
* portal or navigation.
*
* XXX This implementation starts with a leading slash and ends with a slash.
* In previous configurations String urls began without a slash in order
* to be able to provide a full URL which also contains the context part.
* Since version 5.2 the context part is handled by (new) dispatcher.
* Previous implementation of this method signature (HTTPServletRequest)
* returned an url to a workspace page either starting with a
* slash for root context or the context path part. HTTPServletRequest is
* no longer significant here and method signature retained here for
* backwards compatibility only.
*
*
* @param req HttpServletRequest, may be used to determin the context of
* the current thread (application), currently not used and
* introduced here for backwards compatibility
* @return URL for workspace page as String
*/
// In old LegacyInitializer
// WORKSPACE_PAGE_KEY = page.kernel.workspace=pvt/ (mod- t0 portal/nav)
public static String getWorkspaceURL(HttpServletRequest req) {
if (s_log.isDebugEnabled()) {
s_log.debug("Root is " + s_rootURL + ", url is " + s_workspaceURL);
}
if ((s_rootURL == null) || (s_workspaceURL == null)) {
return null;
}
return s_rootURL + s_workspaceURL;
}
// In old LegacyInitializer
// PERMISSION_PAGE_KEY = page.kernel.permission = permissions/
// In old LegacyInitializer
// PERM_SINGLE_PAGE_KEY = page.kernel.perm-single = permissions/one/
}

View File

@ -21,6 +21,7 @@ package com.arsdigita.ui;
import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.StringUtils; import com.arsdigita.util.StringUtils;
import com.arsdigita.util.parameter.StringParameter;
import com.arsdigita.util.parameter.StringArrayParameter; import com.arsdigita.util.parameter.StringArrayParameter;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
@ -32,7 +33,10 @@ import org.apache.log4j.Logger;
/** /**
* A configuration record for configuration of the core UI package * A configuration record for configuration of the core UI package
* (layoput of main UI components). * (layout of main UI components).
*
* Accessors of this class may return null. Developers should take care
* to trap null return values in their code.
* *
* @author Peter Boy &lt;pboy@barkhof.uni-bremen.de&gt; * @author Peter Boy &lt;pboy@barkhof.uni-bremen.de&gt;
* @version $Id: $ * @version $Id: $
@ -52,7 +56,7 @@ public class UIConfig extends AbstractConfig {
* constructor directly! * constructor directly!
* @return * @return
*/ */
public static final synchronized UIConfig getConfig() { public static synchronized UIConfig getConfig() {
if (s_conf == null) { if (s_conf == null) {
s_conf = new UIConfig(); s_conf = new UIConfig();
s_conf.load(); s_conf.load();
@ -89,7 +93,7 @@ public class UIConfig extends AbstractConfig {
// Quick 'md Dirty, we reeally need a StringListParameter class // Quick 'md Dirty, we reeally need a StringListParameter class
private final Parameter m_defaultLayout = private final Parameter m_defaultLayout =
new StringArrayParameter( new StringArrayParameter(
"waf.ui.default_layout", "core.ui.default_layout",
Parameter.REQUIRED, Parameter.REQUIRED,
new String[] new String[]
{ "top:com.arsdigita.ui.UserBanner" { "top:com.arsdigita.ui.UserBanner"
@ -128,11 +132,46 @@ public class UIConfig extends AbstractConfig {
*/ */
private final Parameter m_applicationLayouts = private final Parameter m_applicationLayouts =
new StringArrayParameter( new StringArrayParameter(
"waf.ui.application_layouts", "core.ui.application_layouts",
Parameter.OPTIONAL, Parameter.OPTIONAL,
null null
); );
/** String containing the relative URL for the top level page
* (or entry page / home page) of the site, Without leading slash but with
* trailing slash in case of a directory.
* By default it is the login page, but usually the root page of the main
* presentation application, e.g. portal, navigation, forum, etc. */
// Old initializer: waf.pagemap.root
private final Parameter m_rootPageURL = new StringParameter
("core.ui.pagemap.root_page_url", Parameter.REQUIRED, "register/");
/**String containing the URL for the login page, Without leading slash but
* with trailing slash in case of a directory. */
// Old initializer: waf.pagemap.login
private final Parameter m_loginURL = new StringParameter
("core.ui.pagemap.login_url", Parameter.REQUIRED, "register/");
/** String containing the URL for the logout page, Without leading slash
* but with trailing slash in case of a directory. */
// Old initializer: waf.pagemap.logout
private final Parameter m_logoutURL = new StringParameter
("core.ui.pagemap.logout_url", Parameter.REQUIRED, "register/logout");
/** String containing the URL for a page which may perform a user specific
* redirect if logged in or to a general public page if not. */
// Used to be LOGIN_REDIRECT_PAGE_KEY in old kernel/security/initializer
// parameter waf.pagemap.login_redirect = pvt/
// XXX url pvt seems not to exist anymore! (pboy 2011-02-03)
private final Parameter m_userRedirectURL = new StringParameter
("core.ui.pagemap.user_redirect_url", Parameter.REQUIRED, "pvt/");
/** String containing the URL for the workspace of the site. */
// Old initializer: waf.pagemap.workspace
// XXX url pvt seems not to exist anymore! (pboy 2011-02-03)
private final Parameter m_workspaceURL = new StringParameter
("core.ui.pagemap.workspace_url", Parameter.REQUIRED, "pvt/");
/** /**
* Constructs an empty RuntimeConfig object. * Constructs an empty RuntimeConfig object.
* *
@ -145,6 +184,12 @@ public class UIConfig extends AbstractConfig {
register(m_defaultLayout); register(m_defaultLayout);
register(m_applicationLayouts); register(m_applicationLayouts);
register(m_rootPageURL);
register(m_loginURL);
register(m_logoutURL);
register(m_userRedirectURL);
register(m_workspaceURL);
loadInfo(); loadInfo();
} }
@ -195,4 +240,49 @@ public class UIConfig extends AbstractConfig {
} }
} }
/**
* Retrieve systems root page (entry page) url.
*
* @return root page url
*/
public String getRootPage() {
return (String)get(m_rootPageURL) ;
}
/**
* Retrieve systems login page url.
*
* @return login page url
*/
public String getLogin() {
return (String)get(m_loginURL) ;
}
/**
* Retrieve systems logout page url.
*
* @return logout page url
*/
public String getLogout() {
return (String)get(m_logoutURL) ;
}
/**
* Retrieve systems user login redirect page url.
*
* @return user login redirect page url
*/
public String getUserRedirect() {
return (String)get(m_userRedirectURL) ;
}
/**
* Retrieve systems workspace url.
*
* @return workspace page url
*/
public String getWorkspace() {
return (String)get(m_workspaceURL) ;
}
} }

View File

@ -1,9 +1,70 @@
waf.ui.default_layout.title=Default Layout core.ui.default_layout.title=Default Layout
waf.ui.default_layout.purpose=Default layout components for SimplePage class core.ui.default_layout.purpose=Default layout components for SimplePage class
waf.ui.default_layout.example="top,com.arsdigita.ui.UserBanner","bottom,com.arsdigita.ui.SiteBanner","left,com.arsdigita.x.y.zl", core.ui.default_layout.example="top,com.arsdigita.ui.UserBanner","bottom,com.arsdigita.ui.SiteBanner","left,com.arsdigita.x.y.zl",
waf.ui.default_layout.format=[StringArray] core.ui.default_layout.format=[StringArray]
waf.ui.application_layouts.title=Application Layouts core.ui.application_layouts.title=Application Layouts
waf.ui.application_layouts.purpose=The customized layout for applications using the SimplePage class core.ui.application_layouts.purpose=The customized layout for applications using the SimplePage class
waf.ui.application_layouts.example=unkown core.ui.application_layouts.example=unkown
waf.ui.application_layouts.format=[StringArray] core.ui.application_layouts.format=[StringArray]
core.ui.pagemap.root_page_url.title=Root Page
core.ui.pagemap.root_page_url.purpose=Enter the relative URL for top-level page (to document root and without constant prefix if configured)
core.ui.pagemap.root_page_url.example=register/
core.ui.pagemap.root_page_url.format=[string]
core.ui.pagemap.login_url.title=Login Page
core.ui.pagemap.login_url.purpose=Enter the relative URL for the Login page (to document root and without constant prefix if configured)
core.ui.pagemap.login_url.example=register/
core.ui.pagemap.login_url.format=[string]
core.ui.pagemap.logout_url.title=Logout Page
core.ui.pagemap.logout_url.purpose=Enter the relative URL for the Logout Page (to document root and without constant prefix if configured)
core.ui.pagemap.logout_url.example=register/logout
core.ui.pagemap.logout_url.format=[string]
core.ui.pagemap.user_redirect_url.title=User Redirect Page
core.ui.pagemap.user_redirect_url.purpose=Enter the relative URL to a page which redirects the request according to the logged in user (if exists)
core.ui.pagemap.user_redirect_url.example=pvt/
core.ui.pagemap.user_redirect_url.format=[string]
core.ui.pagemap.workspace_url.title=Workspace Page
core.ui.pagemap.workspace_url.purpose=Enter the relative URL for the Workspace Page (to document root and without constant prefix if configured)
core.ui.pagemap.workspace_url.example=pvt/
core.ui.pagemap.workspace_url.format=[string]
#waf.pagemap.newuser.title=New User Page
#waf.pagemap.newuser.purpose=Enter the relative URL for the New User Page
#waf.pagemap.newuser.example=register/new-user
#waf.pagemap.newuser.format=[string]
#waf.pagemap.cookies.title=Cookies Explanation Page
#waf.pagemap.cookies.purpose=Enter the relative URL for the Cookies explanation page
#waf.pagemap.cookies.example=register/explain-persistent-cookies
#waf.pagemap.cookies.format=[string]
#waf.pagemap.change.title=Change Password Page
#waf.pagemap.change.purpose=Enter the relative URL for the Change Password Page
#waf.pagemap.change.example=register/change-password
#waf.pagemap.change.format=[string]
#waf.pagemap.recover.title=Recover Password Page
#waf.pagemap.recover.purpose=Enter the relative URL for the Recover Password Page
#waf.pagemap.recover.example=register/recover-password
#waf.pagemap.recover.format=[string]
#waf.pagemap.expired.title=Expired Login Page
#waf.pagemap.expired.purpose=Enter the relative URL for the expired login message
#waf.pagemap.expired.example=register/login-expired
#waf.pagemap.expired.format=[string]
#waf.pagemap.permission.title=Permissions Page
#waf.pagemap.permission.purpose=Enter the relative URL for the main Permissions administration page
#waf.pagemap.permission.example=permissions/
#waf.pagemap.permission.format=[string]
#waf.pagemap.perm_single.title=Single object Permissions Page
#waf.pagemap.perm_single.purpose=Enter the relative URL for the Single Object permissons administration page
#waf.pagemap.perm_single.example=permissions/one
#waf.pagemap.perm_single.format=[string]

View File

@ -23,7 +23,6 @@ import com.arsdigita.bebop.SimpleComponent;
import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.Party; import com.arsdigita.kernel.Party;
import com.arsdigita.kernel.User; import com.arsdigita.kernel.User;
import com.arsdigita.kernel.security.LegacyInitializer;
import com.arsdigita.web.URL; import com.arsdigita.web.URL;
import com.arsdigita.xml.Element; import com.arsdigita.xml.Element;
import com.arsdigita.ui.util.GlobalizationUtil; import com.arsdigita.ui.util.GlobalizationUtil;
@ -103,26 +102,27 @@ public class UserBanner extends SimpleComponent {
content.addAttribute( content.addAttribute(
"workspaceURL", "workspaceURL",
URL.there(state.getRequest(), URL.there(state.getRequest(),
LegacyInitializer.getFullURL(LegacyInitializer.WORKSPACE_PAGE_KEY, UI.getWorkspaceURL()).toString());
state.getRequest())).toString()); // LegacyInitializer.getFullURL(LegacyInitializer.WORKSPACE_PAGE_KEY,
// state.getRequest())).toString());
content.addAttribute( content.addAttribute(
"loginURL", "loginURL",
URL.there(state.getRequest(), URL.there(state.getRequest(),
LegacyInitializer.getFullURL(LegacyInitializer.LOGIN_PAGE_KEY, UI.getLoginPageURL()).toString());
state.getRequest())).toString()); // LegacyInitializer.getFullURL(LegacyInitializer.LOGIN_PAGE_KEY,
// state.getRequest())).toString());
content.addAttribute( content.addAttribute(
"loginExcursionURL", "loginExcursionURL",
URL.excursion(state.getRequest(), URL.excursion(state.getRequest(),
LegacyInitializer.getFullURL(LegacyInitializer.LOGIN_PAGE_KEY, UI.getLoginPageURL()).toString());
state.getRequest())).toString()); // LegacyInitializer.getFullURL(LegacyInitializer.LOGIN_PAGE_KEY,
// state.getRequest())).toString());
content.addAttribute( content.addAttribute(
"logoutURL", "logoutURL",
URL.there(state.getRequest(), URL.there(state.getRequest(),UI.getLoginPageURL()).toString());
LegacyInitializer.getFullURL(LegacyInitializer.LOGOUT_PAGE_KEY,
state.getRequest())).toString());
} }
} }

View File

@ -19,7 +19,6 @@
package com.arsdigita.ui.admin; package com.arsdigita.ui.admin;
import com.arsdigita.ui.util.GlobalizationUtil ;
import com.arsdigita.bebop.ActionLink; import com.arsdigita.bebop.ActionLink;
import com.arsdigita.bebop.BoxPanel; import com.arsdigita.bebop.BoxPanel;
@ -35,9 +34,9 @@ import com.arsdigita.bebop.SegmentedPanel;
import com.arsdigita.bebop.SimpleContainer; import com.arsdigita.bebop.SimpleContainer;
import com.arsdigita.bebop.Table; import com.arsdigita.bebop.Table;
import com.arsdigita.bebop.TabbedPane; import com.arsdigita.bebop.TabbedPane;
// import com.arsdigita.bebop.event.ActionEvent;
import com.arsdigita.bebop.event.ActionEvent; import com.arsdigita.bebop.event.ActionEvent;
import com.arsdigita.bebop.event.ActionEvent; // import com.arsdigita.bebop.event.ActionListener;
import com.arsdigita.bebop.event.ActionListener;
import com.arsdigita.bebop.event.ActionListener; import com.arsdigita.bebop.event.ActionListener;
import com.arsdigita.bebop.event.ChangeEvent; import com.arsdigita.bebop.event.ChangeEvent;
import com.arsdigita.bebop.event.ChangeListener; import com.arsdigita.bebop.event.ChangeListener;
@ -50,6 +49,7 @@ import com.arsdigita.bebop.table.TableModel;
import com.arsdigita.bebop.table.TableModelBuilder; import com.arsdigita.bebop.table.TableModelBuilder;
import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.globalization.GlobalizedMessage; import com.arsdigita.globalization.GlobalizedMessage;
import com.arsdigita.ui.UI ;
import com.arsdigita.web.URL; import com.arsdigita.web.URL;
import com.arsdigita.web.Web; import com.arsdigita.web.Web;
import com.arsdigita.web.RedirectSignal; import com.arsdigita.web.RedirectSignal;
@ -59,15 +59,17 @@ import com.arsdigita.kernel.Group;
import com.arsdigita.kernel.GroupCollection; import com.arsdigita.kernel.GroupCollection;
import com.arsdigita.kernel.User; import com.arsdigita.kernel.User;
import com.arsdigita.kernel.UserAuthentication; import com.arsdigita.kernel.UserAuthentication;
import com.arsdigita.kernel.security.LegacyInitializer; // import com.arsdigita.kernel.security.LegacyInitializer;
import com.arsdigita.kernel.security.UserContext; import com.arsdigita.kernel.security.UserContext;
import com.arsdigita.persistence.DataQuery; import com.arsdigita.persistence.DataQuery;
import com.arsdigita.persistence.PersistenceException; import com.arsdigita.persistence.PersistenceException;
import com.arsdigita.persistence.SessionManager; import com.arsdigita.persistence.SessionManager;
import com.arsdigita.util.LockableImpl; import com.arsdigita.util.LockableImpl;
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.ArrayList;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
@ -285,8 +287,7 @@ class UserBrowsePane extends SegmentedPanel
} }
// Redirect to workspace URL // Redirect to workspace URL
final String path = LegacyInitializer.getFullURL final String path = UI.getUserRedirectURL(state.getRequest());
(LegacyInitializer.LOGIN_REDIRECT_PAGE_KEY, state.getRequest());
final URL url = URL.there(state.getRequest(), path); final URL url = URL.there(state.getRequest(), path);
@ -324,7 +325,8 @@ class UserBrowsePane extends SegmentedPanel
return false; return false;
} }
// We show the delete link if the user has never published an item // We show the delete link if the user has never published an item
// This implicitly checks whether the user is banned - if they are deletable they cannot ever have been banned // This implicitly checks whether the user is banned - if they
// are deletable they cannot ever have been banned
User u = getUser(s); User u = getUser(s);
return (!hasUserPublishedItems(u)); return (!hasUserPublishedItems(u));
} }

View File

@ -39,13 +39,13 @@ import com.arsdigita.bebop.parameters.NotNullValidationListener;
import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.bebop.parameters.URLParameter; import com.arsdigita.bebop.parameters.URLParameter;
import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.ui.UI;
import com.arsdigita.web.Web; import com.arsdigita.web.Web;
import com.arsdigita.web.URL; import com.arsdigita.web.URL;
import com.arsdigita.web.ReturnSignal; import com.arsdigita.web.ReturnSignal;
import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.User; import com.arsdigita.kernel.User;
import com.arsdigita.kernel.UserAuthentication; import com.arsdigita.kernel.UserAuthentication;
import com.arsdigita.kernel.security.LegacyInitializer;
import com.arsdigita.kernel.security.RecoveryLoginModule; import com.arsdigita.kernel.security.RecoveryLoginModule;
import com.arsdigita.mail.Mail; import com.arsdigita.mail.Mail;
import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.util.UncheckedWrapperException;
@ -297,8 +297,7 @@ public class ChangePasswordForm extends Form
final HttpServletRequest req = state.getRequest(); final HttpServletRequest req = state.getRequest();
final String path = LegacyInitializer.getFullURL final String path = UI.getWorkspaceURL(req);
(LegacyInitializer.WORKSPACE_PAGE_KEY, req);
final URL fallback = URL.there(req, path); final URL fallback = URL.there(req, path);

View File

@ -22,31 +22,38 @@ import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.Link; import com.arsdigita.bebop.Link;
import com.arsdigita.bebop.event.PrintEvent; import com.arsdigita.bebop.event.PrintEvent;
import com.arsdigita.bebop.event.PrintListener; import com.arsdigita.bebop.event.PrintListener;
import com.arsdigita.kernel.security.LegacyInitializer; // import com.arsdigita.kernel.security.LegacyInitializer;
/** /**
* Package-private class that generates the URL for a link dynamically from * Package-private class that generates the URL for a link dynamically from
* the kernel page map. This class will be removed or changes when the page * the kernel page map. This class will be removed or changes when the page
* map is replaced by package parameters. * map is replaced by package parameters.
* *
* 2011-02-04: API change (pboy)
* The page map is no retrieved from a set of parameters. The target is now a
* String representation of the absolut url (leading slash) relativ to
* document root. The target is now a targetUrl, no longer a targetKey.
*
* @author Sameer Ajmani * @author Sameer Ajmani
**/ * @version $Id: DynamicLink.java 287 2005-02-22 00:29:02Z sskracic $
*/
class DynamicLink extends Link { class DynamicLink extends Link {
public static final String versionId =
"$Id: DynamicLink.java 287 2005-02-22 00:29:02Z sskracic $" +
"$Author: sskracic $" +
"$DateTime: 2004/08/16 18:10:38 $";
DynamicLink(final String labelKey, final String targetKey) { DynamicLink(final String labelKey, final String targetUrl) {
super(new Label(LoginHelper.getMessage(labelKey)), super(new Label(LoginHelper.getMessage(labelKey)),
new PrintListener() { new PrintListener() {
public void prepare(PrintEvent e) { public void prepare(PrintEvent e) {
Link link = (Link) e.getTarget(); Link link = (Link) e.getTarget();
String url = LegacyInitializer.getFullURL // see {@link com.arsdigita.bebopLink#Link(String,URL)}
(targetKey, e.getPageState().getRequest()); // Url is now expected without leading context wich is handled
// by the new dispatcher. Therefore the req. is not needed.
// anymore.
// String url = LegacyInitializer.getFullURL
// (targetKey, e.getPageState().getRequest());
link.setTarget(url); link.setTarget(targetUrl);
} }
}); });
} }

View File

@ -21,7 +21,6 @@ package com.arsdigita.ui.login;
import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.PageState;
import com.arsdigita.dispatcher.DispatcherHelper; import com.arsdigita.dispatcher.DispatcherHelper;
import com.arsdigita.globalization.GlobalizedMessage; import com.arsdigita.globalization.GlobalizedMessage;
import com.arsdigita.kernel.SiteNode;
import com.arsdigita.web.ReturnSignal; import com.arsdigita.web.ReturnSignal;
import java.io.IOException; import java.io.IOException;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@ -139,54 +138,4 @@ public class LoginHelper {
+"response already committed"); +"response already committed");
} }
} }
}
// /**
// * Returns the relative URL associated with the given key. This is the
// * value of the URL in the page map for the given key.
// *
// * @return the relative URL associated with the given key, or null if it
// * does not exist.
// *
// * @deprecated To be replaced by package parameters.
// *
// * @see #getFullURL(String, HttpServletRequest)
// **/
// public static String getURL(String key) {
// return (String)s_pageMap.get(key);
// }
/**
* Returns the absolute URL associated with the given key. This is the
* root URL for the system (the mount point) prepended to the result of
* getURL(key).
*
* @return the absolute URL associated with the given key, or null
* if it does not exist.
*
* @see #getURL(String)
**/
public static String getFullURL(String key, HttpServletRequest req) {
String root = getRootURL(req);
String url = com.arsdigita.kernel.security.LegacyInitializer.getURL(key);
if (s_log.isDebugEnabled()) {
s_log.debug("Root is " + root + ", url is " + url);
}
if ((root == null) || (key == null)) {
return null;
}
return root + url;
}
private static String getRootURL(HttpServletRequest req) {
// XXX this isn't safe since you aren't neccessarily
// calling it from the root webapp - so we can't
// blindly prepend the context path from the current
// request.
//return SiteNode.getRootSiteNode().getURL(req);
return SiteNode.getRootSiteNode().getURL();
}
}

View File

@ -46,8 +46,9 @@ import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.kernel.User; import com.arsdigita.kernel.User;
import com.arsdigita.kernel.UserAuthentication; import com.arsdigita.kernel.UserAuthentication;
import com.arsdigita.kernel.security.CredentialEncodingException; import com.arsdigita.kernel.security.CredentialEncodingException;
import com.arsdigita.kernel.security.LegacyInitializer; // import com.arsdigita.kernel.security.LegacyInitializer;
import com.arsdigita.kernel.security.RecoveryLoginModule; import com.arsdigita.kernel.security.RecoveryLoginModule;
import com.arsdigita.ui.UI;
import com.arsdigita.web.ParameterMap; import com.arsdigita.web.ParameterMap;
import com.arsdigita.web.URL; import com.arsdigita.web.URL;
import com.arsdigita.mail.Mail; import com.arsdigita.mail.Mail;
@ -351,8 +352,9 @@ public class RecoverPasswordPanel extends SimpleContainer
url = com.arsdigita.web.URL.dynamicHostThere url = com.arsdigita.web.URL.dynamicHostThere
(req, (req,
LegacyInitializer.getFullURL // LegacyInitializer.getFullURL
(LegacyInitializer.CHANGE_PAGE_KEY, req), // (LegacyInitializer.CHANGE_PAGE_KEY, req),
UI.getRecoverPasswordPageURL(),
map); map);
} catch (CredentialEncodingException e) { } catch (CredentialEncodingException e) {
throw new UncheckedWrapperException throw new UncheckedWrapperException

View File

@ -28,12 +28,13 @@ import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.PageFactory; import com.arsdigita.bebop.PageFactory;
import com.arsdigita.bebop.event.ActionListener; import com.arsdigita.bebop.event.ActionListener;
import com.arsdigita.bebop.event.ActionEvent; import com.arsdigita.bebop.event.ActionEvent;
import com.arsdigita.dispatcher.Dispatcher; // import com.arsdigita.dispatcher.Dispatcher;
import com.arsdigita.dispatcher.DispatcherConfig; // import com.arsdigita.dispatcher.DispatcherConfig;
import com.arsdigita.dispatcher.DispatcherHelper; // import com.arsdigita.dispatcher.DispatcherHelper;
import com.arsdigita.dispatcher.RequestContext; // import com.arsdigita.dispatcher.RequestContext;
import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.security.LegacyInitializer; // import com.arsdigita.kernel.security.LegacyInitializer;
import com.arsdigita.ui.UI;
import com.arsdigita.web.URL; import com.arsdigita.web.URL;
import com.arsdigita.web.ParameterMap; import com.arsdigita.web.ParameterMap;
import com.arsdigita.web.ReturnSignal; import com.arsdigita.web.ReturnSignal;
@ -62,67 +63,88 @@ import org.apache.log4j.Logger;
**/ **/
public class SubsiteDispatcher extends BebopMapDispatcher { public class SubsiteDispatcher extends BebopMapDispatcher {
public static final String APPLICATION_NAME = "login";
private static final Logger s_log =
Logger.getLogger(SubsiteDispatcher.class.getName());
// define namespace URI
final static String SUBSITE_NS_URI =
"http://www.arsdigita.com/subsite/1.0";
/** Dispatcher map class to store url - page mapping */
public class SubsiteDispatcherMap extends HashMap implements Map { public class SubsiteDispatcherMap extends HashMap implements Map {
public SubsiteDispatcherMap() { public SubsiteDispatcherMap() {
super(); super();
// TODO Auto-generated constructor stub // TODO Auto-generated constructor stub
} }
} }
public static final String APPLICATION_NAME = "login";
private static final Logger s_log =
Logger.getLogger(SubsiteDispatcher.class.getName());
// define namespace URI
final static String SUBSITE_NS_URI =
"http://www.arsdigita.com/subsite/1.0";
/** /**
* Initializes dispatcher by registering URLs with bebop pages. * Constructor initializes dispatcher by registering URLs with bebop pages.
**/ */
public SubsiteDispatcher() { public SubsiteDispatcher() {
s_log.debug("SubsiteDispatcher is used!!"); s_log.debug("SubsiteDispatcher Constructor entered.");
//Map map = new HashMap();
Map map = new SubsiteDispatcherMap(); Map map = new SubsiteDispatcherMap();
// special-case the empty URL // special-case the empty URL
String redirect = LegacyInitializer.getURL(LegacyInitializer.ROOT_PAGE_KEY); // String redirect = LegacyInitializer.getURL(LegacyInitializer.ROOT_PAGE_KEY);
String redirect = UI.getRootPageURL();
Dispatcher root = new RedirectDispatcher(redirect); Dispatcher root = new RedirectDispatcher(redirect);
map.put("", root); map.put("", root);
map.put("index", root); map.put("index", root);
put(map, LegacyInitializer.EDIT_PAGE_KEY, buildSimplePage // put(map, LegacyInitializer.EDIT_PAGE_KEY, buildSimplePage
("login.userEditPage.title", new UserEditForm(), "edit")); put(map, UI.getEditUserProfilePageURL(), buildSimplePage
put(map, LegacyInitializer.LOGIN_PAGE_KEY, buildSimplePage ("login.userEditPage.title",
("login.userRegistrationForm.title", new UserEditForm(), "edit"));
new UserRegistrationForm(Kernel.getSecurityConfig().isAutoRegistrationOn()), // put(map, LegacyInitializer.LOGIN_PAGE_KEY, buildSimplePage
"login")); put(map, UI.getLoginPageURL(), buildSimplePage
("login.userRegistrationForm.title",
new UserRegistrationForm(
Kernel.getSecurityConfig()
.isAutoRegistrationOn()),
"login"));
if (Kernel.getSecurityConfig().isAutoRegistrationOn()) { if (Kernel.getSecurityConfig().isAutoRegistrationOn()) {
put(map, LegacyInitializer.NEWUSER_PAGE_KEY, buildSimplePage // put(map, LegacyInitializer.NEWUSER_PAGE_KEY, buildSimplePage
("login.userNewForm.title", new UserNewForm(),"register")); put(map, UI.getNewUserPageURL(), buildSimplePage
("login.userNewForm.title",
new UserNewForm(),
"register"));
} }
put(map, LegacyInitializer.LOGOUT_PAGE_KEY, buildLogOutPage()); // put(map, LegacyInitializer.LOGOUT_PAGE_KEY, buildLogOutPage());
put(map, LegacyInitializer.COOKIES_PAGE_KEY, buildSimplePage put(map, UI.getLogoutPageURL(), buildLogOutPage());
// put(map, LegacyInitializer.COOKIES_PAGE_KEY, buildSimplePage
put(map, UI.getCookiesExplainPageURL(), buildSimplePage
("login.explainCookiesPage.title", new ElementComponent ("login.explainCookiesPage.title", new ElementComponent
("subsite:explainPersistentCookies", SUBSITE_NS_URI), "cookies")); ("subsite:explainPersistentCookies", SUBSITE_NS_URI), "cookies"));
put(map, LegacyInitializer.CHANGE_PAGE_KEY, buildSimplePage // put(map, LegacyInitializer.CHANGE_PAGE_KEY, buildSimplePage
("login.changePasswordPage.title", new ChangePasswordForm(), put(map, UI.getChangePasswordPageURL(), buildSimplePage
"changepassword")); ("login.changePasswordPage.title",
put(map, LegacyInitializer.RECOVER_PAGE_KEY, buildSimplePage new ChangePasswordForm(),
("login.recoverPasswordPage.title", new RecoverPasswordPanel(), "changepassword"));
"recoverpassword")); // put(map, LegacyInitializer.RECOVER_PAGE_KEY, buildSimplePage
put(map, UI.getRecoverPasswordPageURL(), buildSimplePage
("login.recoverPasswordPage.title",
new RecoverPasswordPanel(),
"recoverpassword"));
Page workspace = checkForPageSubClass(); Page workspace = checkForPageSubClass();
if (workspace == null) workspace = buildSimplePage if (workspace == null) workspace = buildSimplePage
("login.workspacePage.title", new UserInfo(), "workspace"); ("login.workspacePage.title",
put(map, LegacyInitializer.WORKSPACE_PAGE_KEY, workspace); new UserInfo(),
put(map, LegacyInitializer.EXPIRED_PAGE_KEY, buildExpiredPage()); "workspace");
// put(map, LegacyInitializer.WORKSPACE_PAGE_KEY, workspace);
put(map, UI.getWorkspaceURL(), workspace);
// put(map, LegacyInitializer.EXPIRED_PAGE_KEY, buildExpiredPage());
put(map, UI.getLoginExpiredPageURL(), buildExpiredPage());
// special case to handle pvt/home // special case to handle pvt/home
String url = LegacyInitializer.getURL(LegacyInitializer.WORKSPACE_PAGE_KEY); // String url = LegacyInitializer.getURL(LegacyInitializer.WORKSPACE_PAGE_KEY);
String url = UI.getWorkspaceURL();
if (url.equals("pvt/")) { if (url.equals("pvt/")) {
map.put("pvt/home", workspace); map.put("pvt/home", workspace);
} }
@ -130,6 +152,28 @@ public class SubsiteDispatcher extends BebopMapDispatcher {
setMap(map); setMap(map);
} }
/**
* Adds <url, page> to the given map. If the URL represents a directory
* (ends with "/"), URL+"index" is also added to the map and URL-"/" is
* redirected to URL.
**/
private void put(Map map, String url, Page page) {
// String url = LegacyInitializer.getURL(key);
if (url.startsWith("/")) {
// Currently the getter method provide a leading slash (API change)
// but the dispatcher needs an url without
// Needs to be checked when the old style sitenode based Dispatcher
// is eliminated.
url = url.substring(1);
}
map.put(url, page);
if (url.endsWith("/")) {
map.put(url+"index", page);
requireTrailingSlash(url.substring(0, url.length()-1));
}
}
@Override
protected void preprocessRequest(HttpServletRequest req, protected void preprocessRequest(HttpServletRequest req,
HttpServletResponse resp, HttpServletResponse resp,
RequestContext ctx, RequestContext ctx,
@ -139,31 +183,18 @@ public class SubsiteDispatcher extends BebopMapDispatcher {
// /register/login-expired, /register/recover-password // /register/login-expired, /register/recover-password
// NB, although you'd think /register is cachable, it // NB, although you'd think /register is cachable, it
// stores a timestamp in the login form :( // stores a timestamp in the login form :(
if (url.equals(LegacyInitializer.getURL(LegacyInitializer.COOKIES_PAGE_KEY)) || //
url.equals(LegacyInitializer.getURL(LegacyInitializer.EXPIRED_PAGE_KEY)) || // url comes without leading "/" and we have to compensate for the
url.equals(LegacyInitializer.getURL(LegacyInitializer.RECOVER_PAGE_KEY))) { // leading slash provided by the UI.get... methods here.
if (("/"+url).equals(UI.getCookiesExplainPageURL()) ||
("/"+url).equals(UI.getLoginExpiredPageURL()) ||
("/"+url).equals(UI.getRecoverPasswordPageURL()) ) {
DispatcherHelper.cacheForWorld(resp); DispatcherHelper.cacheForWorld(resp);
} else { } else {
DispatcherHelper.cacheDisable(resp); DispatcherHelper.cacheDisable(resp);
} }
} }
/**
* Adds <url, page> to the given map, where URL is looked up from the
* page map using the given key. If the URL represents a directory
* (ends with "/"), URL+"index" is also added to the map and URL-"/" is
* redirected to URL.
**/
private void put(Map map, String key, Page page) {
String url = LegacyInitializer.getURL(key);
map.put(url, page);
if (url.endsWith("/")) {
map.put(url+"index", page);
requireTrailingSlash(url.substring(0, url.length()-1));
}
}
private static Page checkForPageSubClass() { private static Page checkForPageSubClass() {
//check to see if there is subclass of Page defined in Config //check to see if there is subclass of Page defined in Config
DispatcherConfig dc = DispatcherHelper.getConfig(); DispatcherConfig dc = DispatcherHelper.getConfig();
@ -199,13 +230,14 @@ public class SubsiteDispatcher extends BebopMapDispatcher {
private static Page buildExpiredPage() { private static Page buildExpiredPage() {
Page page = PageFactory.buildPage( Page page = PageFactory.buildPage(
APPLICATION_NAME, APPLICATION_NAME,
new Label(LoginHelper.getMessage("login.loginExpiredPage.title"))); new Label(LoginHelper.getMessage("login.loginExpiredPage.title"))
);
page.add(new SimpleContainer() { page.add(new SimpleContainer() {
{ // constructor { // constructor
add(new Label(LoginHelper.getMessage add(new Label(LoginHelper.getMessage
("login.loginExpiredPage.before"))); ("login.loginExpiredPage.before")));
add(new DynamicLink("login.loginExpiredPage.link", add(new DynamicLink("login.loginExpiredPage.link",
LegacyInitializer.LOGIN_PAGE_KEY)); UI.getLoginPageURL() ));
add(new Label(LoginHelper.getMessage add(new Label(LoginHelper.getMessage
("login.loginExpiredPage.after"))); ("login.loginExpiredPage.after")));
add(new ElementComponent("subsite:explainLoginExpired", add(new ElementComponent("subsite:explainLoginExpired",
@ -216,10 +248,15 @@ public class SubsiteDispatcher extends BebopMapDispatcher {
return page; return page;
} }
/**
*
* @return
*/
private static Page buildLogOutPage() { private static Page buildLogOutPage() {
Page page = PageFactory.buildPage( Page page = PageFactory.buildPage(
APPLICATION_NAME, APPLICATION_NAME,
new Label(LoginHelper.getMessage("Logout"))); new Label(LoginHelper.getMessage("Logout"))
);
page.addActionListener(new UserLogoutListener()); page.addActionListener(new UserLogoutListener());
page.addActionListener(new ActionListener() { page.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) { public void actionPerformed(ActionEvent event) {
@ -227,8 +264,7 @@ public class SubsiteDispatcher extends BebopMapDispatcher {
final HttpServletRequest req = state.getRequest(); final HttpServletRequest req = state.getRequest();
final String path = LegacyInitializer.getFullURL final String path = UI.getRootPageURL(req);
(LegacyInitializer.ROOT_PAGE_KEY, req);
throw new ReturnSignal(req, URL.there(req, path)); throw new ReturnSignal(req, URL.there(req, path));
} }

View File

@ -22,7 +22,8 @@ import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.kernel.EmailAddress; import com.arsdigita.kernel.EmailAddress;
import com.arsdigita.kernel.PersonName; import com.arsdigita.kernel.PersonName;
import com.arsdigita.kernel.User; import com.arsdigita.kernel.User;
import com.arsdigita.kernel.security.LegacyInitializer; // import com.arsdigita.kernel.security.LegacyInitializer;
import com.arsdigita.ui.UI;
import com.arsdigita.web.URL; import com.arsdigita.web.URL;
import com.arsdigita.web.ReturnSignal; import com.arsdigita.web.ReturnSignal;
import com.arsdigita.bebop.ColumnPanel; import com.arsdigita.bebop.ColumnPanel;
@ -144,8 +145,9 @@ public class UserEditForm extends UserForm
final HttpServletRequest req = state.getRequest(); final HttpServletRequest req = state.getRequest();
final String path = LegacyInitializer.getFullURL // final String path = LegacyInitializer.getFullURL
(LegacyInitializer.WORKSPACE_PAGE_KEY, req); // (LegacyInitializer.WORKSPACE_PAGE_KEY, req);
final String path = UI.getWorkspaceURL();
final URL fallback = com.arsdigita.web.URL.there(req, path); final URL fallback = com.arsdigita.web.URL.there(req, path);

View File

@ -29,11 +29,11 @@ import com.arsdigita.kernel.PackageInstance;
import com.arsdigita.kernel.SiteNode; import com.arsdigita.kernel.SiteNode;
import com.arsdigita.kernel.SiteNodeCollection; import com.arsdigita.kernel.SiteNodeCollection;
import com.arsdigita.kernel.PackageType; import com.arsdigita.kernel.PackageType;
import com.arsdigita.kernel.security.LegacyInitializer;
import com.arsdigita.persistence.DataCollection; import com.arsdigita.persistence.DataCollection;
import com.arsdigita.persistence.SessionManager; import com.arsdigita.persistence.SessionManager;
import com.arsdigita.xml.Element; import com.arsdigita.ui.UI;
import com.arsdigita.web.URL; import com.arsdigita.web.URL;
import com.arsdigita.xml.Element;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.HashMap; import java.util.HashMap;
@ -55,37 +55,40 @@ import org.apache.log4j.Logger;
* @author Sameer Ajmani * @author Sameer Ajmani
* @since 2001-06-01 * @since 2001-06-01
* @version 1.0 * @version 1.0
* @version $Id: UserInfo.java 287 2005-02-22 00:29:02Z sskracic $
* *
**/ **/
public class UserInfo extends SimpleContainer { public class UserInfo extends SimpleContainer {
public static final String versionId = "$Id: UserInfo.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $";
private static final Logger s_log = private static final Logger s_log =
Logger.getLogger(UserInfo.class.getName()); Logger.getLogger(UserInfo.class.getName());
// m_contentCenters holds a list of content centers that exist /** m_contentCenters holds a list of content centers that exist
// on this installation on this installation */
private List m_contentCenters; private List m_contentCenters;
// m_centerSiteNodes contains a mapping of content centers to the /** m_centerSiteNodes contains a mapping of content centers to the
// site nodes where they are mounted. site nodes where they are mounted. */
private HashMap m_centerSiteNodes; private HashMap m_centerSiteNodes;
private UserAuthenticationListener m_listener = private UserAuthenticationListener m_listener =
new UserAuthenticationListener(); new UserAuthenticationListener();
/**
* Constructor.
*/
public UserInfo() { public UserInfo() {
// add list of links // add list of links
ListPanel list = new ListPanel(false); ListPanel list = new ListPanel(false);
list.add(new DynamicLink("login.userInfo.logoutLink", list.add(new DynamicLink("login.userInfo.logoutLink",
LegacyInitializer.LOGOUT_PAGE_KEY)); UI.getLogoutPageURL()));
list.add(new DynamicLink("login.userInfo.editProfileLink", list.add(new DynamicLink("login.userInfo.editProfileLink",
LegacyInitializer.EDIT_PAGE_KEY)); UI.getEditUserProfilePageURL()));
list.add(new DynamicLink("login.userInfo.changePasswordLink", list.add(new DynamicLink("login.userInfo.changePasswordLink",
LegacyInitializer.CHANGE_PAGE_KEY)); UI.getRecoverPasswordPageURL()));
add(list); add(list);
// add user info text // add user info text
add(new SimpleComponent() { add(new SimpleComponent() {
@Override
public void generateXML(PageState state, Element parent) { public void generateXML(PageState state, Element parent) {
if (!isLoggedIn(state)) { if (!isLoggedIn(state)) {
s_log.debug("user is not logged in, so no XML generated"); s_log.debug("user is not logged in, so no XML generated");
@ -99,12 +102,25 @@ public class UserInfo extends SimpleContainer {
if (m_contentCenters == null) { if (m_contentCenters == null) {
m_contentCenters = new ArrayList(); m_contentCenters = new ArrayList();
m_centerSiteNodes = new HashMap(); m_centerSiteNodes = new HashMap();
// XXX has to refactored!
// used old style packageType to retrieve a list of installed
// content-centers. Odd, there may exist only one content-center per
// installation!
// Currently (version 6.6.0 2011-02-06) content-center = workspace
// exists as legacy application only, not as legacy compatible application!
// retrieve all packages of type content-center
// works because there may be only one.
DataCollection dc = SessionManager.getSession().retrieve DataCollection dc = SessionManager.getSession().retrieve
(PackageType.BASE_DATA_OBJECT_TYPE); (PackageType.BASE_DATA_OBJECT_TYPE);
dc.addEqualsFilter("packageKey", "content-center"); dc.addEqualsFilter("packageKey", "content-center");
if (dc.next()) { if (dc.next()) {
// works because there may be only one entry of
// package type content-center
PackageType pt = new PackageType(dc.getDataObject()); PackageType pt = new PackageType(dc.getDataObject());
dc.close(); dc.close();
PackageInstanceCollection collection = pt.getInstances(); PackageInstanceCollection collection = pt.getInstances();
while (collection.next()) { while (collection.next()) {
PackageInstance instance = collection.getPackageInstance(); PackageInstance instance = collection.getPackageInstance();

View File

@ -31,6 +31,7 @@ import com.arsdigita.bebop.parameters.ArrayParameter;
import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.bebop.parameters.URLParameter; import com.arsdigita.bebop.parameters.URLParameter;
import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.ui.UI;
import com.arsdigita.web.Web; import com.arsdigita.web.Web;
import com.arsdigita.web.URL; import com.arsdigita.web.URL;
import com.arsdigita.web.ReturnSignal; import com.arsdigita.web.ReturnSignal;
@ -43,7 +44,6 @@ import com.arsdigita.kernel.UserAuthentication;
import com.arsdigita.kernel.permissions.PermissionDescriptor; import com.arsdigita.kernel.permissions.PermissionDescriptor;
import com.arsdigita.kernel.permissions.PermissionService; import com.arsdigita.kernel.permissions.PermissionService;
import com.arsdigita.kernel.permissions.PrivilegeDescriptor; import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
import com.arsdigita.kernel.security.LegacyInitializer;
import com.arsdigita.persistence.PersistenceException; import com.arsdigita.persistence.PersistenceException;
import javax.mail.internet.InternetAddress; import javax.mail.internet.InternetAddress;
@ -71,7 +71,6 @@ public class UserNewForm extends UserForm
FormProcessListener, FormProcessListener,
FormValidationListener FormValidationListener
{ {
public static final String versionId = "$Id: UserNewForm.java 738 2005-09-01 12:36:52Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $";
private static final Logger s_log = private static final Logger s_log =
Logger.getLogger(UserNewForm.class); Logger.getLogger(UserNewForm.class);
@ -219,8 +218,9 @@ public class UserNewForm extends UserForm
// redirect to workspace or return URL, if specified // redirect to workspace or return URL, if specified
final HttpServletRequest req = state.getRequest(); final HttpServletRequest req = state.getRequest();
url = LegacyInitializer.getFullURL // url = LegacyInitializer.getFullURL
(LegacyInitializer.WORKSPACE_PAGE_KEY, req); // (LegacyInitializer.WORKSPACE_PAGE_KEY, req);
url = UI.getWorkspaceURL();
final URL fallback = com.arsdigita.web.URL.there(req, url); final URL fallback = com.arsdigita.web.URL.there(req, url);

View File

@ -47,8 +47,9 @@ import com.arsdigita.kernel.KernelHelper;
import com.arsdigita.kernel.security.AccountNotFoundException; import com.arsdigita.kernel.security.AccountNotFoundException;
import com.arsdigita.kernel.security.Credential; import com.arsdigita.kernel.security.Credential;
import com.arsdigita.kernel.security.CredentialException; import com.arsdigita.kernel.security.CredentialException;
import com.arsdigita.kernel.security.LegacyInitializer; // import com.arsdigita.kernel.security.LegacyInitializer;
import com.arsdigita.kernel.security.UserContext; import com.arsdigita.kernel.security.UserContext;
import com.arsdigita.ui.UI;
import com.arsdigita.web.ParameterMap; import com.arsdigita.web.ParameterMap;
import com.arsdigita.web.RedirectSignal; import com.arsdigita.web.RedirectSignal;
import com.arsdigita.web.ReturnSignal; import com.arsdigita.web.ReturnSignal;
@ -69,15 +70,11 @@ import org.apache.log4j.Logger;
* @author Sameer Ajmani * @author Sameer Ajmani
* *
* @version $Id: UserRegistrationForm.java 1230 2006-06-22 11:50:59Z apevec $ * @version $Id: UserRegistrationForm.java 1230 2006-06-22 11:50:59Z apevec $
* */
**/
public class UserRegistrationForm extends Form public class UserRegistrationForm extends Form
implements LoginConstants, FormInitListener, implements LoginConstants, FormInitListener,
FormValidationListener, FormProcessListener FormValidationListener, FormProcessListener {
{
public static final String versionId = "$Id: UserRegistrationForm.java 1230 2006-06-22 11:50:59Z apevec $ by $Author: apevec $, $DateTime: 2004/08/16 18:10:38 $";
private static final Logger s_log = private static final Logger s_log =
Logger.getLogger(UserRegistrationForm.class); Logger.getLogger(UserRegistrationForm.class);
@ -114,19 +111,18 @@ public class UserRegistrationForm extends Form
m_autoRegistrationOn = autoRegistrationOn; m_autoRegistrationOn = autoRegistrationOn;
m_timestamp = new Hidden(new StringParameter m_timestamp = new Hidden(new StringParameter (FORM_TIMESTAMP));
(FORM_TIMESTAMP));
add(m_timestamp); add(m_timestamp);
m_returnURL = new Hidden(new URLParameter m_returnURL = new Hidden(new URLParameter
(LoginHelper.RETURN_URL_PARAM_NAME)); (LoginHelper.RETURN_URL_PARAM_NAME));
m_returnURL.setPassIn(true); m_returnURL.setPassIn(true);
add(m_returnURL); add(m_returnURL);
setupLogin(); setupLogin();
add(new Label(LoginHelper.getMessage add(new Label(LoginHelper.getMessage
("login.userRegistrationForm.password"))); ("login.userRegistrationForm.password")));
m_password = new Password(new StringParameter(FORM_PASSWORD)); m_password = new Password(new StringParameter(FORM_PASSWORD));
// Since new users should not enter a password, allow null. // Since new users should not enter a password, allow null.
//m_password.addValidationListener(new NotNullValidationListener()); //m_password.addValidationListener(new NotNullValidationListener());
@ -137,7 +133,7 @@ public class UserRegistrationForm extends Form
new CheckboxGroup(FORM_PERSISTENT_LOGIN_P); new CheckboxGroup(FORM_PERSISTENT_LOGIN_P);
Label optLabel = Label optLabel =
new Label(LoginHelper.getMessage new Label(LoginHelper.getMessage
("login.userRegistrationForm.cookieOption")); ("login.userRegistrationForm.cookieOption"));
Option opt = new Option(FORM_PERSISTENT_LOGIN_P_DEFAULT, optLabel); Option opt = new Option(FORM_PERSISTENT_LOGIN_P_DEFAULT, optLabel);
m_isPersistent.addOption(opt); m_isPersistent.addOption(opt);
if (Kernel.getConfig().isLoginRemembered()) { if (Kernel.getConfig().isLoginRemembered()) {
@ -146,17 +142,17 @@ public class UserRegistrationForm extends Form
cookiePanel.add(m_isPersistent); cookiePanel.add(m_isPersistent);
cookiePanel.add(new DynamicLink cookiePanel.add(new DynamicLink
("login.userRegistrationForm.explainCookieLink", ("login.userRegistrationForm.explainCookieLink",
LegacyInitializer.COOKIES_PAGE_KEY)); UI.getCookiesExplainPageURL()));
add(cookiePanel); add(cookiePanel);
add(new Submit(SUBMIT), ColumnPanel.CENTER | ColumnPanel.FULL_WIDTH); add(new Submit(SUBMIT), ColumnPanel.CENTER | ColumnPanel.FULL_WIDTH);
add(new DynamicLink("login.userRegistrationForm.forgotPasswordLink", add(new DynamicLink("login.userRegistrationForm.forgotPasswordLink",
LegacyInitializer.RECOVER_PAGE_KEY)); UI.getRecoverPasswordPageURL()));
if (m_autoRegistrationOn) { if (m_autoRegistrationOn) {
add(new DynamicLink("login.userRegistrationForm.newUserRegister", add(new DynamicLink("login.userRegistrationForm.newUserRegister",
LegacyInitializer.NEWUSER_PAGE_KEY)); UI.getNewUserPageURL()));
} }
add(new ElementComponent("subsite:promptToEnableCookiesMsg", add(new ElementComponent("subsite:promptToEnableCookiesMsg",
@ -199,7 +195,7 @@ public class UserRegistrationForm extends Form
} }
public void init(FormSectionEvent event) public void init(FormSectionEvent event)
throws FormProcessException { throws FormProcessException {
s_log.info( "In init" ); s_log.info( "In init" );
if (Kernel.getConfig().isSSOenabled()) { if (Kernel.getConfig().isSSOenabled()) {
// try SSO login // try SSO login
@ -241,8 +237,9 @@ public class UserRegistrationForm extends Form
} catch (CredentialException e) { } catch (CredentialException e) {
s_log.info( "Invalid credential" ); s_log.info( "Invalid credential" );
final String path = LegacyInitializer.getFullURL //final String path = LegacyInitializer.getFullURL
(LegacyInitializer.EXPIRED_PAGE_KEY, state.getRequest()); // (LegacyInitializer.EXPIRED_PAGE_KEY, state.getRequest());
final String path = UI.getLoginExpiredPageURL();
final URL url = com.arsdigita.web.URL.there final URL url = com.arsdigita.web.URL.there
(state.getRequest(), path); (state.getRequest(), path);
@ -267,9 +264,8 @@ public class UserRegistrationForm extends Form
final PageState state = event.getPageState(); final PageState state = event.getPageState();
final HttpServletRequest req = state.getRequest(); final HttpServletRequest req = state.getRequest();
// Redirect to workspace or return URL, if specified. // Redirect to workspace or return URL, if specified.
final String path = LegacyInitializer.getFullURL final String path = UI.getUserRedirectURL(req);
(LegacyInitializer.LOGIN_REDIRECT_PAGE_KEY, req);
final URL url = com.arsdigita.web.URL.there(req, path); final URL url = com.arsdigita.web.URL.there(req, path);
@ -404,8 +400,9 @@ public class UserRegistrationForm extends Form
} }
protected void redirectToNewUserPage(PageState state) { protected void redirectToNewUserPage(PageState state) {
String url = LegacyInitializer.getFullURL // String url = LegacyInitializer.getFullURL
(LegacyInitializer.NEWUSER_PAGE_KEY, state.getRequest()); // (LegacyInitializer.NEWUSER_PAGE_KEY, state.getRequest());
String url = UI.getNewUserPageURL();
ParameterMap map = new ParameterMap(); ParameterMap map = new ParameterMap();
map.setParameter(LoginHelper.RETURN_URL_PARAM_NAME, map.setParameter(LoginHelper.RETURN_URL_PARAM_NAME,

View File

@ -34,13 +34,12 @@ import com.arsdigita.kernel.ACSObject;
import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.Party; import com.arsdigita.kernel.Party;
import com.arsdigita.kernel.permissions.PermissionService; import com.arsdigita.kernel.permissions.PermissionService;
import com.arsdigita.kernel.permissions.PermissionService;
import com.arsdigita.kernel.permissions.PrivilegeDescriptor; import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
import com.arsdigita.kernel.security.LegacyInitializer;
import com.arsdigita.persistence.DataQuery; import com.arsdigita.persistence.DataQuery;
import com.arsdigita.persistence.SessionManager; import com.arsdigita.persistence.SessionManager;
import com.arsdigita.ui.UI;
import com.arsdigita.util.LockableImpl; import com.arsdigita.util.LockableImpl;
import java.math.BigDecimal; import java.math.BigDecimal;
/** /**
@ -68,9 +67,10 @@ class IndexPanel extends SimpleContainer implements PermissionsConstants {
public IndexPanel() { public IndexPanel() {
setClassAttr("PERMISSIONS"); setClassAttr("PERMISSIONS");
m_navbar = new DimensionalNavbar(); m_navbar = new DimensionalNavbar();
m_navbar.add(new Link(PERSONAL_SITE.localize()+"", m_navbar.add(new Link(PERSONAL_SITE.localize()+"",
"/" + LegacyInitializer.getURL( UI.getWorkspaceURL()));
LegacyInitializer.WORKSPACE_PAGE_KEY))); // "/" + LegacyInitializer.getURL(
// LegacyInitializer.WORKSPACE_PAGE_KEY)));
m_navbar.add(new Link(MAIN_SITE.localize()+"", "/")); m_navbar.add(new Link(MAIN_SITE.localize()+"", "/"));
m_navbar.add(new Label(PERMISSIONS_INDEX_NAVBAR.localize()+"")); m_navbar.add(new Label(PERMISSIONS_INDEX_NAVBAR.localize()+""));
m_navbar.setClassAttr("permNavBar"); m_navbar.setClassAttr("permNavBar");
@ -87,7 +87,9 @@ class IndexPanel extends SimpleContainer implements PermissionsConstants {
boxpanel.add(m_adminObjs); boxpanel.add(m_adminObjs);
m_segmentedPanel = new SegmentedPanel(); m_segmentedPanel = new SegmentedPanel();
m_segmentedPanel.addSegment(new Label(PAGE_OBJECT_PANEL_TITLE.localize()+""), boxpanel); m_segmentedPanel.addSegment(new Label(
PAGE_OBJECT_PANEL_TITLE.localize()+""),
boxpanel);
add(m_segmentedPanel); add(m_segmentedPanel);
} }

View File

@ -21,13 +21,12 @@ package com.arsdigita.ui.permissions;
import com.arsdigita.bebop.BoxPanel; import com.arsdigita.bebop.BoxPanel;
import com.arsdigita.bebop.DimensionalNavbar; import com.arsdigita.bebop.DimensionalNavbar;
import com.arsdigita.bebop.Label; import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.Link; import com.arsdigita.bebop.Link;
import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.event.PrintEvent; import com.arsdigita.bebop.event.PrintEvent;
import com.arsdigita.bebop.event.PrintListener; import com.arsdigita.bebop.event.PrintListener;
import com.arsdigita.kernel.ACSObject; import com.arsdigita.kernel.ACSObject;
import com.arsdigita.kernel.security.LegacyInitializer; import com.arsdigita.ui.UI;
/** /**
* *
@ -67,9 +66,10 @@ class PermissionsHeader extends BoxPanel implements PermissionsConstants {
}); });
DimensionalNavbar navbar = new DimensionalNavbar(); DimensionalNavbar navbar = new DimensionalNavbar();
navbar.add(new Link(PERSONAL_SITE.localize()+"", navbar.add(new Link(PERSONAL_SITE.localize()+"",
"/" + LegacyInitializer.getURL( UI.getWorkspaceURL() ));
LegacyInitializer.WORKSPACE_PAGE_KEY))); // "/" + LegacyInitializer.getURL(
// LegacyInitializer.WORKSPACE_PAGE_KEY)));
navbar.add(new Link(MAIN_SITE.localize()+"", "/")); navbar.add(new Link(MAIN_SITE.localize()+"", "/"));
navbar.add(new Link(PERMISSIONS_INDEX.localize()+"", "/permissions/")); navbar.add(new Link(PERMISSIONS_INDEX.localize()+"", "/permissions/"));
navbar.add(objectName); navbar.add(objectName);

View File

@ -33,11 +33,11 @@ import org.apache.log4j.Logger;
* servlet (mapped to "/someprefix/*") for requests to the CCM * servlet (mapped to "/someprefix/*") for requests to the CCM
* webapp.</p> * webapp.</p>
* *
* <p>Upon finding an {@link com.arsdigita.web.Application * <p>Upon finding an {@link com.arsdigita.web.Application application} at the
* application} at the requested URL, this class sets a request * requested URL, this class sets a request attribute storing the ID of the
* attribute storing the ID of the application and forwards to the * application and forwards to the servlet associated with it. If instead no
* servlet associated with it. If instead no application is found, * application is found, the request is forwarded to the fallback servlet,
* the request is forwarded to the fallback servlet, if defined.</p> * if defined.</p>
* *
* <p>This servlet may be deployed using web.xml entries like * <p>This servlet may be deployed using web.xml entries like
* these:</p> * these:</p>

View File

@ -28,7 +28,12 @@ import javax.servlet.http.HttpServlet;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* The prefixer servlet adds prefixes to chosen classes of requests.
* This is useful if you wish to migrate users off the old dispatcher to
* the new dispatcher, which uses a prefix for URLs. The following
* snippet assumes your dispatcher is mapped to "/ccm/*".
* *
* Used by a web.xml entry. (cf. web.xml-core-optional.in)
* *
* @author Justin Ross &lt;<a href="mailto:jross@redhat.com">jross@redhat.com</a>&gt; * @author Justin Ross &lt;<a href="mailto:jross@redhat.com">jross@redhat.com</a>&gt;
* @version $Id: PrefixerServlet.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: PrefixerServlet.java 287 2005-02-22 00:29:02Z sskracic $

View File

@ -1,4 +1,6 @@
<product name="CCM Core" current_version="5.1.1"> <product name="CCM Core" current_version="5.1.1">
<!-- Configuration file for core com.arsdigita.dmi automatic update facility
package. (not in use as of version 6.x.x -->
<product_description>Red Hat CCM Core</product_description> <product_description>Red Hat CCM Core</product_description>
<version_history database="oracle-se"> <version_history database="oracle-se">

View File

@ -1,12 +1,12 @@
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">
<jsp:directive.page import="com.arsdigita.kernel.security.LegacyInitializer"/> <jsp:directive.page import="com.arsdigita.ui.UI"/>
<jsp:directive.page import="com.arsdigita.web.URL"/> <jsp:directive.page import="com.arsdigita.web.URL"/>
<jsp:directive.page import="com.arsdigita.web.RedirectSignal"/> <jsp:directive.page import="com.arsdigita.web.RedirectSignal"/>
<jsp:directive.page extends="com.arsdigita.web.BaseJSP"/> <jsp:directive.page extends="com.arsdigita.web.BaseJSP"/>
<jsp:scriptlet> <jsp:scriptlet>
throw new RedirectSignal(URL.there(request, throw new RedirectSignal(URL.there(request,UI.getUserRedirectURL(request)),
LegacyInitializer.getFullURL(LegacyInitializer.LOGIN_REDIRECT_PAGE_KEY, request)), false); false);
</jsp:scriptlet> </jsp:scriptlet>
</jsp:root> </jsp:root>

View File

@ -1,115 +0,0 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:subsite="http://www.arsdigita.com/subsite/1.0"
exclude-result-prefixes="subsite">
<xsl:import href="../../bebop/xsl/bebop.xsl"/>
<!-- this rule matches one user -->
<xsl:template match="subsite:userInfo">
<p><font color="red">subsite:userInfo -&gt; START GERMAN TRANSLATION</font></p>
<hr />
<h3>What we tell other users about you</h3>
In general we identify content that you've posted by your full name.
In an attempt to protect you from unsolicited bulk email (spam), we
keep your email address hidden except from other registered users.
Total privacy is technically feasible but an important element of an
online community is that people can learn from each other. So we try
to make it possible for users with common interests to contact each
other.
<h4>Basic Information</h4>
<ul>
<li> Name: <xsl:value-of select="@name"/> </li>
<li> User ID: <xsl:value-of select="@id"/> </li>
<li> email address: <xsl:value-of select="@email"/> </li>
<li> personal URL: <xsl:value-of select="@URI"/> </li>
<li> screen name: <xsl:value-of select="@screenName"/> </li>
</ul>
<p><font color="red">subsite:userInfo -&gt; END GERMAN TRANSLATION</font></p>
</xsl:template>
<!-- this rule displays information about peristent cookies -->
<xsl:template match="subsite:explainPersistentCookies">
<p><font color="red">subsite:explainPersistentCookies -&gt; START GERMAN TRANSLATION</font></p>
<hr />
Our server can tell your browser to remember certain things, such as
your email address and password. This is convenient for you because,
if you're the only person who uses your computer, you won't have to
keep telling us your email address and password.
<p>
It would be a very bad idea to choose this option if you're using a
shared computer in a library or school. Any subsequent user of this
machine would be able to masquerade as you on our service.
</p>
<p>
Note that you can erase your saved email address and password by
choosing the "log out" option from your workspace.
</p>
<p><font color="red">subsite:explainPersistentCookies -&gt; END GERMAN TRANSLATION</font></p>
</xsl:template>
<!-- this rule displays a message saying the user typed in the wrong
password when logging in -->
<xsl:template match="subsite:badPassword">
<p><font color="red">subsite:badPassword -&gt; START GERMAN TRANSLATION</font></p>
in <xsl:value-of select="@systemHome"/>
<hr />
The password you typed doesn't match what we have in the database. If
you think you made a typo, please back up using your browser and try
again.
<xsl:if test="@offerToEmailPassword='true'">
<p>If you've forgotten your password, you can
<a href="email-password?user_id={@userId}">ask this server to reset
your password and email a new randomly generated password to you</a>
</p>
</xsl:if>
<p><font color="red">subsite:badPassword -&gt; END GERMAN TRANSLATION</font></p>
</xsl:template>
<xsl:template match="subsite:loginPromptMsg">
<p><font color="red">subsite:loginPromptMsg -&gt; START GERMAN TRANSLATION</font></p>
<p><b>Current users:</b> Please enter your email and
password below.</p>
<p><b>New users:</b> Welcome to ACS Developer Central.
Please begin the registration process by entering a
valid email address and a password for signing into
the system. We will direct you to another
form to complete your registration.</p>
<p><font color="red">subsite:loginPromptMsg -&gt; END GERMAN TRANSLATION</font></p>
</xsl:template>
<xsl:template match="subsite:promptToEnableCookiesMsg">
<p><font color="red">subsite:promptToEnableCookiesMsg -&gt; START GERMAN TRANSLATION</font></p>
<p>If you keep getting thrown back here, it is probably because
browser does not accept cookies. We're sorry for the
inconvenience but it really is impossible to program a system
like this without keeping track of who is posting what.</p>
In Netscape 4.0, you can enable cookies from
Edit -&gt; Preferences -&gt; Advanced.
In Microsoft Internet Explorer 4.0, you can enable cookies from
View -&gt; Internet Options -&gt; Advanced -&gt; Security.
<p><font color="red">subsite:promptToEnableCookiesMsg -&gt; END GERMAN TRANSLATION</font></p>
</xsl:template>
</xsl:stylesheet>

View File

@ -16,9 +16,14 @@ waf.kernel.primary_user_identifier=email
; security.properties: ; security.properties:
waf.auto_registration_on=false waf.auto_registration_on=false
waf.pagemap.root=portal/
waf.pagemap.workspace=portal/ # MOVED to ui.Config
waf.pagemap.login_redirect=content/content-center-redirect.jsp #waf.pagemap.root=portal/
#waf.pagemap.workspace=portal/
#waf.pagemap.login_redirect=content/content-center-redirect.jsp
core.ui.pagemap.root_page_url=navigation/
core.ui.pagemap.workspace_url=navigation/
core.ui.pagemap.user_redirect_url=content/content-center-redirect.jsp
; Searches for localized style sheet (among others) ; Searches for localized style sheet (among others)
waf.templating.stylesheet_resolver=com.arsdigita.templating.PatternStylesheetResolver waf.templating.stylesheet_resolver=com.arsdigita.templating.PatternStylesheetResolver

View File

@ -14,9 +14,13 @@ waf.kernel.primary_user_identifier=email
; security.properties: ; security.properties:
waf.auto_registration_on=false waf.auto_registration_on=false
waf.pagemap.root=portal/ # MOVED to ui.Config
waf.pagemap.workspace=portal/ #waf.pagemap.root=portal/
waf.pagemap.login_redirect=content/content-center-redirect.jsp #waf.pagemap.workspace=portal/
#waf.pagemap.login_redirect=content/content-center-redirect.jsp
core.ui.pagemap.root_page_url=navigation/
core.ui.pagemap.workspace_url=navigation/
core.ui.pagemap.user_redirect_url=content/content-center-redirect.jsp
; Searches for localized style sheet (among others) ; Searches for localized style sheet (among others)
waf.templating.stylesheet_resolver=com.arsdigita.templating.PatternStylesheetResolver waf.templating.stylesheet_resolver=com.arsdigita.templating.PatternStylesheetResolver

View File

@ -16,9 +16,13 @@ waf.kernel.primary_user_identifier=email
; security.properties: ; security.properties:
waf.auto_registration_on=false waf.auto_registration_on=false
waf.pagemap.root=portal/ # MOVED to ui.Config
waf.pagemap.workspace=portal/ #waf.pagemap.root=portal/
waf.pagemap.login_redirect=content/content-center-redirect.jsp #waf.pagemap.workspace=portal/
#waf.pagemap.login_redirect=content/content-center-redirect.jsp
core.ui.pagemap.root_page_url=navigation/
core.ui.pagemap.workspace_url=navigation/
core.ui.pagemap.user_redirect_url=content/content-center-redirect.jsp
; Searches for localized style sheet (among others) ; Searches for localized style sheet (among others)
waf.templating.stylesheet_resolver=com.arsdigita.templating.PatternStylesheetResolver waf.templating.stylesheet_resolver=com.arsdigita.templating.PatternStylesheetResolver

View File

@ -14,9 +14,14 @@ waf.kernel.primary_user_identifier=email
; security.properties: ; security.properties:
waf.auto_registration_on=false waf.auto_registration_on=false
waf.pagemap.root=navigation/
waf.pagemap.workspace=navigation/ # MOVED to ui.Config
waf.pagemap.login_redirect=content/content-center-redirect.jsp #waf.pagemap.root=navigation/
#waf.pagemap.workspace=navigation/
#waf.pagemap.login_redirect=content/content-center-redirect.jsp
core.ui.pagemap.root_page_url=navigation/
core.ui.pagemap.workspace_url=navigation/
core.ui.pagemap.user_redirect_url=content/content-center-redirect.jsp
; Searches for localized style sheet (among others) ; Searches for localized style sheet (among others)
waf.templating.stylesheet_resolver=com.arsdigita.templating.PatternStylesheetResolver waf.templating.stylesheet_resolver=com.arsdigita.templating.PatternStylesheetResolver

View File

@ -14,9 +14,13 @@ waf.kernel.primary_user_identifier=email
; security.properties: ; security.properties:
waf.auto_registration_on=false waf.auto_registration_on=false
waf.pagemap.root=navigation/ # MOVED to ui.Config
waf.pagemap.workspace=navigation/ #waf.pagemap.root=navigation/
waf.pagemap.login_redirect=content/content-center-redirect.jsp #waf.pagemap.workspace=navigation/
#waf.pagemap.login_redirect=content/content-center-redirect.jsp
core.ui.pagemap.root_page_url=navigation/
core.ui.pagemap.workspace_url=navigation/
core.ui.pagemap.user_redirect_url=content/content-center-redirect.jsp
; Searches for localized style sheet (among others) ; Searches for localized style sheet (among others)
waf.templating.stylesheet_resolver=com.arsdigita.templating.PatternStylesheetResolver waf.templating.stylesheet_resolver=com.arsdigita.templating.PatternStylesheetResolver