com.wewebu.ow.server.ecmimpl.opencmis.converter
Class OwCMISDateConverter

java.lang.Object
  extended by com.wewebu.ow.server.ecmimpl.opencmis.converter.OwCMISDateConverter
All Implemented Interfaces:
OwCMISValueConverter<GregorianCalendar,Date>

public class OwCMISDateConverter
extends Object
implements OwCMISValueConverter<GregorianCalendar,Date>

OwCMISStandardDateConverter.

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 Summary
OwCMISDateConverter(TimeZone timezone)
           
 
Method Summary
 List<GregorianCalendar> fromArrayValue(Object[] owdValue_p)
          Converts the array back from type O to a list of type L.
 List<GregorianCalendar> fromValue(Date owdValue_p)
          Vice-versa conversion to OwCMISValueConverter.toValue(List).
 Class<Date> getOClass()
           
protected  TimeZone getTimeZone()
          Time zone of the client, which can be used for conversion.
 Date[] toArrayValue(List<GregorianCalendar> cmisValue_p)
          Converts the list into an array of the resulting type.
 Date[] toStaticArrayValue(List<GregorianCalendar> cmisValue_p)
           
 Date toStaticValue(List<GregorianCalendar> cmisValue_p)
           
 Date toValue(List<GregorianCalendar> cmisValue_p)
          Return a representation of the given List as type O, or simply converts the first entry of the list into the resulting type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwCMISDateConverter

public OwCMISDateConverter(TimeZone timezone)
Parameters:
timezone - TimeZone of the converted Date values
Method Detail

fromArrayValue

public List<GregorianCalendar> fromArrayValue(Object[] owdValue_p)
                                       throws com.wewebu.ow.server.exceptions.OwInvalidOperationException
Description copied from interface: OwCMISValueConverter
Converts the array back from type O to a list of type L.

Specified by:
fromArrayValue in interface OwCMISValueConverter<GregorianCalendar,Date>
Parameters:
owdValue_p - array of resulting type, can be null
Returns:
a list of base types, or empty list
Throws:
com.wewebu.ow.server.exceptions.OwInvalidOperationException

fromValue

public List<GregorianCalendar> fromValue(Date owdValue_p)
                                  throws com.wewebu.ow.server.exceptions.OwInvalidOperationException
Description copied from interface: OwCMISValueConverter
Vice-versa conversion to OwCMISValueConverter.toValue(List).

Specified by:
fromValue in interface OwCMISValueConverter<GregorianCalendar,Date>
Parameters:
owdValue_p - O resulting type, can be null
Returns:
List of base types, or empty list
Throws:
com.wewebu.ow.server.exceptions.OwInvalidOperationException

toArrayValue

public Date[] toArrayValue(List<GregorianCalendar> cmisValue_p)
Description copied from interface: OwCMISValueConverter
Converts the list into an array of the resulting type.

Specified by:
toArrayValue in interface OwCMISValueConverter<GregorianCalendar,Date>
Parameters:
cmisValue_p - List to be converted
Returns:
Array type O, or null

toValue

public Date toValue(List<GregorianCalendar> cmisValue_p)
Description copied from interface: OwCMISValueConverter
Return a representation of the given List as type O, or simply converts the first entry of the list into the resulting type.

Specified by:
toValue in interface OwCMISValueConverter<GregorianCalendar,Date>
Parameters:
cmisValue_p - List of values to convert
Returns:
Resulting type or null

getOClass

public Class<Date> getOClass()

toStaticArrayValue

public Date[] toStaticArrayValue(List<GregorianCalendar> cmisValue_p)

toStaticValue

public Date toStaticValue(List<GregorianCalendar> cmisValue_p)

getTimeZone

protected TimeZone getTimeZone()
Time zone of the client, which can be used for conversion.

Returns:
TimeZone of the client.


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.