FileDocCategorySizeDatePackage
AddonInstanceRegistry.javaAPI DocGlassfish v2 API3801Fri May 04 22:30:24 BST 2007com.sun.enterprise.addons

AddonInstanceRegistry

public class AddonInstanceRegistry extends AddonRegistry
This class maintains the registry, it is a warpper over Properties class.
author
binod@dev.java.net

Fields Summary
Constructors Summary
protected AddonInstanceRegistry(File domainRoot, Logger logger)

        super(domainRoot, logger);
    
Methods Summary
protected statusgetStatus(java.lang.String name)
Retrieve the current status of the addon. If the addon does not exist in the registry, then it should be configured. If the addon status is changed to enabled/disabled that is figured out by comparing with the system copy. of the registry. If the addon is marked for unconfiguring, the addon status will be "unconfigure". If the status is same in user copy and system copy the status will be "unchanged"


        String systemConfFlag = 
        String.class.cast(systemRegistry.get(name+INSTANCEKEY+CONFIGUREKEY));

        if (systemConfFlag != null && systemConfFlag.equals("true")) {
            return status.CONFIGURE;
        }

        if (systemConfFlag != null && systemConfFlag.equals("false")) {
            return status.UNCONFIGURE;
        }

        return status.UNCHANGED;
    
protected voidsetStatus(java.lang.String name, status stat)
Change the status. It will make the status the same in user copy of the registry and system copy.

        if (logger.isLoggable(Level.FINER)) {
            logger.log(Level.FINER, 
            "[No Op]Setting status of " + name + " as" + stat);
        }