Domain.xml - the basics

  • user warning: Table 'variable' is marked as crashed and should be repaired query: UPDATE variable SET value = 's:1:\"1\";' WHERE name = 'image_gallery_nav_vocabulary' in /var/www/ on line 609.
  • user warning: Table 'variable' is marked as crashed and should be repaired query: UPDATE variable SET value = 'a:1:{i:0;s:13:\"primary-links\";}' WHERE name = 'menu_expanded' in /var/www/ on line 609.

Domain.xml is a key configuration point in the Vine ecosystem. Here we'll try to explain all major elements of this file.

Here it's a basic Domain.xml file with the basic resources configured:

<domain name="test" label="Test domain" description="Vine Test domain">

    <!-- Portlet authentication -->
    <authenticationModule key="PortletAuthModule"/>
    <!-- Role resource -->

    <!-- Portal -->
    <hostResource name="portal"

        <!-- Portal file system -->
        <portalFileSystem label="Portal File System" description="Portal File System"/>
        <accountResource name="AccountManager"
                         description="Account Manager"/>


domain: resembles the name space concept, in the future will extend this to include a support for the cases with multiple domains, domains inheritance etc.

authentication module: logic responsible for the user authentication, we have the basic authentication module "PortletAuthModule" which relies on the GridSphere authentication routines and checks whether user was successfully authenticated by GridSphere. Apart from that, we've developped several authentication modules for the grid applications ( i.e. authentication against MyProxy ) or general one ( i.e. Active Directory authentication module ). You can have several authentication modules configured simultaneously. Detailed description available here.

Bear in mind that currently if at least one authentication module succeed user is being authenticated.

vineRoleResource: it's the mandatory resource required by Vine's authorization system. It manages of users' roles and access rights to the underlying resources. Could have separate plugins to propagate informations to i.e. middleware resources ( currently we're supporting Gria Data Manager and DMS ).

hostResource: this is the most common used resource. It more or less conforms to the physical host machine with some services installed on it.

In our example there is one mandatory hostResource with localhost hostname attribute. It's important to have this one configured because of the portalFileSystem - Vine internal implementation of file system which has to have localhost url ( taken from the hostname attribute from its parent resource ).

Some descriptive attributes of the 'hostResource' could be useful and possible to use in web applications:
- description - some description
- image1-small-url - url of the small image which represents current resource
- image1-small-label - label for the small image which represents current resource
- image1-url - url of the big image which represents current resource
- image1-label - label for the big image which represents current resource
- html-url - url of html page which describes current resource

accountResource: responsible for users management, if you want to have a real authorization of users you should configure such one in your localhost hostResource. In other case Vine will use its mockup component to simulate that process.

So even if your host machine has its own domain name you should leave this element and add another hostResource with the hostname set to you domain.

hostResource acts as a container or parent resource. Thus you're able to define different child resources within it. The main advantage of such solution is that children have an access to their parent's attributes so you don't need to duplicate your attributes for every resource.