Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSSelector


                NSLog.setAllowedDebugLevel(NSLog.DebugLevelInformational);
            }
            adaptorEnabled = NSLog.debugLoggingAllowedForGroups(NSLog.DebugGroupSQLGeneration|NSLog.DebugGroupDatabaseAccess) ? Boolean.TRUE : Boolean.FALSE;
                                          // Allows rapid turn-around of adaptor debugging.
            NSNotificationCenter.defaultCenter().addObserver(anObserver,
                                                             new NSSelector("configureAdaptorContext", ERXConstant.NotificationClassArray),
                                                             ERXConfigurationManager.ConfigurationDidChangeNotification,
                                                             null);
            _isConfigureAdaptorContextRapidTurnAround = true;
        }
    }
View Full Code Here


          // NSLog.debug.appendln("Loaded items: " + initializedFrameworks);
            if(observer == null) {
                observer = new Observer();
                NSNotificationCenter center = NSNotificationCenter.defaultCenter();
                center.addObserver(observer,
                        new NSSelector("willFinishInitialization",  ERXConstant.NotificationClassArray),
                        // WOApplication.ApplicationWillFinishLaunchingNotification,
                        ERXApplication.ApplicationDidCreateNotification,
                        null);
                center.addObserver(observer,
                        new NSSelector("didFinishInitialization",  ERXConstant.NotificationClassArray),
                        // WOApplication.ApplicationWillFinishLaunchingNotification,
                        ERXApplication.ApplicationDidFinishInitializationNotification,
                        null);
            }
            if (initializedFrameworks.objectForKey(c.getName()) == null) {
View Full Code Here

   
    // Sets the receiver up as an observer for the EOModelAddedNotification
    // and the EOCooperatingObjectStoreWasAdded notification.
    public ERXSharedEOLoader() {
        NSNotificationCenter.defaultCenter().addObserver(this,
                                                         new NSSelector("modelWasAddedNotification", ERXConstant.NotificationClassArray),
                                                         EOModelGroup.ModelAddedNotification,
                                                         null);
        NSNotificationCenter.defaultCenter().addObserver(this,
                                                         new NSSelector("objectStoreWasAdded", ERXConstant.NotificationClassArray),
                                                         EOObjectStoreCoordinator.CooperatingObjectStoreWasAddedNotification,
                                                         null);
    }
View Full Code Here

            }
            _loadingComplete = true; // make sure we only do this once.
            EOModel currentModel = null;
            try {
                NSNotificationCenter.defaultCenter().addObserver(this,
                                                                 new NSSelector("transactionBeginning", ERXConstant.NotificationClassArray),
                                                                 EOAdaptorContext.AdaptorContextBeginTransactionNotification,
                                                                 null);
                log.debug("Beginning loading of shared EOs");
                NSMutableArray loadedModels = new NSMutableArray();
                for (Enumeration e = _modelList.objectEnumerator(); e.hasMoreElements();) {
View Full Code Here

      EOClassDescription classDescription = _dataSource != null ? _dataSource.classDescriptionForObjects() : null;
      aValue = classDescription != null ? classDescription.validateValueForKey(aValue, key) : aValue;
    } catch (NSValidation.ValidationException e) {
      NSLog._conditionallyLogPrivateException(e);
    }
    NSSelector knownOp;
    if (op == EOQualifier.QualifierOperatorEqual) {
      String operatorString = (String) _queryOperator.objectForKey(key);

      if (operatorString == null) {
        operatorString = QUERYOPERATOR_DEFAULTSTRING;
View Full Code Here

  public void qualifyDataSource() {
    endEditing();
    setInQueryMode(false);

    NSSelector qualifierSetter = null;

    if (_customDataSourceClass) {
      if (SetAuxiliaryQualifier.implementedByObject(_dataSource))
        qualifierSetter = SetAuxiliaryQualifier;
      else if (SetQualifier.implementedByObject(_dataSource)) {
        qualifierSetter = SetQualifier;
      }
    }

    if (qualifierSetter != null) {
      try {
        qualifierSetter.invoke(_dataSource, qualifierFromQueryValues());
      } catch (Exception e) {
        throw NSForwardException._runtimeExceptionForThrowable(e);
      }
    }
View Full Code Here

    return _initializer;
  }

  public static void registerModelGroupListener() {
    if (ERXProperties.booleanForKeyWithDefault("er.extensions.partials.enabled", false)) {
      NSNotificationCenter.defaultCenter().addObserver(_initializer, new NSSelector("modelGroupAdded", ERXConstant.NotificationClassArray), ERXModelGroup.ModelGroupAddedNotification, null);
      // NSNotificationCenter.defaultCenter().addObserver(_initializer,
      // new NSSelector("workaroundStupidLoadingProblem",
      // ERXConstant.NotificationClassArray),
      // WOApplication.ApplicationDidFinishLaunchingNotification, null);
    }
View Full Code Here

  private boolean _running;

  public InstantMessengerAdaptor(String name, NSDictionary parameters) {
    super(name, parameters);

    NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("sessionDidCreate", new Class[] { NSNotification.class }), WOSession.SessionDidCreateNotification, null);

    _application = WOApplication.application();
    _instantMessengers = new HashMap<String, InstantMessengerConnection>();

    _centralizeScreenName = ERXProperties.stringForKey(InstantMessengerAdaptor.CENTRALIZE_SCREEN_NAME_KEY);
View Full Code Here

  @Test
  public void testJobToBeExecuted()
  {
    ERQSJobListener jl = new ERQSJobListener(null);
    NSSelector sel = new NSSelector("register4Listener",new Class[] {NSNotification.class});
    NSNotificationCenter.defaultCenter().addObserver(this, sel, ERQSJobListener.JOB_WILL_RUN, null);
    ERQSJobExecutionContext4Test jec = new ERQSJobExecutionContext4Test();
    jec.getMergedJobDataMap().put(ERQSJob.NOT_PERSISTENT_OBJECT_KEY, new ERQSJobDescription4Test());
   
    jl.jobToBeExecuted(jec);
View Full Code Here

 
  @Test
  public void testNotificationJobWasExecuted()
  {
    ERQSJobListener jl = new ERQSJobListener(null);
    NSSelector sel = new NSSelector("register4Listener",new Class[] {NSNotification.class});
    NSNotificationCenter.defaultCenter().addObserver(this, sel, ERQSJobListener.JOB_RAN, null);
    ERQSJobExecutionContext4Test jec = new ERQSJobExecutionContext4Test();
    jec.getMergedJobDataMap().put(ERQSJob.NOT_PERSISTENT_OBJECT_KEY, new ERQSJobDescription4Test());
   
    jl.jobWasExecuted(jec, null);
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSSelector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.