All Versions
- DSpace 7.x (Current Release)
- DSpace 8.x (Unreleased)
- DSpace 6.x (EOL)
- DSpace 5.x (EOL)
- More Versions...
Old Release
This documentation relates to an old version of DSpace, version 6.x. Looking for another version? See all documentation.
Support for DSpace 6 ended on July 1, 2023. See Support for DSpace 5 and 6 is ending in 2023
Out of the box the control panel is configured (in dspace/config/modules/controlpanel.cfg) to display 5 tabs. These are the same tabs that were present in the previous non-configurable version.
You can remove any of these tabs or create new ones. The configuration file lists the tabs as named plugins (see PluginManager)
The actual file looks like this
#---------------------------------------------------------------#
#------------ADMIN CONTROL PANEL CONFIGURATIONS-----------------#
#---------------------------------------------------------------#
### Control Panel Tabs
controlpanel.tabs = Java Information, \
Configuration, \
SystemWide Alerts, \
Harvesting, \
Current Activity, \
plugin.named.org.dspace.app.xmlui.aspect.administrative.controlpanel.ControlPanelTab = \
org.dspace.app.xmlui.aspect.administrative.controlpanel.ControlPanelJavaTab = Java Information, \
org.dspace.app.xmlui.aspect.administrative.controlpanel.ControlPanelConfigurationTab = Configuration, \
org.dspace.app.xmlui.aspect.administrative.controlpanel.ControlPanelAlertsTab = SystemWide Alerts, \
org.dspace.app.xmlui.aspect.administrative.controlpanel.ControlPanelHarvestingTab = Harvesting, \
org.dspace.app.xmlui.aspect.administrative.controlpanel.ControlPanelCurrentActivityTab = Current Activity, \
controlpanel.tabs becomes the label of the tab and a link to it (eg. admin/panel?tab=Harvesting). The respective tabs can access their name or more precisely
contextPath + "/admin/panel?tab=" + tab_name
under this.web_link
From the configuration example above all the tabs implement interface ControlPanelTab, but in new tab implementation you really want to extend AbstractControlPanelTab. Only method you need to implement/override is
public void addBody(Map objectModel, Division div) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException
Let's take as an example the ControlPanelConfigurationTab, which lists some of the important variables from config files, with the imports and i18n strings left out this tab boils down just to the few lines below
public class ControlPanelConfigurationTab extends AbstractControlPanelTab {
...
/**
* Guarantee a non-null String.
*
* @param value candidate string.
* @return {@code value} or a constant indicating an unset value.
*/
private static String notempty(String value) { return (null == value || "".equals(value)) ? T_UNSET : value; }
@Override
public void addBody(Map objectModel, Division div) throws WingException {
// LIST: DSpace
List dspace = div.addList("dspace");
dspace.setHead(T_DSPACE_HEAD);
dspace.addLabel(T_DSPACE_VERSION);
dspace.addItem(Util.getSourceVersion());
dspace.addLabel(T_DSPACE_DIR);
dspace.addItem(notempty(ConfigurationManager.getProperty("dspace.dir")));
dspace.addLabel(T_DSPACE_URL);
String base_url = notempty(ConfigurationManager.getProperty("dspace.url"));
dspace.addItemXref(base_url, base_url);
dspace.addLabel(T_DSPACE_HOST_NAME);
dspace.addItem(notempty(ConfigurationManager.getProperty("dspace.hostname")));
dspace.addLabel(T_DSPACE_NAME);
dspace.addItem(notempty(ConfigurationManager.getProperty("dspace.name")));
dspace.addLabel(T_DB_NAME);
dspace.addItem(notempty(DatabaseManager.getDbName()));
dspace.addLabel(T_DB_URL);
dspace.addItem(notempty(ConfigurationManager.getProperty("db.url")));
dspace.addLabel(T_DB_DRIVER);
dspace.addItem(notempty(ConfigurationManager.getProperty("db.driver")));
dspace.addLabel(T_DB_MAX_CONN);
dspace.addItem(notempty(ConfigurationManager.getProperty("db.maxconnections")));
dspace.addLabel(T_DB_MAX_WAIT);
dspace.addItem(notempty(ConfigurationManager.getProperty("db.maxwait")));
dspace.addLabel(T_DB_MAX_IDLE);
dspace.addItem(notempty(ConfigurationManager.getProperty("db.maxidle")));
dspace.addLabel(T_MAIL_SERVER);
dspace.addItem(notempty(ConfigurationManager.getProperty("mail.server")));
dspace.addLabel(T_MAIL_FROM_ADDRESS);
dspace.addItem(notempty(ConfigurationManager.getProperty("mail.from.address")));
dspace.addLabel(T_FEEDBACK_RECIPIENT);
dspace.addItem(notempty(ConfigurationManager.getProperty("feedback.recipient")));
dspace.addLabel(T_MAIL_ADMIN);
dspace.addItem(notempty(ConfigurationManager.getProperty("mail.admin")));
}