ccm-ldn-portal nach ccm-portalworkspace verschoben und so geändert, dass es
gleichzeitig mit ccm-portalserver installiert werden kann. Update scrippt (ccm-portalserver 6.6.0 -> 6.6.1) erforderlich. Das Standard APLAWS Theme wird im Moment nicht genutzt, sondern das ursprüngliche Red Hat / CCM Theme. Damit werden Funktionen sichtbar, die das APLAWS Theme nicht nutzt. git-svn-id: https://svn.libreccm.org/ccm/trunk@818 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
8b5474a42a
commit
5353924e2b
|
|
@ -5,7 +5,7 @@ ccm-cms
|
|||
|
||||
# Content assets
|
||||
ccm-cms-assets-fileattachment
|
||||
ccm-cms-assets-imagestep
|
||||
# ccm-cms-assets-imagestep
|
||||
ccm-cms-assets-notes
|
||||
ccm-cms-assets-relatedlink
|
||||
# is ccm-ldn-dublin really an asset?
|
||||
|
|
@ -33,7 +33,7 @@ ccm-cms-types-member
|
|||
ccm-cms-types-mparticle
|
||||
ccm-cms-types-newsitem
|
||||
# -- ccm-cms-types-organization
|
||||
ccm-cms-types-person
|
||||
# ccm-cms-types-person
|
||||
# -- ccm-cms-types-pressrelease
|
||||
# -- ccm-cms-types-researchnetwork
|
||||
# -- ccm-cms-types-service
|
||||
|
|
@ -48,9 +48,9 @@ ccm-cms-types-person
|
|||
# -- ccm-docmngr ## temp., produces errors in build
|
||||
# -- ccm-formbuilder-pdf
|
||||
ccm-forum
|
||||
ccm-forum-categorised
|
||||
# ccm-forum-categorised
|
||||
# -- ccm-simplesurvey
|
||||
ccm-themedirector
|
||||
# ccm-themedirector
|
||||
ccm-user-preferences
|
||||
# -- ccm-weblog
|
||||
# -- ccm-webpage
|
||||
|
|
@ -63,9 +63,9 @@ ccm-user-preferences
|
|||
# -- ccm-ldn-exporter
|
||||
# -- ccm-ldn-freeform
|
||||
# -- ccm-ldn-importer
|
||||
ccm-ldn-navigation
|
||||
# ccm-ldn-navigation
|
||||
ccm-ldn-portal
|
||||
ccm-ldn-rss
|
||||
# ccm-ldn-rss
|
||||
ccm-ldn-search
|
||||
ccm-ldn-shortcuts
|
||||
ccm-ldn-subsite
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ package com.arsdigita.aplaws;
|
|||
import com.arsdigita.london.navigation.Template;
|
||||
import com.arsdigita.london.terms.Domain;
|
||||
import com.arsdigita.london.terms.importer.Parser;
|
||||
import com.arsdigita.london.portal.PageLayout;
|
||||
import com.arsdigita.london.portal.Workspace;
|
||||
import com.arsdigita.portalworkspace.PageLayout;
|
||||
import com.arsdigita.portalworkspace.Workspace;
|
||||
|
||||
import com.arsdigita.categorization.Category;
|
||||
import com.arsdigita.categorization.RootCategoryCollection;
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ import com.arsdigita.categorization.Category;
|
|||
import com.arsdigita.util.Assert;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
|
||||
import com.arsdigita.london.portal.Workspace;
|
||||
import com.arsdigita.london.portal.ui.WorkspaceSelectionModel;
|
||||
import com.arsdigita.portalworkspace.Workspace;
|
||||
import com.arsdigita.portalworkspace.ui.WorkspaceSelectionModel;
|
||||
|
||||
public class CategoryPortalSelectionModel extends WorkspaceSelectionModel {
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@
|
|||
package com.arsdigita.aplaws.ui;
|
||||
|
||||
import com.arsdigita.bebop.AbstractSingleSelectionModel;
|
||||
import com.arsdigita.london.portal.ui.PortalSelectionModel;
|
||||
import com.arsdigita.london.portal.WorkspacePage;
|
||||
import com.arsdigita.portalworkspace.ui.PortalSelectionModel;
|
||||
import com.arsdigita.portalworkspace.WorkspacePage;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.parameters.ParameterModel;
|
||||
import com.arsdigita.domain.DomainObject;
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ import com.arsdigita.bebop.ActionLink;
|
|||
import com.arsdigita.bebop.Page;
|
||||
import com.arsdigita.bebop.event.ActionEvent;
|
||||
import com.arsdigita.bebop.event.ActionListener;
|
||||
import com.arsdigita.london.portal.ui.PersistentPortal;
|
||||
import com.arsdigita.london.portal.Workspace;
|
||||
import com.arsdigita.portalworkspace.ui.PersistentPortal;
|
||||
import com.arsdigita.portalworkspace.Workspace;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.xml.Element;
|
||||
import com.arsdigita.london.portal.ui.PortalConstants;
|
||||
import com.arsdigita.portalworkspace.ui.PortalConstants;
|
||||
import com.arsdigita.kernel.permissions.PermissionService;
|
||||
import com.arsdigita.kernel.permissions.PermissionDescriptor;
|
||||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ import com.arsdigita.kernel.permissions.PermissionService;
|
|||
import com.arsdigita.kernel.permissions.PermissionDescriptor;
|
||||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||
|
||||
import com.arsdigita.london.portal.Workspace;
|
||||
import com.arsdigita.london.portal.WorkspacePage;
|
||||
import com.arsdigita.london.portal.WorkspacePageCollection;
|
||||
import com.arsdigita.portalworkspace.Workspace;
|
||||
import com.arsdigita.portalworkspace.WorkspacePage;
|
||||
import com.arsdigita.portalworkspace.WorkspacePageCollection;
|
||||
|
||||
import com.arsdigita.london.subsite.Subsite;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
|
||||
model com.arsdigita.london.portal;
|
||||
|
||||
import com.arsdigita.kernel.ACSObject;
|
||||
import com.arsdigita.web.Application;
|
||||
|
||||
// @author Jim Parsons (jparsons@arsdigita.com)
|
||||
|
||||
object type WorkspaceThemeApplication extends Application {
|
||||
reference key (themeapplications.theme_app_id);
|
||||
}
|
||||
|
||||
object type WorkspaceTheme extends ACSObject {
|
||||
String[0..1] theme_name = workspace_themes.theme_name VARCHAR(4000);
|
||||
String[0..1] theme_desc = workspace_themes.theme_desc VARCHAR(4000);
|
||||
String[0..1] ctx_bar_color = workspace_themes.ctx_bar_color VARCHAR(100);
|
||||
String[0..1] ctx_bar_text_color = workspace_themes.ctx_bar_text_color VARCHAR(100);
|
||||
String[0..1] active_tab_color = workspace_themes.active_tab_color VARCHAR(100);
|
||||
String[0..1] active_tab_text_color = workspace_themes.active_tab_text_color VARCHAR(100);
|
||||
String[0..1] inactive_tab_color = workspace_themes.inactive_tab_color VARCHAR(100);
|
||||
String[0..1] inactive_tab_text_color = workspace_themes.inactive_tab_text_color VARCHAR(100);
|
||||
String[0..1] top_rule = workspace_themes.top_rule VARCHAR(100);
|
||||
String[0..1] bottom_rule = workspace_themes.bottom_rule VARCHAR(100);
|
||||
String[0..1] portlet_head = workspace_themes.portlet_head VARCHAR(100);
|
||||
String[0..1] portlet_icon = workspace_themes.portlet_icon VARCHAR(100);
|
||||
String[0..1] portlet_border_color = workspace_themes.portlet_border_color VARCHAR(100);
|
||||
String[0..1] portlet_border_style = workspace_themes.portlet_border_style VARCHAR(100);
|
||||
String[0..1] portlet_header_text_color = workspace_themes.portlet_header_text_color VARCHAR(100);
|
||||
String[0..1] page_bg_color = workspace_themes.page_bg_color VARCHAR(100);
|
||||
String[0..1] page_bg_image = workspace_themes.page_bg_image VARCHAR(100);
|
||||
String[0..1] narrow_bg_color = workspace_themes.narrow_bg_color VARCHAR(100);
|
||||
String[0..1] body_text_color = workspace_themes.body_text_color VARCHAR(100);
|
||||
|
||||
reference key (workspace_themes.theme_id);
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
create index workspaces_party_id_idx on workspaces(party_id);
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<registry>
|
||||
<config class="com.arsdigita.london.portal.WorkspaceConfig"
|
||||
storage="ccm-ldn-portal/portal.properties"/>
|
||||
</registry>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
com.arsdigita.london.portal.default_url.title=Portal URL
|
||||
com.arsdigita.london.portal.default_url.purpose=The URL on which to mount the portal workspace
|
||||
com.arsdigita.london.portal.default_url.example=/portal/
|
||||
com.arsdigita.london.portal.default_url.format=[url]
|
||||
|
||||
com.arsdigita.london.portal.default_title.title=Portal Worksapce Title
|
||||
com.arsdigita.london.portal.default_title.purpose=The title of the portal workspace
|
||||
com.arsdigita.london.portal.default_title.example=Portal Homepage
|
||||
com.arsdigita.london.portal.default_title.format=[string]
|
||||
|
||||
com.arsdigita.london.portal.default_is_public.title=Is the portal workspace public?
|
||||
com.arsdigita.london.portal.default_is_public.purpose=Indicate whether or not the Portal Workspace is available to the public
|
||||
com.arsdigita.london.portal.default_is_public.example=true
|
||||
com.arsdigita.london.portal.default_is_public.format=true|false
|
||||
|
||||
|
|
@ -1,189 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2001 ArsDigita Corporation. All Rights Reserved.
|
||||
*
|
||||
* The contents of this file are subject to the ArsDigita Public
|
||||
* License (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.arsdigita.com/ADPL.txt
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.ParameterSingleSelectionModel;
|
||||
import com.arsdigita.bebop.SimpleContainer;
|
||||
import com.arsdigita.bebop.SingleSelectionModel;
|
||||
import com.arsdigita.bebop.parameters.IntegerParameter;
|
||||
import com.arsdigita.bebop.portal.Portal;
|
||||
import com.arsdigita.bebop.portal.PortalModel;
|
||||
import com.arsdigita.bebop.portal.PortalModelBuilder;
|
||||
import com.arsdigita.bebop.portal.PortletRenderer;
|
||||
import com.arsdigita.london.portal.ui.PortalConstants;
|
||||
import com.arsdigita.london.portal.ui.PortalSelectionModel;
|
||||
import com.arsdigita.london.portal.ui.PortletSelectionModel;
|
||||
import com.arsdigita.london.portal.ui.PortletTypeSelectionModel;
|
||||
import com.arsdigita.london.portal.ui.WorkspaceSelectionModel;
|
||||
import com.arsdigita.persistence.DataQuery;
|
||||
import com.arsdigita.persistence.SessionManager;
|
||||
import com.arsdigita.persistence.metadata.ObjectType;
|
||||
import com.arsdigita.portal.Portlet;
|
||||
import com.arsdigita.portal.PortletType;
|
||||
import com.arsdigita.portal.PortletTypeCollection;
|
||||
import com.arsdigita.xml.Element;
|
||||
/**
|
||||
*
|
||||
* @author cgyg9330 <chris.gilbert@westsussex.gov.uk>
|
||||
* @version $Id: StatefulPersistentPortal.java 1271 2006-07-18 13:36:43Z cgyg9330 $
|
||||
*
|
||||
* Dynamically render the portlets for the current portal. If any
|
||||
* portlets are stateful, retrieve a renderer from cache so that the page can
|
||||
* manage the state of the portlet.
|
||||
*
|
||||
* ONLY VALID FOR BROWSE MODE, use com.arsdigita.portal.ui.PersistentPortal for edit mode
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class StatefulPersistentPortal extends SimpleContainer {
|
||||
|
||||
private static final Logger s_log =
|
||||
Logger.getLogger(StatefulPersistentPortal.class);
|
||||
|
||||
private WorkspaceSelectionModel m_workspace;
|
||||
private PortletSelectionModel m_portlet;
|
||||
private PortalModelBuilder m_portalModelBuilder;
|
||||
private PortalSelectionModel m_portal;
|
||||
|
||||
|
||||
/**
|
||||
* maps portlet type to list of empty renderers
|
||||
*/
|
||||
private static Map m_stateful;
|
||||
|
||||
|
||||
|
||||
public StatefulPersistentPortal(PortalSelectionModel portal) {
|
||||
this(portal, "portal");
|
||||
}
|
||||
/**
|
||||
* Constructor is invoked when the page component hierarchy is recreated. This occurs
|
||||
* a) when the first person goes to the homepage after a server restart
|
||||
* b) when someone adds a stateful portlet to one of the homepage portals, which increases the
|
||||
* maximum number of that portlet type that appears on any portal
|
||||
* @param portal the portalSelectionModel used by the Dynamic PortalModelBuilder
|
||||
* @param name
|
||||
*/
|
||||
public StatefulPersistentPortal(
|
||||
PortalSelectionModel portal,
|
||||
String name) {
|
||||
s_log.debug("IN constructor" + name );
|
||||
m_portal = portal;
|
||||
setTag("portal:portal");
|
||||
setNamespace(PortalConstants.PORTAL_XML_NS);
|
||||
|
||||
// retrieve empty renderers for any stateful portlets and add them to the component hierarchy
|
||||
PortletTypeCollection types = PortletType.retrieveAllPortletTypes();
|
||||
m_stateful = new HashMap();
|
||||
|
||||
while (types.next()) {
|
||||
|
||||
PortletType type = types.getPortletType();
|
||||
s_log.debug("checking portlet type " + type.getDescription());
|
||||
String portletObjectType = type.getResourceObjectType();
|
||||
StatefulPortletRendererFactory factory = StatefulPortlet.getRendererFactory(portletObjectType);
|
||||
if (null != factory ) {
|
||||
DataQuery findMaxInstances = SessionManager.getSession().retrieveQuery("com.arsdigita.london.portal.MaxPortletInstances");
|
||||
findMaxInstances.setParameter("portletType", type.getID());
|
||||
|
||||
int requiredRenderers = 0;
|
||||
while (findMaxInstances.next()) {
|
||||
requiredRenderers = ((Integer)findMaxInstances.get("maxCount")).intValue();
|
||||
}
|
||||
s_log.debug("stateful portlet - I am going to instantiate " + requiredRenderers + " renderers");
|
||||
List renderers = new ArrayList();
|
||||
for (int i = 0; i < requiredRenderers; i++) {
|
||||
StatefulPortletRenderer renderer = factory.getRenderer();
|
||||
renderers.add(renderer);
|
||||
|
||||
// and add it to the page
|
||||
add(renderer);
|
||||
s_log.debug("renderer added to page");
|
||||
}
|
||||
m_stateful.put(type.getResourceObjectType(), renderers);
|
||||
|
||||
}
|
||||
}
|
||||
m_portalModelBuilder =
|
||||
new StatefulPersistentPortalModelBuilder(portal, m_stateful);
|
||||
|
||||
}
|
||||
// copied almost directly from PersistentPortal
|
||||
public void generateXML(PageState state,
|
||||
Element parent) {
|
||||
Element content = generateParent(parent);
|
||||
|
||||
WorkspacePage page = m_portal.getSelectedPortal(state);
|
||||
content.addAttribute("layout", page.getLayout().getFormat());
|
||||
content.addAttribute("title", page.getTitle());
|
||||
content.addAttribute("description", page.getDescription());
|
||||
|
||||
PortalModel pm = m_portalModelBuilder.buildModel(state);
|
||||
Iterator portlets = pm.getPortletRenderers();
|
||||
|
||||
while (portlets.hasNext()) {
|
||||
Object entry = portlets.next();
|
||||
if (entry instanceof Object[]) {
|
||||
PortletRenderer renderer = (PortletRenderer)((Object[])entry)[0];
|
||||
BigDecimal portlet = (BigDecimal)((Object[])entry)[1];
|
||||
|
||||
// We want the root element created by the portlet
|
||||
// but the crap generateXML signature doesn't let
|
||||
// us get at it :-( And the bebop portlet isn't
|
||||
// any more helpful either :-(
|
||||
Element hack = new Element("hack");
|
||||
|
||||
renderer.generateXML(state, hack);
|
||||
|
||||
Iterator elements = hack.getChildren().iterator();
|
||||
while (elements.hasNext()) {
|
||||
Element child = (Element)elements.next();
|
||||
|
||||
content.addContent(child);
|
||||
}
|
||||
} else {
|
||||
|
||||
PortletRenderer renderer = (PortletRenderer)entry;
|
||||
renderer.generateXML(state, content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* return the number of renderers for the given portlet type currently registered on the page
|
||||
* @param portletType
|
||||
* @return
|
||||
*/
|
||||
public static int getCurrentPortletRendererInstances (String portletType) {
|
||||
int count = 0;
|
||||
List renderers = (List)m_stateful.get(portletType);
|
||||
if (renderers != null) {
|
||||
count = renderers.size();
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
com.arsdigita.london.portal.traversal_adapters.title=XML renderer rules
|
||||
com.arsdigita.london.portal.traversal_adapters.purpose=Name of File with rules for configuring information in generated XML
|
||||
com.arsdigita.london.portal.traversal_adapters.format=[string]
|
||||
com.arsdigita.london.portal.traversal_adapters.example=/WEB-INF/resources/portal-adapters.xml
|
||||
|
||||
com.arsdigita.london.portal.default_layout.title=Default workspace layout
|
||||
com.arsdigita.london.portal.default_layout.purpose=Default column layout for workspace portals
|
||||
com.arsdigita.london.portal.default_layout.format=[layout]
|
||||
com.arsdigita.london.portal.default_layout.example=25%,25%,25%,25%
|
||||
|
||||
com.arsdigita.london.portal.create_user_workspaces.title=Create user workspaces
|
||||
com.arsdigita.london.portal.create_user_workspaces.purpose=Whether non-admin users should have their own custom workspaces
|
||||
com.arsdigita.london.portal.create_user_workspaces.format=[boolean]
|
||||
com.arsdigita.london.portal.create_user_workspaces.example=false
|
||||
|
||||
com.arsdigita.london.portal.excluded_portlet_types.title=Portlet types not available on this site
|
||||
com.arsdigita.london.portal.excluded_portlet_types.purpose=Prevent these type appearing in the drop down list of portlets to add to the page
|
||||
com.arsdigita.london.portal.excluded_portlet_types.format=[string,string,string]
|
||||
com.arsdigita.london.portal.excluded_portlet_types.example=com.arsdigita.london.portal.portlet.ApplicationDirectoryPortlet,com.arsdigita.london.portal.portlet.TimeOfDayPortlet
|
||||
|
||||
com.arsdigita.london.portal.admin_only_portlet_types.title=Portlet types only available to page admin
|
||||
com.arsdigita.london.portal.admin_only_portlet_types.purpose=Only available to administrator of homepage, or subsite frontpage
|
||||
com.arsdigita.london.portal.admin_only_portlet_types.format=[string,string,string]
|
||||
com.arsdigita.london.portal.admin_only_portlet_types.example=com.arsdigita.london.portal.portlet.ApplicationDirectoryPortlet,com.arsdigita.london.portal.portlet.TimeOfDayPortlet
|
||||
|
||||
com.arsdigita.london.portal.portlet.freeform_html_editor.title=use wysiwyg editor for freeform html portlet
|
||||
com.arsdigita.london.portal.portlet.freeform_html_editor.purpose=If true, use editor specified by waf.bebop.dhtml_editor when user edits freeform html portlet
|
||||
com.arsdigita.london.portal.portlet.freeform_html_editor.format=[boolean]
|
||||
com.arsdigita.london.portal.portlet.freeform_html_editor.example=false
|
||||
|
||||
com.arsdigita.london.portal.workspacePartyPrivilege.title=Privilege granted to the workspace party
|
||||
com.arsdigita.london.portal.workspacePartyPrivilege.purpose=Specify which privilege is granted to the workspace party. Should be "read" or "edit".
|
||||
com.arsdigita.london.portal.workspacePartyPrivilege.format=[string]
|
||||
com.arsdigita.london.portal.workspacePartyPrivilege.example=edit
|
||||
|
||||
com.arsdigita.london.portal.checkWorkspaceReadPermissions.title=Check READ permissions when viewing Workspaces
|
||||
com.arsdigita.london.portal.checkWorkspaceReadPermissions.purpose=Specify whether we should check READ permissions when viewing workspaces. By default we don't, which is odd.
|
||||
com.arsdigita.london.portal.checkWorkspaceReadPermissions.format=[boolean]
|
||||
com.arsdigita.london.portal.checkWorkspaceReadPermissions.example=false
|
||||
|
|
@ -1,19 +1,14 @@
|
|||
<?xml version="1.0"?>
|
||||
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
|
||||
name="ccm-ldn-portal"
|
||||
prettyName="Portal"
|
||||
version="6.6.0"
|
||||
name="ccm-portalworkspace"
|
||||
prettyName="Portal Workspace"
|
||||
version="6.6.1"
|
||||
release="1"
|
||||
webapp="ROOT">
|
||||
<ccm:dependencies>
|
||||
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/>
|
||||
<ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/>
|
||||
<ccm:requires name="ccm-ldn-subsite" version="6.6.0" relation="ge"/>
|
||||
<!-- <ccm:requires name="ccm-forum" version="6.6.0" relation="ge"/> -->
|
||||
<ccm:requires name="ccm-ldn-navigation" version="6.6.0" relation="ge"/>
|
||||
<!-- TEST, workspace portlet relocated
|
||||
<ccm:requires name="ccm-ldn-rss" version="6.6.0" relation="ge"/>
|
||||
-->
|
||||
<ccm:requires name="ccm-ldn-util" version="6.6.0" relation="ge"/>
|
||||
</ccm:dependencies>
|
||||
<ccm:contacts>
|
||||
|
|
@ -15,15 +15,15 @@
|
|||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
model com.arsdigita.london.portal;
|
||||
model com.arsdigita.portalworkspace;
|
||||
|
||||
|
||||
|
||||
object type PageLayout {
|
||||
BigDecimal[1..1] id = workspace_page_layouts.layout_id INTEGER;
|
||||
String[1..1] title = workspace_page_layouts.title VARCHAR(200);
|
||||
String[0..1] description = workspace_page_layouts.description VARCHAR(4000);
|
||||
unique String[1..1] format = workspace_page_layouts.format VARCHAR(50);
|
||||
BigDecimal[1..1] id = pw_workspace_page_layouts.layout_id INTEGER;
|
||||
String[1..1] title = pw_workspace_page_layouts.title VARCHAR(200);
|
||||
String[0..1] description = pw_workspace_page_layouts.description VARCHAR(4000);
|
||||
unique String[1..1] format = pw_workspace_page_layouts.format VARCHAR(50);
|
||||
|
||||
object key(id);
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
model com.arsdigita.london.portal;
|
||||
model com.arsdigita.portalworkspace;
|
||||
|
||||
query MaxPortletInstances {
|
||||
Integer maxCount;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
model com.arsdigita.london.portal;
|
||||
model com.arsdigita.portalworkspace;
|
||||
|
||||
query MaxPortletInstances {
|
||||
Integer maxCount;
|
||||
|
|
@ -12,13 +12,13 @@
|
|||
// rights and limitations under the License.
|
||||
//
|
||||
|
||||
model com.arsdigita.london.portal;
|
||||
model com.arsdigita.portalworkspace;
|
||||
|
||||
query WorkspaceParticipantsWithInitial {
|
||||
BigDecimal participantID;
|
||||
do {
|
||||
select u.user_id as participant_id
|
||||
from workspaces w, group_member_map m, users u, person_names pn
|
||||
from pw_workspaces w, group_member_map m, users u, person_names pn
|
||||
where w.workspace_id = :workspaceID and
|
||||
w.party_id = m.group_id and
|
||||
m.member_id = u.user_id and
|
||||
|
|
@ -35,7 +35,7 @@ query WorkspaceParticipantInitials {
|
|||
select name_initial
|
||||
from ( select distinct upper(substr(pn.family_name, 1, 1))
|
||||
as name_initial
|
||||
from workspaces w, group_member_map m, users u, person_names pn
|
||||
from pw_workspaces w, group_member_map m, users u, person_names pn
|
||||
where w.workspace_id = :workspaceID and
|
||||
w.party_id = m.group_id and
|
||||
m.member_id = u.user_id and
|
||||
|
|
@ -50,7 +50,7 @@ query WorkspaceParticipantIDs {
|
|||
BigDecimal id;
|
||||
do {
|
||||
select m.member_id as participant_id
|
||||
from workspaces w, group_member_map m
|
||||
from pw_workspaces w, group_member_map m
|
||||
where w.workspace_id = :workspaceID and
|
||||
w.party_id = m.group_id
|
||||
} map {
|
||||
|
|
@ -12,30 +12,30 @@
|
|||
// rights and limitations under the License.
|
||||
//
|
||||
|
||||
model com.arsdigita.london.portal;
|
||||
model com.arsdigita.portalworkspace;
|
||||
|
||||
import com.arsdigita.kernel.Party;
|
||||
import com.arsdigita.kernel.User;
|
||||
import com.arsdigita.web.Application;
|
||||
|
||||
object type Workspace extends Application {
|
||||
Party[1..1] party = join workspaces.party_id to parties.party_id;
|
||||
component WorkspacePage[0..n] pages = join workspaces.workspace_id
|
||||
to workspace_pages.workspace_id;
|
||||
PageLayout[1..1] defaultLayout = join workspaces.default_layout_id
|
||||
to workspace_page_layouts.layout_id;
|
||||
WorkspaceTheme[0..1] theme = join workspaces.theme_id to workspace_themes.theme_id;
|
||||
User[0..1] owner = join workspaces.owner_id to users.user_id;
|
||||
Party[1..1] party = join pw_workspaces.party_id to parties.party_id;
|
||||
component WorkspacePage[0..n] pages = join pw_workspaces.workspace_id
|
||||
to pw_workspace_pages.workspace_id;
|
||||
PageLayout[1..1] defaultLayout = join pw_workspaces.default_layout_id
|
||||
to pw_workspace_page_layouts.layout_id;
|
||||
WorkspaceTheme[0..1] theme = join pw_workspaces.theme_id to pw_workspace_themes.theme_id;
|
||||
User[0..1] owner = join pw_workspaces.owner_id to users.user_id;
|
||||
|
||||
Workspace[0..n] relatedWorkspace =
|
||||
join workspaces.workspace_id
|
||||
to workspace_workspace_map.referencing_workspace_id,
|
||||
join workspace_workspace_map.referenced_workspace_id
|
||||
to workspaces.workspace_id;
|
||||
join pw_workspaces.workspace_id
|
||||
to pw_workspace_workspace_map.referencing_workspace_id,
|
||||
join pw_workspace_workspace_map.referenced_workspace_id
|
||||
to pw_workspaces.workspace_id;
|
||||
|
||||
// String description = applications.description VARCHAR(4000);
|
||||
|
||||
reference key (workspaces.workspace_id);
|
||||
reference key (pw_workspaces.workspace_id);
|
||||
|
||||
aggressive load (party.id);
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ query childWorkspacesForApplicationID {
|
|||
from
|
||||
acs_objects,
|
||||
applications,
|
||||
workspaces
|
||||
pw_workspaces
|
||||
where
|
||||
applications.parent_application_id = :applicationID
|
||||
-- joins
|
||||
|
|
@ -15,18 +15,18 @@
|
|||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
model com.arsdigita.london.portal;
|
||||
model com.arsdigita.portalworkspace;
|
||||
|
||||
import com.arsdigita.portal.Portal;
|
||||
|
||||
object type WorkspacePage extends Portal {
|
||||
Integer[1..1] sortKey = applications.sort_key INTEGER;
|
||||
PageLayout[1..1] layout = join workspace_pages.layout_id
|
||||
to workspace_page_layouts.layout_id;
|
||||
composite Workspace[1..1] workspace = join workspace_pages.workspace_id
|
||||
to workspaces.workspace_id;
|
||||
PageLayout[1..1] layout = join pw_workspace_pages.layout_id
|
||||
to pw_workspace_page_layouts.layout_id;
|
||||
composite Workspace[1..1] workspace = join pw_workspace_pages.workspace_id
|
||||
to pw_workspaces.workspace_id;
|
||||
|
||||
reference key (workspace_pages.page_id);
|
||||
reference key (pw_workspace_pages.page_id);
|
||||
|
||||
aggressive load (layout.id, layout.title, layout.description, layout.format);
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
|
||||
model com.arsdigita.portalworkspace;
|
||||
|
||||
import com.arsdigita.kernel.ACSObject;
|
||||
import com.arsdigita.web.Application;
|
||||
|
||||
// @author Jim Parsons (jparsons@arsdigita.com)
|
||||
|
||||
object type WorkspaceThemeApplication extends Application {
|
||||
reference key (pw_workspace_themeapplications.theme_app_id);
|
||||
}
|
||||
|
||||
object type WorkspaceTheme extends ACSObject {
|
||||
String[0..1] theme_name = pw_workspace_themes.theme_name VARCHAR(4000);
|
||||
String[0..1] theme_desc = pw_workspace_themes.theme_desc VARCHAR(4000);
|
||||
String[0..1] ctx_bar_color = pw_workspace_themes.ctx_bar_color VARCHAR(100);
|
||||
String[0..1] ctx_bar_text_color = pw_workspace_themes.ctx_bar_text_color VARCHAR(100);
|
||||
String[0..1] active_tab_color = pw_workspace_themes.active_tab_color VARCHAR(100);
|
||||
String[0..1] active_tab_text_color = pw_workspace_themes.active_tab_text_color VARCHAR(100);
|
||||
String[0..1] inactive_tab_color = pw_workspace_themes.inactive_tab_color VARCHAR(100);
|
||||
String[0..1] inactive_tab_text_color = pw_workspace_themes.inactive_tab_text_color VARCHAR(100);
|
||||
String[0..1] top_rule = pw_workspace_themes.top_rule VARCHAR(100);
|
||||
String[0..1] bottom_rule = pw_workspace_themes.bottom_rule VARCHAR(100);
|
||||
String[0..1] portlet_head = pw_workspace_themes.portlet_head VARCHAR(100);
|
||||
String[0..1] portlet_icon = pw_workspace_themes.portlet_icon VARCHAR(100);
|
||||
String[0..1] portlet_border_color = pw_workspace_themes.portlet_border_color VARCHAR(100);
|
||||
String[0..1] portlet_border_style = pw_workspace_themes.portlet_border_style VARCHAR(100);
|
||||
String[0..1] portlet_header_text_color = pw_workspace_themes.portlet_header_text_color VARCHAR(100);
|
||||
String[0..1] page_bg_color = pw_workspace_themes.page_bg_color VARCHAR(100);
|
||||
String[0..1] page_bg_image = pw_workspace_themes.page_bg_image VARCHAR(100);
|
||||
String[0..1] narrow_bg_color = pw_workspace_themes.narrow_bg_color VARCHAR(100);
|
||||
String[0..1] body_text_color = pw_workspace_themes.body_text_color VARCHAR(100);
|
||||
|
||||
reference key (pw_workspace_themes.theme_id);
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
// rights and limitations under the License.
|
||||
//
|
||||
|
||||
model com.arsdigita.london.portal.portlet;
|
||||
model com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
model com.arsdigita.london.portal.portlet;
|
||||
model com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import com.arsdigita.portal.Portlet;
|
||||
import com.arsdigita.categorization.Category;
|
||||
|
|
@ -14,7 +14,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
|
||||
|
||||
model com.arsdigita.london.portal.portlet;
|
||||
model com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
// rights and limitations under the License.
|
||||
//
|
||||
|
||||
model com.arsdigita.london.portal.portlet;
|
||||
model com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
// rights and limitations under the License.
|
||||
//
|
||||
|
||||
model com.arsdigita.london.portal.portlet;
|
||||
model com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
model com.arsdigita.london.portal.portlet;
|
||||
model com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ query MyWorkspaces {
|
|||
upper(a.title) as sort_key
|
||||
from
|
||||
group_member_trans_index gmti,
|
||||
workspaces w,
|
||||
pw_workspaces w,
|
||||
group_subgroup_map m,
|
||||
applications a
|
||||
where
|
||||
|
|
@ -34,7 +34,7 @@ query MyWorkspaces {
|
|||
a.primary_url,
|
||||
upper(a.title) as sort_key
|
||||
from
|
||||
workspaces w,
|
||||
pw_workspaces w,
|
||||
group_member_map m,
|
||||
applications a
|
||||
where
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
// rights and limitations under the License.
|
||||
//
|
||||
|
||||
model com.arsdigita.london.portal.portlet;
|
||||
model com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
// rights and limitations under the License.
|
||||
//
|
||||
|
||||
model com.arsdigita.london.portal.portlet;
|
||||
model com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
model com.arsdigita.london.portal.portlet;
|
||||
model com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
model com.arsdigita.london.portal.portlet;
|
||||
model com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
create index pw_workspaces_party_id_idx on pw_workspaces(party_id);
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
insert into workspace_page_layouts (layout_id, title, description, format)
|
||||
insert into pw_workspace_page_layouts (layout_id, title, description, format)
|
||||
values (nextval('acs_object_id_seq'), '1 Column', 'One column', '100%');
|
||||
|
||||
insert into workspace_page_layouts (layout_id, title, description, format)
|
||||
insert into pw_workspace_page_layouts (layout_id, title, description, format)
|
||||
values (nextval('acs_object_id_seq'), '2 Column', 'Two columns, equal size', '50%,50%');
|
||||
|
||||
insert into workspace_page_layouts (layout_id, title, description, format)
|
||||
insert into pw_workspace_page_layouts (layout_id, title, description, format)
|
||||
values (nextval('acs_object_id_seq'), '3 Column', 'Three columns, equal size', '30%,40%,30%');
|
||||
|
||||
insert into workspace_page_layouts (layout_id, title, description, format)
|
||||
insert into pw_workspace_page_layouts (layout_id, title, description, format)
|
||||
values (nextval('acs_object_id_seq'), '4 Column', 'Four columns, equal size', '25%,25%,25%,25%');
|
||||
|
||||
insert into workspace_page_layouts (layout_id, title, description, format)
|
||||
insert into pw_workspace_page_layouts (layout_id, title, description, format)
|
||||
values (nextval('acs_object_id_seq'), '5 Column', 'Five columns, equal size', '20%,20%,20%,20%,20%');
|
||||
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
insert into workspace_page_layouts (layout_id, title, description, format)
|
||||
insert into pw_workspace_page_layouts (layout_id, title, description, format)
|
||||
values (acs_object_id_seq.nextval, '1 Column', 'One column', '100%');
|
||||
|
||||
insert into workspace_page_layouts (layout_id, title, description, format)
|
||||
insert into pw_workspace_page_layouts (layout_id, title, description, format)
|
||||
values (acs_object_id_seq.nextval, '2 Column', 'Two columns, equal size', '50%,50%');
|
||||
|
||||
insert into workspace_page_layouts (layout_id, title, description, format)
|
||||
insert into pw_workspace_page_layouts (layout_id, title, description, format)
|
||||
values (acs_object_id_seq.nextval, '3 Column', 'Three columns, equal size', '30%,40%,30%');
|
||||
|
||||
insert into workspace_page_layouts (layout_id, title, description, format)
|
||||
insert into pw_workspace_page_layouts (layout_id, title, description, format)
|
||||
values (acs_object_id_seq.nextval, '4 Column', 'Four columns, equal size', '25%,25%,25%,25%');
|
||||
|
||||
insert into workspace_page_layouts (layout_id, title, description, format)
|
||||
insert into pw_workspace_page_layouts (layout_id, title, description, format)
|
||||
values (acs_object_id_seq.nextval, '5 Column', 'Five columns, equal size', '20%,20%,20%,20%,20%');
|
||||
|
|
@ -4,8 +4,8 @@
|
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://rhea.redhat.com/schemas/waf/xml-renderer-rules xml-renderer-rules.xsd">
|
||||
|
||||
<xrd:context name="com.arsdigita.london.portal.ui.PortalList">
|
||||
<xrd:adapter objectType="com.arsdigita.london.portal.WorkspacePage">
|
||||
<xrd:context name="com.arsdigita.portalworkspace.ui.PortalList">
|
||||
<xrd:adapter objectType="com.arsdigita.portalworkspace.WorkspacePage">
|
||||
<xrd:attributes rule="exclude">
|
||||
<xrd:property name="/object/id"/>
|
||||
<xrd:property name="/object/defaultDomainClass"/>
|
||||
|
|
@ -17,8 +17,8 @@
|
|||
</xrd:adapter>
|
||||
</xrd:context>
|
||||
|
||||
<xrd:context name="com.arsdigita.london.portal.ui.WorkspaceDetails">
|
||||
<xrd:adapter objectType="com.arsdigita.london.portal.Workspace">
|
||||
<xrd:context name="com.arsdigita.portalworkspace.ui.WorkspaceDetails">
|
||||
<xrd:adapter objectType="com.arsdigita.portalworkspace.Workspace">
|
||||
<xrd:attributes rule="exclude">
|
||||
<xrd:property name="/object/id"/>
|
||||
<xrd:property name="/object/defaultDomainClass"/>
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
</xrd:adapter>
|
||||
</xrd:context>
|
||||
|
||||
<xrd:context name="com.arsdigita.london.portal.ui.admin.ApplicationList">
|
||||
<xrd:context name="com.arsdigita.portalworkspace.ui.admin.ApplicationList">
|
||||
<xrd:adapter objectType="com.arsdigita.web.Application">
|
||||
<xrd:attributes rule="include">
|
||||
<xrd:property name="/object/primaryURL"/>
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
</xrd:adapter>
|
||||
</xrd:context>
|
||||
|
||||
<xrd:context name="com.arsdigita.london.portal.ui.admin.ApplicationDetails">
|
||||
<xrd:context name="com.arsdigita.portalworkspace.ui.admin.ApplicationDetails">
|
||||
<xrd:adapter objectType="com.arsdigita.web.Application">
|
||||
<xrd:attributes rule="exclude">
|
||||
<xrd:property name="/object/id"/>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<registry>
|
||||
<config class="com.arsdigita.portalworkspace.WorkspaceConfig"
|
||||
storage="ccm-portalworkspace/portal.properties"/>
|
||||
</registry>
|
||||
|
|
@ -6,19 +6,18 @@
|
|||
<table name="cms_items"/>
|
||||
<initializer class="com.arsdigita.cms.Initializer"/>
|
||||
<initializer class="com.arsdigita.london.util.Initializer"/>
|
||||
<initializer class="com.arsdigita.london.navigation.Initializer"/>
|
||||
<!--
|
||||
<initializer class="com.arsdigita.london.rss.Initializer"/>
|
||||
-->
|
||||
|
||||
<!-- <initializer class="com.arsdigita.london.navigation.Initializer"/> -->
|
||||
<!-- <initializer class="com.arsdigita.london.rss.Initializer"/> -->
|
||||
</requires>
|
||||
<provides>
|
||||
<!--
|
||||
<table name=""/>
|
||||
-->
|
||||
<initializer class="com.arsdigita.london.portal.Initializer"/>
|
||||
<initializer class="com.arsdigita.portalworkspace.Initializer"/>
|
||||
</provides>
|
||||
<scripts>
|
||||
<schema directory="ccm-ldn-portal"/>
|
||||
<data class="com.arsdigita.london.portal.Loader"/>
|
||||
<schema directory="ccm-portalworkspace"/>
|
||||
<data class="com.arsdigita.portalworkspace.Loader"/>
|
||||
</scripts>
|
||||
</load>
|
||||
|
|
@ -19,4 +19,7 @@
|
|||
<script sql="ccm-ldn-portal/upgrade/::database::-6.5.2-6.5.3.sql"/>
|
||||
<script class="com.arsdigita.london.portal.upgrade.CreateFlashPortlet"/>
|
||||
</version>
|
||||
<version from="6.6.0" to="6.6.1">
|
||||
<script sql="ccm-portalworkspace/upgrade/::database::-6.6.0-6.6.1.sql"/>
|
||||
</version>
|
||||
</upgrade>
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal;
|
||||
package com.arsdigita.portalworkspace;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -30,25 +30,21 @@ import com.arsdigita.kernel.ResourceType;
|
|||
import com.arsdigita.kernel.ResourceTypeConfig;
|
||||
import com.arsdigita.kernel.ui.ResourceConfigComponent;
|
||||
import com.arsdigita.kernel.ui.ResourceConfigFormSection;
|
||||
// unused import
|
||||
// import com.arsdigita.london.navigation.ApplicationNavigationModel;
|
||||
// import com.arsdigita.london.navigation.DefaultNavigationModel;
|
||||
import com.arsdigita.london.portal.portlet.ApplicationDirectoryPortlet;
|
||||
import com.arsdigita.london.portal.portlet.ContentDirectoryPortlet;
|
||||
import com.arsdigita.london.portal.portlet.FlashPortletInitializer;
|
||||
import com.arsdigita.london.portal.portlet.FreeformHTMLPortlet;
|
||||
import com.arsdigita.london.portal.portlet.LoginPortlet;
|
||||
// import com.arsdigita.london.navigation.portlet.NavigationDirectoryPortlet;
|
||||
import com.arsdigita.london.portal.portlet.RSSFeedPortlet;
|
||||
import com.arsdigita.london.portal.portlet.TimeOfDayPortlet;
|
||||
import com.arsdigita.london.portal.portlet.MyWorkspacesPortlet;
|
||||
import com.arsdigita.london.portal.portlet.WorkspaceNavigatorPortlet;
|
||||
import com.arsdigita.london.portal.portlet.WorkspaceSummaryPortlet;
|
||||
import com.arsdigita.london.portal.ui.admin.WorkspaceConfigFormSection;
|
||||
import com.arsdigita.london.portal.ui.portlet.ContentDirectoryPortletEditor;
|
||||
import com.arsdigita.london.portal.ui.portlet.FreeformHTMLPortletEditor;
|
||||
import com.arsdigita.london.portal.ui.portlet.RSSFeedPortletEditor;
|
||||
import com.arsdigita.london.portal.ui.portlet.RSSFeedPortletEditorForm;
|
||||
import com.arsdigita.portalworkspace.portlet.ApplicationDirectoryPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.ContentDirectoryPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.FlashPortletInitializer;
|
||||
import com.arsdigita.portalworkspace.portlet.FreeformHTMLPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.LoginPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.RSSFeedPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.TimeOfDayPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.MyWorkspacesPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.WorkspaceNavigatorPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.WorkspaceSummaryPortlet;
|
||||
import com.arsdigita.portalworkspace.ui.admin.WorkspaceConfigFormSection;
|
||||
import com.arsdigita.portalworkspace.ui.portlet.ContentDirectoryPortletEditor;
|
||||
import com.arsdigita.portalworkspace.ui.portlet.FreeformHTMLPortletEditor;
|
||||
import com.arsdigita.portalworkspace.ui.portlet.RSSFeedPortletEditor;
|
||||
import com.arsdigita.portalworkspace.ui.portlet.RSSFeedPortletEditorForm;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
import com.arsdigita.persistence.pdl.ManifestSource;
|
||||
import com.arsdigita.persistence.pdl.NameFilter;
|
||||
|
|
@ -58,11 +54,9 @@ import com.arsdigita.runtime.PDLInitializer;
|
|||
import com.arsdigita.runtime.RuntimeConfig;
|
||||
import com.arsdigita.xml.XML;
|
||||
|
||||
// import com.arsdigita.london.rss.portlet.WorkspaceDirectoryPortlet;
|
||||
|
||||
|
||||
/**
|
||||
* Initializes the Portal system
|
||||
* Initializes the Portal Workspace system
|
||||
*
|
||||
* @version $Id: Initializer.java 2070 2010-01-28 08:47:41Z pboy $
|
||||
*/
|
||||
|
|
@ -78,7 +72,7 @@ public class Initializer extends CompoundInitializer {
|
|||
final String url = RuntimeConfig.getConfig().getJDBCURL();
|
||||
final int database = DbHelper.getDatabaseFromURL(url);
|
||||
|
||||
add(new PDLInitializer(new ManifestSource("ccm-ldn-portal.pdl.mf",
|
||||
add(new PDLInitializer(new ManifestSource("ccm-portalworkspace.pdl.mf",
|
||||
new NameFilter(DbHelper.getDatabaseSuffix(database),
|
||||
"pdl"))));
|
||||
}
|
||||
|
|
@ -123,8 +117,9 @@ public class Initializer extends CompoundInitializer {
|
|||
|
||||
|
||||
e.getFactory().registerInstantiator(
|
||||
ApplicationDirectoryPortlet.BASE_DATA_OBJECT_TYPE,
|
||||
ApplicationDirectoryPortlet.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new ApplicationDirectoryPortlet(dataObject);
|
||||
}
|
||||
|
|
@ -149,6 +144,7 @@ public class Initializer extends CompoundInitializer {
|
|||
e.getFactory().registerInstantiator(
|
||||
LoginPortlet.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new LoginPortlet(dataObject);
|
||||
}
|
||||
|
|
@ -157,6 +153,7 @@ public class Initializer extends CompoundInitializer {
|
|||
e.getFactory().registerInstantiator(
|
||||
MyWorkspacesPortlet.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new MyWorkspacesPortlet(dataObject);
|
||||
}
|
||||
|
|
@ -165,6 +162,7 @@ public class Initializer extends CompoundInitializer {
|
|||
e.getFactory().registerInstantiator(
|
||||
RSSFeedPortlet.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new RSSFeedPortlet(dataObject);
|
||||
}
|
||||
|
|
@ -206,6 +204,7 @@ public class Initializer extends CompoundInitializer {
|
|||
});
|
||||
|
||||
new ResourceTypeConfig(Workspace.BASE_DATA_OBJECT_TYPE) {
|
||||
@Override
|
||||
public ResourceConfigFormSection getCreateFormSection(
|
||||
final ResourceType resType,
|
||||
final RequestLocal parentAppRL) {
|
||||
|
|
@ -214,6 +213,7 @@ public class Initializer extends CompoundInitializer {
|
|||
return config;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceConfigFormSection getModifyFormSection(
|
||||
final RequestLocal application) {
|
||||
final ResourceConfigFormSection config =
|
||||
|
|
@ -223,6 +223,7 @@ public class Initializer extends CompoundInitializer {
|
|||
};
|
||||
|
||||
new ResourceTypeConfig(ContentDirectoryPortlet.BASE_DATA_OBJECT_TYPE) {
|
||||
@Override
|
||||
public ResourceConfigFormSection getCreateFormSection(
|
||||
final ResourceType resType,
|
||||
final RequestLocal parentAppRL) {
|
||||
|
|
@ -232,6 +233,7 @@ public class Initializer extends CompoundInitializer {
|
|||
return config;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceConfigFormSection getModifyFormSection(
|
||||
final RequestLocal application) {
|
||||
final ContentDirectoryPortletEditor config =
|
||||
|
|
@ -241,6 +243,7 @@ public class Initializer extends CompoundInitializer {
|
|||
};
|
||||
|
||||
new ResourceTypeConfig(RSSFeedPortlet.BASE_DATA_OBJECT_TYPE) {
|
||||
@Override
|
||||
public ResourceConfigFormSection getCreateFormSection(
|
||||
final ResourceType resType,
|
||||
final RequestLocal parentAppRL) {
|
||||
|
|
@ -266,6 +269,7 @@ public class Initializer extends CompoundInitializer {
|
|||
return config;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceConfigComponent getModifyComponent(
|
||||
final RequestLocal application) {
|
||||
final RSSFeedPortletEditor config =
|
||||
|
|
@ -293,13 +297,13 @@ public class Initializer extends CompoundInitializer {
|
|||
}
|
||||
};
|
||||
|
||||
// NavigationDirectoryPortlet.registerInstantiator();
|
||||
// NavigationDirectoryPortlet.registerResourceTypeConfig();
|
||||
|
||||
FlashPortletInitializer.initialize();
|
||||
|
||||
// import from london.navigation required
|
||||
// causes horizontal dependency between portal and navigation
|
||||
// required by NavigationTreePortlet (formerly NavigationDirectroryPortlet)
|
||||
// now moved to ldn-navigation ??
|
||||
// ApplicationNavigationModel.register(Workspace.class.getName(),
|
||||
// new DefaultNavigationModel());
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal;
|
||||
package com.arsdigita.portalworkspace;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -24,13 +24,15 @@ import com.arsdigita.kernel.Kernel;
|
|||
import com.arsdigita.kernel.KernelExcursion;
|
||||
import com.arsdigita.kernel.ResourceType;
|
||||
import com.arsdigita.loader.PackageLoader;
|
||||
import com.arsdigita.london.portal.portlet.ApplicationDirectoryPortlet;
|
||||
import com.arsdigita.london.portal.portlet.ContentDirectoryPortlet;
|
||||
import com.arsdigita.london.portal.portlet.FreeformHTMLPortlet;
|
||||
import com.arsdigita.london.portal.portlet.LoginPortlet;
|
||||
// import com.arsdigita.london.navigation.portlet.NavigationDirectoryPortlet;
|
||||
import com.arsdigita.london.portal.portlet.RSSFeedPortlet;
|
||||
import com.arsdigita.london.portal.portlet.TimeOfDayPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.ApplicationDirectoryPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.ContentDirectoryPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.FreeformHTMLPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.LoginPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.MyWorkspacesPortlet ;
|
||||
import com.arsdigita.portalworkspace.portlet.RSSFeedPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.TimeOfDayPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.WorkspaceNavigatorPortlet;
|
||||
import com.arsdigita.portalworkspace.portlet.WorkspaceSummaryPortlet;
|
||||
import com.arsdigita.portal.PortletType;
|
||||
import com.arsdigita.runtime.ScriptContext;
|
||||
import com.arsdigita.util.Assert;
|
||||
|
|
@ -42,7 +44,8 @@ import com.arsdigita.web.ApplicationType;
|
|||
|
||||
/**
|
||||
* Executes nonrecurring at install time and loads (and configures ) a default
|
||||
* workspace instance (i.e. instance of ccm-ldn-portal) in a default configuration.
|
||||
* workspace instance (i.e. instance of ccm-portalworkspace) in a default
|
||||
* configuration.
|
||||
*
|
||||
* Configuration can be modified by configuration parameters before processing,
|
||||
* otherwise hardcoded default values take effect. A set of portlets, part of
|
||||
|
|
@ -59,15 +62,18 @@ public class Loader extends PackageLoader {
|
|||
private static final Logger s_log = Logger.getLogger(Loader.class);
|
||||
|
||||
private StringParameter m_url = new StringParameter(
|
||||
"com.arsdigita.london.portal.default_url", Parameter.REQUIRED,
|
||||
"com.arsdigita.portalworkspace.default_url", Parameter.REQUIRED,
|
||||
"/portal/");
|
||||
|
||||
private StringParameter m_title = new StringParameter(
|
||||
"com.arsdigita.london.portal.default_title", Parameter.REQUIRED,
|
||||
"com.arsdigita.portalworkspace.default_title", Parameter.REQUIRED,
|
||||
"Portal Homepage");
|
||||
|
||||
private BooleanParameter m_isPublic = new BooleanParameter(
|
||||
"com.arsdigita.london.portal.default_is_public",
|
||||
/** Actually a kind of misnomer. In the creation process it is used to
|
||||
* indicate whether a Containergroup should be created.
|
||||
*/
|
||||
private BooleanParameter m_isPublic = new BooleanParameter(
|
||||
"com.arsdigita.portalworkspace.default_is_public",
|
||||
Parameter.REQUIRED, Boolean.TRUE);
|
||||
|
||||
/**
|
||||
|
|
@ -99,9 +105,11 @@ public class Loader extends PackageLoader {
|
|||
loadContentDirectoryPortlet();
|
||||
loadFreeformHTMLPortlet();
|
||||
loadLoginPortlet();
|
||||
loadMyWorkspacesPortlet();
|
||||
loadRSSFeedPortlet();
|
||||
loadTimeOfDayPortlet();
|
||||
// NavigationDirectoryPortlet.loadPortletType();
|
||||
loadWorkspaceNavigatorPortlet();
|
||||
loadWorkspaceSummaryPortlet();
|
||||
}
|
||||
}.run();
|
||||
}
|
||||
|
|
@ -161,7 +169,8 @@ public class Loader extends PackageLoader {
|
|||
// The first string is a key parameter used to create a
|
||||
// legacy package type to back the new application type.
|
||||
ApplicationType type = ApplicationType.createApplicationType(
|
||||
"workspace", "Portal Workspace",
|
||||
"portalworkspace",
|
||||
"Portal Workspace",
|
||||
Workspace.BASE_DATA_OBJECT_TYPE);
|
||||
type.setDescription("Portal based collaborative workspaces");
|
||||
type.createGroup();
|
||||
|
|
@ -171,7 +180,7 @@ public class Loader extends PackageLoader {
|
|||
/**
|
||||
* Setup WorkspacePage type.
|
||||
*
|
||||
* Creates an entry for class (=type) c.ad.ldn.portal.WorkspacePage in
|
||||
* Creates an entry for class (=type) c.ad.portalworkspace.WorkspacePage in
|
||||
* table application_types, but not in apm_package_types.
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -191,7 +200,7 @@ public class Loader extends PackageLoader {
|
|||
PortletType type = PortletType.createPortletType(
|
||||
"Application Directory", PortletType.WIDE_PROFILE,
|
||||
ApplicationDirectoryPortlet.BASE_DATA_OBJECT_TYPE);
|
||||
type.setDescription("Displays a list of applications");
|
||||
type.setDescription("Displays a list of portal workspace applications");
|
||||
}
|
||||
|
||||
private void loadContentDirectoryPortlet() {
|
||||
|
|
@ -214,6 +223,12 @@ public class Loader extends PackageLoader {
|
|||
type.setDescription("Display a login form or user details");
|
||||
}
|
||||
|
||||
private void loadMyWorkspacesPortlet() {
|
||||
PortletType type = PortletType.createPortletType("My Workspaces",
|
||||
PortletType.WIDE_PROFILE, MyWorkspacesPortlet.BASE_DATA_OBJECT_TYPE);
|
||||
type.setDescription("MyWorkspaces: Display ????");
|
||||
}
|
||||
|
||||
private void loadRSSFeedPortlet() {
|
||||
PortletType type = PortletType.createPortletType("RSS Feed",
|
||||
PortletType.WIDE_PROFILE, RSSFeedPortlet.BASE_DATA_OBJECT_TYPE);
|
||||
|
|
@ -229,4 +244,19 @@ public class Loader extends PackageLoader {
|
|||
TimeOfDayPortlet.BASE_DATA_OBJECT_TYPE);
|
||||
type.setDescription("Displays the current date and time");
|
||||
}
|
||||
|
||||
private void loadWorkspaceNavigatorPortlet() {
|
||||
PortletType type = PortletType.createPortletType(
|
||||
"Workspace Navigator Portlet", PortletType.WIDE_PROFILE,
|
||||
WorkspaceNavigatorPortlet.BASE_DATA_OBJECT_TYPE);
|
||||
type.setDescription("Displays ??");
|
||||
}
|
||||
|
||||
private void loadWorkspaceSummaryPortlet() {
|
||||
PortletType type = PortletType.createPortletType(
|
||||
"Workspace Summary Portlet", PortletType.WIDE_PROFILE,
|
||||
WorkspaceSummaryPortlet.BASE_DATA_OBJECT_TYPE);
|
||||
type.setDescription("Displays ???");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
com.arsdigita.portalworkspace.default_url.title=Portal URL
|
||||
com.arsdigita.portalworkspace.default_url.purpose=The URL on which to mount the portal workspace
|
||||
com.arsdigita.portalworkspace.default_url.example=/portal/
|
||||
com.arsdigita.portalworkspace.default_url.format=[url]
|
||||
|
||||
com.arsdigita.portalworkspace.default_title.title=Portal Worksapce Title
|
||||
com.arsdigita.portalworkspace.default_title.purpose=The title of the portal workspace
|
||||
com.arsdigita.portalworkspace.default_title.example=Portal Homepage
|
||||
com.arsdigita.portalworkspace.default_title.format=[string]
|
||||
|
||||
com.arsdigita.portalworkspace.default_is_public.title=Is the portal workspace public?
|
||||
com.arsdigita.portalworkspace.default_is_public.purpose=Indicate whether or not the Portal Workspace is available to the public
|
||||
com.arsdigita.portalworkspace.default_is_public.example=true
|
||||
com.arsdigita.portalworkspace.default_is_public.format=true|false
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal;
|
||||
package com.arsdigita.portalworkspace;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.SQLException;
|
||||
|
|
@ -49,7 +49,8 @@ public class PageLayout extends DomainObject {
|
|||
|
||||
public static final String FORMAT_FOUR_COLUMNS = "25%,25%,25%,25%";
|
||||
|
||||
public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.london.portal.PageLayout";
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.portalworkspace.PageLayout";
|
||||
|
||||
public PageLayout() {
|
||||
this(BASE_DATA_OBJECT_TYPE);
|
||||
|
|
@ -0,0 +1,202 @@
|
|||
/*
|
||||
* Copyright (C) 2001 ArsDigita Corporation. All Rights Reserved.
|
||||
*
|
||||
* The contents of this file are subject to the ArsDigita Public
|
||||
* License (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.arsdigita.com/ADPL.txt
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.portalworkspace;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.arsdigita.bebop.PageState;
|
||||
// import com.arsdigita.bebop.ParameterSingleSelectionModel;
|
||||
import com.arsdigita.bebop.SimpleContainer;
|
||||
// import com.arsdigita.bebop.SingleSelectionModel;
|
||||
// import com.arsdigita.bebop.parameters.IntegerParameter;
|
||||
// import com.arsdigita.bebop.portal.Portal;
|
||||
import com.arsdigita.bebop.portal.PortalModel;
|
||||
import com.arsdigita.bebop.portal.PortalModelBuilder;
|
||||
import com.arsdigita.bebop.portal.PortletRenderer;
|
||||
import com.arsdigita.portalworkspace.ui.PortalConstants;
|
||||
import com.arsdigita.portalworkspace.ui.PortalSelectionModel;
|
||||
import com.arsdigita.portalworkspace.ui.PortletSelectionModel;
|
||||
// import com.arsdigita.portalworkspace.ui.PortletTypeSelectionModel;
|
||||
import com.arsdigita.portalworkspace.ui.WorkspaceSelectionModel;
|
||||
import com.arsdigita.persistence.DataQuery;
|
||||
import com.arsdigita.persistence.SessionManager;
|
||||
// import com.arsdigita.persistence.metadata.ObjectType;
|
||||
// import com.arsdigita.portal.Portlet;
|
||||
import com.arsdigita.portal.PortletType;
|
||||
import com.arsdigita.portal.PortletTypeCollection;
|
||||
import com.arsdigita.xml.Element;
|
||||
|
||||
|
||||
/**
|
||||
* Dynamically render the portlets for the current portal. If any
|
||||
* portlets are stateful, retrieve a renderer from cache so that the page can
|
||||
* manage the state of the portlet.
|
||||
*
|
||||
* ONLY VALID FOR BROWSE MODE, use com.arsdigita.portal.ui.PersistentPortal
|
||||
* for edit mode!
|
||||
*
|
||||
* @author cgyg9330 <chris.gilbert@westsussex.gov.uk>
|
||||
* @version $Id: StatefulPersistentPortal.java 1271 2006-07-18 13:36:43Z cgyg9330 $
|
||||
*/
|
||||
public class StatefulPersistentPortal extends SimpleContainer {
|
||||
|
||||
private static final Logger s_log =
|
||||
Logger.getLogger(StatefulPersistentPortal.class);
|
||||
|
||||
private WorkspaceSelectionModel m_workspace;
|
||||
private PortletSelectionModel m_portlet;
|
||||
private PortalModelBuilder m_portalModelBuilder;
|
||||
private PortalSelectionModel m_portal;
|
||||
|
||||
/** maps portlet type to list of empty renderers */
|
||||
private static Map m_stateful;
|
||||
|
||||
|
||||
|
||||
public StatefulPersistentPortal(PortalSelectionModel portal) {
|
||||
this(portal, "portal");
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor is invoked when the page component hierarchy is recreated.
|
||||
* This occurs
|
||||
* a) when the first person goes to the homepage after a server restart
|
||||
* b) when someone adds a stateful portlet to one of the homepage portals,
|
||||
* which increases the maximum number of that portlet type that appears
|
||||
* on any portal.
|
||||
*
|
||||
* @param portal the portalSelectionModel used by the Dynamic PortalModelBuilder
|
||||
* @param name
|
||||
*/
|
||||
public StatefulPersistentPortal(
|
||||
PortalSelectionModel portal,
|
||||
String name) {
|
||||
s_log.debug("IN constructor" + name );
|
||||
m_portal = portal;
|
||||
setTag("portal:portal");
|
||||
setNamespace(PortalConstants.PORTAL_XML_NS);
|
||||
|
||||
// retrieve empty renderers for any stateful portlets and add them
|
||||
// to the component hierarchy
|
||||
PortletTypeCollection types = PortletType.retrieveAllPortletTypes();
|
||||
m_stateful = new HashMap();
|
||||
|
||||
while (types.next()) {
|
||||
|
||||
PortletType type = types.getPortletType();
|
||||
s_log.debug("checking portlet type " + type.getDescription());
|
||||
String portletObjectType = type.getResourceObjectType();
|
||||
StatefulPortletRendererFactory factory = StatefulPortlet
|
||||
.getRendererFactory(
|
||||
portletObjectType);
|
||||
if (null != factory ) {
|
||||
DataQuery findMaxInstances =
|
||||
SessionManager.getSession().retrieveQuery(
|
||||
"com.arsdigita.portalserver.MaxPortletInstances");
|
||||
findMaxInstances.setParameter("portletType", type.getID());
|
||||
|
||||
int requiredRenderers = 0;
|
||||
while (findMaxInstances.next()) {
|
||||
requiredRenderers = ((Integer)findMaxInstances
|
||||
.get("maxCount")).intValue();
|
||||
}
|
||||
s_log.debug("stateful portlet - I am going to instantiate " +
|
||||
requiredRenderers + " renderers");
|
||||
List renderers = new ArrayList();
|
||||
for (int i = 0; i < requiredRenderers; i++) {
|
||||
StatefulPortletRenderer renderer = factory.getRenderer();
|
||||
renderers.add(renderer);
|
||||
|
||||
// and add it to the page
|
||||
add(renderer);
|
||||
s_log.debug("renderer added to page");
|
||||
}
|
||||
m_stateful.put(type.getResourceObjectType(), renderers);
|
||||
|
||||
}
|
||||
}
|
||||
m_portalModelBuilder =
|
||||
new StatefulPersistentPortalModelBuilder(portal, m_stateful);
|
||||
|
||||
}
|
||||
|
||||
// copied almost directly from PersistentPortal
|
||||
/**
|
||||
*
|
||||
* @param state
|
||||
* @param parent
|
||||
*/
|
||||
@Override
|
||||
public void generateXML(PageState state,
|
||||
Element parent) {
|
||||
Element content = generateParent(parent);
|
||||
|
||||
WorkspacePage page = m_portal.getSelectedPortal(state);
|
||||
content.addAttribute("layout", page.getLayout().getFormat());
|
||||
content.addAttribute("title", page.getTitle());
|
||||
content.addAttribute("description", page.getDescription());
|
||||
|
||||
PortalModel pm = m_portalModelBuilder.buildModel(state);
|
||||
Iterator portlets = pm.getPortletRenderers();
|
||||
|
||||
while (portlets.hasNext()) {
|
||||
Object entry = portlets.next();
|
||||
if (entry instanceof Object[]) {
|
||||
PortletRenderer renderer = (PortletRenderer)((Object[])entry)[0];
|
||||
BigDecimal portlet = (BigDecimal)((Object[])entry)[1];
|
||||
|
||||
// We want the root element created by the portlet
|
||||
// but the crap generateXML signature doesn't let
|
||||
// us get at it :-( And the bebop portlet isn't
|
||||
// any more helpful either :-(
|
||||
Element hack = new Element("hack");
|
||||
|
||||
renderer.generateXML(state, hack);
|
||||
|
||||
Iterator elements = hack.getChildren().iterator();
|
||||
while (elements.hasNext()) {
|
||||
Element child = (Element)elements.next();
|
||||
content.addContent(child);
|
||||
}
|
||||
} else {
|
||||
PortletRenderer renderer = (PortletRenderer)entry;
|
||||
renderer.generateXML(state, content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* return the number of renderers for the given portlet type currently registered on the page
|
||||
* @param portletType
|
||||
* @return
|
||||
*/
|
||||
public static int getCurrentPortletRendererInstances (String portletType) {
|
||||
int count = 0;
|
||||
List renderers = (List)m_stateful.get(portletType);
|
||||
if (renderers != null) {
|
||||
count = renderers.size();
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal;
|
||||
package com.arsdigita.portalworkspace;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
|
@ -24,40 +24,49 @@ import java.util.Map;
|
|||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.arsdigita.bebop.Component;
|
||||
// import com.arsdigita.bebop.Component;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.portal.PortalModel;
|
||||
import com.arsdigita.bebop.portal.PortalModelBuilder;
|
||||
import com.arsdigita.bebop.portal.PortletRenderer;
|
||||
import com.arsdigita.london.portal.ui.PortalSelectionModel;
|
||||
import com.arsdigita.london.portal.ui.SimplePortlet;
|
||||
import com.arsdigita.portalworkspace.ui.PortalSelectionModel;
|
||||
// import com.arsdigita.portalworkspace.ui.SimplePortlet;
|
||||
import com.arsdigita.portal.Portal;
|
||||
import com.arsdigita.portal.PortletCollection;
|
||||
import com.arsdigita.util.LockableImpl;
|
||||
|
||||
/**
|
||||
* Portal Model Builder that should only be applied to portal in browse mode,
|
||||
* as it does not allow for editing.
|
||||
* Portal in edit mode should have a
|
||||
* com.arsdigita.london.portal.ui.PersistentPortalModelBuilder.
|
||||
*
|
||||
* For stateless portlets, this builder creates a renderer with a reference to
|
||||
* its portlet data object. For stateful portlets the builder retrieves one
|
||||
* of the empty renderers registered to the page and puts the portlet data
|
||||
* object in a requestlocal.
|
||||
*
|
||||
* @author cgyg9330
|
||||
*
|
||||
* portal model builder that should only be applied to portal in browse mode, as it does not allow for editing.
|
||||
* portal in edit mode should have a com.arsdigita.london.portal.ui.PersistentPortalModelBuilder.
|
||||
*
|
||||
* For stateless portlets, this builder creates a renderer with a reference to its portlet data object. For stateful portlets
|
||||
* the builder retrieves one of the empty renderers registered to the page and puts the portlet data object in
|
||||
* a requestlocal.
|
||||
*/
|
||||
public class StatefulPersistentPortalModelBuilder
|
||||
extends LockableImpl
|
||||
implements PortalModelBuilder {
|
||||
|
||||
private Logger s_log = Logger.getLogger(StatefulPersistentPortalModelBuilder.class);
|
||||
/** Logging instace for debugging purpose. */
|
||||
private Logger s_log =
|
||||
Logger.getLogger(StatefulPersistentPortalModelBuilder.class);
|
||||
|
||||
/**
|
||||
* hashmap that maps portlet types to a list of empty renderers that have been registered on the page
|
||||
*/
|
||||
/** Hashmap that maps portlet types to a list of empty renderers that
|
||||
have been registered on the page */
|
||||
private Map statefulCollections;
|
||||
private PortalSelectionModel portalModel;
|
||||
|
||||
public StatefulPersistentPortalModelBuilder(
|
||||
/**
|
||||
* Constructor
|
||||
* @param portal
|
||||
* @param stateful
|
||||
*/
|
||||
public StatefulPersistentPortalModelBuilder(
|
||||
PortalSelectionModel portal,
|
||||
Map stateful) {
|
||||
this.portalModel = portal;
|
||||
|
|
@ -66,16 +75,17 @@ public class StatefulPersistentPortalModelBuilder
|
|||
}
|
||||
|
||||
public PortalModel buildModel(PageState state) {
|
||||
// aim of this method is to get hold of a list of renderers for this particular portal
|
||||
// and use them to make a PortalModel
|
||||
// aim of this method is to get hold of a list of renderers for
|
||||
// this particular portal and use them to make a PortalModel
|
||||
s_log.debug("START - buildModel");
|
||||
List portletRenderers = new ArrayList();
|
||||
|
||||
HashMap statefulIterators = new HashMap();
|
||||
|
||||
|
||||
// get iterators for all the renderer lists (this means that each instance of the portlet has it's own renderer)
|
||||
// getting iterators in the buildmodel method means that each time model is built, we start at the beginning of the list
|
||||
// get iterators for all the renderer lists (this means that each
|
||||
// instance of the portlet has it's own renderer)
|
||||
// getting iterators in the buildmodel method means that each time
|
||||
// model is built, we start at the beginning of the list
|
||||
Iterator it = statefulCollections.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry entry = (Map.Entry)it.next();
|
||||
|
|
@ -87,10 +97,13 @@ public class StatefulPersistentPortalModelBuilder
|
|||
PortletCollection portlets = portal.getPortlets();
|
||||
while (portlets.next()) {
|
||||
com.arsdigita.portal.Portlet portlet = portlets.getPortlet();
|
||||
s_log.debug("portlet " + portlet.getPortletType().getDescription() + " " + portlet.getTitle());
|
||||
s_log.debug("portlet " + portlet.getPortletType().getDescription() +
|
||||
" " + portlet.getTitle());
|
||||
if (portlet instanceof StatefulPortlet) {
|
||||
StatefulPortletRenderer statefulRenderer = (StatefulPortletRenderer)((Iterator) statefulIterators.get(
|
||||
portlet.getPortletType().getResourceObjectType())).next();
|
||||
StatefulPortletRenderer statefulRenderer =
|
||||
(StatefulPortletRenderer)((Iterator) statefulIterators
|
||||
.get(portlet.getPortletType()
|
||||
.getResourceObjectType())).next();
|
||||
|
||||
statefulRenderer.setPortlet(portlet, state);
|
||||
portletRenderers.add(statefulRenderer);
|
||||
|
|
@ -14,31 +14,31 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal;
|
||||
package com.arsdigita.portalworkspace;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.portal.AbstractPortletRenderer;
|
||||
import com.arsdigita.london.portal.ui.PortalConstants;
|
||||
import com.arsdigita.portalworkspace.ui.PortalConstants;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
import com.arsdigita.portal.Portlet;
|
||||
import com.arsdigita.xml.Element;
|
||||
|
||||
/**
|
||||
* @author cgyg9330 <chris.gilbert@westsussex.gov.uk>
|
||||
* @version $Id: StatefulPortlet.java 1271 2006-07-18 13:36:43Z cgyg9330 $
|
||||
* In order to register stateful components with the page, stateful portlets
|
||||
* must have the ability to supply renderers that are not tied to any particular
|
||||
* portlet data object.
|
||||
*
|
||||
* In order to register stateful components with the page, stateful portlets must have the ability
|
||||
* to supply renderers that are not tied to any particular portlet data object.
|
||||
* This abstract class provides a means of registering a
|
||||
* StatefulPortletRendererFactory that is used when the page is being built,
|
||||
* and provides a final implementation of doGetPortletRenderer that is used
|
||||
* by a portal page in edit mode.
|
||||
*
|
||||
* This abstract class provides a means of registering a StatefulPortletRendererFactory that is used
|
||||
* when the page is being built, and provides a final implementation of doGetPortletRenderer that
|
||||
* is used by a portal page in edit mode.
|
||||
*
|
||||
* The framework allows the empty renderers that are registered to a page to be populated via
|
||||
* RequestLocals with actual Portlet data objects ready for rendering
|
||||
* The framework allows the empty renderers that are registered to a page to be
|
||||
* populated via RequestLocals with actual Portlet data objects ready for
|
||||
* rendering
|
||||
*
|
||||
* To create a stateful portlet:-
|
||||
*
|
||||
|
|
@ -48,7 +48,8 @@ import com.arsdigita.xml.Element;
|
|||
*
|
||||
* <pre>
|
||||
*
|
||||
* public class StatefulExamplePortletRendererFactory implements StatefulPortletRendererFactory {
|
||||
* public class StatefulExamplePortletRendererFactory
|
||||
* implements StatefulPortletRendererFactory {
|
||||
*
|
||||
* public StatefulPortletRenderer getRenderer() {
|
||||
* return new StatefulExamplePortletRenderer();
|
||||
|
|
@ -63,12 +64,13 @@ import com.arsdigita.xml.Element;
|
|||
* public void init(DomainInitEvent e) {
|
||||
* super.init(e);
|
||||
*
|
||||
* StatefulPortlet.registerRendererFactory(StatefulExamplePortlet.BASE_DATA_OBJECT_TYPE, new StatefulExamplePortletRendererFactory());
|
||||
* StatefulPortlet.registerRendererFactory(
|
||||
* StatefulExamplePortlet.BASE_DATA_OBJECT_TYPE,
|
||||
* new StatefulExamplePortletRendererFactory());
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* ensure that your portlet class extends StatefulPortlet, but apart from that treat is as any other domain object
|
||||
* ensure that your portlet class extends StatefulPortlet, but apart from that
|
||||
* treat is as any other domain object
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
|
|
@ -110,7 +112,8 @@ import com.arsdigita.xml.Element;
|
|||
* label1.addPrintListener (new PrintListener() {
|
||||
* public void prepare(PrintEvent event) {
|
||||
* PageState state = event.getState();
|
||||
* StatefulExamplePortlet thisPortlet = (StatefulExamplePortlet)portlet.get(state);
|
||||
* StatefulExamplePortlet thisPortlet =
|
||||
* (StatefulExamplePortlet)portlet.get(state);
|
||||
* Label label = event.getTarget();
|
||||
* label.setLabel(thisPortlet.getLabel1());
|
||||
* }
|
||||
|
|
@ -122,7 +125,8 @@ import com.arsdigita.xml.Element;
|
|||
* label2.addPrintListener (new PrintListener() {
|
||||
* public void prepare(PrintEvent event) {
|
||||
* PageState state = event.getState();
|
||||
* StatefulExamplePortlet thisPortlet = (StatefulExamplePortlet)portlet.get(state);
|
||||
* StatefulExamplePortlet thisPortlet =
|
||||
* (StatefulExamplePortlet)portlet.get(state);
|
||||
* Label label = event.getTarget();
|
||||
* label.setLabel(thisPortlet.getLabel2());
|
||||
* }
|
||||
|
|
@ -157,9 +161,10 @@ import com.arsdigita.xml.Element;
|
|||
*
|
||||
* }
|
||||
*</pre>
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @author cgyg9330 <chris.gilbert@westsussex.gov.uk>
|
||||
* @version $Id: StatefulPortlet.java 1271 2006-07-18 13:36:43Z cgyg9330 $
|
||||
*/
|
||||
public abstract class StatefulPortlet extends Portlet {
|
||||
|
||||
|
|
@ -169,11 +174,14 @@ public abstract class StatefulPortlet extends Portlet {
|
|||
super(dataObject);
|
||||
}
|
||||
|
||||
public static void registerRendererFactory(String portletType, StatefulPortletRendererFactory factory) {
|
||||
public static void registerRendererFactory(
|
||||
String portletType,
|
||||
StatefulPortletRendererFactory factory) {
|
||||
rendererFactories.put(portletType, factory);
|
||||
}
|
||||
|
||||
public static StatefulPortletRendererFactory getRendererFactory(String portletType) {
|
||||
public static StatefulPortletRendererFactory getRendererFactory(
|
||||
String portletType) {
|
||||
return (StatefulPortletRendererFactory)rendererFactories.get(portletType);
|
||||
}
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal;
|
||||
package com.arsdigita.portalworkspace;
|
||||
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
|
@ -29,11 +29,13 @@ import com.arsdigita.xml.Element;
|
|||
* @author chris gilbert
|
||||
*
|
||||
* Renderer that stores reference to portlet data object in a request local.
|
||||
* When the page is built, enough StatefulPortletRenderers are added to the page as might
|
||||
* be needed by any one portal. Hence all portals share the same stateful portlets and so
|
||||
* portlet data object cannot be stored as an instane variable.
|
||||
* When the page is built, enough StatefulPortletRenderers are added to the
|
||||
* page as might be needed by any one portal. Hence all portals share the same
|
||||
* stateful portlets and so portlet data object cannot be stored as an instane
|
||||
* variable.
|
||||
*
|
||||
* StatefulPortletModelBuilder sets value of requestlocal when the portlet model is built.
|
||||
* StatefulPortletModelBuilder sets value of requestlocal when the portlet
|
||||
* model is built.
|
||||
*/
|
||||
public abstract class StatefulPortletRenderer extends AbstractPortletRenderer {
|
||||
|
||||
|
|
@ -54,11 +56,12 @@ public abstract class StatefulPortletRenderer extends AbstractPortletRenderer {
|
|||
}
|
||||
|
||||
/**
|
||||
* implementation of abstract method that does nothing. Any components that have been added to the container
|
||||
* will be rendered by AbstractPortletRenderer within the bebop:portlet element
|
||||
* Implementation of abstract method that does nothing. Any components
|
||||
* that have been added to the container will be rendered by
|
||||
* AbstractPortletRenderer within the bebop:portlet element
|
||||
*
|
||||
* if you want to include other information within bebop:portlet, override this method
|
||||
* otherwise leave it
|
||||
* If you want to include other information within bebop:portlet, override
|
||||
* this method otherwise leave it.
|
||||
*/
|
||||
protected void generateBodyXML(
|
||||
PageState pageState,
|
||||
|
|
@ -4,17 +4,16 @@
|
|||
* To change the template for this generated file go to
|
||||
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||
*/
|
||||
package com.arsdigita.london.portal;
|
||||
package com.arsdigita.portalworkspace;
|
||||
|
||||
/**
|
||||
* @author cgyg9330
|
||||
*Implementers of Stateful Portlets must implement a factory to retrieve the
|
||||
* correct renderer.
|
||||
*
|
||||
*Implementers of Stateful Portlets must implement a factory to retrieve the correct renderer.
|
||||
* @author cgyg9330
|
||||
*/
|
||||
public interface StatefulPortletRendererFactory {
|
||||
|
||||
|
||||
|
||||
public StatefulPortletRenderer getRenderer();
|
||||
|
||||
public StatefulPortletRenderer getRenderer();
|
||||
|
||||
}
|
||||
|
|
@ -12,9 +12,7 @@
|
|||
* rights and limitations under the License.
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.london.portal;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
package com.arsdigita.portalworkspace;
|
||||
|
||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||
import com.arsdigita.domain.DomainObjectFactory;
|
||||
|
|
@ -32,8 +30,8 @@ import com.arsdigita.kernel.permissions.PermissionDescriptor;
|
|||
import com.arsdigita.kernel.permissions.PermissionManager;
|
||||
import com.arsdigita.kernel.permissions.PermissionService;
|
||||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||
import com.arsdigita.london.portal.ui.PersonalPortalPage;
|
||||
import com.arsdigita.london.portal.ui.WorkspaceTheme;
|
||||
import com.arsdigita.portalworkspace.ui.PersonalPortalPage;
|
||||
import com.arsdigita.portalworkspace.ui.WorkspaceTheme;
|
||||
import com.arsdigita.persistence.DataAssociation;
|
||||
import com.arsdigita.persistence.DataAssociationCursor;
|
||||
import com.arsdigita.persistence.DataCollection;
|
||||
|
|
@ -52,6 +50,9 @@ import com.arsdigita.web.Web;
|
|||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Workspace domain class.
|
||||
* A workspace represents an area containing 0...n portals each arranged
|
||||
|
|
@ -69,7 +70,7 @@ public class Workspace extends Application {
|
|||
return s_config;
|
||||
}
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.london.portal.Workspace";
|
||||
"com.arsdigita.portalworkspace.Workspace";
|
||||
public static final String PARTY = "party";
|
||||
public static final String PARTY_ID = PARTY + "." + ACSObject.ID;
|
||||
public static final String DEFAULT_LAYOUT = "defaultLayout";
|
||||
|
|
@ -99,8 +100,9 @@ public class Workspace extends Application {
|
|||
}
|
||||
|
||||
/*
|
||||
* public String getContextPath() { return "ccm-ldn-portal"; }
|
||||
* public String getContextPath() { return "ccm-portalworkspace"; }
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @return ServletPath (constant) probably should be synchron with web.xml
|
||||
|
|
@ -109,7 +111,7 @@ public class Workspace extends Application {
|
|||
@Override
|
||||
public String getServletPath() {
|
||||
// return "/files";
|
||||
return "/ccm-ldn-portal/files";
|
||||
return "/ccm-portalworkspace/files";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -466,9 +468,9 @@ public class Workspace extends Application {
|
|||
SessionManager.getSession().retrieve(
|
||||
"com.arsdigita.kernel.User");
|
||||
// .retrieve("com.arsdigita.kernel.Party");
|
||||
Filter f =
|
||||
dc.addNotInSubqueryFilter("id",
|
||||
"com.arsdigita.london.portal.WorkspaceParticipantIDs");
|
||||
Filter f = dc.addNotInSubqueryFilter(
|
||||
"id",
|
||||
"com.arsdigita.london.portal.WorkspaceParticipantIDs");
|
||||
f.set("workspaceID", getID());
|
||||
return new PartyCollection(dc);
|
||||
}
|
||||
|
|
@ -521,8 +523,9 @@ public class Workspace extends Application {
|
|||
SessionManager.getSession().retrieve(
|
||||
"com.arsdigita.kernel.User");
|
||||
Filter f =
|
||||
dc.addInSubqueryFilter("id",
|
||||
"com.arsdigita.london.portal.WorkspaceParticipantsWithInitial");
|
||||
dc.addInSubqueryFilter(
|
||||
"id",
|
||||
"com.arsdigita.portalworkspace.WorkspaceParticipantsWithInitial");
|
||||
f.set("workspaceID", getID());
|
||||
f.set("nameInitial", initial);
|
||||
|
||||
|
|
@ -750,7 +753,8 @@ public class Workspace extends Application {
|
|||
personalWorkspaces.addEqualsFilter("owner", owner.getID());
|
||||
|
||||
if (personalWorkspaces.next()) {
|
||||
Workspace workspace = (Workspace) Application.retrieveApplication(personalWorkspaces.
|
||||
Workspace workspace = (Workspace) Application
|
||||
.retrieveApplication(personalWorkspaces.
|
||||
getDataObject());
|
||||
if (personalWorkspaces.next()) {
|
||||
s_log.error("more than one personal workspaces for this user!!");
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal;
|
||||
package com.arsdigita.portalworkspace;
|
||||
|
||||
import com.arsdigita.domain.DomainCollection;
|
||||
import com.arsdigita.persistence.DataCollection;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal;
|
||||
package com.arsdigita.portalworkspace;
|
||||
|
||||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||
import com.arsdigita.runtime.AbstractConfig;
|
||||
|
|
@ -61,52 +61,52 @@ public class WorkspaceConfig extends AbstractConfig {
|
|||
/** File with rules for configuring information in generated XML */
|
||||
private final Parameter m_adapters =
|
||||
new ResourceParameter(
|
||||
"com.arsdigita.london.portal.traversal_adapters",
|
||||
"com.arsdigita.portalworkspace.traversal_adapters",
|
||||
Parameter.REQUIRED,
|
||||
"/WEB-INF/resources/portal-adapters.xml");
|
||||
"/WEB-INF/resources/portalworkspace-adapters.xml");
|
||||
|
||||
/** Default column layout for workspace portals */
|
||||
private final Parameter m_defaultLayout =
|
||||
new StringParameter(
|
||||
"com.arsdigita.london.portal.default_layout",
|
||||
"com.arsdigita.portalworkspace.default_layout",
|
||||
Parameter.REQUIRED, PageLayout.FORMAT_THREE_COLUMNS);
|
||||
|
||||
/** Whether non-admin users should have their own custom workspaces */
|
||||
private final Parameter m_createUserWorkspaces =
|
||||
new BooleanParameter(
|
||||
"com.arsdigita.portal.create_user_workspaces",
|
||||
"com.arsdigita.portalworkspace.create_user_workspaces",
|
||||
Parameter.REQUIRED, Boolean.TRUE);
|
||||
|
||||
/** Types not to be included in the drop down list of portlets to add to a page*/
|
||||
private final Parameter m_excludedPortletTypes =
|
||||
new StringArrayParameter(
|
||||
"com.arsdigita.london.portal.excluded_portlet_types",
|
||||
"com.arsdigita.portalworkspace.excluded_portlet_types",
|
||||
Parameter.OPTIONAL, new String[0]);
|
||||
|
||||
/** Types only available to administrator of homepage, or subsite frontpage*/
|
||||
private final Parameter m_adminPortletTypes =
|
||||
new StringArrayParameter(
|
||||
"com.arsdigita.london.portal.admin_only_portlet_types",
|
||||
"com.arsdigita.portalworkspace.admin_only_portlet_types",
|
||||
Parameter.OPTIONAL, new String[0]);
|
||||
|
||||
/** Whether to use editor specified by waf.bebop.dhtml_editor for editing
|
||||
freeform html portlet*/
|
||||
private final Parameter m_htmlPortletWysiwygEditor =
|
||||
new BooleanParameter(
|
||||
"com.arsdigita.london.portal.portlet.freeform_html_editor",
|
||||
"com.arsdigita.portalworkspace.portlet.freeform_html_editor",
|
||||
Parameter.REQUIRED, Boolean.FALSE);
|
||||
|
||||
/** Which privilege ("read" or "edit") is granted to the workspace party. */
|
||||
private final Parameter m_workspacePartyPrivilege =
|
||||
new StringParameter(
|
||||
"com.arsdigita.london.portal.workspacePartyPrivilege",
|
||||
"com.arsdigita.portalworkspace.workspacePartyPrivilege",
|
||||
Parameter.OPTIONAL, "read");
|
||||
|
||||
/** Whether READ permissions will be checked when viewing workspaces.
|
||||
By default we don't, which is odd. */
|
||||
private final Parameter m_checkWorkspaceReadPermissions =
|
||||
new BooleanParameter(
|
||||
"com.arsdigita.london.portal.checkWorkspaceReadPermissions",
|
||||
"com.arsdigita.portalworkspace.checkWorkspaceReadPermissions",
|
||||
Parameter.OPTIONAL, Boolean.FALSE);
|
||||
|
||||
public WorkspaceConfig() {
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
com.arsdigita.portalworkspace.traversal_adapters.title=XML renderer rules
|
||||
com.arsdigita.portalworkspace.traversal_adapters.purpose=Name of File with rules for configuring information in generated XML
|
||||
com.arsdigita.portalworkspace.traversal_adapters.format=[string]
|
||||
com.arsdigita.portalworkspace.traversal_adapters.example=/WEB-INF/resources/portalworkspace-adapters.xml
|
||||
|
||||
com.arsdigita.portalworkspace.default_layout.title=Default workspace layout
|
||||
com.arsdigita.portalworkspace.default_layout.purpose=Default column layout for workspace portals
|
||||
com.arsdigita.portalworkspace.default_layout.format=[layout]
|
||||
com.arsdigita.portalworkspace.default_layout.example=25%,25%,25%,25%
|
||||
|
||||
com.arsdigita.portalworkspace.create_user_workspaces.title=Create user workspaces
|
||||
com.arsdigita.portalworkspace.create_user_workspaces.purpose=Whether non-admin users should have their own custom workspaces
|
||||
com.arsdigita.portalworkspace.create_user_workspaces.format=[boolean]
|
||||
com.arsdigita.portalworkspace.create_user_workspaces.example=false
|
||||
|
||||
com.arsdigita.portalworkspace.excluded_portlet_types.title=Portlet types not available on this site
|
||||
com.arsdigita.portalworkspace.excluded_portlet_types.purpose=Prevent these type appearing in the drop down list of portlets to add to the page
|
||||
com.arsdigita.portalworkspace.excluded_portlet_types.format=[string,string,string]
|
||||
com.arsdigita.portalworkspace.excluded_portlet_types.example=com.arsdigita.london.portal.portlet.ApplicationDirectoryPortlet,com.arsdigita.london.portal.portlet.TimeOfDayPortlet
|
||||
|
||||
com.arsdigita.portalworkspace.admin_only_portlet_types.title=Portlet types only available to page admin
|
||||
com.arsdigita.portalworkspace.admin_only_portlet_types.purpose=Only available to administrator of homepage, or subsite frontpage
|
||||
com.arsdigita.portalworkspace.admin_only_portlet_types.format=[string,string,string]
|
||||
com.arsdigita.portalworkspace.admin_only_portlet_types.example=com.arsdigita.london.portal.portlet.ApplicationDirectoryPortlet,com.arsdigita.london.portal.portlet.TimeOfDayPortlet
|
||||
|
||||
com.arsdigita.portalworkspace.portlet.freeform_html_editor.title=use wysiwyg editor for freeform html portlet
|
||||
com.arsdigita.portalworkspace.portlet.freeform_html_editor.purpose=If true, use editor specified by waf.bebop.dhtml_editor when user edits freeform html portlet
|
||||
com.arsdigita.portalworkspace.portlet.freeform_html_editor.format=[boolean]
|
||||
com.arsdigita.portalworkspace.portal.portlet.freeform_html_editor.example=false
|
||||
|
||||
com.arsdigita.portalworkspace.workspacePartyPrivilege.title=Privilege granted to the workspace party
|
||||
com.arsdigita.portalworkspace.workspacePartyPrivilege.purpose=Specify which privilege is granted to the workspace party. Should be "read" or "edit".
|
||||
com.arsdigita.portalworkspace.workspacePartyPrivilege.format=[string]
|
||||
com.arsdigita.portalworkspace.workspacePartyPrivilege.example=edit
|
||||
|
||||
com.arsdigita.portalworkspace.checkWorkspaceReadPermissions.title=Check READ permissions when viewing Workspaces
|
||||
com.arsdigita.portalworkspace.checkWorkspaceReadPermissions.purpose=Specify whether we should check READ permissions when viewing workspaces. By default we don't, which is odd.
|
||||
com.arsdigita.portalworkspace.checkWorkspaceReadPermissions.format=[boolean]
|
||||
com.arsdigita.portalworkspace.checkWorkspaceReadPermissions.example=false
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal;
|
||||
package com.arsdigita.portalworkspace;
|
||||
|
||||
import com.arsdigita.domain.DomainObjectFactory;
|
||||
import com.arsdigita.kernel.Resource;
|
||||
|
|
@ -24,6 +24,10 @@ import com.arsdigita.persistence.DataObject;
|
|||
import com.arsdigita.persistence.OID;
|
||||
import com.arsdigita.portal.Portal;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class WorkspacePage extends Portal {
|
||||
|
||||
public static final String SORT_KEY = "sortKey";
|
||||
|
|
@ -33,7 +37,7 @@ public class WorkspacePage extends Portal {
|
|||
public static final String WORKSPACE = "workspace";
|
||||
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.london.portal.WorkspacePage";
|
||||
"com.arsdigita.portalworkspace.WorkspacePage";
|
||||
|
||||
public WorkspacePage() {
|
||||
this(BASE_DATA_OBJECT_TYPE);
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal;
|
||||
package com.arsdigita.portalworkspace;
|
||||
|
||||
import com.arsdigita.persistence.DataAssociationCursor;
|
||||
import com.arsdigita.portal.PortalCollection;
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal.portlet;
|
||||
package com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import com.arsdigita.bebop.portal.AbstractPortletRenderer;
|
||||
import com.arsdigita.london.portal.ui.portlet.ApplicationDirectoryPortletRenderer;
|
||||
import com.arsdigita.portalworkspace.ui.portlet.ApplicationDirectoryPortletRenderer;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ import com.arsdigita.portal.Portlet;
|
|||
public class ApplicationDirectoryPortlet extends Portlet {
|
||||
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.london.portal.portlet.ApplicationDirectoryPortlet";
|
||||
"com.arsdigita.portalworkspace.portlet.ApplicationDirectoryPortlet";
|
||||
|
||||
public static final String CONTENT = "content";
|
||||
|
||||
|
|
@ -36,10 +36,12 @@ public class ApplicationDirectoryPortlet extends Portlet {
|
|||
super(dataObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBaseDataObjectType() {
|
||||
return BASE_DATA_OBJECT_TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AbstractPortletRenderer doGetPortletRenderer() {
|
||||
return new ApplicationDirectoryPortletRenderer(this);
|
||||
}
|
||||
|
|
@ -16,12 +16,12 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal.portlet;
|
||||
package com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import com.arsdigita.bebop.portal.AbstractPortletRenderer;
|
||||
import com.arsdigita.categorization.Category;
|
||||
import com.arsdigita.domain.DomainObjectFactory;
|
||||
import com.arsdigita.london.portal.ui.portlet.ContentDirectoryPortletRenderer;
|
||||
import com.arsdigita.portalworkspace.ui.portlet.ContentDirectoryPortletRenderer;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ import com.arsdigita.portal.Portlet;
|
|||
public class ContentDirectoryPortlet extends Portlet {
|
||||
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.london.portal.portlet.ContentDirectoryPortlet";
|
||||
"com.arsdigita.portalworkspace.portlet.ContentDirectoryPortlet";
|
||||
|
||||
public static final String ROOT = "root";
|
||||
|
||||
|
|
@ -51,10 +51,12 @@ public class ContentDirectoryPortlet extends Portlet {
|
|||
super(dataObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBaseDataObjectType() {
|
||||
return BASE_DATA_OBJECT_TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AbstractPortletRenderer doGetPortletRenderer() {
|
||||
return new ContentDirectoryPortletRenderer(this);
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal.portlet;
|
||||
package com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.StringBufferInputStream;
|
||||
|
|
@ -24,7 +24,7 @@ import java.util.Map;
|
|||
import java.util.Properties;
|
||||
|
||||
import com.arsdigita.bebop.portal.AbstractPortletRenderer;
|
||||
import com.arsdigita.london.portal.ui.portlet.FlashPortletRenderer;
|
||||
import com.arsdigita.portalworkspace.ui.portlet.FlashPortletRenderer;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ import com.arsdigita.portal.Portlet;
|
|||
public class FlashPortlet extends Portlet
|
||||
{
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.london.portal.portlet.FlashPortlet";
|
||||
"com.arsdigita.portalworkspace.portlet.FlashPortlet";
|
||||
|
||||
public static final String BACKGROUND_COLOUR = "backgroundColour";
|
||||
|
||||
|
|
@ -66,11 +66,13 @@ public class FlashPortlet extends Portlet
|
|||
super(dataObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBaseDataObjectType()
|
||||
{
|
||||
return BASE_DATA_OBJECT_TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AbstractPortletRenderer doGetPortletRenderer()
|
||||
{
|
||||
return new FlashPortletRenderer(this);
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal.portlet;
|
||||
package com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import com.arsdigita.bebop.RequestLocal;
|
||||
import com.arsdigita.domain.DomainObject;
|
||||
|
|
@ -25,7 +25,7 @@ import com.arsdigita.kernel.ACSObjectInstantiator;
|
|||
import com.arsdigita.kernel.ResourceType;
|
||||
import com.arsdigita.kernel.ResourceTypeConfig;
|
||||
import com.arsdigita.kernel.ui.ResourceConfigFormSection;
|
||||
import com.arsdigita.london.portal.ui.portlet.FlashPortletEditor;
|
||||
import com.arsdigita.portalworkspace.ui.portlet.FlashPortletEditor;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
import com.arsdigita.portal.PortletType;
|
||||
|
||||
|
|
@ -56,6 +56,7 @@ public final class FlashPortletInitializer
|
|||
DomainObjectFactory.registerInstantiator(
|
||||
FlashPortlet.BASE_DATA_OBJECT_TYPE, new ACSObjectInstantiator()
|
||||
{
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject)
|
||||
{
|
||||
return new FlashPortlet(dataObject);
|
||||
|
|
@ -64,6 +65,7 @@ public final class FlashPortletInitializer
|
|||
|
||||
new ResourceTypeConfig(FlashPortlet.BASE_DATA_OBJECT_TYPE)
|
||||
{
|
||||
@Override
|
||||
public ResourceConfigFormSection getCreateFormSection(
|
||||
final ResourceType resType,
|
||||
final RequestLocal parentAppRL)
|
||||
|
|
@ -71,6 +73,7 @@ public final class FlashPortletInitializer
|
|||
return new FlashPortletEditor(resType, parentAppRL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceConfigFormSection getModifyFormSection(
|
||||
final RequestLocal application)
|
||||
{
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal.portlet;
|
||||
package com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import com.arsdigita.bebop.portal.AbstractPortletRenderer;
|
||||
import com.arsdigita.london.portal.ui.portlet.FreeformHTMLPortletRenderer;
|
||||
import com.arsdigita.portalworkspace.ui.portlet.FreeformHTMLPortletRenderer;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ import com.arsdigita.portal.Portlet;
|
|||
public class FreeformHTMLPortlet extends Portlet {
|
||||
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.london.portal.portlet.FreeformHTMLPortlet";
|
||||
"com.arsdigita.portalworkspace.portlet.FreeformHTMLPortlet";
|
||||
|
||||
public static final String CONTENT = "content";
|
||||
|
||||
|
|
@ -36,6 +36,7 @@ public class FreeformHTMLPortlet extends Portlet {
|
|||
super(dataObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBaseDataObjectType() {
|
||||
return BASE_DATA_OBJECT_TYPE;
|
||||
}
|
||||
|
|
@ -48,6 +49,7 @@ public class FreeformHTMLPortlet extends Portlet {
|
|||
set(CONTENT, text);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AbstractPortletRenderer doGetPortletRenderer() {
|
||||
return new FreeformHTMLPortletRenderer(this);
|
||||
}
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.portal.portlet;
|
||||
package com.arsdigita.portalworkspace.portlet;
|
||||
|
||||
import com.arsdigita.bebop.portal.AbstractPortletRenderer;
|
||||
import com.arsdigita.london.portal.ui.portlet.LoginPortletRenderer;
|
||||
import com.arsdigita.portalworkspace.ui.portlet.LoginPortletRenderer;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ import com.arsdigita.portal.Portlet;
|
|||
public class LoginPortlet extends Portlet {
|
||||
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.london.portal.portlet.LoginPortlet";
|
||||
"com.arsdigita.portalworkspace.portlet.LoginPortlet";
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -44,6 +44,7 @@ public class LoginPortlet extends Portlet {
|
|||
*
|
||||
* @return String BaseDataObjectType
|
||||
*/
|
||||
@Override
|
||||
protected String getBaseDataObjectType() {
|
||||
return BASE_DATA_OBJECT_TYPE;
|
||||
}
|
||||
|
|
@ -52,6 +53,7 @@ public class LoginPortlet extends Portlet {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
protected AbstractPortletRenderer doGetPortletRenderer() {
|
||||
return new LoginPortletRenderer(this);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue