Verfeinerungen von code und doku.

git-svn-id: https://svn.libreccm.org/ccm/trunk@1562 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2012-03-29 23:05:50 +00:00
parent bc86f0b3be
commit 66eddde804
10 changed files with 69 additions and 85 deletions

View File

@ -13,11 +13,21 @@
<ccm:contact uri="mailto:info@runtime-collective.com" type="support"/> <ccm:contact uri="mailto:info@runtime-collective.com" type="support"/>
</ccm:contacts> </ccm:contacts>
<ccm:description> <ccm:description>
Bookmarks application for CCM. Displays bookmarks for a portal. Bookmarks application provides an admin interface to maintain one or more
lists of bookmarks and a portlet to embed on one or more portal pages.
Each portlet instance can be configured to display one of several bookmark
CCM is a collaboration and content management system which is based upon list.
the Red Hat Web Application Framework (WAF), which is a platform for writing
database-backed web applications in Java. By default an administration instance to maintain a list of bookmarks is
installed at ~/ccm/admin/bookmarks. The UI provides the capability to add,
modify and delete bookmarks and to modify their order.
To display this list the Bookmark portlet must be installed on a portal
page. It's installation UI provides (besides the standard properties title
and description) a drop-down list to select the list provider,
“/admin/bookmarks” in case of the default installation.
For each additional, separate bookmarks list it is necessary to install an
additional administration instance for each list.
</ccm:description> </ccm:description>
</ccm:application> </ccm:application>

View File

@ -1,63 +0,0 @@
/*
* Copyright (C) 2001, 2002 Red Hat Inc. All Rights Reserved.
*
* The contents of this file are subject to the CCM 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.redhat.com/licenses/ccmpl.html
*
* 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.bookmarks;
import com.arsdigita.bookmarks.ui.BookmarkEditPane;
import com.arsdigita.bookmarks.ui.BookmarkBasePage;
import com.arsdigita.bebop.page.BebopMapDispatcher;
import com.arsdigita.bebop.Page;
import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.Logger;
/**
* Bookmark dispatcher for both Bebop-backed and other URLs.
*
* @author Jim Parsons
*/
public class BookmarksDispatcher extends BebopMapDispatcher {
private static final Logger s_log =
Logger.getLogger(BookmarksDispatcher.class);
public BookmarksDispatcher() {
super();
Map m = new HashMap();
Page index = buildIndexPage();
m.put("", index);
setMap(m);
}
private Page buildIndexPage() {
BookmarkBasePage p = new BookmarkBasePage();
p.addRequestListener(new ApplicationAuthenticationListener("admin"));
p.getBody().add(new BookmarkEditPane());
p.lock();
return p;
}
}

View File

@ -0,0 +1,17 @@
bookmarks.ui.select_a_bookmark_for_editing=Ein Lesezeichen zur Bearbeitung ausw\u00e4hlen
bookmarks.ui.name_of_new_bookmark=Name f\u00fcr das Lesezeichens:
bookmarks.ui.new_bookmark_url=URL f\u00fcr das Lesezeichen:
bookmarks.ui.bookmark_description=Lesezeichen Beschreibung:
bookmarks.ui.delete_this_bookmark=Dieses LEsezeichen l\u00f6schen
bookmarks.ui.edit_fields_and_click_save_button=Edit fields and click save button.
bookmarks.ui.bookmark_name=Lesezeichen Name:
bookmarks.ui.none=Keine Lesezeichen
bookmarks.ui.bookmark_url=URL Lesezeichen:
bookmarks.ui.creation_date=Erstellungsdatum:
bookmarks.ui.last_modified_date=Zuletzt ver\u00e4ndert:
bookmarks.ui.created_by=Erstellt von:
bookmarks.ui.number_of_visits=Anzahl Besuche:
bookmarks.ui.modification_date=\u00c4nderungsdatum
bookmarks.ui.creator=Ersteller
bookmarks.ui.are_you_sure_you_want_to_delete_this_bookmark=Soll dieses Lesezeichen tats\u00e4chlich gel\u00f6scht werden?
bookmarks.ui.bookmark_in_new_window=In einen neuen Fenster \u00f6ffnen

View File

@ -0,0 +1,17 @@
bookmarks.ui.select_a_bookmark_for_editing=Select a Bookmark for editing
bookmarks.ui.name_of_new_bookmark=Name of New Bookmark:
bookmarks.ui.new_bookmark_url=New Bookmark URL:
bookmarks.ui.bookmark_description=Bookmark Description:
bookmarks.ui.delete_this_bookmark=Delete this Bookmark
bookmarks.ui.edit_fields_and_click_save_button=Edit fields and click save button.
bookmarks.ui.bookmark_name=Bookmark Name:
bookmarks.ui.none=No Bookmarks
bookmarks.ui.bookmark_url=Bookmark URL:
bookmarks.ui.creation_date=Creation Date:
bookmarks.ui.last_modified_date=Last Modified Date:
bookmarks.ui.created_by=Created by:
bookmarks.ui.number_of_visits=Number of visits:
bookmarks.ui.modification_date=Modification Date
bookmarks.ui.creator=Creator
bookmarks.ui.are_you_sure_you_want_to_delete_this_bookmark=Are you sure you want to delete this Bookmark?
bookmarks.ui.bookmark_in_new_window=Open in a new window

View File

@ -53,7 +53,7 @@ public class BookmarksServlet extends BaseApplicationServlet {
/** Logger instance for debugging */ /** Logger instance for debugging */
private static final Logger s_log = Logger.getLogger(BookmarksServlet.class); private static final Logger s_log = Logger.getLogger(BookmarksServlet.class);
private Page adminPage; private Page indexPage;
/** /**
* User extension point, overwrite this method to setup a URL - page mapping * User extension point, overwrite this method to setup a URL - page mapping
@ -63,7 +63,7 @@ public class BookmarksServlet extends BaseApplicationServlet {
@Override @Override
public void doInit() throws ServletException { public void doInit() throws ServletException {
adminPage = buildAdminPage(); indexPage = buildIndexPage();
} }
@ -77,9 +77,9 @@ public class BookmarksServlet extends BaseApplicationServlet {
Application app) Application app)
throws ServletException, IOException { throws ServletException, IOException {
if (adminPage != null) { if (indexPage != null) {
final Document doc = adminPage.buildDocument(sreq, sresp); final Document doc = indexPage.buildDocument(sreq, sresp);
PresentationManager pm = Templating.getPresentationManager(); PresentationManager pm = Templating.getPresentationManager();
pm.servePage(doc, sreq, sresp); pm.servePage(doc, sreq, sresp);
@ -96,7 +96,7 @@ public class BookmarksServlet extends BaseApplicationServlet {
* *
* @return * @return
*/ */
private Page buildAdminPage() { private Page buildIndexPage() {
BookmarkBasePage p = new BookmarkBasePage(); BookmarkBasePage p = new BookmarkBasePage();

View File

@ -79,6 +79,7 @@ public class Initializer extends CompoundInitializer {
e.getFactory().registerInstantiator( e.getFactory().registerInstantiator(
BookmarkPortlet.BASE_DATA_OBJECT_TYPE, BookmarkPortlet.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() { new ACSObjectInstantiator() {
@Override
public DomainObject doNewInstance(DataObject dataObject) { public DomainObject doNewInstance(DataObject dataObject) {
return new BookmarkPortlet(dataObject); return new BookmarkPortlet(dataObject);
} }

View File

@ -68,8 +68,7 @@ public class Loader extends PackageLoader {
*/ */
private ApplicationType loadBookmarksApp() { private ApplicationType loadBookmarksApp() {
/* Create new type legacy free application type /* NOTE: The wording in the title parameter of ApplicationType
* NOTE: The wording in the title parameter of ApplicationType
* determines the name of the subdirectory for the XSL stylesheets. * determines the name of the subdirectory for the XSL stylesheets.
* It gets "urlized", i.e. trimming leading and trailing blanks and * It gets "urlized", i.e. trimming leading and trailing blanks and
* replacing blanks between words and illegal characters with an * replacing blanks between words and illegal characters with an
@ -101,18 +100,13 @@ public class Loader extends PackageLoader {
* *
*/ */
public static void setupDefaultBookmarkApplicationInstance() { public static void setupDefaultBookmarkApplicationInstance() {
s_log.debug("Creating BookmarkApplication instance ...");
/* Determine a parent application. Bookmarks admin page will be /* Determine a parent application. Bookmarks admin page will be
* installed beyond the admin's applications URL. */ * installed beyond the admin's applications URL. */
Application admin = Application.retrieveApplicationForPath("/admin/"); Application admin = Application.retrieveApplicationForPath("/admin/");
// create application instance // create application instance
// Whether a legacy compatible or a legacy free application is
// created depends on the type of ApplicationType above. No need to
// modify anything here in the migration process
// old-style package key used as url fragment where to install the instance
s_log.debug("Creating BookmarkApplication instance ...");
Bookmarks app = Bookmarks.create("bookmarks", "Bookmarks", admin); Bookmarks app = Bookmarks.create("bookmarks", "Bookmarks", admin);
s_log.debug("Bookmarks instance " + " created."); s_log.debug("Bookmarks instance " + " created.");

View File

@ -31,7 +31,8 @@ import com.arsdigita.globalization.GlobalizedMessage;
public class GlobalizationUtil implements Globalized { public class GlobalizationUtil implements Globalized {
private static final String BUNDLE_NAME = "com.arsdigita.bookmarks.ui.BookmarkResources"; private static final String BUNDLE_NAME =
"com.arsdigita.bookmarks.BookmarksResources";
public static GlobalizedMessage globalize(String key) { public static GlobalizedMessage globalize(String key) {
return new GlobalizedMessage(key, BUNDLE_NAME); return new GlobalizedMessage(key, BUNDLE_NAME);

View File

@ -21,8 +21,15 @@
<ccm:contact uri="mailto:rhea@redhat.com" type="support"/> <ccm:contact uri="mailto:rhea@redhat.com" type="support"/>
</ccm:contacts> </ccm:contacts>
<ccm:description> <ccm:description>
The Red Hat Web Application Framework is a platform for writing The ccm-ldn-atoz package enables a site to present all it's content in
database-backed web applications in Java. alphabetical order as an additional service to it's users. Usually the
theme provides a link to the page as part of its static elements.
By default the application presents the A-Z list at ~/ccm/atoz/.
An administration interface is provided at ~/ccm/atoz/admin/. Here you
can configure the content to be listed by selecting an appropriate
content provider.
</ccm:description> </ccm:description>
</ccm:application> </ccm:application>