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

How to use
getDefaultValue
method
in
org.apache.commons.jelly.impl.Attribute

Best Java code snippets using org.apache.commons.jelly.impl.Attribute.getDefaultValue (Showing top 8 results out of 315)

origin: org.jenkins-ci/commons-jelly

public void doTag(XMLOutput output) throws JellyTagException {
  // lets find any attributes that are not set and
  for ( Iterator iter = attributes.values().iterator(); iter.hasNext(); ) {
    Attribute attribute = (Attribute) iter.next();
    String name = attribute.getName();
    if ( ! setAttributesSet.contains( name ) ) {
      if ( attribute.isRequired() ) {
        throw new MissingAttributeException(name);
      }
      // lets get the default value
      Object value = null;
      Expression expression = attribute.getDefaultValue();
      if ( expression != null ) {
        value = expression.evaluate(context);
      }
      // only set non-null values?
      if ( value != null ) {
        super.setAttribute(name, value);
      }
    }
  }
  invokeBody(output);
  // export the bean if required
  if ( var != null ) {
    context.setVariable(var, getDynaBean());
  }
}
origin: commons-jelly/commons-jelly

public void doTag(XMLOutput output) throws JellyTagException {
  // lets find any attributes that are not set and
  for ( Iterator iter = attributes.values().iterator(); iter.hasNext(); ) {
    Attribute attribute = (Attribute) iter.next();
    String name = attribute.getName();
    if ( ! setAttributesSet.contains( name ) ) {
      if ( attribute.isRequired() ) {
        throw new MissingAttributeException(name);
      }
      // lets get the default value
      Object value = null;
      Expression expression = attribute.getDefaultValue();
      if ( expression != null ) {
        value = expression.evaluate(context);
      }
      // only set non-null values?
      if ( value != null ) {
        super.setAttribute(name, value);
      }
    }
  }
  invokeBody(output);
  // export the bean if required
  if ( var != null ) {
    context.setVariable(var, getDynaBean());
  }
}
origin: org.hudsonci.stapler/commons-jelly

public void doTag(XMLOutput output) throws JellyTagException {
  // lets find any attributes that are not set and
  for ( Iterator iter = attributes.values().iterator(); iter.hasNext(); ) {
    Attribute attribute = (Attribute) iter.next();
    String name = attribute.getName();
    if ( ! setAttributesSet.contains( name ) ) {
      if ( attribute.isRequired() ) {
        throw new MissingAttributeException(name);
      }
      // lets get the default value
      Object value = null;
      Expression expression = attribute.getDefaultValue();
      if ( expression != null ) {
        value = expression.evaluate(context);
      }
      // only set non-null values?
      if ( value != null ) {
        super.setAttribute(name, value);
      }
    }
  }
  invokeBody(output);
  // export the bean if required
  if ( var != null ) {
    context.setVariable(var, getDynaBean());
  }
}
origin: org.jvnet.hudson/commons-jelly

public void doTag(XMLOutput output) throws JellyTagException {
  // lets find any attributes that are not set and
  for ( Iterator iter = attributes.values().iterator(); iter.hasNext(); ) {
    Attribute attribute = (Attribute) iter.next();
    String name = attribute.getName();
    if ( ! setAttributesSet.contains( name ) ) {
      if ( attribute.isRequired() ) {
        throw new MissingAttributeException(name);
      }
      // lets get the default value
      Object value = null;
      Expression expression = attribute.getDefaultValue();
      if ( expression != null ) {
        value = expression.evaluate(context);
      }
      // only set non-null values?
      if ( value != null ) {
        super.setAttribute(name, value);
      }
    }
  }
  invokeBody(output);
  // export the bean if required
  if ( var != null ) {
    context.setVariable(var, getDynaBean());
  }
}
origin: org.hudsonci.stapler/commons-jelly

Expression expression = attribute.getDefaultValue();
if ( expression != null ) {
  value = expression.evaluate(context);
origin: commons-jelly/commons-jelly

Expression expression = attribute.getDefaultValue();
if ( expression != null ) {
  value = expression.evaluate(context);
origin: org.jvnet.hudson/commons-jelly

Expression expression = attribute.getDefaultValue();
if ( expression != null ) {
  value = expression.evaluate(context);
origin: org.jenkins-ci/commons-jelly

Expression expression = attribute.getDefaultValue();
if ( expression != null ) {
  value = expression.evaluate(context);
org.apache.commons.jelly.implAttributegetDefaultValue

Javadoc

Returns the defaultValue.

Popular methods of Attribute

  • getName
    Returns the name.
  • isRequired
    Returns whether this attribute is required.
  • <init>
  • setDefaultValue
    Sets the defaultValue.
  • setName
    Sets the name.
  • setRequired
    Sets whether this attribute is required.

Popular in Java

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getApplicationContext (Context)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • 14 Best Plugins for Eclipse
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