Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.hivemind.service.impl
Class ObjectTranslator  view ObjectTranslator download ObjectTranslator.java

java.lang.Object
  extended byorg.apache.hivemind.service.impl.ObjectTranslator
All Implemented Interfaces:
org.apache.hivemind.schema.Translator

public class ObjectTranslator
extends java.lang.Object
implements org.apache.hivemind.schema.Translator

Implementation of the indirect translator. This translator allows the contributor, not the schema, to define where object values come from, and is fully extensible. Perhaps I'll have an inspiration and find a better name than "indirect".


Field Summary
private  org.apache.hivemind.ErrorLog _errorLog
           
private  java.util.Map _providers
          Keyed on prefix, value is an org.apache.hivemind.service.ObjectProvider.
 
Constructor Summary
ObjectTranslator()
           
 
Method Summary
 void setContributions(java.util.Map map)
           
 void setErrorLog(org.apache.hivemind.ErrorLog errorLog)
           
 java.lang.Object translate(org.apache.hivemind.internal.Module contributingModule, java.lang.Class propertyType, java.lang.String inputValue, org.apache.hivemind.Location location)
          Invoked by a org.apache.hivemind.schema.Rule to translate an inputValue into an appropriate object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_errorLog

private org.apache.hivemind.ErrorLog _errorLog
Since:
1.1

_providers

private java.util.Map _providers
Keyed on prefix, value is an org.apache.hivemind.service.ObjectProvider.

Constructor Detail

ObjectTranslator

public ObjectTranslator()
Method Detail

translate

public java.lang.Object translate(org.apache.hivemind.internal.Module contributingModule,
                                  java.lang.Class propertyType,
                                  java.lang.String inputValue,
                                  org.apache.hivemind.Location location)
Description copied from interface: org.apache.hivemind.schema.Translator
Invoked by a org.apache.hivemind.schema.Rule to translate an inputValue into an appropriate object. Substitution symbols will already have been expanded before this method is invoked.

Specified by:
translate in interface org.apache.hivemind.schema.Translator

setContributions

public void setContributions(java.util.Map map)

setErrorLog

public void setErrorLog(org.apache.hivemind.ErrorLog errorLog)
Since:
1.1