![JAR search and dependency download from the Maven repository](/logo.png)
de.tsl2.nano.h5.expression.SimpleExpression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tsl2.nano.h5 Show documentation
Show all versions of tsl2.nano.h5 Show documentation
TSL2 Framework Html5 Extensions (WebServer, Html5Presentation, RuleCover, BeanConfigurator, LogicTable-Sheet, Expression-Descriptors for Actions, Rules, URLs, Queries)
/*
* File: $HeadURL$
* Id : $Id$
*
* created by: Tom, Thomas Schneider
* created on: 15.07.2016
*
* Copyright: (c) Thomas Schneider 2016, all rights reserved
*/
package de.tsl2.nano.h5.expression;
import java.util.Map;
import de.tsl2.nano.core.util.StringUtil;
import de.tsl2.nano.execution.IPRunnable;
import de.tsl2.nano.specification.AbstractRunnable;
/**
* simple runnable expression. useful to show an url in an iframe. all context properties are filled into expression if
* there are ant-like variables.
*
* @author Tom, Thomas Schneider
* @version $Revision$
*/
public class SimpleExpression extends RunnableExpression {
/** serialVersionUID */
private static final long serialVersionUID = 8038825503409780745L;
static {
registerExpression(SimpleExpression.class);
}
/**
* constructor
*/
public SimpleExpression() {
}
@Override
public String getExpressionPattern() {
//no other expression type...
return "[^@!§$%&].*";
}
@SuppressWarnings("serial")
@Override
protected IPRunnable> createRunnable() {
return new AbstractRunnable() {
@Override
public String run(Map context, Object... extArgs) {
return StringUtil.insertProperties(expression, context);
}
@Override
public String getName() {
return WebClient.getName(expression);
}
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy