diff --git a/ccm-core/src/com/arsdigita/bebop/page/BebopApplicationServlet.java b/ccm-core/src/com/arsdigita/bebop/page/BebopApplicationServlet.java index 718c375c3..6b9f764ed 100755 --- a/ccm-core/src/com/arsdigita/bebop/page/BebopApplicationServlet.java +++ b/ccm-core/src/com/arsdigita/bebop/page/BebopApplicationServlet.java @@ -58,10 +58,19 @@ public class BebopApplicationServlet extends BaseApplicationServlet { // Set of pathinfo private final Set m_clientCacheDisabledPages = new HashSet(); + /** + * + * @throws ServletException + */ public void init() throws ServletException { super.init(); } + /** + * + * @param pathInfo + * @param page + */ protected final void put(final String pathInfo, final Page page) { Assert.exists(pathInfo, String.class); @@ -70,6 +79,7 @@ public class BebopApplicationServlet extends BaseApplicationServlet { m_pages.put(pathInfo, page); } + /** * * disable client/middleware caching of specified page. @@ -77,16 +87,25 @@ public class BebopApplicationServlet extends BaseApplicationServlet { */ protected final void disableClientCaching(String pathInfo) { Assert.exists(pathInfo, String.class); - Assert.isTrue(m_pages.containsKey(pathInfo), "Page " + pathInfo + " has not been put in servlet"); + Assert.isTrue(m_pages.containsKey(pathInfo), + "Page " + pathInfo + " has not been put in servlet"); m_clientCacheDisabledPages.add(pathInfo); } + /** + * + * @param sreq + * @param sresp + * @param app + * @throws ServletException + * @throws IOException + */ protected final void doService(final HttpServletRequest sreq, final HttpServletResponse sresp, final Application app) - throws ServletException, IOException { - final String pathInfo = sreq.getPathInfo(); + throws ServletException, IOException { + final String pathInfo = sreq.getPathInfo(); Assert.exists(pathInfo, "String pathInfo"); final Page page = (Page) m_pages.get(pathInfo); diff --git a/ccm-core/src/com/arsdigita/dispatcher/BaseDispatcherServlet.java b/ccm-core/src/com/arsdigita/dispatcher/BaseDispatcherServlet.java index 0b9e907ed..e06c3c4ff 100755 --- a/ccm-core/src/com/arsdigita/dispatcher/BaseDispatcherServlet.java +++ b/ccm-core/src/com/arsdigita/dispatcher/BaseDispatcherServlet.java @@ -44,10 +44,10 @@ import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; /** - * Contains functions common to all - * entry-point dispatcher servlets in the core. Any dispatcher that - * is the first in its chain to handle an HTTP request must also be a - * servlet and should extend this class. + * Contains functions common to all entry-point dispatcher servlets in the core. + * + * Any dispatcher that is the first in its chain to handle an HTTP request + * must also be a servlet and should extend this class. * *

You do not need to extend this class unless your * dispatcher is also a servlet and is mounted in web.xml. In any diff --git a/ccm-core/src/com/arsdigita/dispatcher/InitialRequestContext.java b/ccm-core/src/com/arsdigita/dispatcher/InitialRequestContext.java index e5cce9ec8..78bb89684 100755 --- a/ccm-core/src/com/arsdigita/dispatcher/InitialRequestContext.java +++ b/ccm-core/src/com/arsdigita/dispatcher/InitialRequestContext.java @@ -25,9 +25,9 @@ import javax.servlet.http.HttpServletRequest; import org.apache.log4j.Logger; /** - * Implements a request context for the - * site map application or for any application dispatcher that creates - * the first application context for an incoming request. + * Implements a request context for the site map application + * or for any application dispatcher that creates the first application context + * for an incoming request. * * @author Bill Schneider * @version $Id: InitialRequestContext.java 287 2005-02-22 00:29:02Z sskracic $ diff --git a/ccm-core/src/com/arsdigita/dispatcher/InitializerServlet.java b/ccm-core/src/com/arsdigita/dispatcher/InitializerServlet.java index 288c92280..bd180f8b3 100755 --- a/ccm-core/src/com/arsdigita/dispatcher/InitializerServlet.java +++ b/ccm-core/src/com/arsdigita/dispatcher/InitializerServlet.java @@ -27,8 +27,7 @@ import javax.servlet.UnavailableException; import javax.servlet.http.HttpServlet; /** - * Bootstraps the ACS by - * calling the initializers in the enterprise.init file. + * Bootstraps the ACS by calling the initializers in the enterprise.init file. * * @author Raphael Schloming (rhs@mit.edu) * @version $Id: InitializerServlet.java 287 2005-02-22 00:29:02Z sskracic $ diff --git a/ccm-core/src/com/arsdigita/ui/admin/AdminDispatcher.java b/ccm-core/src/com/arsdigita/ui/admin/AdminDispatcher.java index 39fd2533d..be80414db 100755 --- a/ccm-core/src/com/arsdigita/ui/admin/AdminDispatcher.java +++ b/ccm-core/src/com/arsdigita/ui/admin/AdminDispatcher.java @@ -41,8 +41,9 @@ public class AdminDispatcher extends SubsiteDispatcher * Constructor. Instantiates the subsite url/page mapping. */ public AdminDispatcher() { - addPage("", buildAdminIndexPage(), true); - addPage("denied", buildDeniedPage()); + addPage("", buildAdminIndexPage(), true); // adds index page to dispatchers + // page mapping table + addPage("denied", buildDeniedPage()); // adds demied page respectively. } /** @@ -50,8 +51,10 @@ public class AdminDispatcher extends SubsiteDispatcher * be customized by editing the admin stylesheet. */ private Page buildDeniedPage() { - Page p = PageFactory.buildPage("admin", new Label(new GlobalizedMessage - ("ui.admin.dispatcher.accessDenied", BUNDLE_NAME))); + Page p = PageFactory.buildPage("admin", + new Label(new GlobalizedMessage + ("ui.admin.dispatcher.accessDenied", + BUNDLE_NAME))); Label label = new Label(GlobalizationUtil.globalize("ui.admin.access_denied")); label.setClassAttr("AccessDenied"); @@ -89,10 +92,12 @@ public class AdminDispatcher extends SubsiteDispatcher userSplitPanel.addTab(USER_TAB_CREATE_USER, new CreateUserPane(userSplitPanel)); - /** - * Create main administration tab. + /* + * Create group administration panel */ GroupAdministrationTab groupAdministrationTab = new GroupAdministrationTab(); + + // Create the Admin's page tab bar, currently 2 elements: user & groups TabbedPane tb = new TabbedPane(); tb.setIdAttr("page-body"); diff --git a/ccm-core/src/com/arsdigita/ui/admin/GroupAdministrationTab.java b/ccm-core/src/com/arsdigita/ui/admin/GroupAdministrationTab.java index bbec5c60a..c3df07902 100755 --- a/ccm-core/src/com/arsdigita/ui/admin/GroupAdministrationTab.java +++ b/ccm-core/src/com/arsdigita/ui/admin/GroupAdministrationTab.java @@ -52,7 +52,7 @@ import java.util.ArrayList; import org.apache.log4j.Logger; /** - * + * Constructs the panel for administration of groups. * * @author David Dao * diff --git a/ccm-core/src/com/arsdigita/ui/admin/SubsiteDispatcher.java b/ccm-core/src/com/arsdigita/ui/admin/SubsiteDispatcher.java index 853397bcb..f9261c765 100755 --- a/ccm-core/src/com/arsdigita/ui/admin/SubsiteDispatcher.java +++ b/ccm-core/src/com/arsdigita/ui/admin/SubsiteDispatcher.java @@ -53,7 +53,7 @@ class SubsiteDispatcher extends BebopMapDispatcher { (SubsiteDispatcher.class); /** - * Adds one URL the dispatcher's page map. If isIndex is true, + * Adds one URL to the dispatcher's page map. If isIndex is true, * the page is also mapped to the empty string "" so that it can * handle the special case of a request for the directory. */ diff --git a/ccm-core/src/com/arsdigita/ui/admin/package.html b/ccm-core/src/com/arsdigita/ui/admin/package.html index 5e14df1a6..7839c5daf 100755 --- a/ccm-core/src/com/arsdigita/ui/admin/package.html +++ b/ccm-core/src/com/arsdigita/ui/admin/package.html @@ -3,16 +3,26 @@ com.arsdigita.ui.admin - + +

+Package implements the CORE administration panel, usually mouned at /ccm/admin. +Currently it provides an administration interface to

+ + +

+ The main class is Admin.java (a currently trivial extension of Application) +

+

+ +

(Original description) Basic user interface components for the administrative UI.

-

-Package implements the WAF administration panel, usually mouned at /ccm/admin, -used for administration of users and groups. -

diff --git a/ccm-core/src/com/arsdigita/ui/login/SubsiteDispatcher.java b/ccm-core/src/com/arsdigita/ui/login/SubsiteDispatcher.java index 5b6107ea3..e9a496b64 100755 --- a/ccm-core/src/com/arsdigita/ui/login/SubsiteDispatcher.java +++ b/ccm-core/src/com/arsdigita/ui/login/SubsiteDispatcher.java @@ -41,7 +41,6 @@ import com.arsdigita.web.RedirectSignal; import java.util.HashMap; import java.util.Map; -import org.apache.log4j.Logger; import com.arsdigita.dispatcher.Dispatcher; import com.arsdigita.dispatcher.DispatcherConfig; import com.arsdigita.dispatcher.RequestContext; @@ -59,14 +58,10 @@ import org.apache.log4j.Logger; * page, user workspace, logout, and permissions admin pages. * * @author Sameer Ajmani + * @version $Id: SubsiteDispatcher.java 1225 2006-06-19 09:27:21Z apevec **/ public class SubsiteDispatcher extends BebopMapDispatcher { - public static final String versionId = - "$Id: SubsiteDispatcher.java 1225 2006-06-19 09:27:21Z apevec $" + - " by $Author: apevec $, " + - "$DateTime: 2004/08/16 18:10:38 $"; - public class SubsiteDispatcherMap extends HashMap implements Map { public SubsiteDispatcherMap() { diff --git a/ccm-core/src/com/arsdigita/ui/sitemap/package.html b/ccm-core/src/com/arsdigita/ui/sitemap/package.html index f21bd615a..4c6805917 100755 --- a/ccm-core/src/com/arsdigita/ui/sitemap/package.html +++ b/ccm-core/src/com/arsdigita/ui/sitemap/package.html @@ -3,14 +3,16 @@ com.arsdigita.ui.sitemap - + -

- -User interface for dynamically updating URL to application -mappings. - +

+ User interface for dynamically updating URL to application + mappings. +

+

+ This package uses tro large exend the old style application API + (kernel.Package, kernel.SiteNode, etc) and is deprecated ifself. + It is replace by ~/portal/admin/sitemap.jsp

- diff --git a/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/ApplicationList.java b/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/ApplicationList.java index 6da03d0ea..29c98ab94 100755 --- a/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/ApplicationList.java +++ b/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/ApplicationList.java @@ -74,37 +74,41 @@ public class ApplicationList extends SimpleContainer { } } - /** + /** + * Retrieves a list of installed applications and creates the xml to show + * a listing. * * @param state * @param parent */ public void generateXML(PageState state, Element parent) { - Element content = generateParent(parent); - ApplicationCollection apps = Application.retrieveAllApplications(); + Element content = generateParent(parent); - while (apps.next()) { - Application app = (Application) apps.getDomainObject(); + // get installed web/Applications to show + ApplicationCollection apps = Application.retrieveAllApplications(); - Element appEl = content.newChildElement("portal:application", - PortalConstants.PORTAL_XML_NS); - try { - state.setControlEvent(this, SELECT, app.getOID().toString()); - appEl.addAttribute("appClass", app.getClass().getName()); - appEl.addAttribute("appType", app.getApplicationType().getTitle()); - appEl.addAttribute("viewURL", state.stateAsURL()); - state.clearControlEvent(); - } catch (IOException ex) { - throw new UncheckedWrapperException("damn", ex); - } + while (apps.next()) { + Application app = (Application) apps.getDomainObject(); - DomainObjectXMLRenderer xr = new DomainObjectXMLRenderer(appEl); - xr.setWrapRoot(false); - xr.setWrapAttributes(true); - xr.setWrapObjects(false); + Element appEl = content.newChildElement("portal:application", + PortalConstants.PORTAL_XML_NS); + try { + state.setControlEvent(this, SELECT, app.getOID().toString()); + appEl.addAttribute("appClass", app.getClass().getName()); + appEl.addAttribute("appType", app.getApplicationType().getTitle()); + appEl.addAttribute("viewURL", state.stateAsURL()); + state.clearControlEvent(); + } catch (IOException ex) { + throw new UncheckedWrapperException("damn", ex); + } - xr.walk(app, ApplicationList.class.getName()); - } - } + DomainObjectXMLRenderer xr = new DomainObjectXMLRenderer(appEl); + xr.setWrapRoot(false); + xr.setWrapAttributes(true); + xr.setWrapObjects(false); + + xr.walk(app, ApplicationList.class.getName()); + } + } } diff --git a/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/ApplicationPane.java b/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/ApplicationPane.java index bd5934b1d..579b04d46 100755 --- a/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/ApplicationPane.java +++ b/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/ApplicationPane.java @@ -41,19 +41,23 @@ import com.arsdigita.web.ApplicationTypeCollection; public class ApplicationPane extends SimpleContainer { - private Map m_edit; // Map of application type -> edit config form + private Map m_edit; // Map of application type -> edit config form - private Map m_create; + private Map m_create; - private NewApplicationForm m_newApp; + private NewApplicationForm m_newApp; - private ApplicationDetails m_appDetails; + private ApplicationDetails m_appDetails; - private ActionLink m_editLink; + private ActionLink m_editLink; - private ApplicationSelectionModel m_app; + private ApplicationSelectionModel m_app; - public ApplicationPane(ApplicationSelectionModel app) { + /** + * + * @param app + */ + public ApplicationPane(ApplicationSelectionModel app) { super("portal:applicationPane", PortalConstants.PORTAL_XML_NS); m_app = app; diff --git a/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/ApplicationSelectionModel.java b/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/ApplicationSelectionModel.java index 3a76dde36..8a270f5d1 100755 --- a/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/ApplicationSelectionModel.java +++ b/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/ApplicationSelectionModel.java @@ -42,28 +42,28 @@ public class ApplicationSelectionModel extends ACSObjectSelectionModel { private static final Logger s_log = Logger .getLogger(ApplicationSelectionModel.class); - /** + /** * Constructor * * @param param * @param hasDefaultValue */ public ApplicationSelectionModel(BigDecimalParameter param, - boolean hasDefaultValue) { - super(param); + boolean hasDefaultValue) { + super(param); - m_hasDefaultValue = hasDefaultValue; - } + m_hasDefaultValue = hasDefaultValue; + } - /** + /** * * @param hasDefaultValue */ public ApplicationSelectionModel(boolean hasDefaultValue) { - this(new BigDecimalParameter(DEFAULT_PARAM_NAME), hasDefaultValue); - } + this(new BigDecimalParameter(DEFAULT_PARAM_NAME), hasDefaultValue); + } - /** + /** * * @param param */ @@ -87,37 +87,37 @@ public class ApplicationSelectionModel extends ACSObjectSelectionModel { this(DEFAULT_PARAM_NAME, false); } - /** + /** * * @return */ public Application getDefaultApplication() { - Application app = Web.getContext().getApplication(); + Application app = Web.getContext().getApplication(); - // XXX just in case - if (app == null) { - s_log.debug("Using kernel.getContext().getResource() instead"); + // XXX just in case + if (app == null) { + s_log.debug("Using kernel.getContext().getResource() instead"); app = (Application) Kernel.getContext().getResource(); - } + } - if (app != null) { - s_log.debug("Default Application: " + app.getID()); - } else { - s_log.debug("No application found"); - } - return app; - } + if (app != null) { + s_log.debug("Default Application: " + app.getID()); + } else { + s_log.debug("No application found"); + } + return app; + } - /** - * Override ACSObjectSelectionModel methods to default to the default - * Application - */ - public boolean isSelected(PageState state) { - if (m_hasDefaultValue && !super.isSelected(state)) { - return (getDefaultApplication() != null); - } - return super.isSelected(state); - } + /** + * Override ACSObjectSelectionModel methods to default to the default + * Application + */ + public boolean isSelected(PageState state) { + if (m_hasDefaultValue && !super.isSelected(state)) { + return (getDefaultApplication() != null); + } + return super.isSelected(state); + } /** * diff --git a/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/SiteMapPane.java b/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/SiteMapPane.java index be315a078..ba3a0efd2 100755 --- a/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/SiteMapPane.java +++ b/ccm-ldn-portal/src/com/arsdigita/london/portal/ui/admin/SiteMapPane.java @@ -29,37 +29,43 @@ import com.arsdigita.london.portal.ui.PortalConstants; import com.arsdigita.web.Application; /** - * + * Entry page for Application administration as part of ccm portal. Invocation + * by /web/templates/ccm-ldn-portal/admin/sitemap.jsp + * + * A list of all installed application is created and presented along with + * buttons for creating new instances and others. * */ public class SiteMapPane extends SimpleContainer { - private ApplicationSelectionModel m_app; + private ApplicationSelectionModel m_app; - private ApplicationList m_appList; + private ApplicationList m_appList; - private ApplicationPane m_appPane; + private ApplicationPane m_appPane; - private static final Logger s_log = Logger.getLogger(SiteMapPane.class); + /** Private Logger instance */ + private static final Logger s_log = Logger.getLogger(SiteMapPane.class); - /** - * Constructor + /** + * Constructor creates a new application admin pane instance */ public SiteMapPane() { - setTag("portal:sitemap"); - setNamespace(PortalConstants.PORTAL_XML_NS); + setTag("portal:sitemap"); + setNamespace(PortalConstants.PORTAL_XML_NS); - m_app = new ApplicationSelectionModel("application", false); - m_app.addChangeListener(new ApplicationEditListener()); + m_app = new ApplicationSelectionModel("application", false); + m_app.addChangeListener(new ApplicationEditListener()); - m_appList = new ApplicationList(m_app); - add(m_appList); + m_appList = new ApplicationList(m_app); + // adds a list of installed applications + add(m_appList); - m_appPane = new ApplicationPane(m_app); - add(m_appPane); - } + m_appPane = new ApplicationPane(m_app); + add(m_appPane); + } - /** + /** * * @param p */