// Copyright (c) 2003 Oracle Corporation

package oracle.portal.provider.v1;

import oracle.portal.provider.v1.ProviderXtra;

/**
 * First Extension to the Provider interface.
 *
 * This interface represents an extension to the Provider interface.
 * An extension interface was used to code using the original interface
 * would not be broken by adding new methods.
 */
public interface ProviderXtra2 extends ProviderXtra 
{

    /**
    * Used to determine if this provider needs to be re-initialized from the
    * provider.xml file.  
    * 
    * <p>The mechanism used should work when providers are load-balanced. This
    * means it cannot be drived by communication from the portal such as a 
    * repository refresh (as it used
    * to be) because only one server will receive the refresh request and 
    * reloaded the definition. This leads to the servers being out of sync.</p>
    * 
    * <p>The simplest way to do this is to trigger reload (or at least a 
    * modification check) on a time interval.</p> 
    * This feature requires auto-reload to be enabled.
    * @param action not currently used
    * @returns true if the provider.xml needs to be reloaded.
    */
    public boolean isReloadRequired(int action);
    

    /**
     * Returns the ProviderLog associated with this provider 
     *
     * @return the ProviderLog associated with this provider
     */
    public ProviderLog getProviderLog();


    /**
    * Returns true if debug mode is enabled.
    *
    * Debug mode enabled is determined by the Debug Level being greater than zero
    * 
    * @returns true if debug mode is enabled. Otherwise false
    */
    public boolean isDebugEnabled();

    
    /**
    * Returns the current debug level.
    * 
    * @returns the current debug level
    */
    public int getDebugLevel();


}

