public static void initEntryHandler(TypeBinding typeBinding) { typeBinding.setHandler(EntryHandler.HANDLER); // entry has a key typeBinding.pushInterceptor(SpringSchemaBinding.keyQName, EntryKeyInterceptor.INTERCEPTOR); // entry has bean typeBinding.pushInterceptor(SpringSchemaBinding.beanQName, EntryValueInterceptor.INTERCEPTOR); // entry has ref typeBinding.pushInterceptor(SpringSchemaBinding.refQName, EntryValueInterceptor.INTERCEPTOR); // entry has value typeBinding.pushInterceptor(SpringSchemaBinding.valueQName, StringEntryValueInterceptor.STRING_ENTRY_VALUE_INTERCEPTOR); // entry can take a list typeBinding.pushInterceptor(SpringSchemaBinding.listQName, EntryValueInterceptor.INTERCEPTOR); // entry can take a set typeBinding.pushInterceptor(SpringSchemaBinding.setQName, EntryValueInterceptor.INTERCEPTOR); // entry can take a map typeBinding.pushInterceptor(SpringSchemaBinding.mapQName, EntryValueInterceptor.INTERCEPTOR); // entry has a null typeBinding.pushInterceptor(SpringSchemaBinding.nullQName, EntryValueInterceptor.INTERCEPTOR); }
public static void initBeanHandler(TypeBinding typeBinding) { typeBinding.setHandler(SpringBeanHandler.HANDLER); // handle constructor-arg typeBinding.pushInterceptor(SpringSchemaBinding.constructorQName, ConstructorArgInterceptor.INTERCEPTOR); // handle properties typeBinding.pushInterceptor(SpringSchemaBinding.propertyQName, BeanPropertyInterceptor.INTERCEPTOR); // todo lookup-method // todo replaced method }
public static void configureValueBindings(TypeBinding typeBinding) { // type has beans typeBinding.pushInterceptor(SpringSchemaBinding.beanQName, ValueMetaDataElementInterceptor.VALUES); // type has refs typeBinding.pushInterceptor(SpringSchemaBinding.refQName, ValueMetaDataElementInterceptor.VALUES); // type has values typeBinding.pushInterceptor(SpringSchemaBinding.valueQName, ValueMetaDataElementInterceptor.VALUES); // type can take a list typeBinding.pushInterceptor(SpringSchemaBinding.listQName, ValueMetaDataElementInterceptor.VALUES); // type can take a set typeBinding.pushInterceptor(SpringSchemaBinding.setQName, ValueMetaDataElementInterceptor.VALUES); // type can take a map typeBinding.pushInterceptor(SpringSchemaBinding.mapQName, ValueMetaDataElementInterceptor.VALUES); // type has a null typeBinding.pushInterceptor(SpringSchemaBinding.nullQName, NullValueElementInterceptor.NULLVALUES); // type has wildcard WildcardBinding wcb = typeBinding.getWildcard(); if (wcb == null) throw new IllegalStateException("Missing wildcard binding for type: " + typeBinding.getQName()); wcb.setWildcardHandler(ValueWildcardHandler.WILDCARD); }
public static void initBeansHandler(TypeBinding typeBinding) { typeBinding.setHandler(SpringBeansHandler.HANDLER); // handle import typeBinding.pushInterceptor(SpringSchemaBinding.importQName, ImportInterceptor.INTERCEPTOR); // handle aliases typeBinding.pushInterceptor(SpringSchemaBinding.aliasQName, DeploymentAliasInterceptor.INTERCEPTOR); // handle beans typeBinding.pushInterceptor(SpringSchemaBinding.beanQName, DeploymentBeanInterceptor.INTERCEPTOR); // Deployment can take wildcards typeBinding.getWildcard().setWildcardHandler(DeploymentWildcardHandler.HANDLER); }
public static void initPropsHandler(TypeBinding typeBinding) { typeBinding.setHandler(PropertiesHandler.HANDLER); // props typeBinding.pushInterceptor(SpringSchemaBinding.propQName, MapEntryInterceptor.INTERCEPTOR); }
public static void initMapHandler(TypeBinding typeBinding) { typeBinding.setHandler(SpringMapHandler.HANDLER); // entry has an entry typeBinding.pushInterceptor(SpringSchemaBinding.entryQName, MapEntryInterceptor.INTERCEPTOR); }
public SchemaBinding init(SchemaBinding schema) { // ignore XB property replacement schema.setReplacePropertyRefs(false); // javabean binding TypeBinding beanType = schema.getType(javabeanTypeQName); beanType.setHandler(JavaBeanHandler.HANDLER); // bean has constructor beanType.pushInterceptor(constructorQName, ConstructorInterceptor.INTERCEPTOR); // bean has properties beanType.pushInterceptor(propertyQName, PropertyInterceptor.INTERCEPTOR); // constructor binding TypeBinding constructorType = schema.getType(constructorTypeQName); constructorType.setHandler(ConstructorHandler.HANDLER); // constructor has properties constructorType.pushInterceptor(propertyQName, PropertyInterceptor.INTERCEPTOR); // property binding TypeBinding propertyType = schema.getType(propertyTypeQName); propertyType.setHandler(PropertyHandler.HANDLER); return schema; } }
ParticleBinding urlParticle = new ParticleBinding(urlElement, 0, 1, true); bootstrapModel.addParticle(urlParticle); bootstrapType.pushInterceptor(urlElement.getQName(), new DefaultElementInterceptor()
ParticleBinding urlParticle = new ParticleBinding(urlElement, 0, 1, true); bootstrapModel.addParticle(urlParticle); bootstrapType.pushInterceptor(urlElement.getQName(), new DefaultElementInterceptor()
beanType.pushInterceptor(propertyQName, new DefaultElementInterceptor()