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

How to use
processTraits
method
in
org.metawidget.inspectionresultprocessor.impl.BaseInspectionResultProcessor

Best Java code snippets using org.metawidget.inspectionresultprocessor.impl.BaseInspectionResultProcessor.processTraits (Showing top 7 results out of 315)

origin: org.metawidget.modules/metawidget-all

@Override
protected void processTraits( Element entity, UIMetawidget metawidget, Object toInspect, String type, String... names ) {
  FacesContext context = FacesContext.getCurrentInstance();
  if ( context == null ) {
    throw InspectionResultProcessorException.newException( "FacesContext not available to FacesInspectionResultProcessor" );
  }
  Map<String, Object> requestMap = null;
  try {
    if ( mInjectThis != null ) {
      requestMap = context.getExternalContext().getRequestMap();
      requestMap.put( UNDERSCORE_THIS_ATTRIBUTE, mInjectThis.traverse( toInspect, type, false, names ).getValue() );
    }
    super.processTraits( entity, metawidget, toInspect, type, names );
  } finally {
    // UNDERSCORE_THIS_ATTRIBUTE should not be available outside of our particular
    // evaluation
    if ( requestMap != null ) {
      requestMap.remove( UNDERSCORE_THIS_ATTRIBUTE );
    }
  }
}
origin: org.metawidget.modules.faces/metawidget-faces

@Override
protected void processTraits( Element entity, UIMetawidget metawidget, Object toInspect, String type, String... names ) {
  FacesContext context = FacesContext.getCurrentInstance();
  if ( context == null ) {
    throw InspectionResultProcessorException.newException( "FacesContext not available to FacesInspectionResultProcessor" );
  }
  Map<String, Object> requestMap = null;
  try {
    if ( mInjectThis != null ) {
      requestMap = context.getExternalContext().getRequestMap();
      requestMap.put( UNDERSCORE_THIS_ATTRIBUTE, mInjectThis.traverse( toInspect, type, false, names ).getValue() );
    }
    super.processTraits( entity, metawidget, toInspect, type, names );
  } finally {
    // UNDERSCORE_THIS_ATTRIBUTE should not be available outside of our particular
    // evaluation
    if ( requestMap != null ) {
      requestMap.remove( UNDERSCORE_THIS_ATTRIBUTE );
    }
  }
}
origin: org.metawidget.modules/metawidget-all

@Override
protected void processTraits( Element entity, M metawidget, Object toInspect, String type, String... names ) {
  JexlContext context = LOCAL_CONTEXT.get();
  try {
    context.set( THIS_ATTRIBUTE, mInjectThis.traverse( toInspect, type, false, names ).getValue() );
    super.processTraits( entity, metawidget, toInspect, type, names );
  } finally {
    // THIS_ATTRIBUTE should not be available outside of our particular evaluation
    context.set( THIS_ATTRIBUTE, null );
  }
}
origin: org.metawidget.modules/metawidget-all

public Element processInspectionResultAsDom( Element inspectionResult, M metawidget, Object toInspect, String type, String... names ) {
  Element entity = XmlUtils.getFirstChildElement( inspectionResult );
  // Sanity check
  String elementName = entity.getNodeName();
  if ( !ENTITY.equals( elementName ) ) {
    throw InspectionResultProcessorException.newException( "Top-level element name should be " + ENTITY + ", not " + elementName );
  }
  Map<String, String> attributes = XmlUtils.getAttributesAsMap( entity );
  processEntity( attributes, metawidget, toInspect, type, names );
  XmlUtils.setMapAsAttributes( entity, attributes );
  processTraits( entity, metawidget, toInspect, type, names );
  return inspectionResult;
}
origin: org.metawidget.modules/metawidget-core

public Element processInspectionResultAsDom( Element inspectionResult, M metawidget, Object toInspect, String type, String... names ) {
  Element entity = XmlUtils.getFirstChildElement( inspectionResult );
  // Sanity check
  String elementName = entity.getNodeName();
  if ( !ENTITY.equals( elementName ) ) {
    throw InspectionResultProcessorException.newException( "Top-level element name should be " + ENTITY + ", not " + elementName );
  }
  Map<String, String> attributes = XmlUtils.getAttributesAsMap( entity );
  processEntity( attributes, metawidget, toInspect, type, names );
  XmlUtils.setMapAsAttributes( entity, attributes );
  processTraits( entity, metawidget, toInspect, type, names );
  return inspectionResult;
}
origin: org.metawidget.modules/metawidget-all

processTraits( trait, metawidget, toInspect, type, ArrayUtils.add( names, attributes.get( NAME ) ) );
origin: org.metawidget.modules/metawidget-core

processTraits( trait, metawidget, toInspect, type, ArrayUtils.add( names, attributes.get( NAME ) ) );
org.metawidget.inspectionresultprocessor.implBaseInspectionResultProcessorprocessTraits

Javadoc

Process the traits of the given entity. Subclasses may find it useful to override this method to perform before/after setup around trait processing (for example, establishing an EL context).

Popular methods of BaseInspectionResultProcessor

  • processEntity
    Defers to processAttributes by default.
  • processAttributes
    Process the given attributes (which may belong to either entity, property or action). Does nothing b
  • processInspectionResultAsDom
  • processTrait
    Defers to processAttributes by default.

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Top 17 Plugins for Android Studio
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