com.wewebu.ow.server.fieldctrlimpl
Class OwRelativeDate

java.lang.Object
  extended by java.util.Date
      extended by com.wewebu.ow.server.fieldctrlimpl.OwRelativeDate
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Date>
Direct Known Subclasses:
OwLastDaysDate, OwNextDaysDate

public class OwRelativeDate
extends Date

Current time relative Date extension base. Replaces OwNextDaysDateControl and OwLastDaysDateControl. Instances of this class will be dates set to one of the following current date relative moments

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

Since:
3.1.0.0
See Also:
Serialized Form

Field Summary
static int KEY_EMPTY_FIELD
          value key for null date (empty field)
static int KEY_LAST_30_DAYS
          value key for combo box
static int KEY_LAST_90_DAYS
          value key for combo box
static int KEY_LAST_ONE_DAY
          value key for combo box
static int KEY_LAST_ONE_WEEK
          value key for combo box
static int KEY_LAST_TWO_DAYS
          value key for combo box
static int KEY_LAST_TWO_WEEKS
          value key for combo box
static int KEY_NEXT_30_DAYS
          value key for combo box
static int KEY_NEXT_90_DAYS
          value key for combo box
static int KEY_NEXT_ONE_DAY
          value key for combo box
static int KEY_NEXT_ONE_WEEK
          value key for combo box
static int KEY_NEXT_TWO_DAYS
          value key for combo box
static int KEY_NEXT_TWO_WEEKS
          value key for combo box
static int KEY_TODAY
          value key for combo box
 
Constructor Summary
OwRelativeDate(int iKey_p)
          Constructor
OwRelativeDate(long timestamp_p)
          Constructor used for restoring search template state
 
Method Summary
static OwRelativeDate fromString(String string_p)
          Returns an instance of OwRelativeDate for one of the following relative date representing strings (case insensitive, trimmed and with the inner white space normalized): today tomorrow next two days next week next two weeks next 30 days next 90 days yesterday last two days last week last 30 days last 90 days
 int getSelectedKey()
          Get selected key.
 
Methods inherited from class java.util.Date
after, before, clone, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toLocaleString, toString, UTC
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_EMPTY_FIELD

public static final int KEY_EMPTY_FIELD
value key for null date (empty field)

See Also:
Constant Field Values

KEY_TODAY

public static final int KEY_TODAY
value key for combo box

See Also:
Constant Field Values

KEY_LAST_ONE_DAY

public static final int KEY_LAST_ONE_DAY
value key for combo box

See Also:
Constant Field Values

KEY_LAST_TWO_DAYS

public static final int KEY_LAST_TWO_DAYS
value key for combo box

See Also:
Constant Field Values

KEY_LAST_ONE_WEEK

public static final int KEY_LAST_ONE_WEEK
value key for combo box

See Also:
Constant Field Values

KEY_LAST_TWO_WEEKS

public static final int KEY_LAST_TWO_WEEKS
value key for combo box

See Also:
Constant Field Values

KEY_LAST_30_DAYS

public static final int KEY_LAST_30_DAYS
value key for combo box

See Also:
Constant Field Values

KEY_LAST_90_DAYS

public static final int KEY_LAST_90_DAYS
value key for combo box

See Also:
Constant Field Values

KEY_NEXT_ONE_DAY

public static final int KEY_NEXT_ONE_DAY
value key for combo box

See Also:
Constant Field Values

KEY_NEXT_TWO_DAYS

public static final int KEY_NEXT_TWO_DAYS
value key for combo box

See Also:
Constant Field Values

KEY_NEXT_ONE_WEEK

public static final int KEY_NEXT_ONE_WEEK
value key for combo box

See Also:
Constant Field Values

KEY_NEXT_TWO_WEEKS

public static final int KEY_NEXT_TWO_WEEKS
value key for combo box

See Also:
Constant Field Values

KEY_NEXT_30_DAYS

public static final int KEY_NEXT_30_DAYS
value key for combo box

See Also:
Constant Field Values

KEY_NEXT_90_DAYS

public static final int KEY_NEXT_90_DAYS
value key for combo box

See Also:
Constant Field Values
Constructor Detail

OwRelativeDate

public OwRelativeDate(int iKey_p)
Constructor

Parameters:
iKey_p - - the key value

OwRelativeDate

public OwRelativeDate(long timestamp_p)
Constructor used for restoring search template state

Parameters:
timestamp_p - - the date as long
Method Detail

fromString

public static OwRelativeDate fromString(String string_p)
                                 throws OwInvalidOperationException
Returns an instance of OwRelativeDate for one of the following relative date representing strings (case insensitive, trimmed and with the inner white space normalized):

Parameters:
string_p - String representation of a relative date
Returns:
an OwRelativeDate object for the given relative date string
Throws:
OwInvalidOperationException

getSelectedKey

public int getSelectedKey()
Get selected key.



Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.