/*  Copyright (c) 2000 by Oracle Corporation. All Rights Reserved. */

package oracle.portal.provider.v1;

/**
 *  Defines a Portlet whose meta-data values can be set.  This interface
 *  is provided so that Portlets can be described declaratively.  A provider
 *  reads the declarative information and pushes the Portlet's meta-data into
 *  the instance using these methods. 
 */
public interface MutablePortlet extends Portlet {

    /**
     *  Sets the Portlet security manager.
     *
     *  @param mgr Object implementing the {@link PortletSecurityManager}
     *  interface.
     *  @exception PortletException if the given Object is not a valid {@link
     *  PortletSecurityManager}
     */
    public void setSecurityManager(Object mgr) throws PortletException;

    /**
     *  Sets the Portlet personalization manager.
     *
     *  @param mgr Object implementing the {@link
     *  PortletPersonalizationManager} interface.
     *  @exception PortletException if the given Object is not a valid {@link
     *  PortletPersonalizationManager}
     */
    public void setPersonalizationManager(Object mgr) throws PortletException;

    /**
     *  Sets the Portlet renderer.
     *
     *  @param renderer Object implementing the {@link PortletRenderer}
     *  interface.
     *  @exception PortletException if the given Object is not a valid {@link
     *  PortletRenderer}
     */
    public void setRenderer(Object renderer) throws PortletException;

    /**
     *  Sets the Portlet name.
     *
     *  @param name the Portlet name. This is the Portlet's non-unique display
     *  name.
     */
    public void setName(String name);

    /**
     *  Sets the Portlet unique ID.
     *
     *  @param id the Portlet (unique ID). Value should be a String
     *  representation of a long value, unique with respect to the Provider.
     *  @exception PortletException if the given String does not represent a
     *  valid <code>long</code>.
     */
    public void setId(String id) throws PortletException;

    /**
     *  Sets the Portlet title.
     *
     *  @param title the title of this Portlet. This is the name that shows up
     *  in a portlet's title bar.
     */
    public void setTitle(String title);

    /**
     *  Sets the Portlet description.
     *
     *  @param description a short description of what this portlet is.
     *  Displayed at design-time along with the name and thumbnail image when a
     *  user is choosing to add a portlet to a page.
     */
    public void setDescription(String description);

    /**
     *  Adds to the array of (input) parameters that this portlet recognizes
     *  when requested to render to control/affect the rendering.
     *
     *  @param parameter Object implementing the {@link PortletParameter}
     *  interface.
     *  @exception PortletException if the given Object is not a valid {@link
     *  PortletParameter}
     */
    public void addInputParameter(Object parameter) throws PortletException;

    /**
     *  Adds to the set of mime-types (represented as Strings) that this
     *  Portlet can render.
     *
     *  @param type mime-type String, e.g. "text/html" or "text/xml".
     */
    public void addAcceptContentType(String type);

    /**
     *  Sets the number of seconds the portal should wait before timing out a
     *  request to this portlet.
     *
     *  @param timeout timeout period, as a String representation of an integer
     *  number of seconds.
     *  @exception PortletException if the given String does not represent a
     *  valid <code>int</code>.
     */
    public void setTimeout(String timeout) throws PortletException;

    /**
     *  Sets the timeout messsage that the portal should use in its response when
     *  a request to this Portlet times out.
     *
     *  @param msg timeout message.
     */
    public void setTimeoutMessage(String msg);

    /**
     *  Controls whether this Portlet supports per user personalization.
     *
     *  @param canEdit String representation of boolean value. Should be "true"
     *  if this Portlet is to support per user personalization, "false"
     *  otherwise.
     */
    public void setShowEdit(String canEdit);


    /**
     *  Controls whether this Portlet exposes per user personalization to the
     *  public non-logged in user.
     *
     *  @param canEdit String representation of boolean value. Should be "true"
     *  if this Portlet exposes per user personalization to the public
     *  non-logged in user, "false" otherwise.
     *
     *  @deprecated use MutablePortletXtra3.setMinEditAuthLevel()
     *
     */
    public void setShowEditToPublic(String canEdit);

    /**
     *  Controls whether this Portlet supports per portlet customization. Per
     *  portlet customizations means that all users of this instance see a
     *  customized version of the portlet vs. the generic version. Users are
     *  then free to further personalize this instance (via showEdit).
     *
     *  @param canEditDefault String representation of boolean value. Should be
     *  "true" if this Portlet supports per portlet customization, "false"
     *  otherwise.
     */
    public void setShowEditDefault(String canEditDefault);


    /**
     *  Controls whether this Portlet is capable of displaying a design-time
     *  preview of itself (after customization or personalization).
     *
     *  @param canPreview String representation of boolean value. Should be
     *  "true" if this Portlet is capable of displaying a design-time preview
     *  of itself (after customization or personalization), or "false"
     *  otherwise.
     */
    public void setShowPreview(String canPreview);

    /**
     *  Controls whether this Portlet displays "detailed" mode. Detailed mode
     *  is a full page mode where this portlet is expected to display a finer
     *  level of information.
     *
     *  @param hasDetails String representation of boolean value. Should be
     *  "true" if this Portlet is capable of displaying a "detailed" mode, or
     *  "false" otherwise.
     */
    public void setShowDetails(String hasDetails);

    /**
     *  Controls whether this Portlet displays help information.
     *
     *  @param hasHelp String representation of boolean value. Should be "true"
     *  if this Portlet is capable of displaying a help information, or "false"
     *  otherwise.
     */
    public void setHasHelp(String hasHelp);

    /**
     *  Controls whether this Portlet displays about information.
     *
     *  @param hasAbout String representation of boolean value. Should be
     *  "true" if this Portlet is capable of displaying about information, or
     *  "false" otherwise.
     */
    public void setHasAbout(String hasAbout);

    /**
     *  Sets the name of the default resource bundle class for this Portlet
     *
     *  @param resourceClassName full name of class extending {@link
     *  java.util.ResourceBundle}.
     */
    public void setResource(String resourceClassName);

    /**
     *  Sets the default Locale for this Portal
     *
     *  @param lang a String specifying a Locale, in the form
     *  "language.country".
     */
    public void setDefaultLocale(String lang);
}
