You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by sa...@apache.org on 2012/08/07 08:26:13 UTC
svn commit: r1370126 [8/15] - in /ofbiz/branches/jackrabbit20120501: ./
applications/accounting/script/org/ofbiz/accounting/payment/
applications/accounting/src/org/ofbiz/accounting/payment/
applications/accounting/webapp/accounting/WEB-INF/ applicatio...
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/MiniLangElement.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/MiniLangElement.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/MiniLangElement.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/MiniLangElement.java Tue Aug 7 06:25:59 2012
@@ -41,21 +41,42 @@ public class MiniLangElement {
this.tagName = element.getTagName().intern();
}
+ /**
+ * Updates <code>aic</code> with this element's artifact information.
+ * @param aic The artifact information context
+ */
public void gatherArtifactInfo(ArtifactInfoContext aic) {
}
+ /**
+ * Returns the source code line number for this element.
+ * @return The source code line number for this element
+ */
public String getLineNumber() {
return this.lineNumber == null ? "unknown" : this.lineNumber.toString();
}
+ /**
+ * Returns the containing {@link SimpleMethod} object.
+ * @return The containing {@link SimpleMethod} object
+ */
public SimpleMethod getSimpleMethod() {
return this.simpleMethod;
}
+ /**
+ * Returns this element's tag name.
+ * @return This element's tag name
+ */
public String getTagName() {
return this.tagName;
}
+ /**
+ * Logs a trace message.
+ * @param methodContext
+ * @param messages
+ */
public void outputTraceMessage(MethodContext methodContext, String... messages) {
String lineSep = System.getProperty("line.separator");
StringBuilder buf = new StringBuilder(getSimpleMethod().getFileName());
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/MiniLangUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/MiniLangUtil.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/MiniLangUtil.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/MiniLangUtil.java Tue Aug 7 06:25:59 2012
@@ -50,7 +50,6 @@ import org.ofbiz.minilang.method.MethodO
import org.ofbiz.minilang.method.MethodOperation;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
/**
@@ -70,6 +69,11 @@ public final class MiniLangUtil {
SCRIPT_PREFIXES = Collections.unmodifiableSet(scriptPrefixes);
}
+ /**
+ * Returns <code>true</code> if <code>str</code> contains a script.
+ * @param str The string to test
+ * @return <code>true</code> if <code>str</code> contains a script
+ */
public static boolean containsScript(String str) {
if (str.length() > 0) {
for (String scriptPrefix : SCRIPT_PREFIXES) {
@@ -81,10 +85,27 @@ public final class MiniLangUtil {
return false;
}
+ /**
+ * Returns <code>true</code> if the Mini-language script engine has been configured to
+ * auto-correct version changes.
+ * @return <code>true</code> if the Mini-language script engine has been configured to
+ * auto-correct version changes
+ */
public static boolean autoCorrectOn() {
return "true".equals(UtilProperties.getPropertyValue("minilang.properties", "autocorrect"));
}
+ /**
+ * Calls an object method.
+ * @param operation A reference to the <code>MethodOperation</code> calling this method
+ * @param methodContext
+ * @param parameters
+ * @param methodClass
+ * @param methodObject
+ * @param methodName
+ * @param retFieldFma
+ * @throws MiniLangRuntimeException
+ */
public static void callMethod(MethodOperation operation, MethodContext methodContext, List<MethodObject<?>> parameters, Class<?> methodClass, Object methodObject, String methodName, FlexibleMapAccessor<Object> retFieldFma) throws MiniLangRuntimeException {
Object[] args = null;
Class<?>[] parameterTypes = null;
@@ -115,6 +136,16 @@ public final class MiniLangUtil {
}
}
+ /**
+ * Returns <code>obj</code> converted to the type specified in <code>targetClass</code>.
+ * @param obj
+ * @param targetClass
+ * @param locale
+ * @param timeZone
+ * @param format
+ * @return The converted object
+ * @throws Exception
+ */
@SuppressWarnings("unchecked")
public static Object convertType(Object obj, Class<?> targetClass, Locale locale, TimeZone timeZone, String format) throws Exception {
if (obj == null || obj == GenericEntity.NULL_FIELD) {
@@ -154,6 +185,10 @@ public final class MiniLangUtil {
return converter.convert(obj);
}
+ /**
+ * Flags a Mini-language XML document as corrected.
+ * @param element
+ */
public static void flagDocumentAsCorrected(Element element) {
Document doc = element.getOwnerDocument();
if (doc != null) {
@@ -161,6 +196,16 @@ public final class MiniLangUtil {
}
}
+ /**
+ * Returns a <code>object</code>-derived <code>Class</code> that is
+ * suitable for use with the conversion framework. If the argument is
+ * <code>null</code> or a <code>String</code>, the method returns the
+ * {@link PlainString} class.
+ *
+ * @param object
+ * @return A <code>Class</code> that is
+ * suitable for use with the conversion framework
+ */
public static Class<?> getObjectClassForConversion(Object object) {
if (object == null || object instanceof String) {
return PlainString.class;
@@ -177,6 +222,14 @@ public final class MiniLangUtil {
}
}
+ /**
+ * Returns <code>true</code> if <code>attributeValue</code> is a
+ * constant value (it does not contain an expression).
+ *
+ * @param attributeValue The value to test
+ * @return <code>true</code> if <code>attributeValue</code> is a
+ * constant value
+ */
public static boolean isConstantAttribute(String attributeValue) {
if (attributeValue.length() > 0) {
return !FlexibleStringExpander.containsExpression(FlexibleStringExpander.getInstance(attributeValue));
@@ -184,6 +237,15 @@ public final class MiniLangUtil {
return true;
}
+ /**
+ * Returns <code>true</code> if <code>attributeValue</code> is a
+ * constant value (it does not contain an expression) or a constant
+ * plus expression value.
+ *
+ * @param attributeValue The value to test
+ * @return <code>true</code> if <code>attributeValue</code> is a
+ * constant value or a constant plus expression value
+ */
public static boolean isConstantPlusExpressionAttribute(String attributeValue) {
if (attributeValue.length() > 0) {
if (attributeValue.startsWith("${") && attributeValue.endsWith("}")) {
@@ -200,29 +262,23 @@ public final class MiniLangUtil {
return true;
}
+ /**
+ * Returns <code>true</code> if <code>document</code> contains corrections.
+ *
+ * @param document The document to test
+ * @return <code>true</code> if <code>document</code> contains corrections
+ */
public static boolean isDocumentAutoCorrected(Document document) {
return "true".equals(document.getUserData("autoCorrected"));
}
- public static void removeInvalidAttributes(Element element, String... validAttributeNames) {
- Set<String> validNames = new HashSet<String>();
- for (String name : validAttributeNames) {
- validNames.add(name);
- }
- boolean elementModified = false;
- NamedNodeMap nnm = element.getAttributes();
- for (int i = 0; i < nnm.getLength(); i++) {
- String attributeName = nnm.item(i).getNodeName();
- if (!validNames.contains(attributeName)) {
- element.removeAttribute(attributeName);
- elementModified = true;
- }
- }
- if (elementModified) {
- flagDocumentAsCorrected(element);
- }
- }
-
+ /**
+ * Writes a Mini-language <code>Document</code> to disk. The XML file is styled by the
+ * config/MiniLang.xslt style sheet.
+ *
+ * @param xmlURL
+ * @param document
+ */
public static void writeMiniLangDocument(URL xmlURL, Document document) {
URL styleSheetURL = null;
InputStream styleSheetInStream = null;
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/MiniLangValidate.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/MiniLangValidate.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/MiniLangValidate.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/MiniLangValidate.java Tue Aug 7 06:25:59 2012
@@ -63,7 +63,7 @@ public final class MiniLangValidate {
*
* @param attributeValue
* @param defaultValue
- * @return
+ * @return <code>attributeValue</code> if it is not empty, else returns <code>defaultValue</code>
*/
public static String checkAttribute(String attributeValue, String defaultValue) {
return attributeValue.isEmpty() ? defaultValue : attributeValue;
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java Tue Aug 7 06:25:59 2012
@@ -72,16 +72,17 @@ import org.w3c.dom.Element;
* <ul>
* <li>Creating model classes that extend {@link org.ofbiz.minilang.method.MethodOperation}</li>
* <li>Creating factories for the model classes that implement {@link org.ofbiz.minilang.method.MethodOperation.Factory}</li>
- * <li>Create a service provider information file
+ * <li>Create a service provider information file for the factory classes
* (see <a href="http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html" target="_blank">ServiceLoader</a>)
- * for the factory classes</li>
+ * </li>
* </ul>
* </p>
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-The{{%3Csimplemethod%3E}}element">Mini-language Reference</a>
*/
public final class SimpleMethod extends MiniLangElement {
public static final String module = SimpleMethod.class.getName();
- public static final String err_resource = "MiniLangErrorUiLabels";
+ private static final String err_resource = "MiniLangErrorUiLabels";
private static final String[] DEPRECATED_ATTRIBUTES = {"parameter-map-name", "locale-name", "delegator-name", "security-name", "dispatcher-name", "user-login-name"};
private static final Map<String, MethodOperation.Factory<MethodOperation>> methodOperationFactories;
private static final UtilCache<String, Map<String, SimpleMethod>> simpleMethodsDirectCache = UtilCache.createUtilCache("minilang.SimpleMethodsDirect", 0, 0);
@@ -210,7 +211,7 @@ public final class SimpleMethod extends
}
Document document = null;
try {
- document = UtilXml.readXmlDocument(xmlURL, true, true);
+ document = UtilXml.readXmlDocument(xmlURL, MiniLangValidate.validationOn(), true);
} catch (Exception e) {
throw new MiniLangException("Could not read SimpleMethod XML document [" + xmlURL + "]: ", e);
}
@@ -407,7 +408,7 @@ public final class SimpleMethod extends
Map<String, Object> messageMap = UtilMisc.<String, Object> toMap("shortDescription", shortDescription);
String errMsg = UtilProperties.getMessage(SimpleMethod.err_resource, "simpleMethod.must_logged_process", messageMap, locale) + ".";
if (methodContext.isTraceOn()) {
- outputTraceMessage(methodContext, "\"login-required\" attribute set to \"true\" but UserLogin GenericValue was not found, returning error message:", errMsg);
+ outputTraceMessage(methodContext, "login-required attribute set to \"true\" but UserLogin GenericValue was not found, returning error message:", errMsg);
}
return returnError(methodContext, errMsg);
}
@@ -433,7 +434,7 @@ public final class SimpleMethod extends
boolean beganTransaction = false;
if (useTransaction) {
if (methodContext.isTraceOn()) {
- outputTraceMessage(methodContext, "\"use-transaction\" attribute set to \"true\", beginning transaction.");
+ outputTraceMessage(methodContext, "use-transaction attribute set to \"true\", beginning transaction.");
}
try {
beganTransaction = TransactionUtil.begin();
@@ -549,7 +550,7 @@ public final class SimpleMethod extends
}
}
methodContext.putResult(ModelService.RESPONSE_MESSAGE, response);
- returnValue = null;
+ returnValue = response;
}
// decide whether or not to commit based on the response message, ie only rollback if error is returned and not finished
boolean doCommit = true;
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/SimpleServiceEngine.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/SimpleServiceEngine.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/SimpleServiceEngine.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/SimpleServiceEngine.java Tue Aug 7 06:25:59 2012
@@ -27,7 +27,7 @@ import org.ofbiz.service.ServiceDispatch
import org.ofbiz.service.engine.GenericAsyncEngine;
/**
- * Standard Java Static Method Service Engine
+ * Mini-language Service Engine.
*/
public final class SimpleServiceEngine extends GenericAsyncEngine {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/artifact/ArtifactInfoContext.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/artifact/ArtifactInfoContext.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/artifact/ArtifactInfoContext.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/artifact/ArtifactInfoContext.java Tue Aug 7 06:25:59 2012
@@ -32,30 +32,55 @@ public final class ArtifactInfoContext {
private final Set<String> serviceNameSet = FastSet.newInstance();
private final Set<String> simpleMethodNameSet = FastSet.newInstance();
+ /**
+ * Adds an entity name to this context.
+ * @param name The entity name to add to this context
+ */
public void addEntityName(String name) {
if (name != null) {
this.entityNameSet.add(name);
}
}
+ /**
+ * Adds a service name to this context.
+ * @param name The service name to add to this context
+ */
public void addServiceName(String name) {
if (name != null) {
this.serviceNameSet.add(name);
}
}
+ /**
+ * Adds a visited <code>SimpleMethod</code> to this context.
+ * @param method the <code>SimpleMethod</code> to add to this context
+ */
public void addSimpleMethod(SimpleMethod method) {
this.simpleMethodNameSet.add(method.getLocationAndName());
}
+ /**
+ * Returns the entity names in this context.
+ * @return The entity names in this context
+ */
public Set<String> getEntityNames() {
return this.entityNameSet;
}
+ /**
+ * Returns the service names in this context.
+ * @return The service names in this context
+ */
public Set<String> getServiceNames() {
return this.serviceNameSet;
}
+ /**
+ * Returns <code>true</code> if this context has visited <code>method</code>.
+ * @param method The <code>SimpleMethod</code> to test
+ * @return <code>true</code> if this context has visited <code>method</code>
+ */
public boolean hasVisited(SimpleMethod method) {
return simpleMethodNameSet.contains(method.getLocationAndName());
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/FieldObject.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/FieldObject.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/FieldObject.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/FieldObject.java Tue Aug 7 06:25:59 2012
@@ -25,7 +25,9 @@ import org.ofbiz.minilang.SimpleMethod;
import org.w3c.dom.Element;
/**
- * Specifies an environment field to be passed as an argument to a method call.
+ * Implements the <field> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cfield%3E}}">Mini-language Reference</a>
*/
public final class FieldObject<T> extends MethodObject<T> {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/MessageElement.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/MessageElement.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/MessageElement.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/MessageElement.java Tue Aug 7 06:25:59 2012
@@ -29,6 +29,8 @@ import org.w3c.dom.Element;
/**
* Implements the <fail-message> and <fail-property> elements.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{<failmessage>}}">Mini-language Reference</a>
*/
public final class MessageElement extends MiniLangElement {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/MethodContext.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/MethodContext.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/MethodContext.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/MethodContext.java Tue Aug 7 06:25:59 2012
@@ -35,7 +35,6 @@ import org.ofbiz.base.util.string.Flexib
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.security.Security;
-import org.ofbiz.security.authz.Authorization;
import org.ofbiz.service.DispatchContext;
import org.ofbiz.service.LocalDispatcher;
@@ -47,7 +46,6 @@ public final class MethodContext {
public static final int EVENT = 1;
public static final int SERVICE = 2;
- private Authorization authz;
private Delegator delegator;
private LocalDispatcher dispatcher;
private Map<String, Object> env = FastMap.newInstance();
@@ -72,7 +70,6 @@ public final class MethodContext {
this.timeZone = (TimeZone) context.get("timeZone");
this.dispatcher = ctx.getDispatcher();
this.delegator = ctx.getDelegator();
- this.authz = ctx.getAuthorization();
this.security = ctx.getSecurity();
this.userLogin = (GenericValue) context.get("userLogin");
if (this.loader == null) {
@@ -94,7 +91,6 @@ public final class MethodContext {
this.timeZone = UtilHttp.getTimeZone(request);
this.dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
this.delegator = (Delegator) request.getAttribute("delegator");
- this.authz = (Authorization) request.getAttribute("authz");
this.security = (Security) request.getAttribute("security");
this.userLogin = (GenericValue) request.getSession().getAttribute("userLogin");
if (this.loader == null) {
@@ -107,7 +103,7 @@ public final class MethodContext {
}
/**
- * This is a very simple constructor which assumes the needed objects (dispatcher, delegator, authz, security, request, response, etc) are in the context. Will result in calling method as a
+ * This is a very simple constructor which assumes the needed objects (dispatcher, delegator, security, request, response, etc) are in the context. Will result in calling method as a
* service or event, as specified.
*/
public MethodContext(Map<String, ? extends Object> context, ClassLoader loader, int methodType) {
@@ -118,7 +114,6 @@ public final class MethodContext {
this.timeZone = (TimeZone) context.get("timeZone");
this.dispatcher = (LocalDispatcher) context.get("dispatcher");
this.delegator = (Delegator) context.get("delegator");
- this.authz = (Authorization) context.get("authz");
this.security = (Security) context.get("security");
this.userLogin = (GenericValue) context.get("userLogin");
if (methodType == MethodContext.EVENT) {
@@ -136,8 +131,6 @@ public final class MethodContext {
this.dispatcher = (LocalDispatcher) this.request.getAttribute("dispatcher");
if (this.delegator == null)
this.delegator = (Delegator) this.request.getAttribute("delegator");
- if (this.authz == null)
- this.authz = (Authorization) this.request.getAttribute("authz");
if (this.security == null)
this.security = (Security) this.request.getAttribute("security");
if (this.userLogin == null)
@@ -153,10 +146,6 @@ public final class MethodContext {
}
}
- public Authorization getAuthz() {
- return this.authz;
- }
-
public Delegator getDelegator() {
return this.delegator;
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallBsh.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallBsh.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallBsh.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallBsh.java Tue Aug 7 06:25:59 2012
@@ -41,7 +41,9 @@ import bsh.EvalError;
import bsh.Interpreter;
/**
- * Executes a BSH script.
+ * Implements the <call-bsh> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Ccallbsh%3E}}">Mini-language Reference</a>
*/
public final class CallBsh extends MethodOperation {
@@ -147,11 +149,16 @@ public final class CallBsh extends Metho
return sb.toString();
}
+ /**
+ * A factory for the <call-bsh> element.
+ */
public static final class CallBshFactory implements Factory<CallBsh> {
+ @Override
public CallBsh createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CallBsh(element, simpleMethod);
}
+ @Override
public String getName() {
return "call-bsh";
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallClassMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallClassMethod.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallClassMethod.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallClassMethod.java Tue Aug 7 06:25:59 2012
@@ -26,7 +26,6 @@ import java.util.List;
import org.ofbiz.base.util.ObjectType;
import org.ofbiz.base.util.UtilXml;
import org.ofbiz.base.util.collections.FlexibleMapAccessor;
-import org.ofbiz.base.util.string.FlexibleStringExpander;
import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.MiniLangUtil;
import org.ofbiz.minilang.MiniLangValidate;
@@ -39,7 +38,9 @@ import org.ofbiz.minilang.method.StringO
import org.w3c.dom.Element;
/**
- * Calls a static method on a Java class.
+ * Implements the <call-class-method> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Ccallclassmethod%3E}}">Mini-language Reference</a>
*/
public final class CallClassMethod extends MethodOperation {
@@ -109,11 +110,16 @@ public final class CallClassMethod exten
return sb.toString();
}
+ /**
+ * A factory for the <call-class-method> element.
+ */
public static final class CallClassMethodFactory implements Factory<CallClassMethod> {
+ @Override
public CallClassMethod createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CallClassMethod(element, simpleMethod);
}
+ @Override
public String getName() {
return "call-class-method";
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallObjectMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallObjectMethod.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallObjectMethod.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallObjectMethod.java Tue Aug 7 06:25:59 2012
@@ -24,7 +24,6 @@ import java.util.List;
import org.ofbiz.base.util.UtilXml;
import org.ofbiz.base.util.collections.FlexibleMapAccessor;
-import org.ofbiz.base.util.string.FlexibleStringExpander;
import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.MiniLangRuntimeException;
import org.ofbiz.minilang.MiniLangUtil;
@@ -38,7 +37,9 @@ import org.ofbiz.minilang.method.StringO
import org.w3c.dom.Element;
/**
- * Calls a Java object method using the given fields as parameters
+ * Implements the <call-object-method> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Ccallobjectmethod%3E}}">Mini-language Reference</a>
*/
public final class CallObjectMethod extends MethodOperation {
@@ -104,11 +105,16 @@ public final class CallObjectMethod exte
return sb.toString();
}
+ /**
+ * A factory for the <call-object-method> element.
+ */
public static final class CallObjectMethodFactory implements Factory<CallObjectMethod> {
+ @Override
public CallObjectMethod createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CallObjectMethod(element, simpleMethod);
}
+ @Override
public String getName() {
return "call-object-method";
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java Tue Aug 7 06:25:59 2012
@@ -48,7 +48,9 @@ import org.ofbiz.service.ServiceUtil;
import org.w3c.dom.Element;
/**
- * Calls a service using the given parameters
+ * Implements the <call-service> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Ccallservice%3E}}">Mini-language Reference</a>
*/
public final class CallService extends MethodOperation {
@@ -379,11 +381,16 @@ public final class CallService extends M
return sb.toString();
}
+ /**
+ * A factory for the <call-service> element.
+ */
public static final class CallServiceFactory implements Factory<CallService> {
+ @Override
public CallService createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CallService(element, simpleMethod);
}
+ @Override
public String getName() {
return "call-service";
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallServiceAsynch.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallServiceAsynch.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallServiceAsynch.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallServiceAsynch.java Tue Aug 7 06:25:59 2012
@@ -37,7 +37,9 @@ import org.ofbiz.service.GenericServiceE
import org.w3c.dom.Element;
/**
- * Calls a service using the given parameters
+ * Implements the <call-service-asynch> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Ccallserviceasynch%3E}}">Mini-language Reference</a>
*/
public final class CallServiceAsynch extends MethodOperation {
@@ -126,11 +128,16 @@ public final class CallServiceAsynch ext
return sb.toString();
}
+ /**
+ * A factory for the <call-service-asynch> element.
+ */
public static final class CallServiceAsynchFactory implements Factory<CallServiceAsynch> {
+ @Override
public CallServiceAsynch createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CallServiceAsynch(element, simpleMethod);
}
+ @Override
public String getName() {
return "call-service-asynch";
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMapProcessor.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMapProcessor.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMapProcessor.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMapProcessor.java Tue Aug 7 06:25:59 2012
@@ -36,7 +36,9 @@ import org.ofbiz.minilang.operation.MapP
import org.w3c.dom.Element;
/**
- * An event operation that calls a simple map processor inlined or from a separate file
+ * Implements the <call-map-processor> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Ccallmapprocessor%3E}}">Mini-language Reference</a>
*/
public final class CallSimpleMapProcessor extends MethodOperation {
@@ -122,11 +124,16 @@ public final class CallSimpleMapProcesso
return sb.toString();
}
+ /**
+ * A factory for the <call-map-processor> element.
+ */
public static final class CallSimpleMapProcessorFactory implements Factory<CallSimpleMapProcessor> {
+ @Override
public CallSimpleMapProcessor createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CallSimpleMapProcessor(element, simpleMethod);
}
+ @Override
public String getName() {
return "call-map-processor";
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMethod.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMethod.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallSimpleMethod.java Tue Aug 7 06:25:59 2012
@@ -42,7 +42,9 @@ import org.ofbiz.minilang.method.MethodO
import org.w3c.dom.Element;
/**
- * Invokes a Mini-language simple method.
+ * Implements the <call-simple-method> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Ccallsimplemethod%3E}}">Mini-language Reference</a>
*/
public final class CallSimpleMethod extends MethodOperation {
@@ -192,11 +194,16 @@ public final class CallSimpleMethod exte
return sb.toString();
}
+ /**
+ * A factory for the <call-simple-method> element.
+ */
public static final class CallSimpleMethodFactory implements Factory<CallSimpleMethod> {
+ @Override
public CallSimpleMethod createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CallSimpleMethod(element, simpleMethod);
}
+ @Override
public String getName() {
return "call-simple-method";
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/Return.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/Return.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/Return.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/Return.java Tue Aug 7 06:25:59 2012
@@ -27,7 +27,9 @@ import org.ofbiz.minilang.method.MethodO
import org.w3c.dom.Element;
/**
- * An event operation that returns the given response code
+ * Implements the <return> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Creturn%3E}}">Mini-language Reference</a>
*/
public final class Return extends MethodOperation {
@@ -39,12 +41,15 @@ public final class Return extends Method
MiniLangValidate.attributeNames(simpleMethod, element, "response-code");
MiniLangValidate.noChildElements(simpleMethod, element);
}
- responseCodeFse = FlexibleStringExpander.getInstance(MiniLangValidate.checkAttribute(element.getAttribute("response-code"), "success"));
+ responseCodeFse = FlexibleStringExpander.getInstance(element.getAttribute("response-code"));
}
@Override
public boolean exec(MethodContext methodContext) throws MiniLangException {
String responseCode = responseCodeFse.expandString(methodContext.getEnvMap());
+ if (responseCode.isEmpty()) {
+ responseCode = simpleMethod.getDefaultSuccessCode();
+ }
if (methodContext.getMethodType() == MethodContext.EVENT) {
methodContext.putEnv(simpleMethod.getEventResponseCodeName(), responseCode);
} else {
@@ -63,11 +68,16 @@ public final class Return extends Method
return sb.toString();
}
+ /**
+ * A factory for the <return> element.
+ */
public static final class ReturnFactory implements Factory<Return> {
+ @Override
public Return createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new Return(element, simpleMethod);
}
+ @Override
public String getName() {
return "return";
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java Tue Aug 7 06:25:59 2012
@@ -40,7 +40,9 @@ import org.ofbiz.service.ModelService;
import org.w3c.dom.Element;
/**
- * Sets all Service parameters/attributes in the to-map using the map as a source.
+ * Implements the <set-service-fields> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Csetservicefields%3E}}">Mini-language Reference</a>
*/
public final class SetServiceFields extends MethodOperation {
@@ -80,6 +82,13 @@ public final class SetServiceFields exte
@Override
public boolean exec(MethodContext methodContext) throws MiniLangException {
+ Map<String, ? extends Object> fromMap = mapFma.get(methodContext.getEnvMap());
+ if (fromMap == null) {
+ if (Debug.verboseOn()) {
+ Debug.logVerbose("The from map in set-service-field was not found with name: " + mapFma, module);
+ }
+ return true;
+ }
String serviceName = serviceNameFse.expandString(methodContext.getEnvMap());
ModelService modelService = null;
try {
@@ -92,13 +101,6 @@ public final class SetServiceFields exte
toMap = FastMap.newInstance();
toMapFma.put(methodContext.getEnvMap(), toMap);
}
- Map<String, ? extends Object> fromMap = mapFma.get(methodContext.getEnvMap());
- if (fromMap == null) {
- if (Debug.verboseOn()) {
- Debug.logVerbose("The from map in set-service-field was not found with name: " + mapFma, module);
- }
- return true;
- }
List<Object> errorMessages = FastList.newInstance();
Map<String, Object> validAttributes = modelService.makeValid(fromMap, "IN", true, errorMessages, methodContext.getTimeZone(), methodContext.getLocale());
if (errorMessages.size() > 0) {
@@ -132,11 +134,16 @@ public final class SetServiceFields exte
return sb.toString();
}
+ /**
+ * A factory for the <set-service-fields> element.
+ */
public static final class SetServiceFieldsFactory implements Factory<SetServiceFields> {
+ @Override
public SetServiceFields createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new SetServiceFields(element, simpleMethod);
}
+ @Override
public String getName() {
return "set-service-fields";
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/CombinedCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/CombinedCondition.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/CombinedCondition.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/CombinedCondition.java Tue Aug 7 06:25:59 2012
@@ -32,6 +32,8 @@ import org.w3c.dom.Element;
/**
* Implements the <and>, <or>, <not>, and <xor> elements.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-Conditional%2FLoopingStatements">Mini-language Reference</a>
*/
public abstract class CombinedCondition extends MiniLangElement implements Conditional {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java Tue Aug 7 06:25:59 2012
@@ -79,7 +79,7 @@ public abstract class Compare {
* Returns a <code>Compare</code> instance for the specified operator.
*
* @param operator
- * @return
+ * @return A <code>Compare</code> instance for the specified operator
*/
public static Compare getInstance(String operator) {
Assert.notNull("operator", operator);
@@ -95,7 +95,7 @@ public abstract class Compare {
* @param format Optional format to be used in object type conversions
* @param locale Optional locale to be used in object type conversions
* @param timeZone Optional time zone to be used in object type conversions
- * @return
+ * @return The result of this comparison
* @throws Exception
*/
public abstract boolean doCompare(Object lValue, Object rValue, Class<?> type, Locale locale, TimeZone timeZone, String format) throws Exception;
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.java Tue Aug 7 06:25:59 2012
@@ -38,6 +38,8 @@ import org.w3c.dom.Element;
/**
* Implements the <if-compare> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cifcompare%3E}}">Mini-language Reference</a>
*/
public final class CompareCondition extends MethodOperation implements Conditional {
@@ -58,7 +60,7 @@ public final class CompareCondition exte
MiniLangValidate.attributeNames(simpleMethod, element, "field", "format", "operator", "type", "value");
MiniLangValidate.requiredAttributes(simpleMethod, element, "field", "operator", "value");
MiniLangValidate.constantAttributes(simpleMethod, element, "operator", "type");
- MiniLangValidate.constantPlusExpressionAttributes(simpleMethod, element, "value", "format");
+ MiniLangValidate.constantPlusExpressionAttributes(simpleMethod, element, "value");
MiniLangValidate.expressionAttributes(simpleMethod, element, "field");
}
this.fieldFma = FlexibleMapAccessor.getInstance(element.getAttribute("field"));
@@ -101,7 +103,7 @@ public final class CompareCondition exte
@Override
public boolean checkCondition(MethodContext methodContext) throws MiniLangException {
if (this.compare == null) {
- throw new MiniLangRuntimeException("Invalid operator " + this.operator, this);
+ throw new MiniLangRuntimeException("Invalid operator \"" + this.operator + "\"", this);
}
Object fieldVal = fieldFma.get(methodContext.getEnvMap());
Class<?> targetClass = this.targetClass;
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareFieldCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareFieldCondition.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareFieldCondition.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareFieldCondition.java Tue Aug 7 06:25:59 2012
@@ -38,6 +38,8 @@ import org.w3c.dom.Element;
/**
* Implements the <if-compare-field> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cifcomparefield%3E}}">Mini-language Reference</a>
*/
public final class CompareFieldCondition extends MethodOperation implements Conditional {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/ElseIf.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/ElseIf.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/ElseIf.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/ElseIf.java Tue Aug 7 06:25:59 2012
@@ -33,6 +33,8 @@ import org.w3c.dom.Element;
/**
* Implements the <else-if> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Celseif%3E}}">Mini-language Reference</a>
*/
public final class ElseIf extends MiniLangElement {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/EmptyCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/EmptyCondition.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/EmptyCondition.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/EmptyCondition.java Tue Aug 7 06:25:59 2012
@@ -24,7 +24,6 @@ import java.util.List;
import org.ofbiz.base.util.ObjectType;
import org.ofbiz.base.util.UtilXml;
import org.ofbiz.base.util.collections.FlexibleMapAccessor;
-import org.ofbiz.base.util.string.FlexibleStringExpander;
import org.ofbiz.minilang.MiniLangException;
import org.ofbiz.minilang.MiniLangValidate;
import org.ofbiz.minilang.SimpleMethod;
@@ -35,6 +34,8 @@ import org.w3c.dom.Element;
/**
* Implements the <if-empty> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cifempty%3E}}">Mini-language Reference</a>
*/
public final class EmptyCondition extends MethodOperation implements Conditional {
@@ -112,7 +113,6 @@ public final class EmptyCondition extend
public String toString() {
StringBuilder sb = new StringBuilder("<if-empty ");
sb.append("field=\"").append(this.fieldFma).append("\"/>");
- sb.append("/>");
return sb.toString();
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/HasPermissionCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/HasPermissionCondition.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/HasPermissionCondition.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/HasPermissionCondition.java Tue Aug 7 06:25:59 2012
@@ -32,11 +32,12 @@ import org.ofbiz.minilang.artifact.Artif
import org.ofbiz.minilang.method.MethodContext;
import org.ofbiz.minilang.method.MethodOperation;
import org.ofbiz.security.Security;
-import org.ofbiz.security.authz.Authorization;
import org.w3c.dom.Element;
/**
* Implements the <if-has-permission> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cifhaspermission%3E}}">Mini-language Reference</a>
*/
public final class HasPermissionCondition extends MethodOperation implements Conditional {
@@ -73,16 +74,15 @@ public final class HasPermissionConditio
public boolean checkCondition(MethodContext methodContext) throws MiniLangException {
GenericValue userLogin = methodContext.getUserLogin();
if (userLogin != null) {
+ Security security = methodContext.getSecurity();
String permission = permissionFse.expandString(methodContext.getEnvMap());
String action = actionFse.expandString(methodContext.getEnvMap());
if (!action.isEmpty()) {
- Security security = methodContext.getSecurity();
if (security.hasEntityPermission(permission, action, userLogin)) {
return true;
}
} else {
- Authorization authz = methodContext.getAuthz();
- if (authz.hasPermission(userLogin.getString("userLoginId"), permission, methodContext.getEnvMap())) {
+ if (security.hasPermission(permission, userLogin)) {
return true;
}
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/RegexpCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/RegexpCondition.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/RegexpCondition.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/RegexpCondition.java Tue Aug 7 06:25:59 2012
@@ -38,6 +38,8 @@ import org.w3c.dom.Element;
/**
* Implements the <if-regexp> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cifregexp%3E}}">Mini-language Reference</a>
*/
public class RegexpCondition extends MethodOperation implements Conditional {
@@ -55,7 +57,6 @@ public class RegexpCondition extends Met
if (MiniLangValidate.validationOn()) {
MiniLangValidate.attributeNames(simpleMethod, element, "field", "expr");
MiniLangValidate.requiredAttributes(simpleMethod, element, "field", "expr");
- MiniLangValidate.constantPlusExpressionAttributes(simpleMethod, element, "expr");
MiniLangValidate.expressionAttributes(simpleMethod, element, "field");
}
this.fieldFma = FlexibleMapAccessor.getInstance(element.getAttribute("field"));
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/ValidateMethodCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/ValidateMethodCondition.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/ValidateMethodCondition.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/ValidateMethodCondition.java Tue Aug 7 06:25:59 2012
@@ -36,6 +36,8 @@ import org.w3c.dom.Element;
/**
* Implements the <if-validate-method> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cifvalidatemethod%3E}}">Mini-language Reference</a>
*/
public final class ValidateMethodCondition extends MethodOperation implements Conditional {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearCacheLine.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearCacheLine.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearCacheLine.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearCacheLine.java Tue Aug 7 06:25:59 2012
@@ -31,6 +31,8 @@ import org.w3c.dom.Element;
/**
* Implements the <clear-cache-line> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cclearcacheline%3E}}">Mini-language Reference</a>
*/
public final class ClearCacheLine extends MethodOperation {
@@ -76,10 +78,12 @@ public final class ClearCacheLine extend
* A factory for the <clear-cache-line> element.
*/
public static final class ClearCacheLineFactory implements Factory<ClearCacheLine> {
+ @Override
public ClearCacheLine createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new ClearCacheLine(element, simpleMethod);
}
+ @Override
public String getName() {
return "clear-cache-line";
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearEntityCaches.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearEntityCaches.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearEntityCaches.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/ClearEntityCaches.java Tue Aug 7 06:25:59 2012
@@ -28,6 +28,8 @@ import org.w3c.dom.NamedNodeMap;
/**
* Implements the <clear-entity-caches> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cclearentitycaches%3E}}">Mini-language Reference</a>
*/
public final class ClearEntityCaches extends MethodOperation {
@@ -58,10 +60,12 @@ public final class ClearEntityCaches ext
* A factory for the <clear-entity-caches> element.
*/
public static final class ClearEntityCachesFactory implements Factory<ClearEntityCaches> {
+ @Override
public ClearEntityCaches createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new ClearEntityCaches(element, simpleMethod);
}
+ @Override
public String getName() {
return "clear-entity-caches";
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/CloneValue.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/CloneValue.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/CloneValue.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/CloneValue.java Tue Aug 7 06:25:59 2012
@@ -29,6 +29,8 @@ import org.w3c.dom.Element;
/**
* Implements the <clone-value> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cclonevalue%3E}}">Mini-language Reference</a>
*/
public final class CloneValue extends MethodOperation {
@@ -69,10 +71,12 @@ public final class CloneValue extends Me
* A factory for the <clone-value> element.
*/
public static final class CloneValueFactory implements Factory<CloneValue> {
+ @Override
public CloneValue createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CloneValue(element, simpleMethod);
}
+ @Override
public String getName() {
return "clone-value";
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/CreateValue.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/CreateValue.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/CreateValue.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/CreateValue.java Tue Aug 7 06:25:59 2012
@@ -31,6 +31,8 @@ import org.w3c.dom.Element;
/**
* Implements the <create-value> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Ccreatevalue%3E}}">Mini-language Reference</a>
*/
public final class CreateValue extends MethodOperation {
@@ -96,10 +98,12 @@ public final class CreateValue extends M
* A factory for the <create-value> element.
*/
public static final class CreateValueFactory implements Factory<CreateValue> {
+ @Override
public CreateValue createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new CreateValue(element, simpleMethod);
}
+ @Override
public String getName() {
return "create-value";
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityAnd.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityAnd.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityAnd.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityAnd.java Tue Aug 7 06:25:59 2012
@@ -32,6 +32,8 @@ import org.w3c.dom.Element;
/**
* Implements the <entity-and> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Centityand%3E}}">Mini-language Reference</a>
*/
public final class EntityAnd extends MethodOperation {
@@ -81,10 +83,12 @@ public final class EntityAnd extends Met
* A factory for the <entity-and> element.
*/
public static final class EntityAndFactory implements Factory<EntityAnd> {
+ @Override
public EntityAnd createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new EntityAnd(element, simpleMethod);
}
+ @Override
public String getName() {
return "entity-and";
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCondition.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCondition.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCondition.java Tue Aug 7 06:25:59 2012
@@ -31,7 +31,9 @@ import org.ofbiz.minilang.method.MethodO
import org.w3c.dom.Element;
/**
- * Implements the <entity-and> element.
+ * Implements the <entity-condition> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Centitycondition%3E}}">Mini-language Reference</a>
*/
public final class EntityCondition extends MethodOperation {
@@ -78,10 +80,12 @@ public final class EntityCondition exten
}
public static final class EntityConditionFactory implements Factory<EntityCondition> {
+ @Override
public EntityCondition createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
return new EntityCondition(element, simpleMethod);
}
+ @Override
public String getName() {
return "entity-condition";
}
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCount.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCount.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCount.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCount.java Tue Aug 7 06:25:59 2012
@@ -42,6 +42,8 @@ import org.w3c.dom.Element;
/**
* Implements the <entity-count> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Centitycount%3E}}">Mini-language Reference</a>
*/
public final class EntityCount extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityData.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityData.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityData.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityData.java Tue Aug 7 06:25:59 2012
@@ -42,6 +42,8 @@ import org.w3c.dom.Element;
/**
* Implements the <entity-data> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Centitydata%3E}}">Mini-language Reference</a>
*/
public final class EntityData extends MethodOperation {
@@ -63,7 +65,11 @@ public final class EntityData extends Me
}
locationFse = FlexibleStringExpander.getInstance(element.getAttribute("location"));
delegatorNameFse = FlexibleStringExpander.getInstance(element.getAttribute("delegator-name"));
+ mode = MiniLangValidate.checkAttribute(element.getAttribute("mode"), "load");
String timeoutAttribute = element.getAttribute("timeout");
+ if (!"load".equals(mode) && !timeoutAttribute.isEmpty()) {
+ MiniLangValidate.handleError("timeout attribute is valid only when mode=\"load\".", simpleMethod, element);
+ }
int timeout = -1;
if (!timeoutAttribute.isEmpty()) {
try {
@@ -74,7 +80,6 @@ public final class EntityData extends Me
}
this.timeout = timeout;
errorListFma = FlexibleMapAccessor.getInstance(MiniLangValidate.checkAttribute(element.getAttribute("error-list-name"), "error_list"));
- mode = MiniLangValidate.checkAttribute(element.getAttribute("mode"), "load");
}
@Override
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityOne.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityOne.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityOne.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityOne.java Tue Aug 7 06:25:59 2012
@@ -32,6 +32,8 @@ import org.w3c.dom.Element;
/**
* Implements the <entity-one> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Centityone%3E}}">Mini-language Reference</a>
*/
public final class EntityOne extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByAnd.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByAnd.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByAnd.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByAnd.java Tue Aug 7 06:25:59 2012
@@ -33,6 +33,8 @@ import org.w3c.dom.Element;
/**
* Implements the <filter-list-by-and> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cfilterlistbyand%3E}}">Mini-language Reference</a>
*/
public final class FilterListByAnd extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByDate.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByDate.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByDate.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FilterListByDate.java Tue Aug 7 06:25:59 2012
@@ -34,6 +34,8 @@ import org.w3c.dom.Element;
/**
* Implements the <filter-list-by-date> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cfilterlistbydate%3E}}">Mini-language Reference</a>
*/
public final class FilterListByDate extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelated.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelated.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelated.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelated.java Tue Aug 7 06:25:59 2012
@@ -37,6 +37,8 @@ import org.w3c.dom.Element;
/**
* Implements the <get-related> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cgetrelated%3E}}">Mini-language Reference</a>
*/
public final class GetRelated extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelatedOne.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelatedOne.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelatedOne.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/GetRelatedOne.java Tue Aug 7 06:25:59 2012
@@ -34,6 +34,8 @@ import org.w3c.dom.Element;
/**
* Implements the <get-related-one> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cgetrelatedone%3E}}">Mini-language Reference</a>
*/
public final class GetRelatedOne extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeNextSeqId.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeNextSeqId.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeNextSeqId.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeNextSeqId.java Tue Aug 7 06:25:59 2012
@@ -31,6 +31,8 @@ import org.w3c.dom.Element;
/**
* Implements the <make-next-seq-id> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cmakenextseqid%3E}}">Mini-language Reference</a>
*/
public final class MakeNextSeqId extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeValue.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeValue.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeValue.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/MakeValue.java Tue Aug 7 06:25:59 2012
@@ -34,6 +34,8 @@ import org.w3c.dom.Element;
/**
* Implements the <make-value> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cmakevalue%3E}}">Mini-language Reference</a>
*/
public final class MakeValue extends MethodOperation {
@@ -58,7 +60,7 @@ public final class MakeValue extends Met
public boolean exec(MethodContext methodContext) throws MiniLangException {
String entityName = entityNameFse.expandString(methodContext.getEnvMap());
if (entityName.isEmpty()) {
- throw new MiniLangRuntimeException("Entity name not found: " + entityNameFse, this);
+ throw new MiniLangRuntimeException("Entity name not found.", this);
}
valueFma.put(methodContext.getEnvMap(), methodContext.getDelegator().makeValidValue(entityName, mapFma.get(methodContext.getEnvMap())));
return true;
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/OrderValueList.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/OrderValueList.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/OrderValueList.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/OrderValueList.java Tue Aug 7 06:25:59 2012
@@ -32,6 +32,8 @@ import org.w3c.dom.Element;
/**
* Implements the <order-value-list> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cordervaluelist%3E}}">Mini-language Reference</a>
*/
public final class OrderValueList extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RefreshValue.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RefreshValue.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RefreshValue.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RefreshValue.java Tue Aug 7 06:25:59 2012
@@ -33,6 +33,8 @@ import org.w3c.dom.Element;
/**
* Implements the <refresh-value> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Crefreshvalue%3E}}">Mini-language Reference</a>
*/
public final class RefreshValue extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveByAnd.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveByAnd.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveByAnd.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveByAnd.java Tue Aug 7 06:25:59 2012
@@ -34,6 +34,8 @@ import org.w3c.dom.Element;
/**
* Implements the <remove-by-and> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cremovebyand%3E}}">Mini-language Reference</a>
*/
public final class RemoveByAnd extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveList.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveList.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveList.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveList.java Tue Aug 7 06:25:59 2012
@@ -35,6 +35,8 @@ import org.w3c.dom.Element;
/**
* Implements the <remove-list> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cremovelist%3E}}">Mini-language Reference</a>
*/
public final class RemoveList extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveRelated.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveRelated.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveRelated.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveRelated.java Tue Aug 7 06:25:59 2012
@@ -34,6 +34,8 @@ import org.w3c.dom.Element;
/**
* Implements the <remove-related> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cremoverelated%3E}}">Mini-language Reference</a>
*/
public final class RemoveRelated extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveValue.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveValue.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveValue.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/RemoveValue.java Tue Aug 7 06:25:59 2012
@@ -33,6 +33,8 @@ import org.w3c.dom.Element;
/**
* Implements the <remove-value> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cremovevalue%3E}}">Mini-language Reference</a>
*/
public final class RemoveValue extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SequencedIdToEnv.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SequencedIdToEnv.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SequencedIdToEnv.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SequencedIdToEnv.java Tue Aug 7 06:25:59 2012
@@ -29,6 +29,8 @@ import org.w3c.dom.Element;
/**
* Implements the <sequenced-id> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Csequencedid%3E}}">Mini-language Reference</a>
*/
public final class SequencedIdToEnv extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetCurrentUserLogin.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetCurrentUserLogin.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetCurrentUserLogin.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetCurrentUserLogin.java Tue Aug 7 06:25:59 2012
@@ -30,6 +30,8 @@ import org.w3c.dom.Element;
/**
* Implements the <set-current-user-login> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Csetcurrentuserlogin%3E}}">Mini-language Reference</a>
*/
public final class SetCurrentUserLogin extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetNonpkFields.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetNonpkFields.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetNonpkFields.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetNonpkFields.java Tue Aug 7 06:25:59 2012
@@ -33,6 +33,8 @@ import org.w3c.dom.Element;
/**
* Implements the <set-nonpk-fields> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Csetnonpkfields%3E}}">Mini-language Reference</a>
*/
public final class SetNonpkFields extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetPkFields.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetPkFields.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetPkFields.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/SetPkFields.java Tue Aug 7 06:25:59 2012
@@ -33,6 +33,8 @@ import org.w3c.dom.Element;
/**
* Implements the <set-pk-fields> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Csetpkfields%3E}}">Mini-language Reference</a>
*/
public final class SetPkFields extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreList.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreList.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreList.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreList.java Tue Aug 7 06:25:59 2012
@@ -35,6 +35,8 @@ import org.w3c.dom.Element;
/**
* Implements the <store-list> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cstorelist%3E}}">Mini-language Reference</a>
*/
public final class StoreList extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreValue.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreValue.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreValue.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/StoreValue.java Tue Aug 7 06:25:59 2012
@@ -33,6 +33,8 @@ import org.w3c.dom.Element;
/**
* Implements the <store-value> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cstorevalue%3E}}">Mini-language Reference</a>
*/
public final class StoreValue extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionBegin.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionBegin.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionBegin.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionBegin.java Tue Aug 7 06:25:59 2012
@@ -31,6 +31,8 @@ import org.w3c.dom.Element;
/**
* Implements the <transaction-begin> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Ctransactionbegin%3E}}">Mini-language Reference</a>
*/
public final class TransactionBegin extends MethodOperation {
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionCommit.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionCommit.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionCommit.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionCommit.java Tue Aug 7 06:25:59 2012
@@ -31,6 +31,8 @@ import org.w3c.dom.Element;
/**
* Implements the <transaction-commit> element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Ctransactioncommit%3E}}">Mini-language Reference</a>
*/
public final class TransactionCommit extends MethodOperation {