/** * <p> * Creates an instance of {@code Lifetime} with the specified parameters. * </p> * * @param created a {@code GregorianCalendar} representing the token creation time. * @param expires a {@code GregorianCalendar} representing the token expiration time. */ public Lifetime(GregorianCalendar created, GregorianCalendar expires) { try { this.factory = DatatypeFactory.newInstance(); } catch (DatatypeConfigurationException dce) { throw new RuntimeException(ErrorCodes.PROCESSING_EXCEPTION + "Unable to get DatatypeFactory instance", dce); } // normalize the parameters (convert to UTC). this.created = factory.newXMLGregorianCalendar(created).normalize(); this.expires = factory.newXMLGregorianCalendar(expires).normalize(); // set the delegate fields. this.delegate = new LifetimeType(); AttributedDateTime dateTime = new AttributedDateTime(); dateTime.setValue(this.created.toXMLFormat()); this.delegate.setCreated(dateTime); dateTime = new AttributedDateTime(); dateTime.setValue(this.expires.toXMLFormat()); this.delegate.setExpires(dateTime); }
/** * <p> * Creates an instance of {@code Lifetime} with the specified parameters. * </p> * * @param created a {@code GregorianCalendar} representing the token creation time. * @param expires a {@code GregorianCalendar} representing the token expiration time. */ public Lifetime(GregorianCalendar created, GregorianCalendar expires) { try { this.factory = DatatypeFactory.newInstance(); } catch (DatatypeConfigurationException dce) { throw new RuntimeException(ErrorCodes.PROCESSING_EXCEPTION + "Unable to get DatatypeFactory instance", dce); } // normalize the parameters (convert to UTC). this.created = factory.newXMLGregorianCalendar(created).normalize(); this.expires = factory.newXMLGregorianCalendar(expires).normalize(); // set the delegate fields. this.delegate = new LifetimeType(); AttributedDateTime dateTime = new AttributedDateTime(); dateTime.setValue(this.created.toXMLFormat()); this.delegate.setCreated(dateTime); dateTime = new AttributedDateTime(); dateTime.setValue(this.expires.toXMLFormat()); this.delegate.setExpires(dateTime); }
/** * <p> * Creates an instance of {@code Lifetime} with the specified parameters. * </p> * * @param created a {@code GregorianCalendar} representing the token creation time. * @param expires a {@code GregorianCalendar} representing the token expiration time. */ public Lifetime(GregorianCalendar created, GregorianCalendar expires) { try { this.factory = XMLTimeUtil.newDatatypeFactory(); } catch (DatatypeConfigurationException dce) { throw logger.wsTrustUnableToGetDataTypeFactory(dce); } // normalize the parameters (convert to UTC). this.created = factory.newXMLGregorianCalendar(created).normalize(); this.expires = factory.newXMLGregorianCalendar(expires).normalize(); // set the delegate fields. this.delegate = new LifetimeType(); AttributedDateTime dateTime = new AttributedDateTime(); dateTime.setValue(this.created.toXMLFormat()); this.delegate.setCreated(dateTime); dateTime = new AttributedDateTime(); dateTime.setValue(this.expires.toXMLFormat()); this.delegate.setExpires(dateTime); }
/** * <p> * Creates an instance of {@code Lifetime} with the specified parameters. * </p> * * @param created a {@code GregorianCalendar} representing the token creation time. * @param expires a {@code GregorianCalendar} representing the token expiration time. */ public Lifetime(GregorianCalendar created, GregorianCalendar expires) { try { this.factory = XMLTimeUtil.newDatatypeFactory(); } catch (DatatypeConfigurationException dce) { throw logger.wsTrustUnableToGetDataTypeFactory(dce); } // normalize the parameters (convert to UTC). this.created = factory.newXMLGregorianCalendar(created).normalize(); this.expires = factory.newXMLGregorianCalendar(expires).normalize(); // set the delegate fields. this.delegate = new LifetimeType(); AttributedDateTime dateTime = new AttributedDateTime(); dateTime.setValue(this.created.toXMLFormat()); this.delegate.setCreated(dateTime); dateTime = new AttributedDateTime(); dateTime.setValue(this.expires.toXMLFormat()); this.delegate.setExpires(dateTime); }
/** * <p> * Creates an instance of {@code Lifetime} with the specified parameters. * </p> * * @param created a {@code GregorianCalendar} representing the token creation time. * @param expires a {@code GregorianCalendar} representing the token expiration time. */ public Lifetime(GregorianCalendar created, GregorianCalendar expires) { try { this.factory = XMLTimeUtil.newDatatypeFactory(); } catch (DatatypeConfigurationException dce) { throw logger.wsTrustUnableToGetDataTypeFactory(dce); } // normalize the parameters (convert to UTC). this.created = factory.newXMLGregorianCalendar(created).normalize(); this.expires = factory.newXMLGregorianCalendar(expires).normalize(); // set the delegate fields. this.delegate = new LifetimeType(); AttributedDateTime dateTime = new AttributedDateTime(); dateTime.setValue(this.created.toXMLFormat()); this.delegate.setCreated(dateTime); dateTime = new AttributedDateTime(); dateTime.setValue(this.expires.toXMLFormat()); this.delegate.setExpires(dateTime); }
StaxParserUtil.validate(subEvent, WSTrustConstants.LIFETIME); LifetimeType lifeTime = new LifetimeType();
StaxParserUtil.validate(subEvent, WSTrustConstants.LIFETIME); LifetimeType lifeTime = new LifetimeType();
StaxParserUtil.validate(subEvent, WSTrustConstants.LIFETIME); LifetimeType lifeTime = new LifetimeType();
StaxParserUtil.validate(subEvent, WSTrustConstants.LIFETIME); LifetimeType lifeTime = new LifetimeType();
StaxParserUtil.validate(subEvent, WSTrustConstants.LIFETIME); LifetimeType lifeTime = new LifetimeType();
StaxParserUtil.validate(subEvent, WSTrustConstants.LIFETIME); LifetimeType lifeTime = new LifetimeType();
StaxParserUtil.validate(subEvent, WSTrustConstants.LIFETIME); LifetimeType lifeTime = new LifetimeType();
StaxParserUtil.validate(subEvent, WSTrustConstants.LIFETIME); LifetimeType lifeTime = new LifetimeType();
StaxParserUtil.validate(subEvent, WSTrustConstants.LIFETIME); LifetimeType lifeTime = new LifetimeType();
StaxParserUtil.validate(subEvent, WSTrustConstants.LIFETIME); LifetimeType lifeTime = new LifetimeType();