Nov 9, 2021 3:43:44 PM Thomas Dumont avatar

AdminDashboard

Definition

An AdminDashboard is a component that will be added to the dashboards of the Back Office of Lutece.

Creation

Implementation

An AdminDashboard is implemented as a java class extending the AdminDashboardComponent class. This class will need to implement the getDashboardData( ) method.

/**
 *
 * MyAdminDashboardComponent.
 */
public class MyAdminDashboardComponent extends AdminDashboardComponent
{
    /**
     *
     * {@inheritDoc}
     */
    @Override
    public String getDashboardData( AdminUser user, HttpServletRequest request )
    {
	...
    }
}

Declaration

An AdminDashboard must be declared in the xml file of the plugin by adding the following lines :

<admindashboard-components>
    <admindashboard-component>
        <dashboard-component-name>myAdminDashboardComponent</dashboard-component-name>
        <dashboard-component-class>fr.paris.lutece.plugins.myplugin.web.myAdminDashboardComponent</dashboard-component-class>
    </admindashboard-component>
    ...
</admindashboard-components>