Nachfuehren weiterer Aenderungen als Folge r742.

git-svn-id: https://svn.libreccm.org/ccm/trunk@743 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2011-02-10 08:47:28 +00:00
parent 8ffa7bddc1
commit 0bf93f9fbe
6 changed files with 73 additions and 77 deletions

View File

@ -19,7 +19,6 @@
package com.arsdigita.cms.contenttypes.ui; package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.cms.contenttypes.Organization; import com.arsdigita.cms.contenttypes.Organization;
import com.arsdigita.cms.contenttypes.ui.OrganizationImageForm;
import com.arsdigita.cms.contenttypes.util.OrganizationGlobalizationUtil; import com.arsdigita.cms.contenttypes.util.OrganizationGlobalizationUtil;
import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.PageState;
@ -28,7 +27,6 @@ import com.arsdigita.cms.dispatcher.Utilities;
import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.DataObject;
import com.arsdigita.domain.DomainObject; import com.arsdigita.domain.DomainObject;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
@ -55,7 +53,9 @@ public class OrganizationImageStep
super( itemModel, parent, "_image" ); super( itemModel, parent, "_image" );
setDefaultEditKey(IMAGE_SHEET_NAME); setDefaultEditKey(IMAGE_SHEET_NAME);
add( IMAGE_SHEET_NAME, "Change", new WorkflowLockedComponentAccess(new OrganizationImageForm("OrganizationImageForm", itemModel, this), itemModel)); add( IMAGE_SHEET_NAME, "Change",
new WorkflowLockedComponentAccess(new OrganizationImageForm(
"OrganizationImageForm", itemModel, this), itemModel));
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel, false); DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel, false);
sheet.add(OrganizationGlobalizationUtil.globalize sheet.add(OrganizationGlobalizationUtil.globalize

View File

@ -127,8 +127,11 @@ public class Initializer extends CompoundInitializer {
setup.setDescription setup.setDescription
("The document manager empowers users to share documents."); ("The document manager empowers users to share documents.");
setup.setDispatcherClass("com.arsdigita.cms.docmgr.ui.DMDispatcher"); setup.setDispatcherClass("com.arsdigita.cms.docmgr.ui.DMDispatcher");
setup.setStylesheet("/packages/cms-docmgr/xsl/docs.xsl"); // Class Stylesheet and database backed stylesheet locations are
// deprecated and removed. New StylesheetResolver is pattern based.
// setup.setStylesheet("/packages/cms-docmgr/xsl/docs.xsl");
setup.setInstantiator(new ACSObjectInstantiator() { setup.setInstantiator(new ACSObjectInstantiator() {
@Override
public DomainObject doNewInstance(DataObject dataObject) { public DomainObject doNewInstance(DataObject dataObject) {
return new Repository(dataObject); return new Repository(dataObject);
} }
@ -164,7 +167,9 @@ public class Initializer extends CompoundInitializer {
setup.setDescription setup.setDescription
("Browse documents by category."); ("Browse documents by category.");
setup.setDispatcherClass("com.arsdigita.cms.docmgr.ui.DCNDispatcher"); setup.setDispatcherClass("com.arsdigita.cms.docmgr.ui.DCNDispatcher");
setup.setStylesheet("/packages/cms-docmgr/xsl/docs.xsl"); // Class Stylesheet and database backed stylesheet locations are
// deprecated and removed. New StylesheetResolver is pattern based.
//setup.setStylesheet("/packages/cms-docmgr/xsl/docs.xsl");
setup.setInstantiator(new ACSObjectInstantiator() { setup.setInstantiator(new ACSObjectInstantiator() {
public DomainObject doNewInstance(DataObject dataObject) { public DomainObject doNewInstance(DataObject dataObject) {
return new DocumentCategoryBrowserApplication(dataObject); return new DocumentCategoryBrowserApplication(dataObject);
@ -182,7 +187,9 @@ public class Initializer extends CompoundInitializer {
setup.setDescription setup.setDescription
("Browse documents by category."); ("Browse documents by category.");
setup.setDispatcherClass("com.arsdigita.cms.docmgr.ui.DCNDispatcher"); setup.setDispatcherClass("com.arsdigita.cms.docmgr.ui.DCNDispatcher");
setup.setStylesheet("/packages/cms-docmgr/xsl/docs.xsl"); // Class Stylesheet and database backed stylesheet locations are
// deprecated and removed. New StylesheetResolver is pattern based.
//setup.setStylesheet("/packages/cms-docmgr/xsl/docs.xsl");
setup.setInstantiator(new ACSObjectInstantiator() { setup.setInstantiator(new ACSObjectInstantiator() {
public DomainObject doNewInstance(DataObject dataObject) { public DomainObject doNewInstance(DataObject dataObject) {
return new LegacyCategoryBrowserApplication(dataObject); return new LegacyCategoryBrowserApplication(dataObject);

View File

@ -9,9 +9,10 @@ import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.KernelExcursion; import com.arsdigita.kernel.KernelExcursion;
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.kernel.security.LegacyInitializer;
import com.arsdigita.london.portal.Workspace; import com.arsdigita.london.portal.Workspace;
import com.arsdigita.london.portal.util.GlobalizationUtil; import com.arsdigita.london.portal.util.GlobalizationUtil;
import com.arsdigita.ui.UI;
import com.arsdigita.web.Application; import com.arsdigita.web.Application;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@ -56,7 +57,8 @@ public class PersonalPortalPage extends Page {
Party party = Kernel.getContext().getParty(); Party party = Kernel.getContext().getParty();
if (party == null) { if (party == null) {
sUrl = LegacyInitializer.getURL(LegacyInitializer.LOGIN_PAGE_KEY); // sUrl = LegacyInitializer.getURL(LegacyInitializer.LOGIN_PAGE_KEY);
sUrl = UI.getLoginPageURL();
} else { } else {
try { try {
user = User.retrieve(party.getOID()); user = User.retrieve(party.getOID());
@ -97,7 +99,8 @@ public class PersonalPortalPage extends Page {
sUrl = personalWorkspace.getPath(); sUrl = personalWorkspace.getPath();
} catch (DataObjectNotFoundException donfe) { } catch (DataObjectNotFoundException donfe) {
sUrl = LegacyInitializer.getURL(LegacyInitializer.LOGIN_PAGE_KEY); // sUrl = LegacyInitializer.getURL(LegacyInitializer.LOGIN_PAGE_KEY);
sUrl = UI.getLoginPageURL();
} }
} }

View File

@ -1,15 +1,19 @@
/* /*
* Copyright (C) 2001 ArsDigita Corporation. All Rights Reserved. * Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
* *
* The contents of this file are subject to the ArsDigita Public * This library is free software; you can redistribute it and/or
* License (the "License"); you may not use this file except in * modify it under the terms of the GNU Lesser General Public License
* compliance with the License. You may obtain a copy of * as published by the Free Software Foundation; either version 2.1 of
* the License at http://www.arsdigita.com/ADPL.txt * the License, or (at your option) any later version.
* *
* Software distributed under the License is distributed on an "AS * This library is distributed in the hope that it will be useful,
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * but WITHOUT ANY WARRANTY; without even the implied warranty of
* implied. See the License for the specific language governing * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* rights and limitations under the License. * 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
* *
*/ */
@ -28,12 +32,12 @@ import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
import com.arsdigita.kernel.permissions.UniversalPermissionDescriptor; import com.arsdigita.kernel.permissions.UniversalPermissionDescriptor;
import com.arsdigita.kernel.security.Credential; import com.arsdigita.kernel.security.Credential;
import com.arsdigita.kernel.security.CredentialEncodingException; import com.arsdigita.kernel.security.CredentialEncodingException;
import com.arsdigita.kernel.security.LegacyInitializer;
import com.arsdigita.london.portal.portlet.LoginPortlet; import com.arsdigita.london.portal.portlet.LoginPortlet;
import com.arsdigita.london.portal.ui.PortalConstants; import com.arsdigita.london.portal.ui.PortalConstants;
import com.arsdigita.persistence.DataQuery; import com.arsdigita.persistence.DataQuery;
import com.arsdigita.persistence.Session; import com.arsdigita.persistence.Session;
import com.arsdigita.persistence.SessionManager; import com.arsdigita.persistence.SessionManager;
import com.arsdigita.ui.UI;
import com.arsdigita.ui.login.LoginConstants; import com.arsdigita.ui.login.LoginConstants;
import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.web.Application; import com.arsdigita.web.Application;
@ -41,12 +45,22 @@ import com.arsdigita.web.ApplicationCollection;
import com.arsdigita.xml.Element; import com.arsdigita.xml.Element;
public class LoginPortletRenderer extends AbstractPortletRenderer { public class LoginPortletRenderer extends AbstractPortletRenderer {
private LoginPortlet m_portlet; private LoginPortlet m_portlet;
/**
* Constructor.
* @param portlet
*/
public LoginPortletRenderer(LoginPortlet portlet) { public LoginPortletRenderer(LoginPortlet portlet) {
m_portlet = portlet; m_portlet = portlet;
} }
/**
*
* @param state
* @param parent
*/
public void generateBodyXML(PageState state, Element parent) { public void generateBodyXML(PageState state, Element parent) {
Element login = parent.newChildElement("portlet:login", Element login = parent.newChildElement("portlet:login",
PortalConstants.PORTLET_XML_NS); PortalConstants.PORTLET_XML_NS);
@ -68,8 +82,10 @@ public class LoginPortletRenderer extends AbstractPortletRenderer {
Element content = login.newChildElement("portlet:loginform", Element content = login.newChildElement("portlet:loginform",
PortalConstants.PORTLET_XML_NS); PortalConstants.PORTLET_XML_NS);
content.addAttribute("url", LegacyInitializer
.getURL(LegacyInitializer.LOGIN_PAGE_KEY)); // content.addAttribute("url", LegacyInitializer
// .getURL(LegacyInitializer.LOGIN_PAGE_KEY));
content.addAttribute("url", UI.getLoginPageURL() );
content.addAttribute("timestamp", timestamp); content.addAttribute("timestamp", timestamp);
} else { } else {
User user = (User) party; User user = (User) party;
@ -81,16 +97,19 @@ public class LoginPortletRenderer extends AbstractPortletRenderer {
content.addAttribute("familyName", user.getPersonName() content.addAttribute("familyName", user.getPersonName()
.getFamilyName()); .getFamilyName());
Link editProfile = new Link("Edit profile", "/" Link editProfile = new Link("Edit profile",
+ LegacyInitializer.getURL(LegacyInitializer.EDIT_PAGE_KEY)); UI.getEditUserProfilePageURL());
// "/" + LegacyInitializer.getURL(LegacyInitializer.EDIT_PAGE_KEY));
editProfile.generateXML(state, content); editProfile.generateXML(state, content);
Link changePassword = new Link("Change password", "/" Link changePassword = new Link("Change password",
+ LegacyInitializer.getURL(LegacyInitializer.CHANGE_PAGE_KEY)); UI.getRecoverPasswordPageURL());
// "/" + LegacyInitializer.getURL(LegacyInitializer.CHANGE_PAGE_KEY));
changePassword.generateXML(state, content); changePassword.generateXML(state, content);
Link logout = new Link("Logout", "/" Link logout = new Link("Logout",
+ LegacyInitializer.getURL(LegacyInitializer.LOGOUT_PAGE_KEY)); UI.getLogoutPageURL() );
// "/" + LegacyInitializer.getURL(LegacyInitializer.LOGOUT_PAGE_KEY));
logout.generateXML(state, content); logout.generateXML(state, content);
// Test whether the user can do anything in any content section // Test whether the user can do anything in any content section

View File

@ -18,28 +18,8 @@
*/ */
package com.arsdigita.simplesurvey.ui; package com.arsdigita.simplesurvey.ui;
import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.event.FormProcessListener;
import com.arsdigita.bebop.Label; import com.arsdigita.bebop.Label;
import com.arsdigita.ui.UI;
import com.arsdigita.simplesurvey.ui.SimpleSurveyPanel;
import com.arsdigita.kernel.security.LegacyInitializer;
/** /**
@ -58,8 +38,8 @@ public class ConfirmationPanel extends SimpleSurveyPanel {
protected void addComponentsToPage() { protected void addComponentsToPage() {
String workspaceURL = String workspaceURL = UI.getWorkspaceURL() ;
LegacyInitializer.getURL(LegacyInitializer.WORKSPACE_PAGE_KEY); // LegacyInitializer.getURL(LegacyInitializer.WORKSPACE_PAGE_KEY);
Label bodyText = new Label("Your survey response has been submitted. " + Label bodyText = new Label("Your survey response has been submitted. " +
"You may return to your <a href=\"/" + workspaceURL + "You may return to your <a href=\"/" + workspaceURL +

View File

@ -21,32 +21,19 @@ package com.arsdigita.simplesurvey.ui;
import com.arsdigita.simplesurvey.util.GlobalizationUtil ; import com.arsdigita.simplesurvey.util.GlobalizationUtil ;
import com.arsdigita.bebop.BoxPanel;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.Link;
import com.arsdigita.bebop.Page; import com.arsdigita.bebop.Page;
import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.Link; import com.arsdigita.bebop.SimpleContainer;
import com.arsdigita.ui.login.UserAuthenticationListener;
import com.arsdigita.kernel.SiteNode;
import com.arsdigita.kernel.security.LegacyInitializer;
import com.arsdigita.bebop.BoxPanel;
import javax.servlet.http.HttpServletRequest;
import com.arsdigita.bebop.event.PrintListener; import com.arsdigita.bebop.event.PrintListener;
import com.arsdigita.bebop.event.PrintEvent; import com.arsdigita.bebop.event.PrintEvent;
import com.arsdigita.kernel.SiteNode;
import com.arsdigita.ui.UI;
import com.arsdigita.ui.login.UserAuthenticationListener;
import com.arsdigita.bebop.SimpleContainer; import javax.servlet.http.HttpServletRequest;
import com.arsdigita.bebop.Label;
/** /**
@ -114,8 +101,8 @@ public abstract class SimpleSurveyPanel extends SimpleContainer {
protected void addWorkspaceToNavBar() { protected void addWorkspaceToNavBar() {
// Link to the workspace of the site // Link to the workspace of the site
m_navBar.add(new Link("Workspace", m_navBar.add(new Link("Workspace",UI.getWorkspaceURL()));
"/" + LegacyInitializer.getURL(LegacyInitializer.WORKSPACE_PAGE_KEY))); // "/" + LegacyInitializer.getURL(LegacyInitializer.WORKSPACE_PAGE_KEY)));
} }
protected abstract void addComponentsToPage(); protected abstract void addComponentsToPage();