/** * Update the last access date and time of this token. This means that the * expiration time starts again (if any). */ void updateLastAccess () { m_aLastAccessDT = PDTFactory.getCurrentLocalDateTime (); }
public String marshal(LocalDateTime value) { return (com.helger.commons.datetime.PDTWebDateHelper.getAsStringXSD(value)); }
public LocalDateTime unmarshal(String value) { return (com.helger.commons.datetime.PDTWebDateHelper.getLocalDateTimeFromXSD(value)); }
@Nonnull public LocalDateTime getBuildDateTime () { return PDTFactory.createLocalDateTime (getAsLong ("build.datetime.millis", 0)); }
public LocalDate unmarshal(String value) { return (com.helger.commons.datetime.PDTWebDateHelper.getLocalDateFromXSD(value)); }
@Nullable public static LocalDate getCellValueLocalDate (@Nullable final Cell aCell) { final Date aDate = getCellValueJavaDate (aCell); return aDate == null ? null : PDTFactory.createLocalDate (aDate); }
@Nonnull public HCTime setAsDateAndTime (@Nonnull final LocalDateTime aDateTime) { m_sDatetime = DateTimeFormatterCache.getDateTimeFormatterStrict ("uuuu-MM-dd'T'HH:mm:ss.SSSZZ").format (aDateTime); return this; }
@Nonnull public static IComparableExtractor <LocalDate> getExtractorDate (@Nonnull final Locale aDisplayLocale) { return getExtractorDate (PDTFormatter.getFormatterDate (FormatStyle.MEDIUM, aDisplayLocale, EDTFormatterMode.PARSE)); }
@Nullable public static LocalTime getCellValueLocalTime (@Nullable final Cell aCell) { final Date aDate = getCellValueJavaDate (aCell); return aDate == null ? null : PDTFactory.createLocalTime (aDate); }
@Nonnull public static IComparableExtractor <LocalDateTime> getExtractorDateTime (@Nonnull final Locale aDisplayLocale) { return getExtractorDateTime (PDTFormatter.getFormatterDateTime (FormatStyle.MEDIUM, aDisplayLocale, EDTFormatterMode.PARSE)); }
/** * @param aSubject * The auth subject that was authenticated. May be <code>null</code> if * authentication failed. */ public AuthIdentification (@Nullable final IAuthSubject aSubject) { m_aAuthSubject = aSubject; m_aIdentificationDT = PDTFactory.getCurrentLocalDateTime (); }
@Nullable public static LocalDateTime getCellValueLocalDateTime (@Nullable final Cell aCell) { final Date aDate = getCellValueJavaDate (aCell); return aDate == null ? null : PDTFactory.createLocalDateTime (aDate); }
public String marshal(LocalDate value) { return (com.helger.commons.datetime.PDTWebDateHelper.getAsStringXSD(value)); }
@Nonnull public HCTime setAsDate (@Nonnull final LocalDate aDate) { m_sDatetime = DateTimeFormatterCache.getDateTimeFormatterStrict ("uuuu-MM-dd").format (aDate); return this; }
/** * @return <code>true</code> if this message can be resend now. */ public boolean isTimeToSend () { return m_aEarliestResendDT.compareTo (PDTFactory.getCurrentLocalDateTime ()) <= 0; } }
@Nonnull public HCTime setAsTime (@Nonnull final LocalTime aTime) { m_sDatetime = DateTimeFormatterCache.getDateTimeFormatterStrict ("HH:mm:ss").format (aTime); return this; }
public boolean isExpired () { if (!m_bExpired && isExpirationPossible ()) { // Only if expiration is defined if (Duration.between (m_aLastAccessDT, PDTFactory.getCurrentLocalDateTime ()) .getSeconds () > m_nExpirationSeconds) m_bExpired = true; } return m_bExpired; }
public AS4MessageState (@Nonnull final ESOAPVersion eSOAPVersion, @Nonnull final AS4ResourceManager aResMgr) { m_aReceiptDT = PDTFactory.getCurrentLocalDateTime (); m_eSOAPVersion = ValueEnforcer.notNull (eSOAPVersion, "SOAPVersion"); m_aResMgr = ValueEnforcer.notNull (aResMgr, "ResMgr"); }
/** * @return <code>true</code> if this item is to be expired, because the * retry-time has been exceeded, <code>false</code> otherwise. */ default boolean isExpired () { return getMaxRetryDT ().isBefore (PDTFactory.getCurrentLocalDateTime ()); }
/** * Increment the number of retries and update the previous and the next retry * datetime. */ public void incRetryCount () { m_nRetries++; m_aPreviousRetryDT = PDTFactory.getCurrentLocalDateTime (); m_aNextRetryDT = m_aPreviousRetryDT.plusMinutes (PDServerConfiguration.getReIndexRetryMinutes ()); }