Verschiedene Anpassungen an ccm-portalworkspace-
git-svn-id: https://svn.libreccm.org/ccm/trunk@819 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
5353924e2b
commit
90fde1a251
|
|
@ -21,7 +21,9 @@ package com.arsdigita.cms;
|
|||
import com.arsdigita.cms.contentsection.ContentSectionSetup;
|
||||
import com.arsdigita.cms.util.Util;
|
||||
import com.arsdigita.cms.installer.xml.XMLContentTypeHandler;
|
||||
import com.arsdigita.cms.portlet.ContentDirectoryPortlet;
|
||||
import com.arsdigita.cms.portlet.ContentItemPortlet;
|
||||
import com.arsdigita.cms.portlet.ContentSectionsPortlet;
|
||||
import com.arsdigita.cms.portlet.TaskPortlet;
|
||||
import com.arsdigita.domain.DomainObject;
|
||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||
|
|
@ -195,9 +197,9 @@ public class Loader extends PackageLoader {
|
|||
// Loading CMS portlets
|
||||
// Used to be step 7 (last step) in former enterprise.init
|
||||
s_log.debug("CMS.loader going to load portlets");
|
||||
//ContentDirectoryPortlet.loadPortletType();
|
||||
ContentDirectoryPortlet.loadPortletType();
|
||||
ContentItemPortlet.loadPortletType();
|
||||
//ContentSectionsPortlet.loadPortletType();
|
||||
ContentSectionsPortlet.loadPortletType();
|
||||
TaskPortlet.loadPortletType();
|
||||
|
||||
// Loading forms widget into database
|
||||
|
|
|
|||
|
|
@ -69,10 +69,10 @@ public class ContentDirectoryPortlet extends Portlet {
|
|||
public static void loadPortletType()
|
||||
{
|
||||
PortletType type = PortletType
|
||||
.createPortletType("Content Directory",
|
||||
.createPortletType("CMS Content Directory",
|
||||
PortletType.WIDE_PROFILE,
|
||||
ContentDirectoryPortlet.BASE_DATA_OBJECT_TYPE);
|
||||
type.setDescription("Displays the content directory categories");
|
||||
type.setDescription("Displays the CMS content directory categories");
|
||||
s_log.info("Loading portlet type " + type);
|
||||
}
|
||||
|
||||
|
|
@ -89,6 +89,7 @@ public class ContentDirectoryPortlet extends Portlet {
|
|||
DomainObjectFactory.registerInstantiator(BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator()
|
||||
{
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject)
|
||||
{
|
||||
return new ContentDirectoryPortlet(dataObject);
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ public class ContentSectionsPortlet extends Portlet {
|
|||
* Retrieve the base data object type (i.e. fully qualified class name).
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
protected String getBaseDataObjectType() {
|
||||
return BASE_DATA_OBJECT_TYPE;
|
||||
}
|
||||
|
|
@ -60,6 +61,7 @@ public class ContentSectionsPortlet extends Portlet {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
protected AbstractPortletRenderer doGetPortletRenderer() {
|
||||
return new ContentSectionsPortletRenderer(this);
|
||||
}
|
||||
|
|
@ -95,6 +97,7 @@ public class ContentSectionsPortlet extends Portlet {
|
|||
DomainObjectFactory.registerInstantiator(BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator()
|
||||
{
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject)
|
||||
{
|
||||
return new ContentItemPortlet(dataObject);
|
||||
|
|
@ -118,6 +121,7 @@ public class ContentSectionsPortlet extends Portlet {
|
|||
setup.setProfile(PortletType.WIDE_PROFILE);
|
||||
|
||||
setup.setInstantiator(new ACSObjectInstantiator() {
|
||||
@Override
|
||||
protected DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new ContentSectionsPortlet(dataObject);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,14 +75,14 @@ public class Initializer extends CompoundInitializer {
|
|||
|
||||
// ContentDirectoryPortlet, currently not used.
|
||||
// Portlet of the same name is active in ccm-ldn-portal
|
||||
//loadContentDirectoryPortlet();
|
||||
//ContentDirectoryPortlet.initPortlet();
|
||||
// ContentDirectoryPortlet();
|
||||
ContentDirectoryPortlet.initPortlet();
|
||||
|
||||
// ContentItemPortlet
|
||||
ContentItemPortlet.initPortlet();
|
||||
|
||||
// ContentSectionsPortlet
|
||||
//ContentSectionsPortlet.initPortlet();
|
||||
ContentSectionsPortlet.initPortlet();
|
||||
|
||||
// TaskPortlet
|
||||
TaskPortlet.initPortlet();
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ public class ContentDirectoryPortletRenderer extends AbstractPortletRenderer {
|
|||
element.addAttribute("id",getIdAttr());
|
||||
|
||||
DataQuery categories = SessionManager.getSession().retrieveQuery
|
||||
("com.arsdigita.london.portal.portlet.getContentDirectory");
|
||||
("com.arsdigita.portal.portlet.getContentDirectory");
|
||||
// ("com.arsdigita.london.portal.portlet.getContentDirectory");
|
||||
|
||||
while (categories.next()) {
|
||||
BigDecimal categoryID = (BigDecimal) categories.get("categoryID");
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ public class ContentItemPortletRenderer extends AbstractPortletRenderer {
|
|||
SimpleXMLGenerator.ADAPTER_CONTEXT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCacheKey(PageState state) {
|
||||
ContentItem item = m_portlet.getContentItem();
|
||||
if( null == item ) {
|
||||
|
|
@ -119,6 +120,7 @@ public class ContentItemPortletRenderer extends AbstractPortletRenderer {
|
|||
// For a given cache key a contnet item is *never* dirty,
|
||||
// since upon republishing of a live item, the item_id
|
||||
// changes!
|
||||
@Override
|
||||
public boolean isDirty(PageState state) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import com.arsdigita.workflow.simple.Engine;
|
|||
import com.arsdigita.xml.Element;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
// import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ public class Portlet extends Resource {
|
|||
"com.arsdigita.portal.Portlet";
|
||||
private static Logger s_log = Logger.getLogger(Portlet.class);
|
||||
|
||||
@Override
|
||||
protected String getBaseDataObjectType() {
|
||||
return BASE_DATA_OBJECT_TYPE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ import com.arsdigita.runtime.CompoundInitializer;
|
|||
import com.arsdigita.runtime.ContextInitEvent;
|
||||
import com.arsdigita.runtime.ContextCloseEvent;
|
||||
import com.arsdigita.runtime.DomainInitEvent;
|
||||
// import com.arsdigita.runtime.LegacyInitEvent;
|
||||
import com.arsdigita.runtime.PDLInitializer;
|
||||
import com.arsdigita.runtime.RuntimeConfig;
|
||||
import com.arsdigita.search.MetadataProviderRegistry;
|
||||
|
|
@ -77,12 +76,14 @@ public class Initializer extends CompoundInitializer {
|
|||
*
|
||||
* @param e
|
||||
*/
|
||||
@Override
|
||||
public void init(DomainInitEvent e) {
|
||||
super.init(e);
|
||||
|
||||
e.getFactory().registerInstantiator(
|
||||
Forum.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new Forum(dataObject);
|
||||
}
|
||||
|
|
@ -90,6 +91,7 @@ public class Initializer extends CompoundInitializer {
|
|||
e.getFactory().registerInstantiator(
|
||||
Post.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new Post(dataObject);
|
||||
}
|
||||
|
|
@ -98,6 +100,7 @@ public class Initializer extends CompoundInitializer {
|
|||
e.getFactory().registerInstantiator(
|
||||
PostFileAttachment.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
protected DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new PostFileAttachment(dataObject);
|
||||
}
|
||||
|
|
@ -137,6 +140,7 @@ public class Initializer extends CompoundInitializer {
|
|||
e.getFactory().registerInstantiator(
|
||||
ForumSubscription.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
if (((Boolean)dataObject.get("isModerationAlert"))
|
||||
.booleanValue()) {
|
||||
|
|
@ -162,6 +166,7 @@ public class Initializer extends CompoundInitializer {
|
|||
new PostFileAttachmentURLFinder());
|
||||
|
||||
new ResourceTypeConfig(RecentPostingsPortlet.BASE_DATA_OBJECT_TYPE) {
|
||||
@Override
|
||||
public ResourceConfigFormSection getCreateFormSection
|
||||
(final ResourceType resType, final RequestLocal parentAppRL) {
|
||||
final ResourceConfigFormSection config =
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ import com.arsdigita.london.navigation.Template;
|
|||
import com.arsdigita.london.navigation.TemplateMapping;
|
||||
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 java.net.URL;
|
||||
import java.net.MalformedURLException;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ import com.arsdigita.kernel.permissions.PermissionDescriptor;
|
|||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||
import com.arsdigita.kernel.Party;
|
||||
import com.arsdigita.kernel.Kernel;
|
||||
import com.arsdigita.london.portal.ui.PersistentPortal;
|
||||
import com.arsdigita.london.portal.ui.PortalConstants;
|
||||
import com.arsdigita.london.portal.Workspace;
|
||||
import com.arsdigita.portalworkspace.ui.PersistentPortal;
|
||||
import com.arsdigita.portalworkspace.ui.PortalConstants;
|
||||
import com.arsdigita.portalworkspace.Workspace;
|
||||
import com.arsdigita.xml.Element;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@
|
|||
-- NavigationTreePortlet has been moved from ccm-ldn-portal (where it existed as
|
||||
-- NavigationDirectoryPortlet) to ccm-ldn-navigation because it depends on
|
||||
-- navigation and was misplaced there (generating horizontal dependencies).
|
||||
-- At the time of this update both ccm-ldn-portal and ccm-ldn-navigation must
|
||||
-- be installed because of those horizontal dependencies. So existence of
|
||||
-- ccm-ldn-navigatgion can be taken granted for now.
|
||||
|
||||
|
||||
update application_types
|
||||
|
|
@ -30,3 +33,10 @@ update application_types
|
|||
where object_type
|
||||
like 'com.arsdigita.london.portal.portlet.NavigationDirectoryPortlet' ;
|
||||
|
||||
update applications
|
||||
set (title,description) =
|
||||
('Navigation Tree',
|
||||
'Displays a tree of navigation categories' )
|
||||
where title
|
||||
like 'Navigation Directory' ;
|
||||
|
||||
|
|
|
|||
|
|
@ -74,8 +74,6 @@ import java.util.List;
|
|||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
// same package
|
||||
// import com.arsdigita.london.navigation.Template;
|
||||
import com.arsdigita.domain.xml.TraversalHandler;
|
||||
import com.arsdigita.xml.XML;
|
||||
|
||||
|
|
@ -125,6 +123,7 @@ public class Initializer extends CompoundInitializer {
|
|||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new Template(dataObject);
|
||||
}
|
||||
@Override
|
||||
public DomainObjectInstantiator
|
||||
resolveInstantiator(DataObject obj) {
|
||||
return this;
|
||||
|
|
@ -134,6 +133,7 @@ public class Initializer extends CompoundInitializer {
|
|||
e.getFactory().registerInstantiator
|
||||
(Navigation.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new Navigation(dataObject);
|
||||
}
|
||||
|
|
@ -145,6 +145,7 @@ public class Initializer extends CompoundInitializer {
|
|||
e.getFactory().registerInstantiator
|
||||
(ItemListPortlet.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new ItemListPortlet(dataObject);
|
||||
}
|
||||
|
|
@ -153,6 +154,7 @@ public class Initializer extends CompoundInitializer {
|
|||
e.getFactory().registerInstantiator
|
||||
(ObjectListPortlet.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new ObjectListPortlet(dataObject);
|
||||
}
|
||||
|
|
@ -164,6 +166,7 @@ public class Initializer extends CompoundInitializer {
|
|||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new TemplateMapping(dataObject);
|
||||
}
|
||||
@Override
|
||||
public DomainObjectInstantiator
|
||||
resolveInstantiator(DataObject obj) {
|
||||
return this;
|
||||
|
|
@ -173,6 +176,7 @@ public class Initializer extends CompoundInitializer {
|
|||
|
||||
|
||||
new ResourceTypeConfig(ObjectListPortlet.BASE_DATA_OBJECT_TYPE) {
|
||||
@Override
|
||||
public ResourceConfigFormSection getCreateFormSection
|
||||
(final ResourceType resType, final RequestLocal parentAppRL) {
|
||||
final ResourceConfigFormSection config =
|
||||
|
|
@ -181,6 +185,7 @@ public class Initializer extends CompoundInitializer {
|
|||
return config;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceConfigFormSection getModifyFormSection
|
||||
(final RequestLocal application) {
|
||||
final ObjectListPortletEditor config =
|
||||
|
|
@ -191,6 +196,7 @@ public class Initializer extends CompoundInitializer {
|
|||
};
|
||||
|
||||
new ResourceTypeConfig(ItemListPortlet.BASE_DATA_OBJECT_TYPE) {
|
||||
@Override
|
||||
public ResourceConfigFormSection getCreateFormSection
|
||||
(final ResourceType resType, final RequestLocal parentAppRL) {
|
||||
final ResourceConfigFormSection config =
|
||||
|
|
@ -199,6 +205,7 @@ public class Initializer extends CompoundInitializer {
|
|||
return config;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceConfigFormSection getModifyFormSection
|
||||
(final RequestLocal application) {
|
||||
final ItemListPortletEditor config =
|
||||
|
|
|
|||
|
|
@ -93,8 +93,9 @@ public class NavigationTreePortlet extends Portlet
|
|||
{
|
||||
new ResourceTypeConfig(BASE_DATA_OBJECT_TYPE)
|
||||
{
|
||||
public ResourceConfigFormSection getCreateFormSection(final ResourceType resType,
|
||||
final RequestLocal parentAppRL)
|
||||
public ResourceConfigFormSection getCreateFormSection(
|
||||
final ResourceType resType,
|
||||
final RequestLocal parentAppRL)
|
||||
{
|
||||
return new NavigationTreePortletEditor(resType, parentAppRL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import com.arsdigita.kernel.User;
|
|||
import com.arsdigita.kernel.permissions.PermissionDescriptor;
|
||||
import com.arsdigita.kernel.permissions.PermissionService;
|
||||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||
import com.arsdigita.london.portal.WorkspacePage;
|
||||
import com.arsdigita.portalworkspace.WorkspacePage;
|
||||
import com.arsdigita.london.util.UrlUtil;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
import com.arsdigita.portal.Portal;
|
||||
|
|
|
|||
Loading…
Reference in New Issue