Ignore:
Timestamp:
08/13/13 11:42:09 (11 years ago)
Author:
g.georgovassilis@mpi.nl
Message:

#269 BaseRemoteService? abstracts HTTP communication away for XML services, added facility for mocking services in unit tests, moved tests into src/test

Location:
ComponentRegistry/trunk/ComponentBrowserGui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/trunk/ComponentBrowserGui

    • Property svn:ignore
      •  

        old new  
        88.flexConfig.xml
        99.metadata
         10
         11libs
         12
         13.FlexUnitSettings
  • ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/BrowserService.as

    r3131 r3368  
    11package clarin.cmdi.componentregistry.services {
    2         import clarin.cmdi.componentregistry.common.ItemDescription;
     2        import com.adobe.net.URI;
    33       
    4         import com.adobe.net.URI;       
    5         import mx.collections.ArrayCollection; 
    6         import mx.rpc.events.ResultEvent;
     4        import mx.collections.ArrayCollection;
     5       
     6        import clarin.cmdi.componentregistry.common.ItemDescription;   
    77       
    88        public class BrowserService extends ComponentRegistryService {
     
    1515                public var itemDescriptions:ArrayCollection;
    1616
    17                 // Not bindable needed for lookups over the whole collections of itemDescriptions
    18                 protected var userSpace:Boolean;
    19 
    20                 public function BrowserService(restUrl:String, userSpace:Boolean) {
    21                         super(restUrl);
     17                public function BrowserService(successEvent:String, restUrl:URI, userSpace:Boolean) {
     18                        super(successEvent, restUrl);
    2219                        this.userSpace = userSpace;
    2320                }
    2421               
    25                 override protected function initServiceUrl(url:URI):void{
     22                override protected function dispatchRequest(url:URI):void {
    2623                        if (userSpace) {
    2724                                url.setQueryValue(Config.PARAM_USERSPACE, "true");
    2825                        }
     26                        super.dispatchRequest(url);
    2927                }
    3028               
    31                 /**
    32                  * Override in concrete subclasses
    33                  */
    34                 override protected function result(resultEvent:ResultEvent):void {
    35                 }
    36 
    37                
    38                                
    3929                public function findDescription(id:String):ItemDescription {                   
    4030                        for each (var item:ItemDescription in itemDescriptions) {
Note: See TracChangeset for help on using the changeset viewer.