Removed just another bunch of unused code.

git-svn-id: https://svn.libreccm.org/ccm/trunk@2066 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2013-02-10 16:55:01 +00:00
parent 401ab4ab28
commit 2a121e0aff
29 changed files with 144 additions and 77 deletions

View File

@ -78,6 +78,15 @@ import java.util.ArrayList;
import org.apache.log4j.Category;
// Entry Point for jsp, currently: /template/ccm-portalworkspace/admin/edit.jsp
// Does nothing but display some title.
// No other java code relies on this class.
//
// No documentation available what this class really does or is intended to do.
// Code refers to roles which are not part or portalworkspace. Probably an
// unfinished import from portalserver.
/**
* PeoplePane.
*
@ -92,11 +101,17 @@ public class PeoplePane extends SimpleContainer {
private RequestLocal m_workspaceRL;
private StringParameter m_action;
/**
* Default Constructor.
*/
public PeoplePane() {
setTag("portal:admin");
setNamespace(WorkspacePage.PORTAL_XML_NS);
}
/**
*
*/
public void init(StringParameter sp) {
m_workspaceRL = new RequestLocal() {

View File

@ -15,6 +15,7 @@
package com.arsdigita.portalworkspace.ui.admin;
import com.arsdigita.portalworkspace.ui.ApplicationSelectionModel;
import org.apache.log4j.Logger;
import com.arsdigita.bebop.Page;

View File

@ -13,7 +13,7 @@
*
*/
package com.arsdigita.portalworkspace.ui.admin;
package com.arsdigita.portalworkspace.ui;
import org.apache.log4j.Logger;
@ -28,16 +28,18 @@ import com.arsdigita.web.Web;
/**
* This selection model adds an (optional?) default value which will be
* returned when nothing is selected.
*
* Used by packages admin and sitemap
*/
public class ApplicationSelectionModel extends ACSObjectSelectionModel {
public static final String DEFAULT_PARAM_NAME = "app_id";
public static final String DEFAULT_PARAM_NAME = "app_id";
private boolean m_hasDefaultValue;
private boolean m_hasDefaultValue;
/** Creates a s_logging category with name = full name of class */
private static final Logger s_log = Logger
.getLogger(ApplicationSelectionModel.class);
private static final Logger s_log = Logger
.getLogger(ApplicationSelectionModel.class);
/**
* Constructor
@ -129,7 +131,7 @@ public class ApplicationSelectionModel extends ACSObjectSelectionModel {
}
return super.getSelectedObject(state);
}
}
/**
*
@ -138,24 +140,24 @@ public class ApplicationSelectionModel extends ACSObjectSelectionModel {
*/
@Override
public Object getSelectedKey(PageState state) {
if (m_hasDefaultValue && !super.isSelected(state)) {
return getDefaultApplication();
}
return super.getSelectedKey(state);
}
if (m_hasDefaultValue && !super.isSelected(state)) {
return getDefaultApplication();
}
return super.getSelectedKey(state);
}
/** Utility methods */
public Application getSelectedApplication(PageState state) {
return (Application) getSelectedObject(state);
}
/** Utility methods */
public Application getSelectedApplication(PageState state) {
return (Application) getSelectedObject(state);
}
/**
/**
* Utility method
*
* @param state
* @param Application
*/
public void setSelectedApplication(PageState state, Application Application) {
setSelectedObject(state, Application);
}
setSelectedObject(state, Application);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2001 ArsDigita Corporation. All Rights Reserved.
* 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

View File

@ -44,7 +44,11 @@ import com.arsdigita.web.URL;
import com.arsdigita.xml.Element;
/**
* Purpose?.
*
* As of version 6.6 not really used. References from UserWorkspace,
* DefaultWorkspace, and PackageWorkspace, none of those referenced anymore
* (all are meant as JSP entry points, but not used from any JSP.)
*
*/
public class WorkspaceComponent extends SimpleContainer {

View File

@ -21,6 +21,7 @@ import com.arsdigita.bebop.SimpleContainer;
import com.arsdigita.kernel.Group;
import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.Role;
import com.arsdigita.portalworkspace.ui.ApplicationSelectionModel;
import com.arsdigita.portalworkspace.Workspace;
import com.arsdigita.portalworkspace.WorkspacePage;
@ -29,8 +30,14 @@ import org.apache.log4j.Logger;
/**
* Entry page for PortalWorkspace administration.
*
* @author
* Invocation by (web)/templates/ccm-portalworkspace/admin/index.jsp
*
* Provides a list of participants (administrators and members) and functionaliy
* to add and remove members, provides a way to assign a category for use as an
* index page in navigation, and provides a link to delete this portal instance
* at all.
*/
public class AdminPane extends SimpleContainer {
@ -53,7 +60,7 @@ public class AdminPane extends SimpleContainer {
m_app = new ApplicationSelectionModel("application", true);
/* Add component to select a Navigatgion Category for this portal */
/* Add component to select a Navigation Category for this portal */
m_catComponent = new CategoryComponent(m_app);
m_catComponent.setIdAttr("categoryComponent");
add(m_catComponent);

View File

@ -18,6 +18,7 @@
package com.arsdigita.portalworkspace.ui.admin;
import com.arsdigita.portalworkspace.ui.ApplicationSelectionModel;
import org.apache.log4j.Logger;
import com.arsdigita.bebop.Label;

View File

@ -15,6 +15,7 @@
package com.arsdigita.portalworkspace.ui.admin;
import com.arsdigita.portalworkspace.ui.ApplicationSelectionModel;
import java.math.BigDecimal;
import org.apache.log4j.Logger;

View File

@ -1,5 +1,6 @@
package com.arsdigita.portalworkspace.ui.admin;
import com.arsdigita.portalworkspace.ui.ApplicationSelectionModel;
import org.apache.log4j.Logger;
import com.arsdigita.bebop.ActionLink;

View File

@ -41,6 +41,17 @@ import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.web.Application;
import com.arsdigita.web.ui.ApplicationConfigFormSection;
// Referenced in Initializer.
// No other referebce found.
// TODO: What happens if omitted?
// (2013-02-10pb)
/**
*
*
*/
public class WorkspaceConfigFormSection extends ApplicationConfigFormSection {
private SingleSelect m_layout;

View File

@ -16,28 +16,36 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.arsdigita.portalworkspace.ui.admin;
import org.apache.log4j.Logger;
package com.arsdigita.portalworkspace.ui.sitemap;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.SimpleContainer;
import com.arsdigita.domain.DomainObjectXMLRenderer;
import com.arsdigita.portalworkspace.WorkspacePage;
import com.arsdigita.portalworkspace.ui.ApplicationSelectionModel;
import com.arsdigita.web.Application;
import com.arsdigita.xml.Element;
import org.apache.log4j.Logger;
/**
*
*
*/
public class ApplicationDetails extends SimpleContainer {
private static final Logger s_log = Logger.getLogger(ApplicationList.class);
private static final Logger s_log = Logger.getLogger(ApplicationList.class);
private ApplicationSelectionModel m_app;
private ApplicationSelectionModel m_app;
public ApplicationDetails(ApplicationSelectionModel app) {
super("portal:applicationDetails", WorkspacePage.PORTAL_XML_NS);
m_app = app;
}
/**
* Constructor
* @param app
*/
public ApplicationDetails(ApplicationSelectionModel app) {
super("portal:applicationDetails", WorkspacePage.PORTAL_XML_NS);
m_app = app;
}
/**
*
@ -45,17 +53,18 @@ public class ApplicationDetails extends SimpleContainer {
* @param parent
*/
@Override
public void generateXML(PageState state, Element parent) {
Element content = generateParent(parent);
public void generateXML(PageState state, Element parent) {
Application app = (Application) m_app.getSelectedObject(state);
Element content = generateParent(parent);
DomainObjectXMLRenderer xr = new DomainObjectXMLRenderer(content);
xr.setWrapRoot(false);
xr.setWrapAttributes(true);
xr.setWrapObjects(false);
Application app = (Application) m_app.getSelectedObject(state);
xr.walk(app, ApplicationDetails.class.getName());
}
DomainObjectXMLRenderer xr = new DomainObjectXMLRenderer(content);
xr.setWrapRoot(false);
xr.setWrapAttributes(true);
xr.setWrapObjects(false);
xr.walk(app, ApplicationDetails.class.getName());
}
}

View File

@ -16,23 +16,24 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.arsdigita.portalworkspace.ui.admin;
import java.io.IOException;
import org.apache.log4j.Logger;
package com.arsdigita.portalworkspace.ui.sitemap;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.SimpleContainer;
import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.domain.DomainObjectXMLRenderer;
import com.arsdigita.persistence.OID;
import com.arsdigita.portalworkspace.ui.ApplicationSelectionModel;
import com.arsdigita.portalworkspace.WorkspacePage;
import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.web.Application;
import com.arsdigita.web.ApplicationCollection;
import com.arsdigita.xml.Element;
import java.io.IOException;
import org.apache.log4j.Logger;
/**
*
*

View File

@ -15,7 +15,7 @@
* 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.portalworkspace.ui.admin;
package com.arsdigita.portalworkspace.ui.sitemap;
import java.util.HashMap;
import java.util.Iterator;
@ -34,6 +34,7 @@ import com.arsdigita.kernel.Resource;
import com.arsdigita.kernel.ui.ResourceConfigComponent;
import com.arsdigita.persistence.OID;
import com.arsdigita.portalworkspace.WorkspacePage;
import com.arsdigita.portalworkspace.ui.ApplicationSelectionModel;
import com.arsdigita.web.Application;
import com.arsdigita.web.ApplicationType;
import com.arsdigita.web.ApplicationTypeCollection;

View File

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.arsdigita.portalworkspace.ui.admin;
package com.arsdigita.portalworkspace.ui.sitemap;
import com.arsdigita.bebop.Form;
import com.arsdigita.bebop.FormProcessException;
@ -35,41 +35,53 @@ import com.arsdigita.toolbox.ui.OIDParameter;
import com.arsdigita.web.ApplicationType;
import com.arsdigita.web.ApplicationTypeCollection;
/**
*
*/
public class NewApplicationForm extends Form {
private SingleSelect m_app;
private SingleSelect m_app;
public NewApplicationForm() {
super("newApp", new SimpleContainer("portal:newApplication",
WorkspacePage.PORTAL_XML_NS));
/**
* Constructor.
*/
public NewApplicationForm() {
m_app = new SingleSelect(new OIDParameter("app"));
ApplicationTypeCollection types = ApplicationType
.retrieveAllApplicationTypes();
types.addFilter("not(lower(title) like 'admin')");
types.addOrder("title");
m_app.addOption(new Option(null, "-- select application --"));
while (types.next()) {
ApplicationType type = types.getApplicationType();
m_app.addOption(new Option(type.getOID().toString(), type
.getTitle()));
}
m_app.addValidationListener(new NotNullValidationListener());
add(m_app);
super("newApp", new SimpleContainer("portal:newApplication",
WorkspacePage.PORTAL_XML_NS));
add(new Submit("Create"));
m_app = new SingleSelect(new OIDParameter("app"));
ApplicationTypeCollection types = ApplicationType
.retrieveAllApplicationTypes();
types.addFilter("not(lower(title) like 'admin')");
types.addOrder("title");
m_app.addOption(new Option(null, "-- select application --"));
while (types.next()) {
ApplicationType type = types.getApplicationType();
m_app.addOption(new Option(type.getOID().toString(), type
.getTitle()));
}
m_app.addValidationListener(new NotNullValidationListener());
add(m_app);
addProcessListener(new FormProcessListener() {
public void process(FormSectionEvent ev)
throws FormProcessException {
add(new Submit("Create"));
fireCompletionEvent(ev.getPageState());
}
});
}
addProcessListener(new FormProcessListener() {
public void process(FormSectionEvent ev)
throws FormProcessException {
public ApplicationType getApplicationType(PageState state) {
OID app = (OID) m_app.getValue(state);
return (ApplicationType) DomainObjectFactory.newInstance(app);
}
fireCompletionEvent(ev.getPageState());
}
});
}
/**
*
* @param state
* @return
*/
public ApplicationType getApplicationType(PageState state) {
OID app = (OID) m_app.getValue(state);
return (ApplicationType) DomainObjectFactory.newInstance(app);
}
}

View File

@ -16,8 +16,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.arsdigita.portalworkspace.ui.admin;
package com.arsdigita.portalworkspace.ui.sitemap;
import com.arsdigita.portalworkspace.ui.ApplicationSelectionModel;
import com.arsdigita.bebop.Page;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.SimpleContainer;