Package java.util

Examples of java.util.Date.after()


        if (value == null || component.getAttributes().get("departDate") == null) return;

        Date toDate   = (Date) value;
        Date fromDate = (Date) component.getAttributes().get("departDate");

        if (fromDate.after(toDate)) {
            FacesMessage message = new FacesMessage("Invalid dates submitted.");
            message.setSeverity(FacesMessage.SEVERITY_ERROR);
            throw new ValidatorException(message);
        }
    }
View Full Code Here


    synchronized (KEY_CACHE_BLOGS) {
      for (BlogData data : blogs) {
        if (nb++ > max)
          break;
        if (now.after(data.next) && !list.contains(data.id)) {
          list.add(data.id);
        }
      }
    }
View Full Code Here

        //all users
        if (!orderByNextUpdate){
          copy.add(data.jid);
          continue;
        } else {
          if (data.nextUpdate == null || now.after(data.nextUpdate)){
            copy.add(data.jid);
          }
         
        }
       
View Full Code Here

        }

        for (Header h : request.getHeaders(HeaderConstants.IF_MODIFIED_SINCE)) {
            try {
                Date ifModifiedSince = DateUtils.parseDate(h.getValue());
                if (ifModifiedSince.after(now) || lastModified.after(ifModifiedSince)) {
                    return false;
                }
            } catch (DateParseException dpe) {
                // nop
            }
View Full Code Here

      assertNotNull("Expires header must be set on not modified response",
        responseExpiresHeader);

      Date responseExpires = headerDateFormat.parse(responseExpiresHeader);
      assertTrue("Expected later than current date but was " + responseExpires,
        responseExpires.after(new Date()));
    }
    finally
    {
      ThreadContext.detach();
    }
View Full Code Here

    it = dfs.listCacheDirectives(null);
    ent = it.next();
    assertFalse(it.hasNext());
    entryExpiry = new Date(ent.getInfo().getExpiration().getMillis());
    assertTrue("Directive should not have expired",
        entryExpiry.after(new Date()));
    // Verify that setting a negative TTL throws an error
    try {
      dfs.modifyCacheDirective(new CacheDirectiveInfo.Builder().setId(id)
          .setExpiration(Expiration.newRelative(-1)).build());
    } catch (InvalidRequestException e) {
View Full Code Here

           
            cal.setTimeInMillis( System.currentTimeMillis() - period );
           
            Date test = cal.getTime();
           
            return lastChecked == null || test.after( lastChecked );
        }
        else
        {
            throw new IllegalArgumentException( "Invalid interval specification: \'" + intervalSpec + "\'" );
        }
View Full Code Here

    public boolean hasExpired() {
      if (expires == null) {
        return false;
      }
      Date now = new Date();
      return now.after(expires);
    }

    /**
     * Returns {@code true} if the cookie hasn't expired, the
     * URI domain matches, and the URI path starts with the
View Full Code Here

                    if ( lastModified != null )
                    {
                        Date t = new Date( Long.parseLong( lastModified ) );

                        // Only add documents that were added after the last time we indexed
                        if ( t.after( timestamp ) )
                        {
                            chunk.add( i );
                        }
                    }
                }
View Full Code Here

            if ( localTimestamp != null )
            {
                // if we have localTimestamp
                // if incremental can't be done for whatever reason, simply use old logic of
                // checking the timestamp, if the same, nothing to do
                if ( updateTimestamp != null && localTimestamp != null && !updateTimestamp.after( localTimestamp ) )
                {
                    return null; // index is up to date
                }
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.