org.quattor.pan.dml
Interface Operation

All Known Implementing Classes:
AbstractMatcher, AbstractOperation, AbstractStaticMatcher, AbstractVariableMatcher, Add, Append, Assign, Base64Decode, Base64Encode, BitAnd, BitIOR, BitNot, BitXOR, BooleanProperty, BuiltInFunction, Clone, Create, Debug, DebugSuppressed, Delete, Deprecated, Digest, Div, DML, DoubleProperty, Element, ErrorMessage, Escape, Exists, FileContents, First, For, Foreach, Format, Function, Hash, HashResource, IfElse, IfExists, Index, IsOfType, IsValueOfType, IsVariableOfType, Key, Length, List, ListResource, ListVariable, LogicalAnd, LogicalEQ, LogicalGE, LogicalGT, LogicalLE, LogicalLT, LogicalNE, LogicalNot, LogicalOr, LongProperty, Match, Matches, Merge, Mod, Mult, NestedListVariable, NestedVariable, Next, Null, NumberProperty, PathExists, PersistentElement, Prepend, Property, ProtectedHashResource, ProtectedListResource, Replace, Resource, Return, SelfNestedListVariable, SelfNestedVariable, SelfSimpleListVariable, SelfSimpleVariable, SetSelf, SetValue, SimpleListVariable, SimpleVariable, Splice, Split, StaticMatch, StaticMatches, StringExists, StringProperty, Sub, Substr, ToBoolean, ToDouble, ToLong, ToLowerCase, ToString, ToUpperCase, Traceback, TracebackSuppressed, TransientElement, UnaryMinus, UnaryPlus, Undef, Unescape, Value, Variable, VariableExists, While

public interface Operation

All DML (data manipulation language) components implement this interface and act as operators.

Author:
loomis

Method Summary
 void checkInvalidSelfContext()
          This method will check that if a given reference to SELF occurs in an invalid context.
 void checkRestrictedContext()
          This method will check that the given operation and any arguments can be used in a restricted context such as variable indices and function arguments.
 Element execute(Context context)
          Execute this operation within the given context.
 

Method Detail

execute

Element execute(Context context)
                throws EvaluationException
Execute this operation within the given context. If an error occurs, an EvaluationException will be thrown with the details.

Parameters:
context - evaluation context for the statement
Returns:
Element produced by running operation
Throws:
EvaluationException - if an error occurs during processing

checkRestrictedContext

void checkRestrictedContext()
                            throws SyntaxException
This method will check that the given operation and any arguments can be used in a restricted context such as variable indices and function arguments. This is primarily to avoid ambiguities in evaluation order for functions which operate by throwing exceptions (like return and error). This method will throw a SyntaxException if called on an Operation which cannot be used in a restricted context.

Throws:
SyntaxException - if this operation cannot be run within a restricted context

checkInvalidSelfContext

void checkInvalidSelfContext()
                             throws SyntaxException
This method will check that if a given reference to SELF occurs in an invalid context. Currently this is only the include statement that doesn't define a value for SELF. (It doesn't really make sense as there is no value being assigned.) For operations that do not reference SELF, this should be a no-op. For those that do, a SyntaxException should be thrown.

Throws:
SyntaxException - if this operation references SELF


Copyright © 2011 Quattor. All Rights Reserved.