If your extension module needs an Administration interface,
you can add a custom Admin Console Component to manage your module. The Admin
Console is composed of default administration pages. Each Admin Console page is
a simple web script component built from a library of useful functions and
macros that are imported into each Admin Console web script.
The custom Admin Console component can be added by
implementing a repository web script. In this example we will add a custom
component under a new section called “Formtek”. The “General Information”
custom page displays the Formtek Root Directory Path and the Formtek Modules
installed.
To have the new component listed under the
Formtek section we will have to store the web script files in a specific
directory path - org/alfresco/enterprise/repository/admin/zformtek.
The web script descriptor file shown below automatically adds
this custom component to the Admin Console. In the web script descriptor file
the url, family and the authentication tag values are very important. The Admin
Console is available only in the Alfresco Enterprise edition and only an
Administrator can access it so the url has to begin with /enterprise/admin, the
custom component needs to belong to the AdminConsole family and the
authentication has to be set to admin.
In the web script controller, we have to inform the Admin
Console system which MBean and its properties we want to use in our custom
component. In this custom component we are using the ModuleService MBean to get
the list of installed modules.
The web script template contains the page layout. For this
custom component it loops through the list of installed modules and displays only
the Formtek modules. The template uses a number of resource
properties that are fetched using the msg
function.
No comments:
Post a Comment