Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSForwardException


                }
                if(!found) {
                    throw new NSKeyValueCoding.UnknownKeyException("Key + " + key + " not found in class " + clazz.getName(), clazz, key);
                }
            } catch (Exception e) {
                throw new NSForwardException(e);
            }
            if(result != null) {
                if(result.getClass().getComponentType() != null) {
                    result = new NSArray((Object[])result);
                } else if(result instanceof Collection) {
View Full Code Here


        try {
            pkAttributeNames = pkAttributeNames.sortedArrayUsingComparator
            ( NSComparator.AscendingStringComparator );
        } catch( NSComparator.ComparisonException ex ) {
            log.error( "Unable to sort attribute names: "+ ex );
            throw new NSForwardException(ex);
        }
        NSArray values = isEncrypted
            ? NSArray.componentsSeparatedByString( ERXCrypto.crypterForAlgorithm(ERXCrypto.BLOWFISH).decrypt(value).trim(), AttributeValueSeparator )
            : NSArray.componentsSeparatedByString( value, AttributeValueSeparator )
        int attrCount = pkAttributeNames.count();
        NSMutableDictionary result = new NSMutableDictionary( attrCount );
        for( int i = 0; i < attrCount; i++ ) {
            String currentAttributeName = (String)pkAttributeNames.objectAtIndex( i );
            EOAttribute currentAttribute = entity.attributeNamed( currentAttributeName );
            Object currentValue = values.objectAtIndex( i );
            switch ( currentAttribute.adaptorValueType() ) {
                case 3:
                    NSTimestampFormatter tsf = new NSTimestampFormatter();
                    try {
                        currentValue = tsf.parseObject( (String) currentValue );   
                    } catch( java.text.ParseException ex ) {
                        log.error( "Error while trying to parse: "+currentValue );
                        throw new NSForwardException( ex );
                    }
                    case 1:
                        if( currentAttribute.valueFactoryMethodName() != null ) {
                            currentValue = currentAttribute.newValueForString( (String) currentValue );
                        }
View Full Code Here

        }
      }
    }
    catch (MessagingException e) {
      log.warn("MessagingException exception caught, re-throwing exception.", e);
      throw new NSForwardException(e);
    }
    finally {
      setMimeMessage(null);
    }
  }
View Full Code Here

  protected void __setContent(Object appendable) {
    try {
      WOMessage.class.getDeclaredField("_content").set(this, appendable);
    }
    catch (Throwable e) {
      throw new NSForwardException(e);
    }
  }
View Full Code Here

    Object newContent;
    try {
      newContent = _content.getClass().newInstance();
    }
    catch (Throwable e) {
      throw new NSForwardException(e);
    }
    __setContent(newContent);
  }
View Full Code Here

      }

      return project;
    }
    catch (Throwable e) {
      throw new NSForwardException(e);
    }
  }
View Full Code Here

            }
            } else {
                _log.warn("Attempting to refresh a non-shared EO: " + entityName);
            }
        } catch (Exception e) {
            throw new NSForwardException(e, "Exception while refreshing shared objects for entity named " + entityName);
        } finally {
            sharedEC.unlock();
        }
    }
View Full Code Here

          }
        }
        ERXExtensions.initApp(null, woaFolder.toURI().toURL(), applicationSubclass, args);
    }
    catch (IOException e) {
      throw new NSForwardException(e);
    }
    }
View Full Code Here

          System.setProperty("er.extensions.ERXApplication.developmentMode", "true");
          ERXApplication.primeApplication(mainBundleName, mainBundleURL, applicationSubclass.getName());
          //NSNotificationCenter.defaultCenter().postNotification(new NSNotification(ERXApplication.ApplicationDidCreateNotification, WOApplication.application()));
    }
    catch (IOException e) {
      throw new NSForwardException(e);
    }
      _appInitialized = true;
    }
View Full Code Here

                 
          ERXApplication.setup(args);
          ERXFrameworkPrincipal.sharedInstance(ERXExtensions.class).bundleDidLoad(null);
        }
        catch (Exception e) {
          throw new NSForwardException(e);
        }
          _eofInitialized = true;
        }
      } finally {
        _eofInitializeLock.unlock();
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSForwardException

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.