public class OwExprScopeValue extends OwExprValue
Scope values represent values obtained during evaluation that need to be queried for
properties or functions.
Example:
employee.birthDate.year
The employee.birthDate
sub-expression will be evaluated to a OwExprScopeValue
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Constructor and Description |
---|
OwExprScopeValue(OwExprScope scope_p)
Constructor
|
Modifier and Type | Method and Description |
---|---|
OwExprValue |
accept(OwExprBinaryOperator binaryOperator_p,
OwExprScopeValue v1_p)
Stage 2 binary operator visitor acceptance method
|
OwExprValue |
accept(OwExprBinaryOperator binaryOperator_p,
OwExprValue v2_p)
Stage 1 binary operator visitor acceptance method
|
OwExprProperty |
at(int index_p)
Indexed access delegate.
Delegates to m_scope . |
OwExprFunction |
function(String functionName_p,
OwExprExpressionType[] argunmentTypes_p)
Scope
OwExprScope.function(String, OwExprExpressionType[]) default implementation. |
OwExprScope |
getScope() |
protected Map |
getValuePropeties()
Overridable default value properties factory method
|
boolean |
hasProperty(String propertyName_p)
Scope
OwExprScope.hasProperty(String) default implementation. |
int |
length()
Indexed access delegate.
Delegates to m_scope . |
OwExprProperty |
property(String propertyName_p)
Scope
OwExprScope.property(String) default implementation. |
OwExprScope |
solveScope(String name_p) |
Object |
toJavaObject(Class javaSuperType_p)
Java class conversion method.
|
String |
toString() |
accept, accept, accept, accept, accept, accept, fromJavaValue, fromJavaValue, getJavaType
public OwExprScopeValue(OwExprScope scope_p)
scope_p
- the scope represented by this valueprotected Map getValuePropeties()
OwExprValue
getValuePropeties
in class OwExprValue
Map
of OwExprProperty
for this valuepublic OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprValue v2_p) throws OwExprEvaluationException
OwExprValue
accept
in class OwExprValue
binaryOperator_p
- binary operator visitorv2_p
- right side operator valueOwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprScopeValue v1_p) throws OwExprEvaluationException
OwExprValue
accept
in class OwExprValue
binaryOperator_p
- binary operator visitorv1_p
- lef side operator valueOwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public Object toJavaObject(Class javaSuperType_p) throws OwExprEvaluationException
OwExprValue
toJavaObject
in class OwExprValue
javaSuperType_p
- the requested java super type
The returned type should be a subclass of this type.
This is necessary for values having more than one possible java peers
such as OwExprNumericValue
's Integer and Double support.OwExprEvaluationException
public final OwExprScope solveScope(String name_p) throws OwExprEvaluationException
OwExprEvaluationException
public final OwExprFunction function(String functionName_p, OwExprExpressionType[] argunmentTypes_p) throws OwExprEvaluationException
OwExprValue
OwExprScope.function(String, OwExprExpressionType[])
default implementation.
By default value-scopes have no functions definedfunction
in interface OwExprScope
function
in class OwExprValue
functionName_p
- the requested function nameargunmentTypes_p
- array of OwExprExpressionType
that defines the argument signature
of the requested functionOwExprProperty
designated by propertyName_p and found in this value's scopeOwExprEvaluationException
- if the requested property is not found in this scope or
the creation of the corresponding OwExprProperty
has failedpublic final OwExprProperty property(String propertyName_p) throws OwExprEvaluationException
OwExprValue
OwExprScope.property(String)
default implementation.
A default value properties mechanism is implemented.
Concrete values must create properties via OwExprValue.getValuePropeties()
.property
in interface OwExprScope
property
in class OwExprValue
propertyName_p
- the requested property nameOwExprProperty
designated by propertyName_p and found in this value's scopeOwExprEvaluationException
- if the requested property is not found in this scope or
the creation of the corresponding OwExprProperty
has failedpublic OwExprProperty at(int index_p) throws OwExprEvaluationException
m_scope
.at
in interface OwExprScope
at
in class OwExprValue
index_p
- OwExprProperty
property found at the requested indexOwExprEvaluationException
public int length() throws OwExprEvaluationException
m_scope
.length
in interface OwExprScope
length
in class OwExprValue
OwExprEvaluationException
public final OwExprScope getScope()
public boolean hasProperty(String propertyName_p) throws OwExprEvaluationException
OwExprValue
OwExprScope.hasProperty(String)
default implementation.
A default value properties mechanism is implemented.
Concrete values must create properties via OwExprValue.getValuePropeties()
.hasProperty
in interface OwExprScope
hasProperty
in class OwExprValue
propertyName_p
- OwExprEvaluationException
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.