Formatierungen und Doku angepasst.

git-svn-id: https://svn.libreccm.org/ccm/trunk@399 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2010-04-24 22:11:24 +00:00
parent 31deb7a8f7
commit 08f69e5b1e
14 changed files with 132 additions and 53 deletions

View File

@ -24,6 +24,10 @@ import com.arsdigita.kernel.Kernel;
import com.arsdigita.web.Web;
import com.arsdigita.xml.Element;
/**
*
*
*/
public class SiteBanner extends SimpleComponent {
public void generateXML(PageState state,

View File

@ -29,6 +29,10 @@ import com.arsdigita.xml.Element;
import com.arsdigita.ui.util.GlobalizationUtil;
import com.arsdigita.globalization.GlobalizedMessage;
/**
*
*
*/
public class UserBanner extends SimpleComponent {
private static GlobalizedMessage s_help;
@ -38,6 +42,9 @@ public class UserBanner extends SimpleComponent {
private static boolean initialized = false;
/**
*
*/
static void init() {
if (initialized) {
return;
@ -51,6 +58,11 @@ public class UserBanner extends SimpleComponent {
initialized = true;
}
/**
*
* @param state
* @param parent
*/
public void generateXML(PageState state,
Element parent) {
init();

View File

@ -31,16 +31,10 @@ import com.arsdigita.globalization.GlobalizedMessage;
interface AdminConstants {
/**
* The XML namespace used by admin components.
*/
/** The XML namespace used by admin components. */
String ADMIN_XML_NS = "http://www.arsdigita.com/admin-ui/1.0";
/**
* Globalization resource for admin ui.
*/
/** Globalization resource for admin ui. */
String BUNDLE_NAME = "com.arsdigita.ui.admin.AdminResources";
@ -55,31 +49,25 @@ interface AdminConstants {
// (new GlobalizedMessage("ui.admin.nav.logout",
// BUNDLE_NAME));
/**
* Administration page title
*/
/** Administration page title */
Label PAGE_TITLE_LABEL = new Label
(new GlobalizedMessage("ui.admin.dispatcher.title",
BUNDLE_NAME));
/**
* Administration main tab names.
*/
/** Administration main tab names. */
Label USER_TAB_TITLE = new Label
(new GlobalizedMessage("ui.admin.tab.user.title",
BUNDLE_NAME));
Label GROUP_TAB_TITLE = new Label
(new GlobalizedMessage("ui.admin.tab.group.title",
BUNDLE_NAME));
GlobalizedMessage USER_NAVBAR_TITLE =
new GlobalizedMessage("ui.admin.tab.user.navbartitle",
BUNDLE_NAME);
/**
* Tabbed pane indices
*/
/** Tabbed pane indices */
int USER_TAB_INDEX = 0;
int GROUP_TAB_INDEX = 1;

View File

@ -34,14 +34,12 @@ import com.arsdigita.globalization.GlobalizedMessage;
* @author Ron Henderson
* @version $Id: AdminDispatcher.java 287 2005-02-22 00:29:02Z sskracic $
*/
public class AdminDispatcher extends SubsiteDispatcher
implements AdminConstants
{
/**
* Constructor. Instantiates the subsite url/page mapping.
*/
public AdminDispatcher() {
addPage("", buildAdminIndexPage(), true);
addPage("denied", buildDeniedPage());

View File

@ -52,7 +52,6 @@ class AdminSplitPanel extends BoxPanel implements ChangeListener {
/**
* Constructor
*/
public AdminSplitPanel (GlobalizedMessage title) {
m_title = title;
@ -65,7 +64,6 @@ class AdminSplitPanel extends BoxPanel implements ChangeListener {
*
* @pre label != null && c != null
*/
public void addTab (Label label, Component c) {
Assert.isUnlocked(this);
m_componentList.add(c);
@ -74,6 +72,10 @@ class AdminSplitPanel extends BoxPanel implements ChangeListener {
m_keys.add(label);
}
/**
*
* @param p
*/
public void register(Page p) {
Assert.isUnlocked(this);

View File

@ -26,7 +26,6 @@ import com.arsdigita.bebop.SegmentedPanel;
*
* @author David Dao
*/
class CreateUserPane extends SegmentedPanel
implements AdminConstants,
Resettable

View File

@ -30,13 +30,13 @@ import com.arsdigita.bebop.list.ListCellRenderer;
import com.arsdigita.bebop.list.ListModel;
import com.arsdigita.bebop.list.ListModelBuilder;
import com.arsdigita.util.LockableImpl;
// import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.kernel.EmailAddress;
// import com.arsdigita.kernel.EmailAddress;
import com.arsdigita.kernel.EmailAddress;
// import com.arsdigita.kernel.User;
import com.arsdigita.kernel.User;
import com.arsdigita.kernel.User;
import java.math.BigDecimal;
// import java.math.BigDecimal;
import java.math.BigDecimal;
import java.util.Iterator;
@ -54,13 +54,22 @@ class EmailList extends List
/**
* Constructor
*/
public EmailList() {
setModelBuilder(new EmailListModelBuilder());
setCellRenderer(this);
addActionListener(this);
}
/**
*
* @param list
* @param state
* @param value
* @param key
* @param index
* @param isSelected
* @return
*/
public Component getComponent(List list,
PageState state,
Object value,
@ -86,7 +95,6 @@ class EmailList extends List
* This actionlister is executed when the user clicks the "delete"
* link next to an email address.
*/
public void actionPerformed (ActionEvent e) {
PageState ps = e.getPageState();
@ -110,19 +118,34 @@ class EmailList extends List
}
}
/**
*
*
*/
class EmailListModelBuilder extends LockableImpl
implements ListModelBuilder,
AdminConstants
{
/**
*
*/
private class EmailListModel implements ListModel {
private Iterator m_emails;
private EmailAddress m_currentEmail;
/**
*
* @param emails
*/
public EmailListModel(Iterator emails) {
m_emails = emails;
}
/**
*
* @return
*/
public boolean next() {
if (m_emails.hasNext()) {
m_currentEmail = (EmailAddress) m_emails.next();
@ -132,6 +155,10 @@ class EmailListModelBuilder extends LockableImpl
}
}
/**
*
* @return
*/
public String getKey() {
return m_currentEmail.getEmailAddress();
}
@ -141,6 +168,12 @@ class EmailListModelBuilder extends LockableImpl
}
}
/**
*
* @param l
* @param state
* @return
*/
public ListModel makeModel(List l, PageState state) {
BigDecimal userID = (BigDecimal)state.getValue(USER_ID_PARAM);

View File

@ -59,7 +59,7 @@ import org.apache.log4j.Logger;
*/
class GroupAdministrationTab extends BoxPanel
implements AdminConstants,
ChangeListener {
ChangeListener {
private static final Logger s_log =
Logger.getLogger(GroupAdministrationTab.class);

View File

@ -55,9 +55,6 @@ import org.apache.log4j.Logger;
* Tree selection model, and when it detects one, it draws two box panels;
* one above the other. The Top box panel is for SiteNode info and cfg, and the
* bottom is for package instance cfg.
import com.arsdigita.ui.util.GlobalizationUtil ;
*
* Every time a selection event is heard, this class:
* <ul>
@ -65,11 +62,8 @@ import com.arsdigita.ui.util.GlobalizationUtil ;
* <li>2) creates a site node from the ID
* <li>3) Extracts the Name of the node
* <li>4) Builds a title for the top box panel with a call to this.makeTitle()
* <li>5) Determines if there is a package instance mounted on the node.
import com.arsdigita.ui.util.GlobalizationUtil ;
* If there is, the title for the bottom is set with a call to makelowertitle.
* <li>5) Determines if there is a package instance mounted on the node.<br />
* If there is, the title for the bottom is set with a call to makelowertitle.
* <li>6) sets visible the appropriate action links for the node, like this:
* <ul>
* <li>a) If Node has no instance, and is a leaf node, Offer "AddSubnode",

View File

@ -35,11 +35,13 @@ import com.arsdigita.ui.util.GlobalizationUtil;
import com.arsdigita.util.LockableImpl;
import org.apache.log4j.Logger;
/**
*
* @version $Id: SiteListing.java 287 2005-02-22 00:29:02Z sskracic $
*/
public class SiteListing extends BoxPanel
implements ChangeListener, ActionListener {
public static final String versionId = "$Id: SiteListing.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $";
private static final Logger s_log =
Logger.getLogger(SiteListing.class);
@ -49,6 +51,9 @@ public class SiteListing extends BoxPanel
private ToggleLink m_addLink;
/**
* Constructor, builds a list of ....
*/
public SiteListing () {
super(BoxPanel.VERTICAL, false);
SiteNode sn;
@ -72,14 +77,28 @@ public class SiteListing extends BoxPanel
}
/**
* Getter method.
*
* @return Returs a list containing the instantiated applications (nodes)
*/
public List getList() {
return m_list;
}
/**
* Getter method.
*
* @return
*/
public Tree getTree() {
return m_tree;
}
/**
*
* @return
*/
public ToggleLink getCFGLink() {
return m_addLink;
}

View File

@ -31,10 +31,12 @@ import com.arsdigita.bebop.ToggleLink;
import com.arsdigita.bebop.event.ActionListener;
import com.arsdigita.bebop.event.ActionEvent;
/**
*
* @version $Id: SiteMapAdminPane.java 287 2005-02-22 00:29:02Z sskracic $
*/
public class SiteMapAdminPane extends SimpleContainer
implements ActionListener {
public static final String versionId = "$Id: SiteMapAdminPane.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $";
implements ActionListener {
private SingleSelectionModel m_processes;
private ToggleLink m_addLink;
@ -42,12 +44,20 @@ public class SiteMapAdminPane extends SimpleContainer
private Label m_noSelection;
private DisplayActions m_displayActions;
private Label m_cfgSiteMap;
/**
* Constructor
*
* @param m
* @param l
*/
public SiteMapAdminPane (SingleSelectionModel m, ToggleLink l) {
super();
m_processes = m;
m_addLink = l;
m_noSelection = new Label(GlobalizationUtil.globalize("ui.sitemap.h4emselect_sitenode_to_view_detailsemh4"), false);
m_noSelection = new Label(GlobalizationUtil.globalize(
"ui.sitemap.h4emselect_sitenode_to_view_detailsemh4"), false);
add(m_noSelection);
m_displayActions = new DisplayActions(m);
@ -55,10 +65,15 @@ public class SiteMapAdminPane extends SimpleContainer
//Have this call a class that outputs the config menu...
m_cfgSiteMap = new Label(GlobalizationUtil.globalize("ui.sitemap.configuration_menu_placeholder"));
m_cfgSiteMap = new Label(GlobalizationUtil.globalize(
"ui.sitemap.configuration_menu_placeholder"));
add(m_cfgSiteMap);
}
/**
*
* @param p
*/
public void register(Page p) {
super.register(p);
p.setVisibleDefault(m_noSelection, true);
@ -67,6 +82,10 @@ public class SiteMapAdminPane extends SimpleContainer
p.addActionListener( this );
}
/**
*
* @param e
*/
public void actionPerformed(ActionEvent e) {
PageState s = e.getPageState();
boolean proc = m_processes.isSelected(s);

View File

@ -50,12 +50,10 @@ import org.apache.log4j.Logger;
/**
* Dispatcher for SiteMap Admin functionality
*
* @version $Id: SiteMapDispatcher.java 287 2005-02-22 00:29:02Z sskracic $
*/
public class SiteMapDispatcher extends BebopMapDispatcher {
public static final String versionId =
"$Id: SiteMapDispatcher.java 287 2005-02-22 00:29:02Z sskracic $" +
"$Author: sskracic $" +
"$DateTime: 2004/08/16 18:10:38 $";
private static final Logger s_log =
Logger.getLogger(SiteMapDispatcher.class);
@ -76,6 +74,14 @@ public class SiteMapDispatcher extends BebopMapDispatcher {
setMap(m);
}
/***
*
* @param req
* @param resp
* @param ctx
* @throws IOException
* @throws javax.servlet.ServletException
*/
public void dispatch(HttpServletRequest req,
HttpServletResponse resp,
RequestContext ctx)
@ -129,7 +135,6 @@ public class SiteMapDispatcher extends BebopMapDispatcher {
/**
* "Access Denied" page for the SiteMap.
*/
private Page buildDeniedPage() {
Page p = PageFactory.buildPage("admin",
new Label(new GlobalizedMessage
@ -146,6 +151,10 @@ public class SiteMapDispatcher extends BebopMapDispatcher {
return p;
}
/**
* Admin Page for the SiteMap application
* @return
*/
private Page buildAdminPage() {
Page p = PageFactory.buildPage("admin", "Sitemap Administration");

View File

@ -22,10 +22,12 @@ import com.arsdigita.kernel.ui.DataQueryTreeModel;
import com.arsdigita.kernel.SiteNode;
/**
*
* @version $Id: SiteNodeTreeModel.java 287 2005-02-22 00:29:02Z sskracic $
*/
public class SiteNodeTreeModel extends DataQueryTreeModel {
public static final String versionId = "$Id: SiteNodeTreeModel.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $";
public SiteNodeTreeModel (SiteNode rootSiteNode) {
super(rootSiteNode.getID(),
"com.arsdigita.ui.sitemap.getRootNode",