com.wewebu.ow.server.ecmimpl.cmis.util
Class OwCMISStandardDateConverter

java.lang.Object
  extended by com.wewebu.ow.server.ecmimpl.cmis.util.OwCMISStandardDateConverter
All Implemented Interfaces:
OwCMISValueConverter<XMLGregorianCalendar,Date>, OwCMISValueConverterClass<XMLGregorianCalendar,Date>

public class OwCMISStandardDateConverter
extends Object
implements OwCMISValueConverter<XMLGregorianCalendar,Date>, OwCMISValueConverterClass<XMLGregorianCalendar,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
OwCMISStandardDateConverter(TimeZone timezone)
           
 
Method Summary
 List<XMLGregorianCalendar> fromArrayValue(Date[] owdValue_p)
          Converts the array back from type O to a list of type L.
 List<XMLGregorianCalendar> fromValue(Date owdValue_p)
          Vice-versa conversion to OwCMISValueConverter.toValue(List).
 OwCMISValueConverterClass<XMLGregorianCalendar,Date> getConverterClass()
           
 Class<Date> getOClass()
          Return the java.lang.Class which should be the resulting type at end of conversion.
protected  TimeZone getTimeZone()
          Time zone of the client, which can be used for conversion.
 OwCMISValueConverter<XMLGregorianCalendar,Date> newConverter(OwCMISNetwork network_p)
           
 Date[] toArrayValue(List<XMLGregorianCalendar> cmisValue_p)
          Converts the list into an array of the resulting type.
 Date[] toStaticArrayValue(List<XMLGregorianCalendar> cmisValue_p)
          Statically converts the list into an array of the resulting type.
 Date toStaticValue(List<XMLGregorianCalendar> cmisValue_p)
          Return a statically-created (non OwCMISNetwork depended) representation of the given List as type O or simply converts the first entry of the list into the resulting type.
 Date toValue(List<XMLGregorianCalendar> 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

OwCMISStandardDateConverter

public OwCMISStandardDateConverter(TimeZone timezone)
Parameters:
timezone - Timezone of the client
Since:
3.1.0.3
Method Detail

fromArrayValue

public List<XMLGregorianCalendar> fromArrayValue(Date[] 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<XMLGregorianCalendar,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<XMLGregorianCalendar> 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<XMLGregorianCalendar,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<XMLGregorianCalendar> cmisValue_p)
Description copied from interface: OwCMISValueConverter
Converts the list into an array of the resulting type.

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

toValue

public Date toValue(List<XMLGregorianCalendar> 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<XMLGregorianCalendar,Date>
Parameters:
cmisValue_p - List of values to convert
Returns:
Resulting type or null

getOClass

public Class<Date> getOClass()
Description copied from interface: OwCMISValueConverterClass
Return the java.lang.Class which should be the resulting type at end of conversion.

Specified by:
getOClass in interface OwCMISValueConverterClass<XMLGregorianCalendar,Date>
Returns:
Class

newConverter

public OwCMISValueConverter<XMLGregorianCalendar,Date> newConverter(OwCMISNetwork network_p)
Specified by:
newConverter in interface OwCMISValueConverterClass<XMLGregorianCalendar,Date>
Parameters:
network_p - the OwCMISNetwork that the resulting converter depends on
Returns:
a converter object corresponding to this converter-class object

toStaticArrayValue

public Date[] toStaticArrayValue(List<XMLGregorianCalendar> cmisValue_p)
Description copied from interface: OwCMISValueConverterClass
Statically converts the list into an array of the resulting type. The conversion is non OwCMISNetwork depended.

Specified by:
toStaticArrayValue in interface OwCMISValueConverterClass<XMLGregorianCalendar,Date>
Parameters:
cmisValue_p - List to be converted
Returns:
Array type O, or null

toStaticValue

public Date toStaticValue(List<XMLGregorianCalendar> cmisValue_p)
Description copied from interface: OwCMISValueConverterClass
Return a statically-created (non OwCMISNetwork depended) representation of the given List as type O or simply converts the first entry of the list into the resulting type.

Specified by:
toStaticValue in interface OwCMISValueConverterClass<XMLGregorianCalendar,Date>
Parameters:
cmisValue_p - List of values to convert
Returns:
Resulting type or null

getConverterClass

public OwCMISValueConverterClass<XMLGregorianCalendar,Date> getConverterClass()
Specified by:
getConverterClass in interface OwCMISValueConverter<XMLGregorianCalendar,Date>
Returns:
the class/definition object of this converter

getTimeZone

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

Returns:
TimeZone of the client.
Since:
3.1.0.3


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.