Skip navigation links


com.fatwire.assetapi.query
Class ConditionParser

java.lang.Object
  extended by com.fatwire.assetapi.query.ConditionParser


public class ConditionParser
extends java.lang.Object

The parsing utilities to parse the conditions from query into Baisc search ics variables or flex search conditon - SearchState


Method Summary
static java.util.List<java.lang.String> parseBasicCondition(ICS ics, java.lang.Long site, AssetTypeDef atd, Condition c, java.lang.String prefix, FTValList attributes)
          This method is used to convert a condition to an asset search format.
static com.openmarket.gator.interfaces.ISearchState parseFlexCondition(ICS ics, AssetTypeDef atd, java.lang.String attributeType, Condition c)
          Parse a Condition and convert the passed in Condition to an ISearchState that could be used to search for flex assets
static java.lang.String validAttributes(ICS ics, AssetTypeDef atd, java.util.List<java.lang.String> attributes)
          validate whether any of the attribute specified in the list does not belong to the specified assettype/subtype

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

parseFlexCondition

public static com.openmarket.gator.interfaces.ISearchState parseFlexCondition(ICS ics,
                                                                              AssetTypeDef atd,
                                                                              java.lang.String attributeType,
                                                                              Condition c)
                                                                       throws AssetAccessException
Parse a Condition and convert the passed in Condition to an ISearchState that could be used to search for flex assets
Parameters:
ics - the ICS object
atd - the asset type definition object
attributeType - The flex asset attribute type
c - The condition to parse
Returns:
ISearchState The searchstate equivilant of the Condtion
Throws:
AssetAccessException - throws this exception if error met parsing the Condition

parseBasicCondition

public static java.util.List<java.lang.String> parseBasicCondition(ICS ics,
                                                                   java.lang.Long site,
                                                                   AssetTypeDef atd,
                                                                   Condition c,
                                                                   java.lang.String prefix,
                                                                   FTValList attributes)
                                                            throws AssetAccessException
This method is used to convert a condition to an asset search format. In particular, asset search has the following restriction 1. for same attribute, the only operation allowed is OR 2. for different attribute, the only operation allowed is AND
Parameters:
ics - the ICS object
site - the Content Server site id of the query
atd - the asset type definition
c - the Query Condition that needs to be parsed
prefix - the prefix that we want to use for converting
attributes - the list of attributes that we converted; this will be used to pass into search method
Returns:
the list of ics variables that we created so that we could clean them up from ICS later
Throws:
AssetAccessException - throws this exception if errors occur in parsing

validAttributes

public static java.lang.String validAttributes(ICS ics,
                                               AssetTypeDef atd,
                                               java.util.List<java.lang.String> attributes)
validate whether any of the attribute specified in the list does not belong to the specified assettype/subtype
Parameters:
ics - the ICS object
atd - the asset type definition object
attributes - list of string names to validate
Returns:
true if all are valid attributes, false if any is not

Skip navigation links


Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.