jodd.madvoc.injector
Class BaseScopeInjector

java.lang.Object
  extended by jodd.madvoc.injector.BaseScopeInjector
Direct Known Subclasses:
ApplicationScopeInjector, MadvocContextScopeInjector, RequestScopeInjector, ServletContextScopeInjector, SessionScopeInjector

public abstract class BaseScopeInjector
extends java.lang.Object

Abstract base class for HTTP scopes injection.


Field Summary
protected static ScopeDataResolver scopeDataResolver
           
protected  ScopeType scopeType
           
 
Constructor Summary
protected BaseScopeInjector(ScopeType scopeType)
          Creates scope injector for provided ScopeType.
 
Method Summary
protected  java.lang.String getMatchedPropertyName(ScopeData.In in, java.lang.String attrName)
          Returns matched property name or null if name is not matched.
protected  java.lang.Object getTargetProperty(java.lang.Object target, ScopeData.Out out)
          Reads target property.
 ScopeData.In[] lookupInData(java.lang.Class actionClass)
          Delegates to ScopeDataResolver.lookupInData(Class, jodd.madvoc.ScopeType)
 ScopeData.Out[] lookupOutData(java.lang.Class actionClass)
          Delegates to ScopeDataResolver.lookupOutData(Class, jodd.madvoc.ScopeType)
protected  void setTargetProperty(java.lang.Object target, java.lang.String name, java.lang.Object attrValue, boolean create)
          Sets target bean property, optionally creates instance if doesn't exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scopeDataResolver

protected static final ScopeDataResolver scopeDataResolver

scopeType

protected final ScopeType scopeType
Constructor Detail

BaseScopeInjector

protected BaseScopeInjector(ScopeType scopeType)
Creates scope injector for provided ScopeType.

Method Detail

setTargetProperty

protected void setTargetProperty(java.lang.Object target,
                                 java.lang.String name,
                                 java.lang.Object attrValue,
                                 boolean create)
Sets target bean property, optionally creates instance if doesn't exist.


getTargetProperty

protected java.lang.Object getTargetProperty(java.lang.Object target,
                                             ScopeData.Out out)
Reads target property.


getMatchedPropertyName

protected java.lang.String getMatchedPropertyName(ScopeData.In in,
                                                  java.lang.String attrName)
Returns matched property name or null if name is not matched.

Matches if attribute name matches the required field name. If the match is positive, injection or outjection is performed on the field.

Parameter name matches field name if param name starts with field name and has either '.' or '[' after the field name.

Returns real property name, once when name is matched.


lookupInData

public ScopeData.In[] lookupInData(java.lang.Class actionClass)
Delegates to ScopeDataResolver.lookupInData(Class, jodd.madvoc.ScopeType)


lookupOutData

public ScopeData.Out[] lookupOutData(java.lang.Class actionClass)
Delegates to ScopeDataResolver.lookupOutData(Class, jodd.madvoc.ScopeType)



Copyright © 2003-2010 Jodd Team