RestActions.js 1.4 KB

123456789101112131415161718192021222324
  1. MWF.xApplication.Deployment = MWF.xApplication.Deployment || {};
  2. MWF.xApplication.Deployment.Actions = MWF.xApplication.Deployment.Actions || {};
  3. MWF.require("MWF.xDesktop.Actions.RestActions", null, false);
  4. MWF.xApplication.Deployment.Actions.RestActions = new Class({
  5. initialize: function(){
  6. this.action = new MWF.xDesktop.Actions.RestActions("/Actions/action.json", "x_component_assemble_control", "x_component_Deployment");
  7. },
  8. createComponent: function(data, success, failure, async){
  9. this.action.invoke({"name": "createComponent", "async": async, "data": data, "success": success, "failure": failure});
  10. },
  11. getComponent: function(id, success, failure, async){
  12. this.action.invoke({"name": "getComponent", "async": async, "parameter": {"id": id}, "success": success, "failure": failure});
  13. },
  14. updateComponent: function(id, data, success, failure, async){
  15. this.action.invoke({"name": "updateComponent", "async": async, "parameter": {"id": id}, "data": data, "success": success, "failure": failure});
  16. },
  17. removeComponent: function(id, success, failure, async){
  18. this.action.invoke({"name": "removeComponent", "async": async, "parameter": {"id": id}, "success": success, "failure": failure});
  19. },
  20. listComponent: function(success, failure, async){
  21. this.action.invoke({"name": "listComponent", "async": async, "success": success, "failure": failure});
  22. }
  23. });