Diverse kleine Formatierungen, Kommentare, etc.

git-svn-id: https://svn.libreccm.org/ccm/trunk@885 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2011-04-30 20:12:52 +00:00
parent 8267552268
commit 7b5df202c2
6 changed files with 217 additions and 166 deletions

View File

@ -59,6 +59,7 @@ import org.apache.log4j.Logger;
* a fresh installation of the whole system.
*
* @author Justin Ross <jross@redhat.com>
* @author Peter Boy <pboy@barkhof.uni-bremen.de>
* @version $Id: Loader.java 2070 2010-01-28 08:47:41Z pboy $
*/
public class Loader extends PackageLoader {
@ -66,11 +67,13 @@ public class Loader extends PackageLoader {
private static final Logger s_log = Logger.getLogger(Loader.class);
private StringParameter m_url = new StringParameter(
"com.arsdigita.portalworkspace.default_url", Parameter.REQUIRED,
"com.arsdigita.portalworkspace.default_url",
Parameter.REQUIRED,
"/portal/");
private StringParameter m_title = new StringParameter(
"com.arsdigita.portalworkspace.default_title", Parameter.REQUIRED,
"com.arsdigita.portalworkspace.default_title",
Parameter.REQUIRED,
"Portal Homepage");
/** Actually a kind of misnomer. In the creation process it is used to
@ -81,7 +84,7 @@ public class Loader extends PackageLoader {
Parameter.REQUIRED, Boolean.TRUE);
/**
* Standard constructor.
* Standard constructor loads/registers the configuration parameter.
*/
public Loader() {
register(m_isPublic);
@ -151,7 +154,7 @@ public class Loader extends PackageLoader {
}
s_log.debug("node name is " + name);
// set up the portal node
// set up the portal default node (instance)
// Workspace workspace = Workspace.createWorkspace(name, title,
// parent, Boolean.TRUE.equals(isPublic));
Workspace workspace = Workspace.createWorkspace(type, name, title,

View File

@ -31,24 +31,20 @@ import com.arsdigita.persistence.SessionManager;
import com.arsdigita.util.StringUtils;
import com.arsdigita.util.UncheckedWrapperException;
/**
*
*
*/
public class PageLayout extends DomainObject {
public static final String ID = "id";
public static final String TITLE = "title";
public static final String DESCRIPTION = "description";
public static final String FORMAT = "format";
public static final String FORMAT_ONE_COLUMN = "100%";
public static final String FORMAT_TWO_COLUMNS = "50%,50%";
public static final String FORMAT_THREE_COLUMNS = "30%,40%,30%";
public static final String FORMAT_FOUR_COLUMNS = "25%,25%,25%,25%";
public static final String BASE_DATA_OBJECT_TYPE =
"com.arsdigita.portalworkspace.PageLayout";
@ -68,7 +64,11 @@ public class PageLayout extends DomainObject {
super(oid);
}
/**
*
*/
public void initialize() {
super.initialize();
if (isNew()) {
@ -96,6 +96,13 @@ public class PageLayout extends DomainObject {
throw new RuntimeException("Cannot find page layout for " + format);
}
/**
*
* @param title
* @param description
* @param format
* @return
*/
public static PageLayout create(String title, String description,
String format) {
PageLayout page = new PageLayout();

View File

@ -1,16 +1,19 @@
/*
* Copyright (C) 2001 ArsDigita Corporation. All Rights Reserved.
* Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
*
* The contents of this file are subject to the ArsDigita Public
* 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
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* 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.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.arsdigita.portalworkspace;
@ -48,9 +51,9 @@ 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.
* 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!
@ -88,10 +91,9 @@ public class StatefulPersistentPortal extends SimpleContainer {
* @param portal the portalSelectionModel used by the Dynamic PortalModelBuilder
* @param name
*/
public StatefulPersistentPortal(
PortalSelectionModel portal,
String name) {
public StatefulPersistentPortal(PortalSelectionModel portal, String name) {
s_log.debug("IN constructor" + name );
m_portal = portal;
setTag("portal:portal");
setNamespace(PortalConstants.PORTAL_XML_NS);
@ -123,6 +125,7 @@ public class StatefulPersistentPortal extends SimpleContainer {
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);
@ -134,9 +137,11 @@ public class StatefulPersistentPortal extends SimpleContainer {
m_stateful.put(type.getResourceObjectType(), renderers);
}
}
m_portalModelBuilder =
new StatefulPersistentPortalModelBuilder(portal, m_stateful);
} // end while
m_portalModelBuilder = new StatefulPersistentPortalModelBuilder(portal,
m_stateful);
}
@ -186,7 +191,9 @@ public class StatefulPersistentPortal extends SimpleContainer {
}
/**
* return the number of renderers for the given portlet type currently registered on the page
* return the number of renderers for the given portlet type currently
* registered on the page
*
* @param portletType
* @return
*/

View File

@ -1,17 +1,21 @@
/*
* Copyright (C) 2001 ArsDigita Corporation. All Rights Reserved.
* Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
*
* The contents of this file are subject to the ArsDigita Public
* 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
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* 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.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.arsdigita.portalworkspace;
import com.arsdigita.domain.DataObjectNotFoundException;

View File

@ -1,16 +1,19 @@
/*
* Copyright (C) 2001 ArsDigita Corporation. All Rights Reserved.
* Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
*
* The contents of this file are subject to the ArsDigita Public
* 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
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* 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.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.arsdigita.portalworkspace;
@ -18,12 +21,24 @@ package com.arsdigita.portalworkspace;
import com.arsdigita.domain.DomainCollection;
import com.arsdigita.persistence.DataCollection;
/**
*
*
*/
public class WorkspaceCollection extends DomainCollection {
/**
*
* @param wks
*/
public WorkspaceCollection(DataCollection wks) {
super(wks);
}
/**
*
* @return
*/
public Workspace getWorkspace() {
return (Workspace) getDomainObject();
}

View File

@ -1,16 +1,19 @@
/*
* Copyright (C) 2001 ArsDigita Corporation. All Rights Reserved.
* Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
*
* The contents of this file are subject to the ArsDigita Public
* 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
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* 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.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.arsdigita.portalworkspace;
@ -18,12 +21,24 @@ package com.arsdigita.portalworkspace;
import com.arsdigita.persistence.DataAssociationCursor;
import com.arsdigita.portal.PortalCollection;
/**
*
*
*/
public class WorkspacePageCollection extends PortalCollection {
/**
*
* @param portals
*/
public WorkspacePageCollection(DataAssociationCursor portals) {
super(portals);
}
/**
*
* @return
*/
public WorkspacePage getPage() {
return (WorkspacePage) getDomainObject();
}