Changeset 3366
- Timestamp:
- 08/13/13 11:06:15 (11 years ago)
- Location:
- ComponentRegistry/branches/ggeorgovassilis_workspace/ComponentBrowserGui
- Files:
-
- 24 added
- 5 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/branches/ggeorgovassilis_workspace/ComponentBrowserGui
- Property svn:ignore
-
old new 8 8 .flexConfig.xml 9 9 .metadata 10 11 libs 12 13 .FlexUnitSettings
-
- Property svn:ignore
-
ComponentRegistry/branches/ggeorgovassilis_workspace/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/common/components/HelpLabelButton.as
r2515 r3366 1 1 package clarin.cmdi.componentregistry.common.components 2 2 { 3 import clarin.cmdi.componentregistry.services.Config;4 5 import com.adobe.net.URI;6 7 3 import flash.events.MouseEvent; 8 4 import flash.net.URLRequest; -
ComponentRegistry/branches/ggeorgovassilis_workspace/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/common/components/LoginLabelButton.as
r2515 r3366 8 8 import flash.net.navigateToURL; 9 9 10 import mx.controls.Label;11 10 12 11 public class LoginLabelButton extends LabelButton { … … 27 26 var req:URLRequest = new URLRequest(); 28 27 29 var uri:URI = new URI(Config.instance.serviceRootUrl);28 var uri:URI = new URI(Config.instance.serviceRootUrl); 30 29 uri.setQueryValue("shhaaDo", "lI"); 31 30 if (viewType) { -
ComponentRegistry/branches/ggeorgovassilis_workspace/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/importer/FileLoadedEvent.as
r1255 r3366 1 1 package clarin.cmdi.componentregistry.importer { 2 import clarin.cmdi.componentregistry.common.ItemDescription;3 2 4 3 import flash.events.Event; -
ComponentRegistry/branches/ggeorgovassilis_workspace/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/BaseRemoteService.as
r3363 r3366 14 14 import mx.utils.StringUtil; 15 15 16 import clarin.cmdi.componentregistry.services.remote.HttpServiceFactory; 17 import clarin.cmdi.componentregistry.services.remote.RemoteService; 18 16 19 /** 17 20 * Handles communication with any arbitrary XML backend service, implements error handling and dispatching of success events. … … 22 25 23 26 protected var successEventName:String; 24 protected var readService: HTTPService;27 protected var readService:RemoteService; 25 28 26 29 /** … … 29 32 */ 30 33 public function BaseRemoteService(successEventName:String) { 31 readService = new HTTPService();32 readService. method = HTTPRequestMessage.GET_METHOD;33 readService. resultFormat = HTTPService.RESULT_FORMAT_E4X;34 readService = HttpServiceFactory.createRemoteService(); 35 readService.setMethod(HTTPRequestMessage.GET_METHOD); 36 readService.setResultFormat(HTTPService.RESULT_FORMAT_E4X); 34 37 this.successEventName = successEventName; 35 38 } … … 41 44 protected function dispatchRequest(url:URI):void { 42 45 trace(url); 43 readService. url = url.toString();46 readService.setUrl(url); 44 47 var token:AsyncToken = readService.send(); 45 48 token.addResponder(new Responder(this.requestCallbackOk, this.requestCallbackFailed)); -
ComponentRegistry/branches/ggeorgovassilis_workspace/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/ComponentInfoService.as
r3363 r3366 2 2 3 3 import com.adobe.net.URI; 4 5 import mx.controls.Alert; 4 6 5 7 import clarin.cmdi.componentregistry.common.Component; -
ComponentRegistry/branches/ggeorgovassilis_workspace/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/IsocatService.as
r1591 r3366 2 2 import com.adobe.net.URI; 3 3 4 import flash.events.EventDispatcher;5 6 import mx.controls.Alert;7 4 import mx.managers.CursorManager; 8 import mx.messaging.messages.HTTPRequestMessage;9 import mx.rpc.events.FaultEvent;10 import mx.rpc.events.ResultEvent;11 5 import mx.rpc.http.HTTPService; 12 import mx.utils.StringUtil;13 6 14 public class IsocatService extends EventDispatcher{7 public class IsocatService extends BaseRemoteService { 15 8 public static const PROFILE_LOADED:String = "ProfileLoaded"; 16 9 public static const TYPE_SIMPLE:String = "simple"; … … 27 20 28 21 public function IsocatService() { 22 super(PROFILE_LOADED); 29 23 } 30 24 … … 35 29 public function load(keyword:String, type:String):void { 36 30 if (keyword) { 37 createClient();38 31 CursorManager.setBusyCursor(); 39 32 var uri:URI = new URI(Config.instance.isocatSearchUrl); … … 41 34 if (type) 42 35 uri.setQueryValue("type", type); 43 service.url = uri.toString(); 44 service.send(); 36 dispatchRequest(uri); 45 37 } 46 38 } … … 53 45 } 54 46 55 private function createClient():void { 56 service = new HTTPService(); 57 service.method = HTTPRequestMessage.GET_METHOD; 58 service.resultFormat = HTTPService.RESULT_FORMAT_E4X; 59 service.addEventListener(ResultEvent.RESULT, handleResult); 60 service.addEventListener(FaultEvent.FAULT, handleError); 61 } 62 63 64 private function handleResult(resultEvent:ResultEvent):void { 47 override protected function handleXmlResult(result:XML):void { 65 48 CursorManager.removeBusyCursor(); 66 if (resultEvent.statusCode >= 200 && resultEvent.statusCode < 300) { 67 var data:XML = new XML(resultEvent.result); 68 searchResults = data.dcif::dataCategory; 69 } else { 70 Alert.show("Unexpected error, server returned status: " + resultEvent.statusCode + "\n Message = "); 71 } 72 } 73 74 private function handleError(faultEvent:FaultEvent):void { 75 CursorManager.removeBusyCursor(); 76 var errorMessage:String = StringUtil.substitute("Error in {0} status {1}: {2}", this, faultEvent.statusCode, faultEvent.fault.faultString); 77 Alert.show(errorMessage); 49 searchResults = result.dcif::dataCategory; 78 50 } 79 51 -
ComponentRegistry/branches/ggeorgovassilis_workspace/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/SaveItemDialog.as
r1088 r3366 1 1 package clarin.cmdi.componentregistry.services { 2 import clarin.cmdi.componentregistry.common.ItemDescription;3 4 import com.adobe.net.URI;5 2 6 3 import flash.net.URLRequest; 7 4 import flash.net.navigateToURL; 5 import clarin.cmdi.componentregistry.common.ItemDescription; 6 import com.adobe.net.URI; 8 7 9 8 public class SaveItemDialog { -
ComponentRegistry/branches/ggeorgovassilis_workspace/ComponentBrowserGui/src/main/flex/main.mxml
r2515 r3366 9 9 <mx:Script> 10 10 <![CDATA[ 11 import com.flexspy.FlexSpy; 12 13 import mx.controls.Button; 14 import mx.managers.PopUpManager; 15 11 16 import clarin.cmdi.componentregistry.common.AboutPopup; 12 17 import clarin.cmdi.componentregistry.common.Credentials; … … 14 19 import clarin.cmdi.componentregistry.services.Config; 15 20 import clarin.cmdi.componentregistry.services.PingSessionService; 16 17 import com.flexspy.FlexSpy; 18 19 import mx.controls.Button; 20 import mx.managers.PopUpManager; 21 import clarin.cmdi.componentregistry.services.remote.ClientServiceFactoryImpl; 21 22 22 23 import org.hasseg.externalMouseWheel.ExternalMouseWheelSupport;
Note: See TracChangeset
for help on using the changeset viewer.