// DashboardProperties.java
//
//    Created: September 2005
//
// This file is a component of the BioMoby project.
// Copyright Martin Senger (martin.senger@gmail.com).
//

package org.biomoby.service.dashboard;

/**
 * A list of names of most/all recognized properties that can be fired
 * by dashboard panels, and a list of names of Java properties that
 * can be used to configure the dashboard. <p>
 *
 * @author <A HREF="mailto:martin.senger@gmail.com">Martin Senger</A>
 * @version $Id: DashboardProperties.java,v 1.32 2009/02/03 09:02:28 groscurt Exp $
 */

public interface DashboardProperties {

    // TBD: trying to make some order in using both: preference keys
    // (for storing user preferences) and property names (for
    // publishing events on a property channel). Let's try to unified
    // them - I start here with a new GeneratorPanel...

    static final String DP_USE_DOT = "use-dot";
    static final String DP_USE_SIMULATE = "use-simulate";

    static final String DP_USE_DT_GEN = "use-dt-gen";
    static final String DP_USE_DT_COMP = "use-dt-comp";
    static final String DP_USE_DT_DOC = "use-dt-doc";
    static final String DP_USE_DT_JAR = "use-dt-jar";
    static final String DP_USE_S_GEN = "use-s-gen";
    static final String DP_USE_S_COMP = "use-s-comp";
    static final String DP_USE_S_DOC = "use-s-doc";
    static final String DP_USE_S_JAR = "use-s-jar";

    static final String DP_DOT_LOC = "dotLocation";

    static final String DP_MOSES_FLAVOUR = "mosesFlavour";
    static final String DP_FL_NONE = "not-specified";
    static final String DP_FL_SOAPLAB = "soaplab";
    static final String DP_FL_BIOCASE = "biocase";
    static final String DP_FL_HIBERNATE = "hibernate";

    static final String DP_SEL_SERVICES = "selectedServices";   // type: Vector with service/authority name
    static final String DP_SEL_AUTHORITIES = "selectedAuthorities";   // type: Vector with authority name
    static final String DP_DEPL_SERVICES = "servicesToDeploy";  // type: Map with serviceName => className

    static final String DP_LOCAL_DEPLOY = "use-local-deploy";
    static final String DP_TOMCAT_HOME = "tomcatHome";
    static final String DP_AXIS_IN_TOMCAT = "axisInTomcat";
    static final String DP_DEPLOY_IN_TOMCAT = "deployInTomcat";
    static final String DP_HOSTNAME = "tomcatHostname";
    static final String DP_PORT = "tomcatPort";
    static final String DP_AXIS_ADMIN = "axisAdminURLPath";
    static final String DP_WSDD_TEMPL = "wsddTemplate";
    static final String DP_USER_JARS = "dirWithUserJars";
    static final String DP_PATTERN = "classnamePattern";
    static final String DP_CBS_DEPLOY = "copy-by-select-deploy";

    static final String DP_CALL_SERVICE = "howToCallService";
    static final String DP_CS_NONE = "no-call";
    static final String DP_CS_CLASS = "local-class";
    static final String DP_CS_URL = "service-endpoint";
    static final String DP_CS_NEWURL = "service-new-endpoint";
    static final String DP_CS_REGISTRY = "as-registered";

    static final String DP_ENDPOINT = "serviceEndpoint";
    static final String DP_IMPL_CLASS = "serviceImplClass";

    static final String DP_INP_SHOW = "showInput";
    static final String DP_INP_SHOWXML = "showInputAsXML";
    static final String DP_INP_ASBYTES = "sendInputAsBytes";
    static final String DP_INP_PING = "sendEmptyInputAsPing";

    static final String DP_OUT_SHOW = "showOutput";
    static final String DP_OUT_SHOWXML = "showOutputAsXML";
    static final String DP_OUT_VIEWER = "showInViewer";
    static final String DP_OUT_FILE = "outputToFile";
    static final String DP_RESULT_FILE = "resultFile";

    static final String DP_DETACH_VIEW = "detachViewers";

//     static final String DP_SC_IN_DATA = "sc-inputData";
    static final String DP_SC_IN_FILE = "sc-inputFromFile";
    static final String DP_SC_INPUT_FILE = "sc-inputFile";
    static final String DP_SC_SERVICE = "dp-sc-service";  // type: MobyService
    static final String DP_SC_SERVICE_NAME = "dp-sc-service-name";
    static final String DP_SC_SERVICES = "dp-sc-recent-services";

    static final String DP_CONSOLE_FILE = "dp-cons-savefile";

    // names of properties used in property change events
    static final String DP_STATUS_MSG = "status-msg";
    static final String DP_SERVICE_NAME = "dp-service-name";
    static final String DP_DATATYPE_NAME = "dp-datatype-name";

    // names of properties used in property channel storage
    static final String DP_REGISTRY_MODEL = "dp-registry-model";  // type: RegistryModel
    static final String DP_ANT_MODEL = "dp-ant-model";  // type: AntModel

    static final String DP_REGISTRY_SYNONYM = "dp-registry-synonym";
    static final String DP_REG_INFO = "dp-reg-info";  // type: Boolean
    static final String DP_REGISTRY_ENDPOINT = "dp-registry-endpoint";
    static final String DP_REGISTRY_NAMESPACE = "dp-registry-namespace";
    static final String DP_CACHE_DIR = "dp-cache-dir";
    static final String DP_USE_CACHE = "dp-use-cache";  // type: Boolean

    static final String DP_REG_DT_NAME = "dp-reg-dt-name";
    static final String DP_REG_DT_AUTH = "dp-reg-dt-auth";
    static final String DP_REG_DT_EMAIL = "dp-reg-dt-email";
    static final String DP_REG_DT_DESC = "dp-reg-dt-desc";
    static final String DP_REG_DT_TREE = "dp-reg-dt-tree";   // type: MobyDataType

    static final String DP_REG_NS_NAME = "dp-reg-ns-name";
    static final String DP_REG_NS_AUTH = "dp-reg-ns-auth";
    static final String DP_REG_NS_EMAIL = "dp-reg-ns-email";
    static final String DP_REG_NS_DESC = "dp-reg-ns-desc";

    static final String DP_REG_ST_NAME = "dp-reg-st-name";
    static final String DP_REG_ST_AUTH = "dp-reg-st-auth";
    static final String DP_REG_ST_EMAIL = "dp-reg-st-email";
    static final String DP_REG_ST_DESC = "dp-reg-st-desc";
    static final String DP_REG_ST_ISA = "dp-reg-st-isa";

    static final String DP_REG_S_NAME = "dp-reg-s-name";
    static final String DP_REG_S_AUTH = "dp-reg-s-auth";
    static final String DP_REG_S_EMAIL = "dp-reg-s-email";
    static final String DP_REG_S_CATEGORY = "dp-reg-s-category";
    static final String DP_REG_S_URL = "dp-reg-s-url";
    static final String DP_REG_S_RDF_URL = "dp-reg-s-rdf-url";
    static final String DP_REG_S_RDF_PATH = "dp-reg-s-rdf-path";
    static final String DP_REG_S_XML_PATH = "dp-reg-s-xml-path";
    static final String DP_USE_SIGNATURE = "dp-use-signature";  // type: Boolean
    static final String DP_USE_AUTHORITATIVE = "dp-use-auth";  // type: Boolean
    static final String DP_REG_S_TYPE = "dp-reg-s-type";

    static final String DP_REG_VERBOSE = "dp-reg-verbose";

    static final String DP_S_SELECTED = "dp-s-selected";  // type: MobyService

    /** A property name. Its value contains a title that will appear
     * in big fonts on top of the dashboard.  It may be empty if
     * property {@link #DP_TITLE_ICON} is defined; otherwise a default
     * value will be used.
     */
    static final String DP_TITLE = "dashboard.title";

    /** A property name. Its value contains a filename with an icon
     * accompanying a dashboard title (defined by property {@link
     * #DP_TITLE}. No default value used. Specify here either an
     * absolute path (not recommended) or a relative path whose
     * beginning can be found somewhere on the CLASSPATH.
     */
    static final String DP_TITLE_ICON = "dashboard.title.icon";

    /** A property name. Its value contains a filename with the main
     * dashboard icon. Specify here either an absolute path (not
     * recommended) or a relative path whose beginning can be found
     * somewhere on the CLASSPATH.
     */
    static final String DP_ICON = "dashboard.icon";

    /** A property name. Its value contains a color name used to paint
     * main dashboard background. The name can be a color name, or a
     * number in various format (see <tt>GraphColours</tt> for
     * details).
     */
    static final String DP_BGCOLOR = "dashboard.bgcolor";

    /** A property name. Its value contains a short description what a
	dashboard can do generally. Often, however, it is more
	convenient to put the description in a file and to use
	property {@link #DP_DESCRIPTION_FILE}.
     */
    static final String DP_DESCRIPTION = "dashboard.description";

    /** A property name. Its value contains a file name with a short
	description what a dashboard can do generally.
     */
    static final String DP_DESCRIPTION_FILE = "dashboard.description.file";

    /** A property name. Its value contains a short description of a
	project that uses this dashboard. Often, however, it is more
	convenient to put the description in a file and to use
	property {@link #DP_P_DESCRIPTION_FILE}.
     */
    static final String DP_P_DESCRIPTION = "project.description";

    /** A property name. Its value contains a file name with a short
	description of a project that uses this dashboard.
     */
    static final String DP_P_DESCRIPTION_FILE = "project.description.file";

    /** A property name. Its value contains a name of a contact
	person, possibly with an email address.
     */
    static final String DP_CONTACT = "dashboard.contact";

    /** A property name. Its value contains a directory name with the
     * local cache of a BiMoby Central registry.
     */
    static final String DP_REGISTRY_CACHE_DIR = "registry.cache.dir";

    /** A property name. Its value contains a name or a
     * comma-separated list of names of BioMoby registries that will
     * be displayed in the RegistryPanel. If this property is missing,
     * the list is taken from the hard-coded known registries in the
     * Java source file. <p>
     *
     * The names (values of this property) are equivalent to the
     * 'synonym' attribute of the Registry class.
     */
    static final String DP_WANTED_REGISTRIES = "dashboard.wanted.registries";

    /** A property name. Its value contains a name (synonym) of a
     * default BioMoby registry. By default, the default registry is
     * taken either from the first element in {@link
     * #DP_WANTED_REGISTRIES} or from
     * <tt>Registries.DEFAULT_REGISTRY_SYNONYM</tt>.
     */
    static final String DP_DEFAULT_REGISTRY = "dashboard.default.registry";


    /**
     * A property name. Its value contains the user name used for the authentication required for the servlet container
     * the service is hosted at.
     */
    static final String DP_USER_AUTHENTICATION = "service-authentication-user";

    /**
     * A property name. Its value contains the password used for the authentication required for the servlet container
     * the service is hosted at.
     */
    static final String DP_PASSWORD_AUTHENTICATION = "service-authentication-passwd";

    /**
     * A property name. Its value contains whether authentication is required for the servlet container the service is
     * hosted at.
     */
    static final String DP_AUTHENTICATION = "service-authentication";
}
