congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
WsrfbfUtils
Code IndexAdd Tabnine to your IDE (free)

How to use
WsrfbfUtils
in
com.ebmwebsourcing.wsstar.basefaults.datatypes.impl.utils

Best Java code snippets using com.ebmwebsourcing.wsstar.basefaults.datatypes.impl.utils.WsrfbfUtils (Showing top 20 results out of 315)

origin: com.ebmwebsourcing.wsstar/wsrf-bf-datatypes-jaxbimpl

/**
 * 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);
}
 
origin: com.ebmwebsourcing.wsstar/wsn-b-datatypes-jaxbimpl

@Override
public final Document writeGetCurrentMessageResponseAsDOM(
    GetCurrentMessageResponse value) throws WsnbException {
  Document result = null;    
  try {
    Marshaller marshaller = this.wsnbJaxbContext.createWSNotificationMarshaller();
        
    
    result = WsstarCommonUtils.getNamespaceDocumentBuilder().newDocument(); 
    
    // TODO : Check if it is a Thread safe method
    final JAXBElement<com.ebmwebsourcing.wsstar.jaxb.notification.base.GetCurrentMessageResponse> element = 
      new JAXBElement<com.ebmwebsourcing.wsstar.jaxb.notification.base.GetCurrentMessageResponse>(WsnbConstants.GET_CURRENT_MESSAGE_RESPONSE_QNAME,
          com.ebmwebsourcing.wsstar.jaxb.notification.base.GetCurrentMessageResponse.class,((GetCurrentMessageResponseImpl)value).getJaxbTypeObj());

    marshaller.marshal(element, result);            
      } catch (final JAXBException ex) {
    throw new WsnbException(WsrfbfUtils.getBindingExMessage(value), ex);
  }
  
  return result;
}
origin: com.ebmwebsourcing.wsstar/wsn-b-datatypes-jaxbimpl

@Override
public final Document writeSubscribeResponseAsDOM(SubscribeResponse value)
    throws WsnbException {
  Document result = null;    
  try {
    Marshaller marshaller = this.wsnbJaxbContext.createWSNotificationMarshaller();
        
    result = WsstarCommonUtils.getNamespaceDocumentBuilder().newDocument(); 
    
    // TODO : Check if it is a Thread safe method
    final JAXBElement<com.ebmwebsourcing.wsstar.jaxb.notification.base.SubscribeResponse> element =
     new JAXBElement<com.ebmwebsourcing.wsstar.jaxb.notification.base.SubscribeResponse>(WsnbConstants.SUBSCRIBE_RESPONSE_QNAME,
          com.ebmwebsourcing.wsstar.jaxb.notification.base.SubscribeResponse.class, SubscribeResponseImpl.toJaxbModel(value));     
    marshaller.marshal(element, result);                        
      } catch (final JAXBException ex) {
    throw new WsnbException(WsrfbfUtils.getBindingExMessage(value), ex);
  }                    
  return result;
}
origin: com.ebmwebsourcing.wsstar/wsrf-rl-datatypes-jaxbimpl

@Override
public final void setNewTerminationTime(Date value) {
  this.jaxbTypeObj.setNewTerminationTime(WsrfbfUtils.toXMLGregorianCalendar(value, SetTerminationTimeResponseImpl.logger)); 
}
origin: com.ebmwebsourcing.wsstar/wsn-b-datatypes-jaxbimpl

@Override
public final Document writeUseRawAsDOM(UseRaw value) throws WsnbException {
  Document result = null;
  if (value instanceof UseRawImpl){
    try {
      Marshaller marshaller = this.wsnbJaxbContext.createWSNotificationMarshaller();
      result = WsstarCommonUtils.getNamespaceDocumentBuilder().newDocument();
      // TODO : Check if it is a Thread safe method
      final JAXBElement<com.ebmwebsourcing.wsstar.jaxb.notification.base.UseRaw> element = 
        new JAXBElement<com.ebmwebsourcing.wsstar.jaxb.notification.base.UseRaw>(WsnbConstants.USERAW_QNAME,
            com.ebmwebsourcing.wsstar.jaxb.notification.base.UseRaw.class,((UseRawImpl)value).getJaxbTypeObj());
      marshaller.marshal(element, result);            
    } catch (final JAXBException ex) {
      throw new WsnbException(WsrfbfUtils.getBindingExMessage(value), ex);
    } 
  }
  return result;	
}
origin: com.ebmwebsourcing.wsstar/wsrf-rl-datatypes-jaxbimpl

@Override
public final void setValue(Date value) {
  this.jaxbTypeObj.setValue(WsrfbfUtils.toXMLGregorianCalendar(value, TerminationTimeImpl.logger));	
}
  
origin: com.ebmwebsourcing.wsstar/wsn-b-datatypes-jaxbimpl

@Override
public final Document writeUnsubscribeAsDOM(Unsubscribe value)
    throws WsnbException {
  Document result = null;
  if (value instanceof UnsubscribeImpl){
    try {
      Marshaller marshaller = this.wsnbJaxbContext.createWSNotificationMarshaller();
      result = WsstarCommonUtils.getNamespaceDocumentBuilder().newDocument();
      // TODO : Check if it is a Thread safe method
      final JAXBElement<com.ebmwebsourcing.wsstar.jaxb.notification.base.Unsubscribe> element = 
        new JAXBElement<com.ebmwebsourcing.wsstar.jaxb.notification.base.Unsubscribe>(WsnbConstants.UNSUBSCRIBE_QNAME,
            com.ebmwebsourcing.wsstar.jaxb.notification.base.Unsubscribe.class,((UnsubscribeImpl)value).getJaxbTypeObj());
      marshaller.marshal(element, result);            
    } catch (final JAXBException ex) {
      throw new WsnbException(WsrfbfUtils.getBindingExMessage(value), ex);
    } 
  }
  return result;	
}
origin: com.ebmwebsourcing.wsstar/wsrf-rl-datatypes-jaxbimpl

  /**
   * 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);
  }
}
origin: com.ebmwebsourcing.wsstar/wsn-b-datatypes-jaxbimpl

@Override
public final Document writeUnsubscribeResponseAsDOM(UnsubscribeResponse value)
    throws WsnbException {
  Document result = null;
  if (value instanceof UnsubscribeResponseImpl){
    try {
      Marshaller marshaller = this.wsnbJaxbContext.createWSNotificationMarshaller();
      result = WsstarCommonUtils.getNamespaceDocumentBuilder().newDocument();
      // TODO : Check if it is a Thread safe method
      final JAXBElement<com.ebmwebsourcing.wsstar.jaxb.notification.base.UnsubscribeResponse> element = 
        new JAXBElement<com.ebmwebsourcing.wsstar.jaxb.notification.base.UnsubscribeResponse>(WsnbConstants.UNSUBSCRIBE_RESPONSE_QNAME,
            com.ebmwebsourcing.wsstar.jaxb.notification.base.UnsubscribeResponse.class,((UnsubscribeResponseImpl)value).getJaxbTypeObj());
      marshaller.marshal(element, result);            
    } catch (final JAXBException ex) {
      throw new WsnbException(WsrfbfUtils.getBindingExMessage(value), ex);
    } 
  }
  return result;	
}
origin: com.ebmwebsourcing.wsstar/wsrf-bf-datatypes-jaxbimpl

@Override
public final void setTimestamp(Date value) {
  this.jaxbTypeObj.setTimestamp(WsrfbfUtils.toXMLGregorianCalendar(value,this.logger));		
}

origin: com.ebmwebsourcing.wsstar/wsrf-rl-datatypes-jaxbimpl

@Override
public final Document writeDestroyAsDOM(Destroy value) throws WsrfrlException {
  Document result = null;
  if (value instanceof DestroyImpl){
    try {
      Marshaller marshaller = this.resourceLifetimeJaxbContext.createWSResourceLifetimeMarshaller();
      result = WsstarCommonUtils.getNamespaceDocumentBuilder().newDocument();
      // TODO : Check if it is a Thread safe method
      final JAXBElement<com.ebmwebsourcing.wsstar.jaxb.resource.resourcelifetime.Destroy> element = 
        new JAXBElement<com.ebmwebsourcing.wsstar.jaxb.resource.resourcelifetime.Destroy>(WsrfrlConstants.DESTROY_QNAME,
            com.ebmwebsourcing.wsstar.jaxb.resource.resourcelifetime.Destroy.class,
            ((DestroyImpl)value).getJaxbTypeObj());
      marshaller.marshal(element, result);            
    } catch (final JAXBException ex) {
      throw new WsrfrlException(WsrfbfUtils.getBindingExMessage(value), ex);
    } 
  }
  return result;	
}
origin: com.ebmwebsourcing.wsstar/wsn-b-datatypes-jaxbimpl

@Override
public final void setTerminationTime(Date value) {
  this.jaxbTypeObj.setTerminationTime(WsrfbfUtils.toXMLGregorianCalendar(value, RenewResponseImpl.logger));
}
origin: com.ebmwebsourcing.wsstar/wsn-b-datatypes-jaxbimpl

@Override
public final Document writeRenewAsDOM(Renew value) throws WsnbException {
  Document result = null;
  if (value instanceof RenewImpl){
    try {
      Marshaller marshaller = this.wsnbJaxbContext.createWSNotificationMarshaller();
      result = WsstarCommonUtils.getNamespaceDocumentBuilder().newDocument();
      // TODO : Check if it is a Thread safe method
      final JAXBElement<com.ebmwebsourcing.wsstar.jaxb.notification.base.Renew> element = 
        new JAXBElement<com.ebmwebsourcing.wsstar.jaxb.notification.base.Renew>(WsnbConstants.RENEW_QNAME,
            com.ebmwebsourcing.wsstar.jaxb.notification.base.Renew.class,((RenewImpl)value).getJaxbTypeObj());
      marshaller.marshal(element, result);            
    } catch (final JAXBException ex) {
      throw new WsnbException(WsrfbfUtils.getBindingExMessage(value), ex);
    } 
  }
  return result;	
  
}
origin: com.ebmwebsourcing.wsstar/wsn-b-datatypes-jaxbimpl

@Override
public final void setCurrentTime(Date value) {
  this.jaxbTypeObj.setCurrentTime(WsrfbfUtils.toXMLGregorianCalendar(value, RenewResponseImpl.logger));
}

origin: com.ebmwebsourcing.wsstar/wsn-b-datatypes-jaxbimpl

@Override
public final Document writeSubscriptionPolicyTypeAsDOM(
    SubscriptionPolicyType value) throws WsnbException {
  Document result = null;    
  try {
    Marshaller marshaller = this.wsnbJaxbContext.createWSNotificationMarshaller();
    result = WsstarCommonUtils.getNamespaceDocumentBuilder().newDocument(); 
    // TODO : Check if it is a Thread safe method
    final JAXBElement<com.ebmwebsourcing.wsstar.jaxb.notification.base.SubscriptionPolicyType> element = 
      WsnbJAXBContext.WSNB_JAXB_FACTORY.createSubscriptionPolicy(SubscriptionPolicyTypeImpl.toJaxbModel(value));
    marshaller.marshal(element, result);
  } catch (final JAXBException ex) {
    throw new WsnbException(WsrfbfUtils.getBindingExMessage(value), ex);
  }                       
  return result;
}
origin: com.ebmwebsourcing.wsstar/wsn-b-datatypes-jaxbimpl

@Override
public final void setCreationTime(Date value) {
  this.jaxbTypeObj.setCreationTime(WsrfbfUtils.toXMLGregorianCalendar(value, SubscriptionManagerRPImpl.logger));
}
origin: com.ebmwebsourcing.wsstar/wsn-b-datatypes-jaxbimpl

@Override
public final Document writeProducerPropertiesExpressionAsDOM(ProducerPropertiesExpression value)
    throws WsnbException {
  Document result = null;    
  try {
    Marshaller marshaller = this.wsnbJaxbContext.createWSNotificationMarshaller();
    
    result = WsstarCommonUtils.getNamespaceDocumentBuilder().newDocument(); 
                     // TODO : Check if it is a Thread safe method
    final JAXBElement<com.ebmwebsourcing.wsstar.jaxb.notification.base.QueryExpressionType> element =
      WsnbJAXBContext.WSNB_JAXB_FACTORY.createProducerProperties(ProducerPropertiesExpressionImpl.toJaxbModel(value));
    
    marshaller.marshal(element, result);
    
  } catch (final JAXBException ex) {
    throw new WsnbException(WsrfbfUtils.getBindingExMessage(value), ex);
  } 
  
  return result;
}
origin: com.ebmwebsourcing.wsstar/wsn-b-datatypes-jaxbimpl

@Override
public final void setTerminationTime(Date termTime) {
  this.jaxbTypeObj.setTerminationTime(WsrfbfUtils.toXMLGregorianCalendar(termTime, SubscribeResponseImpl.logger));
}

origin: com.ebmwebsourcing.wsstar/wsn-b-datatypes-jaxbimpl

@Override
public final Document writeMessageContentExpressionAsDOM(MessageContentExpression value)
    throws WsnbException {
  Document result = null;    
  try {
    Marshaller marshaller = this.wsnbJaxbContext.createWSNotificationMarshaller();
    
    result = WsstarCommonUtils.getNamespaceDocumentBuilder().newDocument(); 
            
    // TODO : Check if it is a Thread safe method
    final JAXBElement<com.ebmwebsourcing.wsstar.jaxb.notification.base.QueryExpressionType> element =
      WsnbJAXBContext.WSNB_JAXB_FACTORY.createMessageContent(MessageContentExpressionImpl.toJaxbModel(value));
    
    marshaller.marshal(element, result);
    
  } catch (final JAXBException ex) {
    throw new WsnbException(WsrfbfUtils.getBindingExMessage(value), ex);
  } 
  
  return result;
}

origin: com.ebmwebsourcing.wsstar/wsn-b-datatypes-jaxbimpl

@Override
public final void setCurrentTime(Date value) {
  this.jaxbTypeObj.setCurrentTime(WsrfbfUtils.toXMLGregorianCalendar(value, SubscribeResponseImpl.logger));
}
com.ebmwebsourcing.wsstar.basefaults.datatypes.impl.utilsWsrfbfUtils

Most used methods

  • getBindingExMessage
    provide a "generic" message content for Binding Exception
  • toXMLGregorianCalendar
    Convert to XMLGregorianCalendar type and also to avoid to duplicate piece of code

Popular in Java

  • Updating database using SQL prepared statement
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • setScale (BigDecimal)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now