com.wewebu.ow.server.plug.owrecord.filter
Class OwRecordFilterOperatorHelper

java.lang.Object
  extended by com.wewebu.ow.server.plug.owrecord.filter.OwRecordFilterOperatorHelper

public class OwRecordFilterOperatorHelper
extends Object

Helper class for FieldDefinition retrieval. Creates wrapper classes which have basic operators to be used with the requested FieldDefinition.

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

Since:
3.2.0.0

Nested Class Summary
protected static class OwRecordFilterOperatorHelper.OwFieldDefWrapper
           OwFieldDefWrapper.
 
Field Summary
static Collection<Integer> BOOLEAN_OPERATORS
           
static Collection<Integer> DEFAULT_OPERATORS
          Collection of operators which is used for non-number fields.
static Collection<Integer> MULTIVAL_OPERATORS
           
static Collection<Integer> NUMBER_OPERATORS
          Collection of operators which is used for number fields (e.g.
 
Constructor Summary
OwRecordFilterOperatorHelper()
           
 
Method Summary
 Collection<com.wewebu.ow.server.field.OwFieldDefinition> collectFilterProperties(com.wewebu.ow.server.ecm.OwObject obj_p, com.wewebu.ow.server.field.OwFieldDefinitionProvider fieldDefProvider_p, Collection columnInfoList_p)
          Process the column info collection depending on the given object to retrieve field definitions which can be used for filtering.
 com.wewebu.ow.server.field.OwFieldDefinition getFieldDefinition(com.wewebu.ow.server.field.OwFieldDefinitionProvider fieldDefinitonProvider_p, String propName_p, String resourceId_p)
          Get a OwFieldDefintion which represents the given property name.
 List<String> getResourceIdsFromObject(com.wewebu.ow.server.ecm.OwObject obj_p)
          Return a list which contains the IDs from where the object retrieves it children.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUMBER_OPERATORS

public static final Collection<Integer> NUMBER_OPERATORS
Collection of operators which is used for number fields (e.g. Integer, Float and Date)


DEFAULT_OPERATORS

public static final Collection<Integer> DEFAULT_OPERATORS
Collection of operators which is used for non-number fields.


MULTIVAL_OPERATORS

public static final Collection<Integer> MULTIVAL_OPERATORS

BOOLEAN_OPERATORS

public static final Collection<Integer> BOOLEAN_OPERATORS
Constructor Detail

OwRecordFilterOperatorHelper

public OwRecordFilterOperatorHelper()
Method Detail

collectFilterProperties

public Collection<com.wewebu.ow.server.field.OwFieldDefinition> collectFilterProperties(com.wewebu.ow.server.ecm.OwObject obj_p,
                                                                                        com.wewebu.ow.server.field.OwFieldDefinitionProvider fieldDefProvider_p,
                                                                                        Collection columnInfoList_p)
                                                                                 throws Exception
Process the column info collection depending on the given object to retrieve field definitions which can be used for filtering.

Parameters:
obj_p - OwObject which act as parent and define the resources to get field definitions
fieldDefProvider_p - OwFieldDefinitionProvider from where the field definition of the properties can be requested
columnInfoList_p - Collection of OwFieldColumnInfo object which should be checked for filtering
Returns:
Collection of FieldDefinitions which can be used for filtering
Throws:
Exception - if cannot retrieve filter properties from object, or field definitions.
See Also:
getResourceIdsFromObject(OwObject), getFieldDefinition(OwFieldDefinitionProvider, String, String)

getFieldDefinition

public com.wewebu.ow.server.field.OwFieldDefinition getFieldDefinition(com.wewebu.ow.server.field.OwFieldDefinitionProvider fieldDefinitonProvider_p,
                                                                       String propName_p,
                                                                       String resourceId_p)
                                                                throws Exception
Get a OwFieldDefintion which represents the given property name. May create a wrapper to which provides basic operators.

Parameters:
fieldDefinitonProvider_p - OwFieldDefinitionProvider
propName_p - String symbolic or unique name of property
resourceId_p - String resource id where to search for field definition
Returns:
OwFieldDefinition for given property name
Throws:
Exception - if cannot get OwFieldDefinition or operators of OwFieldDefinition

getResourceIdsFromObject

public List<String> getResourceIdsFromObject(com.wewebu.ow.server.ecm.OwObject obj_p)
                                      throws Exception
Return a list which contains the IDs from where the object retrieves it children.

If the object is a virtual folder, the IDs will be retrieved from the searchtemplate which is used by the object.

Parameters:
obj_p - OwObject from which to request the OwResource(s)
Returns:
List of strings representing resource-IDs.
Throws:
Exception - if resource ID could not be retrieved, or searchtemplate could not be parsed.


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.