Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSTimestamp


    }
   
    @Override
    public void takeValuesFromRequest (WORequest request, WOContext context) {
        super.takeValuesFromRequest (request,context);
        NSTimestamp date = null;
        try {
            if(dateString != null) {
              date = (NSTimestamp)dateFormatter().parseObject(dateString);
            }
            if(object() != null) {
View Full Code Here


    public ERDPrinterFriendlyWrapper(WOContext context) { super(context); }

    @Override
    public boolean isStateless() { return true; }

    public NSTimestamp now() { return new NSTimestamp(); }
View Full Code Here

   * This method exists just to show a derived non-model method appearing in the rest results.
   *
   * @return
   */
  public NSTimestamp derivedCurrentTime() {
    return new NSTimestamp();
  }
View Full Code Here

          }
          case DATE: {
            XMLNode lastNode = _stack.peek();
            if (aType.equals(lastNode.type())) {
              if (lastNode.value() == null) {
                lastNode.setValue(new NSTimestamp());
                lastNode.setTagOpen(false);
              }
            } else {
              throw new SAXException("Ending <" + qName + "> tag does not match starting <" + lastNode.type() + "> tag.");
            }
View Full Code Here

              lastNode.setValue(unescapeString(_curChars.toString()));
              lastNode.setTagOpen(false);
              break;
            case DATE:
              try {
                lastNode.setValue(new NSTimestamp(_dateFormat.parse(_curChars.toString())));
              } catch (Exception exception) {
                throw new SAXException("Unable to convert value <" + _curChars.toString() + "> to timestamp.");
              }
              lastNode.setTagOpen(false);
              break;
View Full Code Here

        setContent(content);
        setContentData(new NSData());
    }
   
    private void setContentData(NSData data) {
        setLastModified(new NSTimestamp());
        setLength((long)data.length());
        content().setContent(data);
    }
View Full Code Here

    private NSData contentData() {
        return content().content();
    }

    public void touch() {
        setLastModified(new NSTimestamp());
        editingContext().saveChanges();
    }
View Full Code Here

    /*
     * // FIXME: Should be dynamic public String pageTitle() { return "NetStruxr -
     * "+d2wContext().valueForKey("displayNameForEntity")+" View"; }
     */
    public NSTimestamp now() {
        return new NSTimestamp();
    }
View Full Code Here

          case 'B':
            return BigDecimal.valueOf(NumericUtils.prefixCodedToDouble(value));
          }
        }
        if (attribute().className().contains("NSTimestamp")) {
          return new NSTimestamp(DateTools.stringToDate(value));
        } else if (attribute().className().contains("NSData")) {
          return new NSData((NSData) NSPropertyListSerialization.propertyListFromString(value));
        } else if (attribute().className().contains("NSArray")) {
          return NSArray.componentsSeparatedByString(value, " ");
        }
View Full Code Here

        };

        // This TimerTask displays warning messages.
        TimerTask warningMessageTask = new TimerTask() {

            private NSTimestamp _downTime = new NSTimestamp();
            private String _downTimeString = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss").format(_downTime);

            @Override
            public void run() {
                if (! _isConnected) {
                    double elapsTime = (new NSTimestamp().getTime() - _downTime.getTime()) / (60.0d * 60.0d * 1000.0d);
                    String elapsTimeString = new DecimalFormat("#,##0.0").format(elapsTime);

                    NSLog.err.appendln(ERCNNotificationCoordinator.LOG_HEADER
                            + "JMS connection has been down for " + elapsTimeString + " hours. "
                            + "(Since " + _downTimeString + ")");
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSTimestamp

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.