public class OwCMISDateTime extends Object
Date handling utility for CMIS adapter.
The main purpose of this utility is to implement String to Date and reversed conversions
with respect to the Date String format specified by CMIS : YYYY-MM-DDThh:mm:ss.sss[Z | +hh:mm | -hh:mm].
The implementation relays on the GregorianCalendar implementation.
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 |
|---|
OwCMISDateTime(Date date_p,
TimeZone timeZone_p)
Constructor
|
OwCMISDateTime(GregorianCalendar calendar_p) |
OwCMISDateTime(String dateLexicalRepresentation_p)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj_p) |
GregorianCalendar |
getCalendar() |
Date |
getDate(boolean ignoreTimeZone_p) |
TimeZone |
getTimeZone() |
XMLGregorianCalendar |
getXMLGregorianCalendar() |
XMLGregorianCalendar |
getXMLGregorianCalendar(boolean ignoreTimeZone_p) |
int |
hashCode() |
String |
toCMISDateTimeString() |
String |
toCMISDateTimeString(boolean omitTimeZone_p) |
String |
toISODateTimeString() |
String |
toISODateTimeString(boolean omitTimeZone_p) |
String |
toString() |
public OwCMISDateTime(String dateLexicalRepresentation_p) throws com.wewebu.ow.server.exceptions.OwInvalidOperationException
dateLexicalRepresentation_p - String representation of a CMIS datecom.wewebu.ow.server.exceptions.OwInvalidOperationExceptionpublic OwCMISDateTime(GregorianCalendar calendar_p)
public OwCMISDateTime(Date date_p, TimeZone timeZone_p) throws com.wewebu.ow.server.exceptions.OwInvalidOperationException
date_p - date represented by this objecttimeZone_p - the time zone to represent the given date incom.wewebu.ow.server.exceptions.OwInvalidOperationException - if cannot create/convert to GregorianCalendarpublic String toCMISDateTimeString()
public String toISODateTimeString()
public String toISODateTimeString(boolean omitTimeZone_p)
public String toCMISDateTimeString(boolean omitTimeZone_p)
omitTimeZone_p - if true the time zone part of the string representation will be omittedfalse the string representation will include the time zone partpublic Date getDate(boolean ignoreTimeZone_p)
ignoreTimeZone_p - if true ???Date representation of this objectpublic GregorianCalendar getCalendar()
GregorianCalendar representation of this object; the TimeZone of the
returned Calendar will be set to the closest TimeZone as given
by TimeZone.getAvailableIDs(int) for this dates UTC offsetpublic XMLGregorianCalendar getXMLGregorianCalendar()
XMLGregorianCalendar representation of this date time objectpublic XMLGregorianCalendar getXMLGregorianCalendar(boolean ignoreTimeZone_p)
ignoreTimeZone_p - if true the returned XMLGregorianCalendar will
have an undefined time zoneXMLGregorianCalendar representation of this date time objectpublic TimeZone getTimeZone()
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.