Codota Logo
BaseInspectionResultProcessor.processTraits
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
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

  • Making http post requests using okhttp
  • addToBackStack (FragmentTransaction)
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now