com.wewebu.ow.server.ecmimpl.opencmis.converter
Class OwCMISSameTypeConverter<S>

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

public class OwCMISSameTypeConverter<S>
extends Object
implements OwCMISValueConverter<S,S>

OwCMISSameTypeConverter. Simple list to array converter or list to single value, and vis versa.

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
OwCMISSameTypeConverter(Class<S> oClass_p)
           
 
Method Summary
 List<S> fromArrayValue(Object[] owdValue_p)
          Converts the array back from type O to a list of type L.
 List<S> fromValue(S owdValue_p)
          Vice-versa conversion to OwCMISValueConverter.toValue(List).
 S[] toArrayValue(List<S> cmisValue_p)
          Converts the list into an array of the resulting type.
 S[] toStaticArrayValue(List<S> cmisValue_p)
           
 S toStaticValue(List<S> cmisValue_p)
           
 S toValue(List<S> 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

OwCMISSameTypeConverter

public OwCMISSameTypeConverter(Class<S> oClass_p)
Method Detail

fromArrayValue

public List<S> fromArrayValue(Object[] owdValue_p)
Description copied from interface: OwCMISValueConverter
Converts the array back from type O to a list of type L.

Specified by:
fromArrayValue in interface OwCMISValueConverter<S,S>
Parameters:
owdValue_p - array of resulting type, can be null
Returns:
a list of base types, or empty list

fromValue

public List<S> fromValue(S owdValue_p)
Description copied from interface: OwCMISValueConverter
Vice-versa conversion to OwCMISValueConverter.toValue(List).

Specified by:
fromValue in interface OwCMISValueConverter<S,S>
Parameters:
owdValue_p - O resulting type, can be null
Returns:
List of base types, or empty list

toArrayValue

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

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

toValue

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

toStaticArrayValue

public S[] toStaticArrayValue(List<S> cmisValue_p)

toStaticValue

public S toStaticValue(List<S> cmisValue_p)


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.