com.wewebu.ow.server.ecmimpl.opencmis.propertyclass
Class OwCMISAbstractNativePropertyClass<O,N,P extends org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<N>>

java.lang.Object
  extended by com.wewebu.ow.server.ecmimpl.opencmis.propertyclass.OwCMISAbstractPropertyClass<O,OwCMISNativeObjectClass<?,?>>
      extended by com.wewebu.ow.server.ecmimpl.opencmis.propertyclass.OwCMISAbstractNativePropertyClass<O,N,P>
All Implemented Interfaces:
com.wewebu.ow.server.ecm.OwPropertyClass, OwCMISNativePropertyClass<O,N,P>, OwCMISPropertyClass<O>, com.wewebu.ow.server.field.OwFieldDefinition
Direct Known Subclasses:
OwCMISBooleanPropertyClassImpl, OwCMISDateTimePropertyClassImpl, OwCMISDecimalPropertyClassImpl, OwCMISHtmlPropertyClassImpl, OwCMISIdPropertyClassImpl, OwCMISIntegerPropertyClassImpl, OwCMISStringPropertyClassImpl, OwCMISUriPropertyClassImpl

public abstract class OwCMISAbstractNativePropertyClass<O,N,P extends org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<N>>
extends OwCMISAbstractPropertyClass<O,OwCMISNativeObjectClass<?,?>>
implements OwCMISNativePropertyClass<O,N,P>

OwCMISAbstractNativePropertyClass.

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


Field Summary
 
Fields inherited from interface com.wewebu.ow.server.ecm.OwPropertyClass
CONTEXT_MAX, CONTEXT_NORMAL, CONTEXT_ON_CHECKIN, CONTEXT_ON_CREATE
 
Constructor Summary
OwCMISAbstractNativePropertyClass(String className, P propertyDefinition, OwCMISValueConverter<N,O> converter, Class<O> javaClass, Collection<Integer> operators, OwCMISNativeObjectClass<?,?> objectClass)
           
 
Method Summary
 OwCMISNativeProperty<O,N> from(O... value_p)
          Create a new Instance of the specific OwCMISProperty depending on the current OwCMISPropertyClass.
 OwCMISNativeProperty<O,N> from(org.apache.chemistry.opencmis.client.api.Property<N> property_p)
           
protected  OwCMISValueConverter<N,O> getConverter()
           
 Object getDefaultValue()
           
 String getDescription(Locale locale_p)
           
 String getDisplayName(Locale locale_p)
           
 com.wewebu.ow.server.field.OwEnumCollection getEnums()
           
 String getJavaClassName()
           
 P getNativeType()
           
 String getNonQualifiedName()
          Returns the non qualified name ( the CMIS definition name of this property)
 Collection<Integer> getOperators()
           
 String getQueryName()
          Returns the specified queryName of the property which should be used in search request instead of the id or property name.
 boolean isArray()
           
 boolean isHidden(int iContext_p)
           
 boolean isNameProperty()
           
 boolean isOrderable()
          Returns a boolean representation, notifying the possibility of this property to be used in ORDER BY clause.
 boolean isQueryable()
          Returns a boolean representation if this property can occur in WHERE clause for filtration.
 boolean isReadOnly(int context_p)
           
 boolean isRequired()
           
 boolean isSystem()
           
protected  org.apache.chemistry.opencmis.client.api.Property<N> newProperty(List<N> nativeValues_p)
           
 String toString()
           
 
Methods inherited from class com.wewebu.ow.server.ecmimpl.opencmis.propertyclass.OwCMISAbstractPropertyClass
createProxy, getCategory, getClassName, getComplexChildClasses, getFullQualifiedName, getNodeFromValue, getObjectClass, getPreferredPropertyType, getValueFromNode, getValueFromString, isComplex, isEnum, isSystemProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.wewebu.ow.server.ecmimpl.opencmis.propertyclass.OwCMISNativePropertyClass
getObjectClass
 
Methods inherited from interface com.wewebu.ow.server.ecmimpl.opencmis.propertyclass.OwCMISPropertyClass
createProxy, getFormat, getFullQualifiedName, isSystemProperty
 
Methods inherited from interface com.wewebu.ow.server.ecm.OwPropertyClass
getCategory
 
Methods inherited from interface com.wewebu.ow.server.field.OwFieldDefinition
getClassName, getComplexChildClasses, getMaxValue, getMinValue, getNodeFromValue, getValueFromNode, getValueFromString, isComplex, isEnum
 

Constructor Detail

OwCMISAbstractNativePropertyClass

public OwCMISAbstractNativePropertyClass(String className,
                                         P propertyDefinition,
                                         OwCMISValueConverter<N,O> converter,
                                         Class<O> javaClass,
                                         Collection<Integer> operators,
                                         OwCMISNativeObjectClass<?,?> objectClass)
Method Detail

getOperators

public final Collection<Integer> getOperators()
                                       throws com.wewebu.ow.server.exceptions.OwException
Specified by:
getOperators in interface com.wewebu.ow.server.field.OwFieldDefinition
Throws:
com.wewebu.ow.server.exceptions.OwException

getConverter

protected OwCMISValueConverter<N,O> getConverter()

newProperty

protected org.apache.chemistry.opencmis.client.api.Property<N> newProperty(List<N> nativeValues_p)

from

public OwCMISNativeProperty<O,N> from(O... value_p)
                               throws com.wewebu.ow.server.exceptions.OwException
Description copied from interface: OwCMISPropertyClass
Create a new Instance of the specific OwCMISProperty depending on the current OwCMISPropertyClass.

Specified by:
from in interface OwCMISNativePropertyClass<O,N,P extends org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<N>>
Specified by:
from in interface OwCMISPropertyClass<O>
Parameters:
value_p - Object the initial value which should be set, can be null
Returns:
OwCMISProperty with given value, depending on the current property class.
Throws:
com.wewebu.ow.server.exceptions.OwException - if creation of OwCMISProperty failed

from

public OwCMISNativeProperty<O,N> from(org.apache.chemistry.opencmis.client.api.Property<N> property_p)
                               throws com.wewebu.ow.server.exceptions.OwException
Specified by:
from in interface OwCMISNativePropertyClass<O,N,P extends org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<N>>
Throws:
com.wewebu.ow.server.exceptions.OwException

getDefaultValue

public Object getDefaultValue()
                       throws com.wewebu.ow.server.exceptions.OwException
Specified by:
getDefaultValue in interface com.wewebu.ow.server.field.OwFieldDefinition
Throws:
com.wewebu.ow.server.exceptions.OwException

isSystem

public boolean isSystem()
                 throws com.wewebu.ow.server.exceptions.OwException
Specified by:
isSystem in class OwCMISAbstractPropertyClass<O,OwCMISNativeObjectClass<?,?>>
Throws:
com.wewebu.ow.server.exceptions.OwException

isNameProperty

public boolean isNameProperty()
                       throws com.wewebu.ow.server.exceptions.OwException
Specified by:
isNameProperty in interface com.wewebu.ow.server.ecm.OwPropertyClass
Throws:
com.wewebu.ow.server.exceptions.OwException

isReadOnly

public boolean isReadOnly(int context_p)
                   throws com.wewebu.ow.server.exceptions.OwException
Specified by:
isReadOnly in interface com.wewebu.ow.server.ecm.OwPropertyClass
Specified by:
isReadOnly in interface OwCMISPropertyClass<O>
Throws:
com.wewebu.ow.server.exceptions.OwException

getDisplayName

public String getDisplayName(Locale locale_p)
Specified by:
getDisplayName in interface com.wewebu.ow.server.field.OwFieldDefinition

getDescription

public String getDescription(Locale locale_p)
Specified by:
getDescription in interface com.wewebu.ow.server.field.OwFieldDefinition

getNativeType

public P getNativeType()
Specified by:
getNativeType in interface OwCMISNativePropertyClass<O,N,P extends org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<N>>
Specified by:
getNativeType in interface com.wewebu.ow.server.field.OwFieldDefinition

isRequired

public boolean isRequired()
                   throws com.wewebu.ow.server.exceptions.OwException
Specified by:
isRequired in interface com.wewebu.ow.server.field.OwFieldDefinition
Throws:
com.wewebu.ow.server.exceptions.OwException

isArray

public boolean isArray()
Specified by:
isArray in interface OwCMISPropertyClass<O>
Specified by:
isArray in interface com.wewebu.ow.server.field.OwFieldDefinition

getNonQualifiedName

public String getNonQualifiedName()
Description copied from interface: OwCMISPropertyClass
Returns the non qualified name ( the CMIS definition name of this property)

Specified by:
getNonQualifiedName in interface OwCMISPropertyClass<O>
Returns:
String representing the full qualified name

getQueryName

public String getQueryName()
Description copied from interface: OwCMISPropertyClass
Returns the specified queryName of the property which should be used in search request instead of the id or property name.

see CMIS spec 1.0, chapter 2.1.3.2.1 Attributes common to ALL Object-Type Property Definitions

Specified by:
getQueryName in interface OwCMISPropertyClass<O>
Returns:
String queryName

isQueryable

public boolean isQueryable()
Description copied from interface: OwCMISPropertyClass
Returns a boolean representation if this property can occur in WHERE clause for filtration.

see CMIS spec 1.0, chapter 2.1.3.2.1 Attributes common to ALL Object-Type Property Definitions

Specified by:
isQueryable in interface OwCMISPropertyClass<O>
Returns:
boolean true if possible to use for filtering, else false

isOrderable

public boolean isOrderable()
Description copied from interface: OwCMISPropertyClass
Returns a boolean representation, notifying the possibility of this property to be used in ORDER BY clause.

see CMIS specification 1.0, chapter 2.1.3.2.1 Attributes common to ALL Object-Type Property Definitions

Specified by:
isOrderable in interface OwCMISPropertyClass<O>
Returns:
boolean true if possible to order/sort the values, else false.

getEnums

public com.wewebu.ow.server.field.OwEnumCollection getEnums()
                                                     throws com.wewebu.ow.server.exceptions.OwException
Specified by:
getEnums in interface OwCMISPropertyClass<O>
Specified by:
getEnums in interface com.wewebu.ow.server.field.OwFieldDefinition
Throws:
com.wewebu.ow.server.exceptions.OwException

getJavaClassName

public final String getJavaClassName()
Specified by:
getJavaClassName in interface com.wewebu.ow.server.field.OwFieldDefinition

isHidden

public boolean isHidden(int iContext_p)
                 throws com.wewebu.ow.server.exceptions.OwException
Specified by:
isHidden in interface com.wewebu.ow.server.ecm.OwPropertyClass
Specified by:
isHidden in interface OwCMISPropertyClass<O>
Throws:
com.wewebu.ow.server.exceptions.OwException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.