Verschiedene Formatierungen / Doku Ergaenzung

git-svn-id: https://svn.libreccm.org/ccm/trunk@656 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2010-12-23 21:03:25 +00:00
parent fba978d8bd
commit e01da4aefb
14 changed files with 161 additions and 117 deletions

View File

@ -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);

View File

@ -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.
*
* <p>You do <em>not</em> need to extend this class unless your
* dispatcher is also a servlet and is mounted in web.xml. In any

View File

@ -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 $

View File

@ -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 $

View File

@ -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");

View File

@ -52,7 +52,7 @@ import java.util.ArrayList;
import org.apache.log4j.Logger;
/**
*
* Constructs the panel for administration of groups.
*
* @author David Dao
*

View File

@ -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.
*/

View File

@ -3,16 +3,26 @@
<head>
<title>com.arsdigita.ui.admin</title>
</head>
<body bgcolor="white">
<body>
<p>
Package implements the CORE administration panel, usually mouned at /ccm/admin.
Currently it provides an administration interface to</p>
<ul>
<li>create, remove and modify user data</li>
<li>create and remove groups and populate groups with users</li>
</ul>
<p>
The main class is Admin.java (a currently trivial extension of Application)
</p>
<p>
</p>
<p>
(Original description)
Basic user interface components for the administrative UI.
</p>
<p>
Package implements the WAF administration panel, usually mouned at /ccm/admin,
used for administration of users and groups.
</p>
</body>
</html>

View File

@ -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() {

View File

@ -3,14 +3,16 @@
<head>
<title>com.arsdigita.ui.sitemap</title>
</head>
<body bgcolor="white">
<body>
<p>
User interface for dynamically updating URL to application
mappings.
<p>
User interface for dynamically updating URL to application
mappings.
</p>
<p>
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
</p>
</body>
</html>

View File

@ -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());
}
}
}

View File

@ -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;

View File

@ -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);
}
/**
*

View File

@ -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
*/