Package com.webobjects.foundation

Examples of com.webobjects.foundation._NSThreadsafeMutableDictionary


    public boolean shouldWriteAdaptorConfig() { return _shouldWriteAdaptorConfig; }
    public boolean shouldRespondToMulticast() { return _shouldRespondToMulticast; }

    public Application() {
        super();
        _lock = new _NSCollectionReaderWriterLock();

        String dd = System.getProperties().getProperty("_DeploymentDebugging");
        if (dd != null) {
            NSLog.debug.setIsVerbose(true);
            NSLog.out.setIsVerbose(true);
View Full Code Here


      synchronized (delegates) {
          if (hasDelegate(delegate)) {
            throw new IllegalArgumentException("Delegate is already included");
          }
         
            _NSDelegate delegateObject = new _NSDelegate(getClass(), delegate);
            delegates.addObject(delegateObject);
        }
    }
View Full Code Here

      synchronized (delegates) {
          if (hasDelegate(delegate)) {
            throw new IllegalArgumentException("Delegate is already included");
          }
         
          _NSDelegate delegateObject = new _NSDelegate(getClass(), delegate);
          delegates.insertObjectAtIndex(delegateObject, 0);
      }
    }
View Full Code Here

          if ( ! hasDelegate(delegate)) {
            throw new IllegalArgumentException("Delegate is not present");
          }
         
          for (int i = 0; i < delegates.count(); i++) {
            _NSDelegate delegateObject = (_NSDelegate)delegates.objectAtIndex(i);
            if (delegateObject.delegate().equals(delegate))
            {
              delegates.removeObjectAtIndex(i);
              break;
            }
          }
View Full Code Here

     * @return <code>true</code> if delegate is represented in delegates()
     */
    public boolean hasDelegate(Object delegate) {
      synchronized (delegates) {
          for (int i = 0; i < delegates.count(); i++) {
            _NSDelegate delegateObject = (_NSDelegate)delegates.objectAtIndex(i);
            if (delegateObject.delegate().equals(delegate))
            {
              return true;
            }
          }
          return false;
View Full Code Here

     */
    protected Object perform(String methodName, Object args[], Object defaultResult) {
        Object result = null;
      synchronized (delegates) {
            for (int i = 0; (result == null || result.equals(defaultResult)) && i < delegates.count(); i++) {
                _NSDelegate delegate = (_NSDelegate) delegates.objectAtIndex(i);
                if (delegate.respondsTo(methodName)) {
                    result = delegate.perform(methodName, args);
                }
            }
      }

        return result == null ? defaultResult : result;
View Full Code Here

   * @return <code>null</code> to force the page to reload
   */
  @Override
  public Object fetch() {
    if (isBatching()) {
      _NSDelegate delegate = null;
      if (delegate() != null) {
        delegate = new _NSDelegate(WODisplayGroup.Delegate.class, delegate());
        if (delegate.respondsTo("displayGroupShouldFetch") && !delegate.booleanPerform("displayGroupShouldFetch", this)) {
                return null;
        }
      }
     
      if (undoManager() != null) {
        undoManager().removeAllActionsWithTarget(this);
      }
      NSNotificationCenter.defaultCenter().postNotification("WODisplayGroupWillFetch", this);
      refetch();
      if (delegate != null) {
        // was initialized above
        if (delegate.respondsTo("displayGroupDidFetchObjects")) {
          delegate.perform("displayGroupDidFetchObjects", this, _displayedObjects);
        }
      }
      return null;
    }
    return super.fetch();
View Full Code Here

    if (isBatching()) {
      // refetch();
      NSMutableArray<T> selectedObjects = (NSMutableArray<T>) selectedObjects();
      NSArray<T> obj = allObjects();
      if (delegate() != null) {
        _NSDelegate delegate = new _NSDelegate(WODisplayGroup.Delegate.class, delegate());
        if (delegate.respondsTo("displayGroupDisplayArrayForObjects")) {
          delegate.perform("displayGroupDisplayArrayForObjects", this, obj);
        }
      }
      // _displayedObjects = new NSMutableArray(obj);
      setSelectedObjects(selectedObjects);
      // selectObjectsIdenticalToSelectFirstOnNoMatch(selectedObjects,
View Full Code Here

  private void _init(boolean forSerialization) {
    if (!forSerialization) {
      _selection = NSArray.EmptyArray;
      _allObjects = new NSMutableArray();
      _displayedObjects = new NSMutableArray();
      _delegate = new _NSDelegate(Delegate.class);

      _numberOfObjectsPerBatch = 0;
      setCurrentBatchIndex(1);
    }
View Full Code Here

   * Construct an ERXDynamicURL.
   *
   * @param dynamicUrl a WODynamicURL (either from the 5.3 or the 5.4 package)
   */
  public ERXDynamicURL(Object dynamicUrl) {
    _delegate = new _NSDelegate(WODynamicURL.class, dynamicUrl);
  }
View Full Code Here

TOP

Related Classes of com.webobjects.foundation._NSThreadsafeMutableDictionary

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.