/** * Convert to {@link XMLGregorianCalendar} type * and also to avoid to duplicate piece of code * * @param time The {@link Date} Object to convert to a {@link XMLGregorianCalendar} object * @param logger The logger to use to log possible {@link DatatypeConfigurationException} * @return the corresponding {@link XMLGregorianCalendar} object. */ public static XMLGregorianCalendar toXMLGregorianCalendar(Date time, Logger logger) { GregorianCalendar timeAsCalendar = new GregorianCalendar(); timeAsCalendar.setTime(time); return WsrfbfUtils.toXMLGregorianCalendar(timeAsCalendar, logger); }
/** * Convert {@link JaxbElement<XMLGregorianCalendar>} type in order to avoid to duplicate piece of code * * @param time The {@link GregorianCalendar} Object to convert to a {@link XMLGregorianCalendar} object * @return the corresponding {@link XMLGregorianCalendar} object. */ private static JAXBElement<XMLGregorianCalendar> toXMLGregorianCalendarJaxbElt(Date time) { XMLGregorianCalendar xmlTime = WsrfbfUtils.toXMLGregorianCalendar(time, SetTerminationTimeImpl.logger); return WsrfrlJAXBContext.WSRFRL_JAXB_FACTORY.createSetTerminationTimeRequestedTerminationTime(xmlTime); } }
@Override public final void setNewTerminationTime(Date value) { this.jaxbTypeObj.setNewTerminationTime(WsrfbfUtils.toXMLGregorianCalendar(value, SetTerminationTimeResponseImpl.logger)); }
@Override public final void setValue(Date value) { this.jaxbTypeObj.setValue(WsrfbfUtils.toXMLGregorianCalendar(value, TerminationTimeImpl.logger)); }
@Override public final void setTimestamp(Date value) { this.jaxbTypeObj.setTimestamp(WsrfbfUtils.toXMLGregorianCalendar(value,this.logger)); }
@Override public final void setTerminationTime(Date value) { this.jaxbTypeObj.setTerminationTime(WsrfbfUtils.toXMLGregorianCalendar(value, RenewResponseImpl.logger)); }
@Override public final void setCurrentTime(Date value) { this.jaxbTypeObj.setCurrentTime(WsrfbfUtils.toXMLGregorianCalendar(value, RenewResponseImpl.logger)); }
@Override public final void setTerminationTime(Date termTime) { this.jaxbTypeObj.setTerminationTime(WsrfbfUtils.toXMLGregorianCalendar(termTime, SubscribeResponseImpl.logger)); }
/** * Default constructor */ protected SetTerminationTimeResponseImpl(Date currTime,Date newTermTime) { this.jaxbTypeObj = WsrfrlJAXBContext.WSRFRL_JAXB_FACTORY.createSetTerminationTimeResponse(); this.jaxbTypeObj.setCurrentTime(WsrfbfUtils.toXMLGregorianCalendar(currTime, SetTerminationTimeResponseImpl.logger)); this.jaxbTypeObj.setNewTerminationTime(WsrfbfUtils.toXMLGregorianCalendar(newTermTime, SetTerminationTimeResponseImpl.logger)); }
/** * Default constructor * * Note : According to the xml schema the "timestamp" field is mandatory * * @param timestamp the timestamp of the {@link BaseFaultType) object that must * be {@link GregorianCalendar} representation of an Date xml type. */ protected BaseFaultTypeImpl(Date timestamp, Logger logger){ this.logger = (logger!=null)?logger:Logger.getLogger(this.getClass().getSimpleName()); this.jaxbTypeObj = WsrfbfJAXBContext.WSRFBF_JAXB_FACTORY.createBaseFaultType(); this.jaxbTypeObj.setTimestamp(WsrfbfUtils.toXMLGregorianCalendar(timestamp,this.logger)); }
@Override public final void setInitialTerminationTime(Date value) { this.jaxbTypeObj.setInitialTerminationTime( new JAXBElement<String>(WsnbConstants.INIT_TERMINATION_TIME_QNAME, String.class, WsrfbfUtils.toXMLGregorianCalendar(value, SubscribeImpl.logger).toString())); }
/** * Default constructor */ protected TerminationNotificationImpl(Date termTime) { this.jaxbTypeObj = WsrfrlJAXBContext.WSRFRL_JAXB_FACTORY.createTerminationNotification(); this.jaxbTypeObj.setTerminationTime(WsrfbfUtils.toXMLGregorianCalendar(termTime, TerminationNotificationImpl.logger)); }
/** * Default constructor */ protected CurrentTimeImpl(Date time) { this.jaxbTypeObj = WsrfrlJAXBContext.WSRFRL_JAXB_FACTORY.createCurrentTime(); this.jaxbTypeObj.setValue(WsrfbfUtils.toXMLGregorianCalendar(time,CurrentTimeImpl.logger)); }
/** * Default constructor */ protected RenewResponseImpl(Date termTime) { this.jaxbTypeObj = WsnbJAXBContext.WSNB_JAXB_FACTORY.createRenewResponse(); this.jaxbTypeObj.setTerminationTime(WsrfbfUtils.toXMLGregorianCalendar(termTime, RenewResponseImpl.logger)); }
/** * Default constructor */ protected TerminationTimeImpl(Date time) { this.jaxbTypeObj = WsrfrlJAXBContext.WSRFRL_JAXB_FACTORY.createTerminationTime(); this.jaxbTypeObj.setValue(WsrfbfUtils.toXMLGregorianCalendar(time, TerminationTimeImpl.logger)); }
@Override public final void setTerminationTime(Date value) { this.jaxbTypeObj.setTerminationTime(WsrfbfUtils.toXMLGregorianCalendar(value, RenewImpl.logger).toString()); }
@Override public final void setMaximumTime(Date value) { ((com.ebmwebsourcing.wsstar.jaxb.notification.base.UnacceptableTerminationTimeFaultType) this.getJaxbTypeObj()).setMaximumTime(WsrfbfUtils.toXMLGregorianCalendar(value, this.getLogger())); }
@Override public final void setMaximumTime(Date value) { ((com.ebmwebsourcing.wsstar.jaxb.notification.base.UnacceptableInitialTerminationTimeFaultType) this.getJaxbTypeObj()).setMaximumTime(WsrfbfUtils.toXMLGregorianCalendar(value, this.getLogger())); }
@Override public final void setMinimumTime(Date value) { ((com.ebmwebsourcing.wsstar.jaxb.notification.base.UnacceptableInitialTerminationTimeFaultType) this.getJaxbTypeObj()).setMinimumTime(WsrfbfUtils.toXMLGregorianCalendar(value, this.getLogger())); };
@Override public final void setMinimumTime(Date value) { ((com.ebmwebsourcing.wsstar.jaxb.notification.base.UnacceptableTerminationTimeFaultType) this.getJaxbTypeObj()).setMinimumTime(WsrfbfUtils.toXMLGregorianCalendar(value, this.getLogger())); };