/* Copyright (c) 2001, 2003 Oracle Corporation. All Rights Reserved */
package oracle.portal.provider.v2;

/**
 * Interface used to store Portlet related constants.
 */
public interface PortletConstants
{
    /**
     * Resource attribute name for the portlet name.  If your portlets string
     * meta-data is stored in a resource bundle use this constant to represent
     * the portlet's name.
     */
    public static final String NAME = "PortletName";

    /**
     * Resource attribute name for the portlet title.  If your portlets string
     * meta-data is stored in a resource bundle use this constant to represent
     * the portlet's title.
     */
    public static final String TITLE = "PortletTitle";

    /**
     * Resource attribute name for the portlet short title.  If your portlets string
     * meta-data is stored in a resource bundle use this constant to represent
     * the portlet's short title.
     */
    public static final String SHORTTITLE = "PortletShortTitle";

    /**
     * Resource attribute name for the portlet description.  If your portlets
     * string meta-data is stored in a resource bundle use this constant to
     * represent the portlet's description.
     */
    public static final String DESCRIPTION = "PortletDescription";

    /**
     * Resource attribute name for the portlet timeout message.  If your
     * portlets string meta-data is stored in a resource bundle use this
     * constant to represent the portlet's timeout message.
     */
    public static final String TIMEOUTMSG = "PortletTimeoutMsg";

    /**
     * The possible values for the cacheLevel attribute that may appear
     * in the default provider definition file parsed by 
     * DefaultProviderDefinition.
     */
    public static final String CACHE_LEVEL_SYSTEM_STR  = "system";
    public static final String CACHE_LEVEL_USER_STR    = "user";
    public static final String CACHE_LEVEL_SESSION_STR = "session";

    /**
     * The possible values stored for the cacheLevel property.
     */
    public static final int CACHE_LEVEL_UNSPECIFIED = -1;
    public static final int CACHE_LEVEL_SYSTEM      = 0;
    public static final int CACHE_LEVEL_USER        = 1;
    public static final int CACHE_LEVEL_SESSION     = 2;

    /**
     * The possible values stored for the rewriteUrls property.
     */
    public static final int REWRITE_URLS_UNSPECIFIED = -1;
    public static final int REWRITE_URLS_FALSE       = 0;
    public static final int REWRITE_URLS_TRUE        = 1;

    /**
     * Setting used to indicate that the locale personalization level is not
     * specified.
     */
    public static final int PERSONALIZATION_LEVEL_UNSPECIFIED = -1;

    /**
     * Setting used to indicate that the locale personalization level is NONE,
     * i.e default preferences are stored at the system level, irrespective of
     * the locale in which they are created.
     */
    public static final int PERSONALIZATION_LEVEL_NONE = 0;

    /**
     * Setting used to indicate that the locale personalization level is
     * LANGUAGE, i.e in addition to system level, default preferences will be
     * stored with language information from the locale only (no
     * country/territory).
     */
    public static final int PERSONALIZATION_LEVEL_LANGUAGE = 1;

    /**
     * Setting used to indicate that the locale personalization level is LOCALE,
     * i.e in addition to system level, default preferences will be stored with
     * full locale information (language and country).
     */
    public static final int PERSONALIZATION_LEVEL_LOCALE = 2;

    /**
     * String used to represent {@link #PERSONALIZATION_LEVEL_NONE} in a
     * human readable form.
     */
    public static final String PERSONALIZATION_LEVEL_NONE_STR = "none";

    /**
     * String used to represent {@link #PERSONALIZATION_LEVEL_LANGUAGE} in a
     * human readable form.
     */
    public static final String PERSONALIZATION_LEVEL_LANGUAGE_STR = "language";

    /**
     * String used to represent {@link #PERSONALIZATION_LEVEL_LOCALE} in a
     * human readable form.
     */
    public static final String PERSONALIZATION_LEVEL_LOCALE_STR = "locale";
}
