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

How to use
getValue
method
in
org.directwebremoting.extend.InboundVariable

Best Java code snippets using org.directwebremoting.extend.InboundVariable.getValue (Showing top 19 results out of 315)

origin: org.directwebremoting/dwr

public String urlDecode() {
  if (!urlDecoded) {
    return LocalUtil.urlDecode(getValue());
  }
  return getValue();
}
origin: infiniteautomation/ma-core-public

@Override
public Object convertInbound(Class paramClass,
    InboundVariable paramInboundVariable,
    InboundContext paramInboundContext) throws MarshallException {
  
  //Convert from string to Unit
  try{
    //For the ONE unit
    if(paramInboundVariable.getValue().equals("ONE"))
      return Unit.ONE;
    else
      return UnitUtil.parseLocal(URLDecoder.decode(paramInboundVariable.getValue(), Common.UTF8));
  }catch(Exception e){
    throw new MarshallException(paramClass);
  }
}
origin: org.directwebremoting/dwr

public Object convertInbound(Class<?> paramType, InboundVariable data)
{
  if (data.isNull())
  {
    return null;
  }
  try
  {
    Constructor<?> converter = paramType.getConstructor(String.class);
    return converter.newInstance(data.getValue());
  }
  catch (Exception ex)
  {
    throw new IllegalArgumentException(ex.toString());
  }
}
origin: org.directwebremoting/dwr

/**
* Parses a currency ISO code.
*/
public Object convertInbound(Class<?> paramType, InboundVariable data) throws ConversionException
{
  if (data.isNull())
  {
    return null;
  }
  try
  {
    Currency currency = Currency.getInstance(data.getValue());
    if (currency == null)
    {
      throw new IllegalArgumentException(data.getValue() + " is not a valid java.util.Currency value");
    }
    return currency;
  }
  catch (Exception ex)
  {
    throw new ConversionException(Currency.class, ex);
  }
}
origin: net.disy.wps/wps-api

public Object convertInbound(
  @SuppressWarnings("unchecked") Class paramType,
  InboundVariable iv,
  InboundContext inctx) {
 String string = LocalUtil.decode(iv.getValue());
 try {
  return datatypeFactory.newXMLGregorianCalendar(string);
 }
 catch (IllegalArgumentException iaex) {
  log.warn("Failed to create XMLGregorianCalendar from string [" //$NON-NLS-1$
    + string
    + "]. Returning [null]."); //$NON-NLS-1$
  return null;
 }
}
origin: org.directwebremoting/dwr

public Object convertInbound(Class<?> paramType, InboundVariable data) throws ConversionException
{
  if (data.isNull())
  {
    return null;
  }
  String value = data.getValue();
  if (value == null || value.length() == 0)
  {
    return null;
  }
  try
  {
    if (paramType == BigDecimal.class)
    {
      return new BigDecimal(value.trim());
    }
    if (paramType == BigInteger.class)
    {
      return new BigInteger(value.trim());
    }
    throw new ConversionException(paramType);
  }
  catch (NumberFormatException ex)
  {
    log.debug("Error converting " + value + " to a number.");
    throw new ConversionException(paramType, "Format error converting number.");
  }
}
origin: org.directwebremoting/dwr

public Object convertInbound(Class<?> paramType, InboundVariable data) throws ConversionException
{
  if (data.isNull())
  {
    return null;
  }
  ScriptSession session = WebContextFactory.get().getScriptSession();
  String id = data.getValue();
  DefaultJavascriptObject object = new DefaultJavascriptObject(session, id);
  return Proxy.newProxyInstance(paramType.getClassLoader(), new Class[] { paramType }, object);
}
origin: org.directwebremoting/dwr

public Object convertInbound(Class<?> paramType, InboundVariable data) throws ConversionException {
  if (data.isNull()) {
    return null;
  }
  String value = data.getValue();
  // If the text is null then the whole bean is null
  if (value.trim().equals(ProtocolConstants.INBOUND_NULL)) {
    return null;
  }
  try {
    long millis = 0;
    if (value.length() > 0) {
      millis = Long.parseLong(value);
    }
    if (paramType == DateTime.class) {
      return new DateTime(millis);
    } else if (paramType == LocalDateTime.class) {
      return new LocalDateTime(new Date(millis));
    } else {
      throw new ConversionException(paramType);
    }
  }
  catch (ConversionException ex) {
    throw ex;
  }
  catch (Exception ex) {
    throw new ConversionException(paramType, ex);
  }
}
origin: org.directwebremoting/dwr

String value = data.getValue();
origin: net.disy.legato/legato-tools

@Override
public Object convertInbound(
  @SuppressWarnings({ "rawtypes" }) Class paramType,
  InboundVariable data,
  InboundContext inctx) throws MarshallException {
 String value = data.getValue();
 // If the text is null then the whole bean is null
 if (value.trim().equals(ProtocolConstants.INBOUND_NULL)) {
  return null;
 }
 if (!value.startsWith(ProtocolConstants.INBOUND_MAP_START)) {
  throw new MarshallException(paramType, Messages.getString("BeanConverter.FormatError", //$NON-NLS-1$
    ProtocolConstants.INBOUND_MAP_START));
 }
 if (!value.endsWith(ProtocolConstants.INBOUND_MAP_END)) {
  throw new MarshallException(paramType, Messages.getString("BeanConverter.FormatError", //$NON-NLS-1$
    ProtocolConstants.INBOUND_MAP_START));
 }
 value = value.substring(1, value.length() - 1);
 final Map<String, String> tokens = extractInboundTokens(paramType, value);
 return convertInbound(paramType, data, tokens, inctx, value);
}
origin: org.directwebremoting/dwr

public Object convertInbound(Class<?> paramType, InboundVariable data) throws ConversionException
{
  if (data.isNull())
  {
    return null;
  }
  String value = data.getValue().trim();
  try
  {
    return LocalUtil.simpleConvert(value, paramType);
  }
  catch (NumberFormatException ex)
  {
    log.debug("Error converting " + value + " to a number.");
    throw new ConversionException(paramType, "Format error converting number.");
  }
  catch (IllegalArgumentException ex)
  {
    throw new ConversionException(paramType);
  }
}
origin: org.directwebremoting/dwr

public Object convertInbound(Class<?> paramType, InboundVariable data) throws ConversionException
{
  if (data.isNull())
  {
    return null;
  }
  ScriptSession session = WebContextFactory.get().getScriptSession();
  String id = data.getValue();
  return new DefaultJavascriptObject(session, id);
}
origin: org.directwebremoting/dwr

public Object convertInbound(Class<?> paramType, InboundVariable data) throws ConversionException
{
  if (data.isNull())
  {
    return null;
  }
  ScriptSession session = WebContextFactory.get().getScriptSession();
  String id = data.getValue();
  return new DefaultJavascriptFunction(session, id);
}
origin: org.directwebremoting/dwr

String value = data.getValue();
if (value == null)
origin: org.directwebremoting/dwr

String value = data.getValue();
if (value.startsWith(ProtocolConstants.INBOUND_ARRAY_START))
  log.error("Found array end without array start: " + data.getValue());
  throw new IllegalArgumentException("Could not parse input. See logs for details.");
  log.error("Found array end without array end: " + data.getValue());
  throw new IllegalArgumentException("Could not parse input. See logs for details.");
origin: org.directwebremoting/dwr

String value = data.getValue();
origin: org.directwebremoting/dwr

public Object convertInbound(Class<?> paramType, InboundVariable data) throws ConversionException
{
  if (data.isNull())
  {
    return null;
  }
  if (data.getFormField().isFile())
  {
    // Data from file uploads is not URL encoded
    return data.getValue();
  }
  else
  {
    return data.urlDecode();
  }
}
origin: org.directwebremoting/dwr

String value = data.getValue();
origin: org.directwebremoting/dwr

String value = data.getValue();
org.directwebremoting.extendInboundVariablegetValue

Popular methods of InboundVariable

  • <init>
    Constructor for when we need to temporarily create an InboundVariable for sorting out varargs
  • getLookup
  • getType
  • isNull
    Was this type null on the way in
  • dereference
    Attempt to de-reference an inbound variable. We try de-referencing as soon as possible (why? there i
  • equals
  • getContext
    Accessor of the context of the variable: the other related variables
  • getFormField
  • getMembers
    Nasty hack to get around varargs
  • getNamedObjectType
    If we are using object parameters that have specified types then the ConverterManager will need to g
  • hashCode
  • toString
  • hashCode,
  • toString,
  • urlDecode

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • 21 Best IntelliJ 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