/** * Constructs a new access policy condition that compares the current time * (on the AWS servers) to the specified date. * * @param type * The type of comparison to perform. For example, * {@link DateComparisonType#DateLessThan} will cause this policy * condition to evaluate to true if the current date is less than * the date specified in the second argument. * @param date * The date to compare against. */ public DateCondition(DateComparisonType type, Date date) { super.type = type.toString(); super.conditionKey = ConditionFactory.CURRENT_TIME_CONDITION_KEY; super.values = Arrays.asList(new String[] {DateUtils.formatISO8601Date(date)}); }
/** * Constructs a new access policy condition that compares the current time * (on the AWS servers) to the specified date. * * @param type * The type of comparison to perform. For example, * {@link DateComparisonType#DateLessThan} will cause this policy * condition to evaluate to true if the current date is less than * the date specified in the second argument. * @param date * The date to compare against. */ public DateCondition(DateComparisonType type, Date date) { super.type = type.toString(); super.conditionKey = ConditionFactory.CURRENT_TIME_CONDITION_KEY; super.values = Arrays.asList(new String[] {DateUtils.formatISO8601Date(date)}); }
/** * Constructs a new access policy condition that compares the current time * (on the AWS servers) to the specified date. * * @param type The type of comparison to perform. For example, * {@link DateComparisonType#DateLessThan} will cause this policy * condition to evaluate to true if the current date is less than * the date specified in the second argument. * @param date The date to compare against. */ public DateCondition(DateComparisonType type, Date date) { super.type = type.toString(); super.conditionKey = ConditionFactory.CURRENT_TIME_CONDITION_KEY; super.values = Arrays.asList(new String[] { DateUtils.formatISO8601Date(date) }); }
/** * Constructs a new access policy condition that compares the current time * (on the AWS servers) to the specified date. * * @param type The type of comparison to perform. For example, * {@link DateComparisonType#DateLessThan} will cause this policy * condition to evaluate to true if the current date is less than * the date specified in the second argument. * @param date The date to compare against. */ public DateCondition(DateComparisonType type, Date date) { super.type = type.toString(); super.conditionKey = ConditionFactory.CURRENT_TIME_CONDITION_KEY; super.values = Arrays.asList(new String[] { DateUtils.formatISO8601Date(date) }); }
/** * Constructs a new access policy condition that compares the current time * (on the AWS servers) to the specified date. * * @param type The type of comparison to perform. For example, * {@link DateComparisonType#DateLessThan} will cause this policy * condition to evaluate to true if the current date is less than * the date specified in the second argument. * @param date The date to compare against. */ public DateCondition(DateComparisonType type, Date date) { super.type = type.toString(); super.conditionKey = ConditionFactory.CURRENT_TIME_CONDITION_KEY; super.values = Arrays.asList(new String[] { DateUtils.formatISO8601Date(date) }); }
/** * Constructs a new access policy condition that compares the current time * (on the AWS servers) to the specified date. * * @param type * The type of comparison to perform. For example, * {@link DateComparisonType#DateLessThan} will cause this policy * condition to evaluate to true if the current date is less than * the date specified in the second argument. * @param date * The date to compare against. */ public DateCondition(DateComparisonType type, Date date) { super.type = type.toString(); super.conditionKey = ConditionFactory.CURRENT_TIME_CONDITION_KEY; super.values = Arrays.asList(new String[] {DateUtils.formatISO8601Date(date)}); }