Ignore:
Timestamp:
03/25/10 08:50:42 (14 years ago)
Author:
patdui
Message:
  • more little bug fixes and layout changes, trying to use shibboleth for authorisation
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/DeleteService.as

    r224 r281  
    2323                private var service:HttpClient;
    2424
     25        private static var _instance:DeleteService = new DeleteService();
     26
    2527                public function DeleteService() {
     28                        if (_instance != null) {
     29                                throw new Error("DeleteService should only be accessed through DeleteService.instance");
     30                        }
    2631                        service = new HttpClient();
    2732                        service.listener.onComplete = handleResult;
     
    2934                }
    3035
    31                 private function getCredentials():String {
    32                         return Base64.encode("tomcat:tomcat");
    33                 }
     36//              private function getCredentials():String {
     37//                      return Base64.encode("tomcat:tomcat");
     38//              }
    3439
    3540                public function deleteItem(item:ItemDescription):void {
    3641                        CursorManager.setBusyCursor();
    37                         var uri:URI = new URI(item.dataUrl);
     42                        var uri:URI = new URI(item.dataUrl);//+";JSESSIONID="+Config.instance.sessionId
    3843                        var httpDelete:Delete = new Delete();
    39                         httpDelete.addHeader("Authorization", "BASIC " + getCredentials());
     44//                      httpDelete.addHeader("Authorization", "BASIC " + getCredentials());
    4045                        service.request(uri, httpDelete);
    4146                }
     
    5863                }
    5964
     65                public static function get instance():DeleteService {
     66                        return _instance;
     67                }
    6068        }
    6169}
Note: See TracChangeset for help on using the changeset viewer.