com.wewebu.expression.language
Class OwExprSystem

java.lang.Object
  extended by com.wewebu.expression.language.OwExprExternalScope
      extended by com.wewebu.expression.language.OwExprReflectiveScope
          extended by com.wewebu.expression.language.OwExprSystem
All Implemented Interfaces:
OwExprScope

public class OwExprSystem
extends OwExprReflectiveScope

The system scope is the default top level scope. No named reference can be made to it. This makes so called domain-less or scope-less function calls and property references legal.

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


Field Summary
static String DATE_FORMAT_STRING
           
static int VERSION_MAJOR
          Expression language major version
static int VERSION_MINOR
          Expression language minor version
static String VERSION_STRING
          Expression language version string
static int VERSION_UPDATE
          Expression language update version
 
Constructor Summary
OwExprSystem()
           
 
Method Summary
static boolean arrayItemEquals(Object item_p, Object object_p)
          Array based item equality operator.
Array objects are considered and compared accordingly.
Example:
arrayItemEquals(new Object[]{new Object[]{'a','b'}},new Object[]{new Object[]{'a','b'}}) will return true
 boolean contains(Object[] array_p, Object object_p)
          Array item containment check method.
 Calendar date(int year_p, int month_p, int day_p)
          The expression language date(NUMERIC:year,NUMERIC:month,NUMERIC:day):DATE function implementation.
 Calendar date(int year_p, int month_p, int day_p, int hour_p, int minute_p, int second_p)
           
 Calendar date(int year_p, int month_p, int day_p, int hour_p, int minute_p, int second_p, String timeZoneID_p)
           
 Calendar date(int year_p, int month_p, int day_p, String timeZoneID_p)
           
 Calendar date(String date_p)
          The expression language date(STRING:date):DATE function implementation.
 OwExprTime days(double days_p)
          The expression language days(NUMERIC:timeInDays):TIME function implementation.
 String getVersionString()
          The expression language versionString property implementation.
 OwExprTime hours(int hours_p)
           
 OwExprTime minutes(int minutes_p)
           
 OwExprTime seconds(int seconds_p)
           
 OwExprTime time(int hours_p, int minutes_p, int seconds_p)
           
 Calendar today()
          The expression language today() function implementation.
 int[] version()
          The expression language version():NUMERIC[3] function implementation.
 
Methods inherited from class com.wewebu.expression.language.OwExprReflectiveScope
at, hasProperty, length, prelevateFunction, prelevateProperty, toString
 
Methods inherited from class com.wewebu.expression.language.OwExprExternalScope
addScope, function, getName, property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERSION_MAJOR

public static final int VERSION_MAJOR
Expression language major version

See Also:
Constant Field Values

VERSION_MINOR

public static final int VERSION_MINOR
Expression language minor version

See Also:
Constant Field Values

VERSION_UPDATE

public static final int VERSION_UPDATE
Expression language update version

See Also:
Constant Field Values

VERSION_STRING

public static final String VERSION_STRING
Expression language version string

See Also:
Constant Field Values

DATE_FORMAT_STRING

public static final String DATE_FORMAT_STRING
See Also:
Constant Field Values
Constructor Detail

OwExprSystem

public OwExprSystem()
Method Detail

version

public final int[] version()
The expression language version():NUMERIC[3] function implementation.

Returns:
an int array containing the version numbers in the major,minor, update order

getVersionString

public final String getVersionString()
The expression language versionString property implementation.

Returns:
the expression language version String

arrayItemEquals

public static boolean arrayItemEquals(Object item_p,
                                      Object object_p)
Array based item equality operator.
Array objects are considered and compared accordingly.
Example:
arrayItemEquals(new Object[]{new Object[]{'a','b'}},new Object[]{new Object[]{'a','b'}}) will return true

Parameters:
item_p -
object_p -
Returns:
true if and only if the two objects are identical (arrays considered)
Since:
version 1.1.0 and AWD 3.1.0.0

contains

public final boolean contains(Object[] array_p,
                              Object object_p)
Array item containment check method. The expression language code(SCOPE,SCOPE) function implementation.

Parameters:
array_p -
object_p -
Returns:
true if and only if object_p is contained by the given objects array
Since:
version 1.1.0 and AWD 3.1.0.0

today

public final Calendar today()
The expression language today() function implementation.

Returns:
the current date

date

public Calendar date(int year_p,
                     int month_p,
                     int day_p)
The expression language date(NUMERIC:year,NUMERIC:month,NUMERIC:day):DATE function implementation.

Parameters:
year_p -
month_p -
day_p -
Returns:
a date for the given parameters

date

public Calendar date(int year_p,
                     int month_p,
                     int day_p,
                     String timeZoneID_p)

date

public Calendar date(int year_p,
                     int month_p,
                     int day_p,
                     int hour_p,
                     int minute_p,
                     int second_p)

date

public Calendar date(int year_p,
                     int month_p,
                     int day_p,
                     int hour_p,
                     int minute_p,
                     int second_p,
                     String timeZoneID_p)

date

public Calendar date(String date_p)
              throws ParseException
The expression language date(STRING:date):DATE function implementation.

Parameters:
date_p - String date formated as yyyy-MM-dd'T'HH:mm:ssZ
Returns:
a Calendar for the given date_p parameter
Throws:
ParseException

days

public final OwExprTime days(double days_p)
The expression language days(NUMERIC:timeInDays):TIME function implementation.

Parameters:
days_p -
Returns:
a time span OwExprTime object for the given number of days

seconds

public final OwExprTime seconds(int seconds_p)

minutes

public final OwExprTime minutes(int minutes_p)

hours

public final OwExprTime hours(int hours_p)

time

public final OwExprTime time(int hours_p,
                             int minutes_p,
                             int seconds_p)


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.