Source: vclsd/service/WKcService.js

/*jslint plusplus: true, white: true, indent: 2, maxlen: 90 */
/*global $wk$ */
/**
 *  @author    Wolfgang Kowarschick
 *  @copyright 2012-2013, Wolfgang Kowarschick
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted under the terms of the 
 *  Creative Commons License Attribution-NonCommercial-ShareAlike 3.0 Unported    
 *  (CC BY-NC-SA 3.0: http://creativecommons.org/licenses/by-nc-sa/3.0/). 
 */

 
////////////////////////////////////////////////////////////////////////////////
// Class "$wk$.vclsd.service.WKcService"
////////////////////////////////////////////////////////////////////////////////

$wk$("$wk$.WKcClass", "$wk$.observer.WKcSignaler", 
function($)
{ "use strict";

  /** 
   * <code>WKcService</code> objects can be used to exchange data with 
   * external data servers.
   * 
   * @class   * @name $wk$.vclsd.service.WKcService
   * @returns {Object} A new service object.
   */
  var WKcService =
  new $.WKcClass
  ({fullName: "$wk$.vclsd.service.WKcService",
    
    mixin:    $.WKcSignaler,
    
    private: 
    { v_data: null,
    },
    
    methods: 
    { /**
       * Sets the data object where the service shall save the
       * data read by default.
       * 
       * @method
       * @name $wk$.vclsd.service.WKcService#data
       * @writeonly
       * 
       * @param {$wk$.vclsd.data.WKcData} p_data A data object.
       */
      set data(p_data) { this.v_data = p_data; },
      
      /**
       * Asynchronosly exchanges data with an external data server.
       *  
       * @method
       * @name $wk$.vclsd.service.WKcService#ajax
       * 
       * @fires $E$.AJAX_START
       * @fires $E$.PROGRESS
       * @fires $E$.ABORT
       * @fires $E$.ERROR
       * @fires $E$.LOAD
       * @fires $E$.TIMEOUT
       * @fires $E$.AJAX_END
       *  
       * @param {String} p_args.url   
       *                   The URL of the external data source.
       * @param {String} [p_args.requestMethod = "get"]
       *                   The request method: <code>"get"</code> oder
       *                                       <code>"post"</code> oder
       *                                       <code>head</code>.
       * @param {String} [p_args.synchronous = false]  
       *                   Indicates, whether the data is exchaned
       *                   synchronously or asynchronously.
       * @param {Number} [p_args.timeout = 0]
       * @param {String} [p_args.responseType = 'text']  
       *                   The type of the data to be loaded.
       * @param {String} [p_args.dataIn = this.data]  
       *                   A data object into which the result data is 
       *                   to be put.
       * @param {String} [p_args.attrIn = null]  
       *                   The attribute of the data object into which
       *                   the result data is put.
       * @param {String} [p_args.dataOutHeader = null] 
       *                   A data object that contains the key/value pairs
       *                   that are to be sent to the server. 
       * @param {String} [p_args.dataOut = null]
       *                   A data object that contains the data that is to be
       *                   send to the server.
       * @param {String} [p_args.attrOut = null]
       *                   The attribute of the data object taht contains
       *                   the data that is to be send to the server.
       * @param {String} [p_args.p_event = $E$.DATA_CHANGED]
       *                   The event type signaled by <code>dataIn</code>
       *                   after it has been changed.
       */
      /*  http://www.w3.org/TR/XMLHttpRequest2/#request
       *    request username/request password are not supproted yet
       */
      ajax:
      function(p_args)
      {
      
      }
    }
  });

  $.moduleAdd({ name:   "$wk$.vclsd.service.WKcService",
                module: { WKcService: WKcService }
             });
});

////////////////////////////////////////////////////////////////////////////////
// End of Class "$wk$.ldvcs.service.WKcService"
////////////////////////////////////////////////////////////////////////////////
W. Kowarschick © 2013 (CC BY-NC-SA 3.0: http://creativecommons.org/licenses/by-nc-sa/3.0/)
Documentation generated by JSDoc 3.3.0-dev on Sat Oct 05 2013 15:14:39 GMT+0200 (MESZ) using the DocStrap template.