Package org.joda.time

Examples of org.joda.time.DateTime.toDate()


      DateTime creationDate = new DateTime();
      DateTime expirationDate = new DateTime(creationDate.getMillis() + config.ttl);

      // These variables are used to build the trust assertion
      Date creationTime = creationDate.toDate();
      Date expirationTime = expirationDate.toDate();

      // Create the subject
      Subject subject = createSubject(config, doc, crypto, creationDate, expirationDate, data);

      // Set the subject
View Full Code Here


                validTill = assertion.getSaml2().getConditions().getNotOnOrAfter();
            } else {
                validTill = assertion.getSaml1().getConditions().getNotOnOrAfter();
            }

            SecurityToken securityToken = new SecurityToken(assertion.getId(), null, validTill.toDate());
            securityToken.setToken(assertion.getElement());
            securityToken.setPrincipal(principal);
           
            if (tokenRealm != null) {
                Properties props = new Properties();
View Full Code Here

                validTill = assertion.getSaml2().getConditions().getNotOnOrAfter();
            } else {
                validTill = assertion.getSaml1().getConditions().getNotOnOrAfter();
            }
           
            SecurityToken securityToken = new SecurityToken(assertion.getId(), null, validTill.toDate());
            securityToken.setToken(assertion.getElement());
            securityToken.setPrincipal(principal);
           
            if (tokenRealm != null) {
                Properties props = new Properties();
View Full Code Here

            calendar.setTimeInMillis(Long.valueOf(duration));
            logger.info("Workflow Variable Date = "+ SimpleDateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.SHORT).format(calendar.getTime()));
            return calendar.getTime();
        } catch (NumberFormatException e) {
            DateTime dateTime = ISODateTimeFormat.dateOptionalTimeParser().parseDateTime(duration);
            return dateTime.toDate();
        }
    }

    public Date subtract(Date date, String duration) {
        return null;
View Full Code Here

            Calendar calendar = Calendar.getInstance();
            calendar.setTimeInMillis(Long.valueOf(value));
            return calendar.getTime();
        } catch (NumberFormatException e) {
            DateTime dateTime = ISODateTimeFormat.dateOptionalTimeParser().parseDateTime(value);
            return dateTime.toDate();
        }
    }
}
View Full Code Here

            if (isTokenLogDebug) {
                tokenIssuerLog.debug("finishSAMLTokenCreation");
            }

            rstrElem = createRSTR(rahasData, notBefore.toDate(), notAfter.toDate(), envelope, doc,
                    assertionNode, assertionId, encryptedKey);

            if (isTokenLogDebug) {
                tokenIssuerLog.debug("RSTRCreationDone");
            }
View Full Code Here

    if (updatedSince == null)
      return null;

    DateTime date = new DateTime(updatedSince);

    return date.toDate();
  }

  public String getSortBy() {
    return getParameter(SORT_BY);
  }
View Full Code Here

    else
    {
      try
      {
        DateTime date = format.parseDateTime(value);
        return date.toDate();
      }
      catch (RuntimeException e)
      {
        throw new ConversionException(e);
      }
View Full Code Here

                validTill = assertion.getSaml2().getConditions().getNotOnOrAfter();
            } else {
                validTill = assertion.getSaml1().getConditions().getNotOnOrAfter();
            }

            SecurityToken securityToken = new SecurityToken(assertion.getId(), null, validTill.toDate());
            securityToken.setToken(assertion.getElement());
            securityToken.setPrincipal(principal);
           
            Properties props = new Properties();
            String tokenRealm = tokenParameters.getRealm();
View Full Code Here

                validTill = assertion.getSaml2().getConditions().getNotOnOrAfter();
            } else {
                validTill = assertion.getSaml1().getConditions().getNotOnOrAfter();
            }
           
            SecurityToken securityToken = new SecurityToken(assertion.getId(), null, validTill.toDate());
            securityToken.setToken(assertion.getElement());
            securityToken.setPrincipal(principal);
           
            if (tokenRealm != null) {
                Properties props = new Properties();
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.