//# 0 errors, 51 messages
//#
/*
    //#contentdecoratorcontext.java:1:1: class: net.sourceforge.pebble.api.decorator.ContentDecoratorContext
    //#contentdecoratorcontext.java:1:1: method: net.sourceforge.pebble.api.decorator.ContentDecoratorContext.net.sourceforge.pebble.api.decorator.ContentDecoratorContext__static_init
 * Copyright (c) 2003-2006, Simon Brown
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in
 *     the documentation and/or other materials provided with the
 *     distribution.
 *
 *   - Neither the name of Pebble nor the names of its contributors may
 *     be used to endorse or promote products derived from this software
 *     without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
package net.sourceforge.pebble.api.decorator;

/**
 * Provides context to content decorators, of where they are running, etc.
 *
 * @author    Simon Brown
 */
public class ContentDecoratorContext {

  public static final int SUMMARY_VIEW = 0;
  public static final int DETAIL_VIEW = 1;
  public static final int PREVIEW = 2;

  public static final int HTML_PAGE = 0;
  public static final int NEWS_FEED = 1;
  public static final int XML_RPC = 2;
  public static final int EMAIL = 4;

  private int view = 0;
  private int media = 0;

  public ContentDecoratorContext() {
    //#contentdecoratorcontext.java:53: method: void net.sourceforge.pebble.api.decorator.ContentDecoratorContext.net.sourceforge.pebble.api.decorator.ContentDecoratorContext()
    //#input(void net.sourceforge.pebble.api.decorator.ContentDecoratorContext()): this
    //#output(void net.sourceforge.pebble.api.decorator.ContentDecoratorContext()): this.media
    //#output(void net.sourceforge.pebble.api.decorator.ContentDecoratorContext()): this.view
    //#post(void net.sourceforge.pebble.api.decorator.ContentDecoratorContext()): this.media == 0
    //#post(void net.sourceforge.pebble.api.decorator.ContentDecoratorContext()): this.view == 0
  }
    //#contentdecoratorcontext.java:54: end of method: void net.sourceforge.pebble.api.decorator.ContentDecoratorContext.net.sourceforge.pebble.api.decorator.ContentDecoratorContext()

  public int getView() {
    return view;
    //#contentdecoratorcontext.java:57: method: int net.sourceforge.pebble.api.decorator.ContentDecoratorContext.getView()
    //#input(int getView()): this
    //#input(int getView()): this.view
    //#output(int getView()): return_value
    //#pre[2] (int getView()): init'ed(this.view)
    //#post(int getView()): return_value == this.view
    //#post(int getView()): init'ed(return_value)
    //#contentdecoratorcontext.java:57: end of method: int net.sourceforge.pebble.api.decorator.ContentDecoratorContext.getView()
  }

  public void setView(int view) {
    this.view = view;
    //#contentdecoratorcontext.java:61: method: void net.sourceforge.pebble.api.decorator.ContentDecoratorContext.setView(int)
    //#input(void setView(int)): this
    //#input(void setView(int)): view
    //#output(void setView(int)): this.view
    //#post(void setView(int)): this.view == view
    //#post(void setView(int)): init'ed(this.view)
  }
    //#contentdecoratorcontext.java:62: end of method: void net.sourceforge.pebble.api.decorator.ContentDecoratorContext.setView(int)

  public int getMedia() {
    return media;
    //#contentdecoratorcontext.java:65: method: int net.sourceforge.pebble.api.decorator.ContentDecoratorContext.getMedia()
    //#input(int getMedia()): this
    //#input(int getMedia()): this.media
    //#output(int getMedia()): return_value
    //#pre[2] (int getMedia()): init'ed(this.media)
    //#post(int getMedia()): return_value == this.media
    //#post(int getMedia()): init'ed(return_value)
    //#contentdecoratorcontext.java:65: end of method: int net.sourceforge.pebble.api.decorator.ContentDecoratorContext.getMedia()
  }

  public void setMedia(int media) {
    this.media = media;
    //#contentdecoratorcontext.java:69: method: void net.sourceforge.pebble.api.decorator.ContentDecoratorContext.setMedia(int)
    //#input(void setMedia(int)): media
    //#input(void setMedia(int)): this
    //#output(void setMedia(int)): this.media
    //#post(void setMedia(int)): this.media == media
    //#post(void setMedia(int)): init'ed(this.media)
  }
    //#contentdecoratorcontext.java:70: end of method: void net.sourceforge.pebble.api.decorator.ContentDecoratorContext.setMedia(int)

}    //#output(net.sourceforge.pebble.api.decorator.ContentDecoratorContext__static_init): __Descendant_Table[net/sourceforge/pebble/api/decorator/ContentDecoratorContext]
    //#output(net.sourceforge.pebble.api.decorator.ContentDecoratorContext__static_init): __Dispatch_Table.getMedia()I
    //#output(net.sourceforge.pebble.api.decorator.ContentDecoratorContext__static_init): __Dispatch_Table.getView()I
    //#output(net.sourceforge.pebble.api.decorator.ContentDecoratorContext__static_init): __Dispatch_Table.setMedia(I)V
    //#output(net.sourceforge.pebble.api.decorator.ContentDecoratorContext__static_init): __Dispatch_Table.setView(I)V
    //#post(net.sourceforge.pebble.api.decorator.ContentDecoratorContext__static_init): __Descendant_Table[net/sourceforge/pebble/api/decorator/ContentDecoratorContext] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.api.decorator.ContentDecoratorContext__static_init): __Dispatch_Table.getMedia()I == &getMedia
    //#post(net.sourceforge.pebble.api.decorator.ContentDecoratorContext__static_init): __Dispatch_Table.getView()I == &getView
    //#post(net.sourceforge.pebble.api.decorator.ContentDecoratorContext__static_init): __Dispatch_Table.setMedia(I)V == &setMedia
    //#post(net.sourceforge.pebble.api.decorator.ContentDecoratorContext__static_init): __Dispatch_Table.setView(I)V == &setView
    //#contentdecoratorcontext.java:: end of method: net.sourceforge.pebble.api.decorator.ContentDecoratorContext.net.sourceforge.pebble.api.decorator.ContentDecoratorContext__static_init
    //#contentdecoratorcontext.java:: end of class: net.sourceforge.pebble.api.decorator.ContentDecoratorContext
