// ---------------------------------------------------------------------------
// This file has been generated by the Web Dynpro Code Generator.
// DO NOT MODIFY! CHANGES WILL BE LOST IF THE FILE IS REGENERATED.
// ---------------------------------------------------------------------------
package uwl.rss.subscriptions.ui.wdp;

import com.sap.tc.webdynpro.progmodel.api.*;
import com.sap.tc.webdynpro.progmodel.gci.*;
import com.sap.tc.webdynpro.progmodel.context.*;
import com.sap.tc.webdynpro.services.exceptions.WDRuntimeException;

/** Interface that is provided to application class. */

public interface IPrivateRssSubscriptionsView {

  /*
   * Event Handler identifiers.
   */ 
    
  /** Event handler constant. */
  public static IWDEventHandlerId WD_EVENTHANDLER_ON_ACTION_SAVE = new com.sap.tc.webdynpro.progmodel.gci.impl.GCIEventHandlerId("onActionSave", "RssSubscriptionsView", "uwl.rss.subscriptions.ui.RssSubscriptions");
  
  /** Event handler constant. */
  public static IWDEventHandlerId WD_EVENTHANDLER_ON_ACTION_DELETE = new com.sap.tc.webdynpro.progmodel.gci.impl.GCIEventHandlerId("onActionDelete", "RssSubscriptionsView", "uwl.rss.subscriptions.ui.RssSubscriptions");
  
  /** Event handler constant. */
  public static IWDEventHandlerId WD_EVENTHANDLER_ON_ACTION_TEST_URL = new com.sap.tc.webdynpro.progmodel.gci.impl.GCIEventHandlerId("onActionTestUrl", "RssSubscriptionsView", "uwl.rss.subscriptions.ui.RssSubscriptions");
  
  /**
   * Provides access to the generic API of this controller.
   */
  IWDViewController wdGetAPI();


  /**
   * Interface for the node 'Context'.
   *
   * singleton = true, cardinality = _1_1, selection = _1_1
   */
  public static class IContextNode extends Node
  {
    private InternalRssSubscriptionsView gen_delegate;

    IContextNode(InternalRssSubscriptionsView delegate, IGCINodeInfo nodeInfo, Node parent) {
      super(nodeInfo, parent);
      gen_delegate = delegate;
    }

    protected com.sap.tc.webdynpro.progmodel.context.Node createNode(IGCINodeInfo nodeInfo, com.sap.tc.webdynpro.progmodel.context.Node parentNode, com.sap.tc.webdynpro.progmodel.context.NodeElement parentElement) {
      if (nodeInfo == gen_delegate.infoContext)
        return new IPrivateRssSubscriptionsView.IContextNode(gen_delegate, nodeInfo, parentNode);
      if (nodeInfo == gen_delegate.infoSubscriptions)
        return new IPrivateRssSubscriptionsView.ISubscriptionsNode(gen_delegate, nodeInfo, parentNode);
      return super.createNode(nodeInfo, parentNode, parentElement);
    }

    protected com.sap.tc.webdynpro.progmodel.context.NodeElement doCreateElement(IGCINodeInfo nodeInfo, Object reference) {
      if (nodeInfo == gen_delegate.infoContext) {
        return new IPrivateRssSubscriptionsView.IContextElement(gen_delegate, nodeInfo);
      }
      if (nodeInfo == gen_delegate.infoSubscriptions) {
        return new IPrivateRssSubscriptionsView.ISubscriptionsElement(gen_delegate, nodeInfo);
      }
      return super.doCreateElement(nodeInfo, reference);
    }

    // ---- typed accessors --------------------------------------------------

    /**
     * Provides access to the generic context API as described by IWDContext.
     */
    public IWDContext wdGetAPI() {
      return getContext();
    }

    /**
     * Creates a new element for this node. The element is <b>not</b> bound 
     * to the node. Use {@link #bind(IContextElement)} or 
     * {@link IWDNode#bind(Collection)} to bind it or {@link IWDNode#addElement(IWDNodeElement)}
     * to add it to the node.
     * @return an element for this node
     */
    public IPrivateRssSubscriptionsView.IContextElement createContextElement() {
      return (IPrivateRssSubscriptionsView.IContextElement)createElement();
    }

    /**
     * Binds a single IContextElement to the node.
     * @param element a node element for this node
     */
    public void bind(IPrivateRssSubscriptionsView.IContextElement element) {
      bind(element == null ? java.util.Collections.EMPTY_LIST : java.util.Collections.singletonList(element));
    }

    /** 
     * Returns the element at the lead selection.
     * @return the element at the lead selection or <code>null</code> if the
     *         lead selection is not set
     */
    public IPrivateRssSubscriptionsView.IContextElement currentContextElement() {
      return (IPrivateRssSubscriptionsView.IContextElement) getCurrentElement();
    }

    // ---- hooks ------------------------------------------------------------

    // ---- child nodes ------------------------------------------------------------

    private IPrivateRssSubscriptionsView.ISubscriptionsNode gen_nodeSubscriptions;
    
    /**
     * Returns the singleton child node Subscriptions.
     * @return the child node
     */
    public IPrivateRssSubscriptionsView.ISubscriptionsNode nodeSubscriptions() {
      if (gen_nodeSubscriptions == null)
        gen_nodeSubscriptions = (IPrivateRssSubscriptionsView.ISubscriptionsNode) getChildNode("Subscriptions");
      return gen_nodeSubscriptions;
    }

    /**
     * Returns the current (lead selection) element of the singleton child node
     * Subscriptions.
     * @return the child node element or <code>null</code> if no such element 
     *         exists
     */
    public IPrivateRssSubscriptionsView.ISubscriptionsElement currentSubscriptionsElement() {
      return (IPrivateRssSubscriptionsView.ISubscriptionsElement) nodeSubscriptions().getCurrentElement();
    }

    public IPrivateRssSubscriptionsView.ISubscriptionsElement createSubscriptionsElement() {
      return (IPrivateRssSubscriptionsView.ISubscriptionsElement) doCreateElement(gen_delegate.infoSubscriptions, null);
    }

  }

  /**
   * Interface for the elements of the node Context.
   */
  public static class IContextElement extends com.sap.tc.webdynpro.progmodel.context.NodeElement
  {
    private InternalRssSubscriptionsView gen_delegate;

    public IContextElement(InternalRssSubscriptionsView delegate, com.sap.tc.webdynpro.progmodel.gci.IGCINodeInfo info) {
      super(info);
      gen_delegate = delegate;
    }

  }


  /**
   * Interface for the node 'Subscriptions'.
   *
   * singleton = true, cardinality = _0_n, selection = _0_n
   */
  public static class ISubscriptionsNode extends Node
  {
    private InternalRssSubscriptionsView gen_delegate;

    ISubscriptionsNode(InternalRssSubscriptionsView delegate, IGCINodeInfo nodeInfo, Node parent) {
      super(nodeInfo, parent);
      gen_delegate = delegate;
    }

    // ---- typed accessors --------------------------------------------------

    /**
     * Creates a new element for this node. The element is <b>not</b> bound 
     * to the node. Use {@link #bind(ISubscriptionsElement)} or 
     * {@link IWDNode#bind(Collection)} to bind it or {@link IWDNode#addElement(IWDNodeElement)}
     * to add it to the node.
     * @return an element for this node
     */
    public IPrivateRssSubscriptionsView.ISubscriptionsElement createSubscriptionsElement() {
      return (IPrivateRssSubscriptionsView.ISubscriptionsElement)createElement();
    }

    /**
     * Binds a single ISubscriptionsElement to the node.
     * @param element a node element for this node
     */
    public void bind(IPrivateRssSubscriptionsView.ISubscriptionsElement element) {
      bind(element == null ? java.util.Collections.EMPTY_LIST : java.util.Collections.singletonList(element));
    }

    /** 
     * Returns the element at the lead selection.
     * @return the element at the lead selection or <code>null</code> if the
     *         lead selection is not set
     */
    public IPrivateRssSubscriptionsView.ISubscriptionsElement currentSubscriptionsElement() {
      return (IPrivateRssSubscriptionsView.ISubscriptionsElement) getCurrentElement();
    }

    /** 
     * Returns the element at the given index.
     * @param index the index of the element you want to get
     * @return the element or <code>null</code> if no element
     *         exists at that index
     */
    public IPrivateRssSubscriptionsView.ISubscriptionsElement getSubscriptionsElementAt(int index) {
      return (IPrivateRssSubscriptionsView.ISubscriptionsElement) getElementAt(index);
    }

    // ---- hooks ------------------------------------------------------------

    // ---- child nodes ------------------------------------------------------------

  }

  /**
   * Interface for the elements of the node Subscriptions.
   */
  public static class ISubscriptionsElement extends com.sap.tc.webdynpro.progmodel.context.NodeElement
  {
    private InternalRssSubscriptionsView gen_delegate;

    public ISubscriptionsElement(InternalRssSubscriptionsView delegate, com.sap.tc.webdynpro.progmodel.gci.IGCINodeInfo info) {
      super(info);
      gen_delegate = delegate;
    }

    // attribute "url"
    public final static String URL = "url";

    private java.lang.String _url;

    /**
     * Returns the attribute url.
     */
    public java.lang.String getUrl() {
      return _url;
    }

    /**
     * Sets the attribute url.
     * @param value the new value
     */
    public void setUrl(java.lang.String value) {
      this._url = value;
      changed(0);
    }
    
    // attribute "title"
    public final static String TITLE = "title";

    private java.lang.String _title;

    /**
     * Returns the attribute title.
     */
    public java.lang.String getTitle() {
      return _title;
    }

    /**
     * Sets the attribute title.
     * @param value the new value
     */
    public void setTitle(java.lang.String value) {
      this._title = value;
      changed(1);
    }
    
    // attribute "disabled"
    public final static String DISABLED = "disabled";

    private boolean _disabled;

    /**
     * Returns the attribute disabled.
     */
    public boolean getDisabled() {
      return _disabled;
    }

    /**
     * Sets the attribute disabled.
     * @param value the new value
     */
    public void setDisabled(boolean value) {
      this._disabled = value;
      changed(2);
    }
    
    // attribute "statusImage"
    public final static String STATUS_IMAGE = "statusImage";

    private java.lang.String _statusImage;

    /**
     * Returns the attribute statusImage.
     */
    public java.lang.String getStatusImage() {
      return _statusImage;
    }

    /**
     * Sets the attribute statusImage.
     * @param value the new value
     */
    public void setStatusImage(java.lang.String value) {
      this._statusImage = value;
      changed(3);
    }
    
    // attribute "statusText"
    public final static String STATUS_TEXT = "statusText";

    private java.lang.String _statusText;

    /**
     * Returns the attribute statusText.
     */
    public java.lang.String getStatusText() {
      return _statusText;
    }

    /**
     * Sets the attribute statusText.
     * @param value the new value
     */
    public void setStatusText(java.lang.String value) {
      this._statusText = value;
      changed(4);
    }
    
    // generic access to fields (framework usage)
    protected Object wdGetObject(IGCIAttributeInfo info) {
      switch (info.getIndex()) {
        case 0: // url
          return _url;
        case 1: // title
          return _title;
        case 2: // disabled
          return new Boolean(_disabled);
        case 3: // statusImage
          return _statusImage;
        case 4: // statusText
          return _statusText;
        default:
          return super.wdGetObject(info);
      }
    }

    protected void wdSetObject(IGCIAttributeInfo info, Object value) {
      switch (info.getIndex()) {
        case 0: // url
          this._url = (String)value;
          changed(info);
          break;
        case 1: // title
          this._title = (String)value;
          changed(info);
          break;
        case 2: // disabled
          this._disabled = ((Boolean)value).booleanValue();
          changed(info);
          break;
        case 3: // statusImage
          this._statusImage = (String)value;
          changed(info);
          break;
        case 4: // statusText
          this._statusText = (String)value;
          changed(info);
          break;
        default:
          super.wdSetObject(info, value);
          break;
      }
    }

    protected boolean wdGetBoolean(IGCIAttributeInfo info) {
      switch (info.getIndex()) {
        case 2: // disabled
          return _disabled;
        default:
          return super.wdGetBoolean(info);
      }
    }

    protected void wdSetBoolean(IGCIAttributeInfo info, boolean value) {
      switch (info.getIndex()) {
        case 2: // disabled
          this._disabled = (boolean)value;
          changed(info);
          break;
        default:
          super.wdSetBoolean(info, value);
          break;
      }
    }

    protected String wdGetString(IGCIAttributeInfo info) {
      switch (info.getIndex()) {
        case 0: // url
          return _url;
        case 1: // title
          return _title;
        case 3: // statusImage
          return _statusImage;
        case 4: // statusText
          return _statusText;
        default:
          return super.wdGetString(info);
      }
    }

    protected void wdSetString(IGCIAttributeInfo info, String value) {
      switch (info.getIndex()) {
        case 0: // url
          this._url = (java.lang.String)value;
          changed(info);
          break;
        case 1: // title
          this._title = (java.lang.String)value;
          changed(info);
          break;
        case 3: // statusImage
          this._statusImage = (java.lang.String)value;
          changed(info);
          break;
        case 4: // statusText
          this._statusText = (java.lang.String)value;
          changed(info);
          break;
        default:
          super.wdSetString(info, value);
          break;
      }
    }

  }

  /**
   * Returns the context root node.
   * @return the context root node.
   */
  IContextNode wdGetContext();

  /** Declared event handler. */
  void onActionSave(IWDCustomEvent wdEvent );

  /** Declared event handler. */
  void onActionDelete(IWDCustomEvent wdEvent );

  /** Declared event handler. */
  void onActionTestUrl(IWDCustomEvent wdEvent );

  /** Gets controller belonging to the same component. */
  uwl.rss.subscriptions.ui.wdp.IPublicRssSubscriptionsInterface wdGetRssSubscriptionsInterfaceController();

  /** Gets controller belonging to the same component. */
  uwl.rss.subscriptions.ui.wdp.IPublicRssSubscriptionsInterfaceView wdGetRssSubscriptionsInterfaceViewController();

  /** Gets controller belonging to the same component. */
  uwl.rss.subscriptions.ui.wdp.IPublicRssSubscriptions wdGetRssSubscriptionsController();

  /** Gets action 'Save'. */
  IWDAction wdGetSaveAction();

  /** Gets action 'Delete'. */
  IWDAction wdGetDeleteAction();

  /** Gets action 'TestUrl'. */
  IWDAction wdGetTestUrlAction();

  /** Enumeration of all available action event handlers. */
  public final class WDActionEventHandler extends com.sap.tc.webdynpro.progmodel.gci.GCIActionEventHandlerEnum
  {
    public static final WDActionEventHandler SAVE = new WDActionEventHandler("onActionSave", true, NO_PARAMETERS);
    public static final WDActionEventHandler DELETE = new WDActionEventHandler("onActionDelete", true, NO_PARAMETERS);
    public static final WDActionEventHandler TEST_URL = new WDActionEventHandler("onActionTestUrl", true, NO_PARAMETERS);

    private WDActionEventHandler(String value, boolean isValidating, Object[] declaredParameters) {
      super(value, isValidating, declaredParameters);
    }
  }

  /**
   * Creates a new action for this controller.
   * @param eventHandler is the action's event handler with an appropriate signature
   * @param text is the text displayed in the UI element triggering this action
   */
  IWDAction wdCreateAction(WDActionEventHandler eventHandler, String text);

  /**
   * Creates a new action with the given name for this controller.
   * @param eventHandler is the action's event handler with an appropriate signature
   * @param name is the action's name
   * @param text is the text displayed in the UI element triggering this action
   */
  IWDAction wdCreateNamedAction(WDActionEventHandler eventHandler, String name, String text);

}
