/*
 * Smart GWT (GWT for SmartClient)
 * Copyright 2008 and beyond, Isomorphic Software, Inc.
 *
 * Smart GWT is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License version 3
 * as published by the Free Software Foundation.  Smart GWT is also
 * available under typical commercial license terms - see
 * http://smartclient.com/license
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 */
/* sgwtgen */
 
package com.smartgwt.client.tools;


import com.smartgwt.client.event.*;
import com.smartgwt.client.core.*;
import com.smartgwt.client.types.*;
import com.smartgwt.client.data.*;
import com.smartgwt.client.data.Record;
import com.smartgwt.client.data.events.*;
import com.smartgwt.client.browser.window.*;
import com.smartgwt.client.rpc.*;
import com.smartgwt.client.ai.*;
import com.smartgwt.client.callbacks.*;
import com.smartgwt.client.tools.*;
import com.smartgwt.client.bean.*;
import com.smartgwt.client.widgets.*;
import com.smartgwt.client.widgets.ai.*;
import com.smartgwt.client.widgets.events.*;
import com.smartgwt.client.widgets.form.*;
import com.smartgwt.client.widgets.form.validator.*;
import com.smartgwt.client.widgets.form.fields.*;
import com.smartgwt.client.widgets.tile.*;
import com.smartgwt.client.widgets.tile.events.*;
import com.smartgwt.client.widgets.grid.*;
import com.smartgwt.client.widgets.grid.events.*;
import com.smartgwt.client.widgets.chart.*;
import com.smartgwt.client.widgets.layout.*;
import com.smartgwt.client.widgets.layout.events.*;
import com.smartgwt.client.widgets.menu.*;
import com.smartgwt.client.widgets.tour.*;
import com.smartgwt.client.widgets.notify.*;
import com.smartgwt.client.widgets.rte.*;
import com.smartgwt.client.widgets.rte.events.*;
import com.smartgwt.client.widgets.ace.*;
import com.smartgwt.client.widgets.ace.events.*;
import com.smartgwt.client.widgets.tab.*;
import com.smartgwt.client.widgets.toolbar.*;
import com.smartgwt.client.widgets.tree.*;
import com.smartgwt.client.widgets.tree.events.*;
import com.smartgwt.client.widgets.tableview.*;
import com.smartgwt.client.widgets.viewer.*;
import com.smartgwt.client.widgets.calendar.*;
import com.smartgwt.client.widgets.calendar.events.*;
import com.smartgwt.client.widgets.cube.*;
import com.smartgwt.client.widgets.notify.*;
import com.smartgwt.client.widgets.drawing.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import com.google.gwt.event.shared.*;
import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.core.client.JavaScriptObject;

import com.smartgwt.client.util.*;
import com.smartgwt.client.util.events.*;
import com.smartgwt.client.util.workflow.*;
import com.smartgwt.client.util.workflow.Process; // required to override java.lang.Process
import com.smartgwt.client.util.tour.*;


/**
 * Configuration object for {@link com.smartgwt.client.tools.Reify#loadReify Reify.loadReify()}.
 */
@BeanFactory.FrameworkClass
public class ReifyLoadConfig extends DataClass {

    public static ReifyLoadConfig getOrCreateRef(JavaScriptObject jsObj) {
        if(jsObj == null) return null;
        return new ReifyLoadConfig(jsObj);
    }
        


    public ReifyLoadConfig(){
        
    }

    public ReifyLoadConfig(JavaScriptObject jsObj){
        
        setJavaScriptObject(jsObj);
    }



    // ********************* Properties / Attributes ***********************

    /**
     * ID of a DataSource to open when Reify loads.
     *
     * @param dataSource New dataSource value. Default value is null
     * @return {@link com.smartgwt.client.tools.ReifyLoadConfig ReifyLoadConfig} instance, for chaining setter calls
     */
    public ReifyLoadConfig setDataSource(String dataSource) {
        return (ReifyLoadConfig)setAttribute("dataSource", dataSource);
    }

    /**
     * ID of a DataSource to open when Reify loads.
     *
     * @return Current dataSource value. Default value is null
     */
    public String getDataSource()  {
        return getAttributeAsString("dataSource");
    }
    

    /**
     * How to load the Reify editor: <code>"inline"</code> loads Reify as a {@link com.smartgwt.client.widgets.Canvas} in the
     * current page; <code>"window"</code> opens Reify in a new browser tab.
     *
     * @param mode New mode value. Default value is "window"
     * @return {@link com.smartgwt.client.tools.ReifyLoadConfig ReifyLoadConfig} instance, for chaining setter calls
     */
    public ReifyLoadConfig setMode(String mode) {
        return (ReifyLoadConfig)setAttribute("mode", mode);
    }

    /**
     * How to load the Reify editor: <code>"inline"</code> loads Reify as a {@link com.smartgwt.client.widgets.Canvas} in the
     * current page; <code>"window"</code> opens Reify in a new browser tab.
     *
     * @return Current mode value. Default value is "window"
     */
    public String getMode()  {
        return getAttributeAsString("mode");
    }
    

    /**
     * Name of a project to open when Reify loads.
     *
     * @param project New project value. Default value is null
     * @return {@link com.smartgwt.client.tools.ReifyLoadConfig ReifyLoadConfig} instance, for chaining setter calls
     */
    public ReifyLoadConfig setProject(String project) {
        return (ReifyLoadConfig)setAttribute("project", project);
    }

    /**
     * Name of a project to open when Reify loads.
     *
     * @return Current project value. Default value is null
     */
    public String getProject()  {
        return getAttributeAsString("project");
    }
    

    /**
     * For <code>mode:"inline"</code>, additional properties to apply to the {@link com.smartgwt.client.tools.Reify} instance
     * when it is created.
     *
     * @param reifyProperties New reifyProperties value. Default value is null
     * @return {@link com.smartgwt.client.tools.ReifyLoadConfig ReifyLoadConfig} instance, for chaining setter calls
     */
    public ReifyLoadConfig setReifyProperties(Map reifyProperties) {
        return (ReifyLoadConfig)setAttribute("reifyProperties", reifyProperties);
    }

    /**
     * For <code>mode:"inline"</code>, additional properties to apply to the {@link com.smartgwt.client.tools.Reify} instance
     * when it is created.
     *
     * @return Current reifyProperties value. Default value is null
     */
    public Map getReifyProperties()  {
        return getAttributeAsMap("reifyProperties");
    }
    

    /**
     * For <code>mode:"window"</code> with <code>useRTM:true</code>, the RTM channel name to use for communication.  Defaults
     * to a randomly generated session ID.
     *
     * @param rtmChannel New rtmChannel value. Default value is null
     * @return {@link com.smartgwt.client.tools.ReifyLoadConfig ReifyLoadConfig} instance, for chaining setter calls
     */
    public ReifyLoadConfig setRtmChannel(String rtmChannel) {
        return (ReifyLoadConfig)setAttribute("rtmChannel", rtmChannel);
    }

    /**
     * For <code>mode:"window"</code> with <code>useRTM:true</code>, the RTM channel name to use for communication.  Defaults
     * to a randomly generated session ID.
     *
     * @return Current rtmChannel value. Default value is null
     */
    public String getRtmChannel()  {
        return getAttributeAsString("rtmChannel");
    }
    

    /**
     * Name of a screen to open when Reify loads.
     *
     * @param screen New screen value. Default value is null
     * @return {@link com.smartgwt.client.tools.ReifyLoadConfig ReifyLoadConfig} instance, for chaining setter calls
     */
    public ReifyLoadConfig setScreen(String screen) {
        return (ReifyLoadConfig)setAttribute("screen", screen);
    }

    /**
     * Name of a screen to open when Reify loads.
     *
     * @return Current screen value. Default value is null
     */
    public String getScreen()  {
        return getAttributeAsString("screen");
    }
    

    /**
     * For <code>mode:"inline"</code>, a {@link com.smartgwt.client.widgets.layout.Layout} to add the Reify instance to as a
     * member.  If not specified, the Reify instance is created but not added to the page ? call {@link
     * com.smartgwt.client.widgets.Canvas#draw Canvas.draw()} or add it to a layout manually.
     *
     * @param target New target value. Default value is null
     * @return {@link com.smartgwt.client.tools.ReifyLoadConfig ReifyLoadConfig} instance, for chaining setter calls
     */
    public ReifyLoadConfig setTarget(Layout target) {
        return (ReifyLoadConfig)setAttribute("target", target == null ? null : target.getOrCreateJsObj());
    }

    /**
     * For <code>mode:"inline"</code>, a {@link com.smartgwt.client.widgets.layout.Layout} to add the Reify instance to as a
     * member.  If not specified, the Reify instance is created but not added to the page ? call {@link
     * com.smartgwt.client.widgets.Canvas#draw Canvas.draw()} or add it to a layout manually.
     *
     * @return Current target value. Default value is null
     */
    public Layout getTarget()  {
        return (Layout)Layout.getByJSObject(getAttributeAsJavaScriptObject("target"));
    }
    

    /**
     * For <code>mode:"window"</code>, whether to use {@link com.smartgwt.client.docs.RealtimeMessaging} for communication
     * between the host page and the Reify window.  By default, <code>window.postMessage</code> is used, which requires
     * same-origin.  Set <code>useRTM:true</code> for cross-origin scenarios.
     *
     * @param useRTM New useRTM value. Default value is false
     * @return {@link com.smartgwt.client.tools.ReifyLoadConfig ReifyLoadConfig} instance, for chaining setter calls
     */
    public ReifyLoadConfig setUseRTM(Boolean useRTM) {
        return (ReifyLoadConfig)setAttribute("useRTM", useRTM);
    }

    /**
     * For <code>mode:"window"</code>, whether to use {@link com.smartgwt.client.docs.RealtimeMessaging} for communication
     * between the host page and the Reify window.  By default, <code>window.postMessage</code> is used, which requires
     * same-origin.  Set <code>useRTM:true</code> for cross-origin scenarios.
     *
     * @return Current useRTM value. Default value is false
     */
    public Boolean getUseRTM()  {
        Boolean result = getAttributeAsBoolean("useRTM", true);
        return result == null ? false : result;
    }
    

    /**
     * For <code>mode:"window"</code>, a window features string to pass to <code>window.open()</code>.  See the MDN
     * documentation for <code>Window.open()</code> for valid values.
     *
     * @param windowFeatures New windowFeatures value. Default value is null
     * @return {@link com.smartgwt.client.tools.ReifyLoadConfig ReifyLoadConfig} instance, for chaining setter calls
     */
    public ReifyLoadConfig setWindowFeatures(String windowFeatures) {
        return (ReifyLoadConfig)setAttribute("windowFeatures", windowFeatures);
    }

    /**
     * For <code>mode:"window"</code>, a window features string to pass to <code>window.open()</code>.  See the MDN
     * documentation for <code>Window.open()</code> for valid values.
     *
     * @return Current windowFeatures value. Default value is null
     */
    public String getWindowFeatures()  {
        return getAttributeAsString("windowFeatures");
    }
    

    // ********************* Methods ***********************

    // ********************* Static Methods ***********************

    // ***********************************************************

}
