@ConfigParam (name = "name", use = ConfigParam.Use.OPTIONAL) public SetElementData setElementName(String elementQName) { this.elementQName = elementQName; return this; }
public static <U> void uninitialise(U instance) { invoke(instance, Uninitialize.class); }
@ConfigParam (defaultVal = "ERROR") public void setOnFail(final OnFail onFail) { this.onFail = onFail; }
@ConfigParam(defaultVal = "1000") // Default pause of 1 second public Pause setPeriod(long period) { this.period = period; return this; }
/** * @param terminateBefore the terminateBefore to set */ @ConfigParam(use = Use.OPTIONAL) public TerminateVisitor setTerminateBefore(boolean terminateBefore) { this.terminateBefore = terminateBefore; return this; }
/** * Omit the XML Declaration from the serialized fragments. * @param omitXMLDeclaration True if the XML declaration is to be omitted, otherwise false. * @return this instance. */ @ConfigParam(defaultVal = "false") public FragmentSerializer setOmitXMLDeclaration(boolean omitXMLDeclaration) { this.omitXMLDeclaration = omitXMLDeclaration; return this; }
@ConfigParam(defaultVal = "false") public RemoveElement setKeepChildren(boolean keepChildren) { this.keepChildren = keepChildren; return this; }
@ConfigParam (name = "namespace", use = ConfigParam.Use.OPTIONAL) public SetElementData setElementNamespace(String namespace) { this.elementNamespace = namespace; return this; }
@ConfigParam public RemoveAttribute setName(String attributeName) { this.qName = attributeName; return this; }
/** * Set the bind-to beanId for the serialized fragment. * @param bindTo The bind-to beanId for the serialized fragment. * @return this instance. */ @ConfigParam public FragmentSerializer setBindTo(String bindTo) { this.bindTo = bindTo; return this; }
@ConfigParam(name = Filter.ENTITIES_REWRITE, defaultVal = "true") public void setRewriteEntities(boolean rewriteEntities) { this.rewriteEntities = rewriteEntities; }
@ConfigParam(defaultVal = "false") public void setCloseEmptyElements(boolean closeEmptyElements) { this.closeEmptyElements = closeEmptyElements; }
@ConfigParam (use = ConfigParam.Use.OPTIONAL) public RemoveAttribute setNamespace(String attributeNamespace) { this.namespace = attributeNamespace; return this; }
@ConfigParam(name = Filter.ENTITIES_REWRITE, defaultVal = "true") public void setRewriteEntities(boolean rewriteEntities) { this.rewriteEntities = rewriteEntities; }
/** * Retain the fragment bean in the {@link BeanContext} after it's creating fragment * has been processed. * * @param retain True if the fragment bean is to be retained in the {@link org.dhatim.javabean.context.BeanContext}, * otherwise false. * @return this instance. */ @ConfigParam(defaultVal = "false") public FragmentSerializer setRetain(boolean retain) { this.retain = retain; return this; }
/** * Set whether or not the child content only should be serialized. * <p/> * This variable is, by default, false. * * @param childContentOnly True if the child content only (exclude * the targeted element itself), otherwise false. * @return this instance. */ @ConfigParam(defaultVal = "false") public FragmentSerializer setChildContentOnly(boolean childContentOnly) { this.childContentOnly = childContentOnly; return this; }
/** * Expression Binding initVal setter. * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly@gmail.com</a> */ public class InitValExpressionSetter implements DOMVisitBefore { @ConfigParam private String initValAttrib; public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException { String initValExpression = DomUtils.getAttributeValue(element, initValAttrib); if(initValExpression != null) { ExtensionContext extensionContext = ExtensionContext.getExtensionContext(executionContext); SmooksResourceConfiguration creatorConfig = extensionContext.getResourceByName(BeanInstanceCreator.class.getName()); String propertyName = DomUtils.getAttributeValue(element, "property"); creatorConfig.setParameter(BeanInstanceCreator.INIT_VAL_EXPRESSION, "this." + propertyName + " = (" + initValExpression + ");"); } } }
@ConfigParam ( use = Use.OPTIONAL ) public void setJndiContextFactory( final String contextFactory ) { jndiProperties.setContextFactory( contextFactory ); }
@ConfigParam (defaultVal = "AUTO_ACKNOWLEDGE", choice = {"AUTO_ACKNOWLEDGE", "CLIENT_ACKNOWLEDGE", "DUPS_OK_ACKNOWLEDGE" } ) public void setAcknowledgeMode( final String jmsAcknowledgeMode ) { jmsProperties.setAcknowledgeMode( jmsAcknowledgeMode ); }
@ConfigParam (name="name") public void setCompositRuleName(final String compositRuleName) { this.compositRuleName = compositRuleName; this.ruleProviderName = RuleProviderAccessor.parseRuleProviderName(compositRuleName); this.ruleName = RuleProviderAccessor.parseRuleName(compositRuleName); }