com.wewebu.ow.server.ecm
Class OwFieldPropertyClassWrapper

java.lang.Object
  extended by com.wewebu.ow.server.ecm.OwFieldPropertyClassWrapper
All Implemented Interfaces:
OwPropertyClass, OwFieldDefinition

public class OwFieldPropertyClassWrapper
extends Object
implements OwPropertyClass

Property class wrapper for OwFields.

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
OwFieldPropertyClassWrapper(OwFieldDefinition fielddefinition_p)
          create a property class out of a field definition
 
Method Summary
 String getCategory()
          get the property category, or an empty string of no category is set
 String getClassName()
          get the name of the class
 List getComplexChildClasses()
          get child properties classes of a complex property class
 Object getDefaultValue()
          get the default value
 String getDescription(Locale locale_p)
          get the description defined by the DMS System
 String getDisplayName(Locale locale_p)
          get the displayable name of the type as defined by the ECM System can be identical to getClassName
 OwEnumCollection getEnums()
          get a list of enum objects for the enum type (see isEnum)
 OwFormat getFormat()
          get the formatter object for string representation
 String getJavaClassName()
          get the java class name of java object associated with this property
 Object getMaxValue()
          get the max allowed value, or Integer len for String or null if not defined
 Object getMinValue()
          get the min allowed value, or Integer len for String or null if not defined
 Object getNativeType()
          get the native type which is defined by the underlying system WARNING: The returned object is opaque.
 Node getNodeFromValue(Object value_p, Document doc_p)
          create a XML serialization of the given field value
 Collection getOperators()
          get a collection of possible filter / search operators for the field
 Object getValueFromNode(Node node_p)
          create a value for the field described by this class with the given XML Node serialization
 Object getValueFromString(String text_p)
          create a value for the field described by this class with the given String serialization
 boolean isArray()
          check if property contains a list of values
 boolean isComplex()
          check if the property is a component that contains another child properties
 boolean isEnum()
          check if property is a enum type (see getEnums)
 boolean isHidden(int context_p)
          check if property is visible to the user
 boolean isNameProperty()
          check if property is identical the the OwObject.getName Property
 boolean isReadOnly(int context_p)
          check if property is read only on the class level.
 boolean isRequired()
          check if property is required, i.e.
 boolean isSystemProperty()
          check if property is a internal system property and contains no custom object information
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwFieldPropertyClassWrapper

public OwFieldPropertyClassWrapper(OwFieldDefinition fielddefinition_p)
create a property class out of a field definition

Parameters:
fielddefinition_p -
Method Detail

getDisplayName

public String getDisplayName(Locale locale_p)
get the displayable name of the type as defined by the ECM System can be identical to getClassName

Specified by:
getDisplayName in interface OwFieldDefinition
Parameters:
locale_p - Locale to use
Returns:
type displayable name of property

getDescription

public String getDescription(Locale locale_p)
get the description defined by the DMS System

Specified by:
getDescription in interface OwFieldDefinition
Parameters:
locale_p - Locale to use
Returns:
type description of property

getCategory

public String getCategory()
                   throws Exception
Description copied from interface: OwPropertyClass
get the property category, or an empty string of no category is set

Specified by:
getCategory in interface OwPropertyClass
Returns:
Category of Property
Throws:
Exception

isHidden

public boolean isHidden(int context_p)
                 throws Exception
Description copied from interface: OwPropertyClass
check if property is visible to the user

Specified by:
isHidden in interface OwPropertyClass
Parameters:
context_p - Context in which the property is read-only as defined by CONTEXT_...
Returns:
true if property is visible to the user
Throws:
Exception

isNameProperty

public boolean isNameProperty()
                       throws Exception
Description copied from interface: OwPropertyClass
check if property is identical the the OwObject.getName Property

Specified by:
isNameProperty in interface OwPropertyClass
Throws:
Exception

isReadOnly

public boolean isReadOnly(int context_p)
                   throws Exception
Description copied from interface: OwPropertyClass
check if property is read only on the class level. NOTE: isReadOnly is also defined in OwProperty on the instance level. I.e. A Property might be defined as readable on the class level, but still be write protected on a specific instance

Specified by:
isReadOnly in interface OwPropertyClass
Parameters:
context_p - Context in which the property is read-only as defined by CONTEXT_...
Returns:
true if property is read only
Throws:
Exception

isSystemProperty

public boolean isSystemProperty()
                         throws Exception
Description copied from interface: OwPropertyClass
check if property is a internal system property and contains no custom object information

Specified by:
isSystemProperty in interface OwPropertyClass
Throws:
Exception

getClassName

public String getClassName()
Description copied from interface: OwFieldDefinition
get the name of the class

Specified by:
getClassName in interface OwFieldDefinition
Returns:
class name

getDefaultValue

public Object getDefaultValue()
                       throws Exception
Description copied from interface: OwFieldDefinition
get the default value

Specified by:
getDefaultValue in interface OwFieldDefinition
Throws:
Exception

getEnums

public OwEnumCollection getEnums()
                          throws Exception
Description copied from interface: OwFieldDefinition
get a list of enum objects for the enum type (see isEnum)

Specified by:
getEnums in interface OwFieldDefinition
Returns:
OwEnumCollection of OwEnum objects, which can be used in a select box.
Throws:
Exception

getFormat

public OwFormat getFormat()
Description copied from interface: OwFieldDefinition
get the formatter object for string representation

Specified by:
getFormat in interface OwFieldDefinition
Returns:
OwFormat, can be null to use the default format

getJavaClassName

public String getJavaClassName()
Description copied from interface: OwFieldDefinition
get the java class name of java object associated with this property

Specified by:
getJavaClassName in interface OwFieldDefinition
Returns:
java class name

getMaxValue

public Object getMaxValue()
                   throws Exception
Description copied from interface: OwFieldDefinition
get the max allowed value, or Integer len for String or null if not defined

Specified by:
getMaxValue in interface OwFieldDefinition
Throws:
Exception

getMinValue

public Object getMinValue()
                   throws Exception
Description copied from interface: OwFieldDefinition
get the min allowed value, or Integer len for String or null if not defined

Specified by:
getMinValue in interface OwFieldDefinition
Throws:
Exception

getNativeType

public Object getNativeType()
                     throws Exception
Description copied from interface: OwFieldDefinition
get the native type which is defined by the underlying system WARNING: The returned object is opaque. Using this object makes the client dependent on the underlying system

Specified by:
getNativeType in interface OwFieldDefinition
Returns:
Object native Type Object
Throws:
Exception

getNodeFromValue

public Node getNodeFromValue(Object value_p,
                             Document doc_p)
                      throws Exception
Description copied from interface: OwFieldDefinition
create a XML serialization of the given field value

Specified by:
getNodeFromValue in interface OwFieldDefinition
Parameters:
value_p - Object with field value
doc_p - DOM Document to add to
Returns:
DOM Node
Throws:
Exception

getOperators

public Collection getOperators()
                        throws Exception
Description copied from interface: OwFieldDefinition
get a collection of possible filter / search operators for the field

Specified by:
getOperators in interface OwFieldDefinition
Returns:
Collection of operators as defined with OwSearchOperator.CRIT_OP_..., or null if no operators are defined
Throws:
Exception

getValueFromNode

public Object getValueFromNode(Node node_p)
                        throws Exception
Description copied from interface: OwFieldDefinition
create a value for the field described by this class with the given XML Node serialization

Specified by:
getValueFromNode in interface OwFieldDefinition
Parameters:
node_p - the serialized value as a XML DOM Node
Returns:
Object the value of the field
Throws:
Exception

getValueFromString

public Object getValueFromString(String text_p)
                          throws Exception
Description copied from interface: OwFieldDefinition
create a value for the field described by this class with the given String serialization

Specified by:
getValueFromString in interface OwFieldDefinition
Parameters:
text_p - String the serialized value
Returns:
Object the value of the field
Throws:
Exception

isArray

public boolean isArray()
                throws Exception
Description copied from interface: OwFieldDefinition
check if property contains a list of values

Specified by:
isArray in interface OwFieldDefinition
Returns:
true if property is array, false if property is scalar
Throws:
Exception

isEnum

public boolean isEnum()
               throws Exception
Description copied from interface: OwFieldDefinition
check if property is a enum type (see getEnums)

Specified by:
isEnum in interface OwFieldDefinition
Returns:
true if property is a enum type
Throws:
Exception

isRequired

public boolean isRequired()
                   throws Exception
Description copied from interface: OwFieldDefinition
check if property is required, i.e. must be set by the user

Specified by:
isRequired in interface OwFieldDefinition
Returns:
true if property is required
Throws:
Exception

isComplex

public boolean isComplex()
Description copied from interface: OwFieldDefinition
check if the property is a component that contains another child properties

Specified by:
isComplex in interface OwFieldDefinition
Returns:
true if the property can contains child properties
See Also:
OwFieldDefinition.getComplexChildClasses()

getComplexChildClasses

public List getComplexChildClasses()
                            throws Exception
Description copied from interface: OwFieldDefinition
get child properties classes of a complex property class

Specified by:
getComplexChildClasses in interface OwFieldDefinition
Returns:
Collection of OwFieldDefinition or null if isComplex is false
Throws:
Exception
See Also:
OwFieldDefinition.isComplex()


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.