Skip navigation links


com.openmarket.gator.flexfilters
Class AbstractFlexFilter

java.lang.Object
  extended by com.openmarket.gator.flexfilters.AbstractFlexFilter

All Implemented Interfaces:
IFilter

public abstract class AbstractFlexFilter
extends java.lang.Object
implements IFilter

This class provides a convenient base class for custom filter implementations. Default implementations provided in this class assume that filter parameters are Flex attribute names. If that is not the case IFilter interface should be used instead.


Constructor Summary
AbstractFlexFilter(FTValList ftvallist)
          Implementations are required to have a single-argument public constructor that expects a COM.FutureTense.Interfaces.FTValList object.

 

Method Summary
 void checkArguments(IFilterEnvironment env, java.lang.String filterIdentifier, FTValList filterArguments, IReplicate replicateObject)
          Check validity of arguments for share, using the mapping structure provided.
 void describeDerivedAttributes(IFilterEnvironment env, java.lang.String filterIdentifier, FTValList filterArguments, java.lang.String defTypeName, java.lang.String parentDefTypeName, IFilterDescription descriptionObject)
          Describe all the potential derived attributes, parent affinities, and recommendations the filter might set.
abstract  void filterAsset(IFilterEnvironment env, java.lang.String filterIdentifier, FTValList filterArguments, IFilterableAssetInstance instance)
          Perform the filter operation.
 java.lang.String[] getArgumentLegalValues(IFilterEnvironment env, java.lang.String filterIdentifier, java.lang.String argumentName)
          Obtain legal values for a single filter argument.
 java.lang.String getAttrID(IFilterEnvironment ifilterenvironment, FTValList ftValList, java.lang.String argname)
          This is a helper to return the attribute asset ID for a specific attribute that was passed to the filter as an attribute argument.
 void getDependencies(IFilterEnvironment env, java.lang.String filterIdentifier, FTValList filterArguments, java.lang.String assetTypeName, java.lang.String parentTypeName, IFilterDependencies filterdeps)
          Describe the filter's asset dependencies.
 java.lang.String getFilterEditURL(IFilterEnvironment env, java.lang.String loginname, java.lang.String filterIdentifier, FTValList filterArguments)
          This method is depreciated and is implemented to return null.
abstract  FTValList getLegalArguments(IFilterEnvironment env, java.lang.String filterIdentifier)
          Obtain the legal filter arguments.
 FTValList replicateArguments(IFilterEnvironment env, java.lang.String filterIdentifier, FTValList filterArguments, IReplicate replicateObject)
          Perform a copy of the arguments, using the mapping structure provided.

 

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

 

Constructor Detail

AbstractFlexFilter

public AbstractFlexFilter(FTValList ftvallist)
Implementations are required to have a single-argument public constructor that expects a COM.FutureTense.Interfaces.FTValList object. The FTValList provided by the caller is the full set of configuration arguments that were registered when the Filter was registered in the Filters database table. If nothing is declared in the database then a null value is presented and the filter must provide an alternative (static) declaration of the arguments.

Method Detail

getFilterEditURL

public java.lang.String getFilterEditURL(IFilterEnvironment env,
                                         java.lang.String loginname,
                                         java.lang.String filterIdentifier,
                                         FTValList filterArguments)
                                  throws com.openmarket.basic.interfaces.AssetException
This method is depreciated and is implemented to return null.
Specified by:
getFilterEditURL in interface IFilter
Throws:
com.openmarket.basic.interfaces.AssetException

filterAsset

public abstract void filterAsset(IFilterEnvironment env,
                                 java.lang.String filterIdentifier,
                                 FTValList filterArguments,
                                 IFilterableAssetInstance instance)
                          throws com.openmarket.basic.interfaces.AssetException
Perform the filter operation. All changes should occur to the IFilterableAssetInstance. This method must be implemented by anuy class which extends this class. There is no default implementation for this method.
Specified by:
filterAsset in interface IFilter
Parameters:
env - filter environment
filterIdentifier - filter id
filterArguments - filter parameters
instance - filterable asset instance
Throws:
com.openmarket.basic.interfaces.AssetException

describeDerivedAttributes

public void describeDerivedAttributes(IFilterEnvironment env,
                                      java.lang.String filterIdentifier,
                                      FTValList filterArguments,
                                      java.lang.String defTypeName,
                                      java.lang.String parentDefTypeName,
                                      IFilterDescription descriptionObject)
                               throws com.openmarket.basic.interfaces.AssetException
Describe all the potential derived attributes, parent affinities, and recommendations the filter might set. This method can be overridden by the class that extends this class. When not overridden then all filter attributes are declared as potential output from the filter.
Specified by:
describeDerivedAttributes in interface IFilter
Parameters:
env - filter environment
filterIdentifier - filter id
filterArguments - filter parameters
defTypeName - flex definition type
parentDefTypeName - flex parent definition type
descriptionObject - filter description
Throws:
com.openmarket.basic.interfaces.AssetException

getDependencies

public void getDependencies(IFilterEnvironment env,
                            java.lang.String filterIdentifier,
                            FTValList filterArguments,
                            java.lang.String assetTypeName,
                            java.lang.String parentTypeName,
                            IFilterDependencies filterdeps)
                     throws com.openmarket.basic.interfaces.AssetException
Describe the filter's asset dependencies. This method can be overridden by the class that extends this class. When not overridden then all filter dependencies are implemented as 'exists'.
Specified by:
getDependencies in interface IFilter
Parameters:
env - filter environment
filterIdentifier - filter id
filterArguments - filter parameters
assetTypeName - flex asset type
parentTypeName - flex parent type
filterdeps - filter dependencies
Throws:
com.openmarket.basic.interfaces.AssetException

getLegalArguments

public abstract FTValList getLegalArguments(IFilterEnvironment env,
                                            java.lang.String filterIdentifier)
                                     throws com.openmarket.basic.interfaces.AssetException
Obtain the legal filter arguments. This method must be implemented by any class that extends this class. The purpose it to provide a list of acceptable arguments to the CS Advanced UI when creating or editing a flex filter instance.
Specified by:
getLegalArguments in interface IFilter
Parameters:
env - filter environment
filterIdentifier - filter id
Returns:
legal filter arugments
Throws:
com.openmarket.basic.interfaces.AssetException

getArgumentLegalValues

public java.lang.String[] getArgumentLegalValues(IFilterEnvironment env,
                                                 java.lang.String filterIdentifier,
                                                 java.lang.String argumentName)
                                          throws com.openmarket.basic.interfaces.AssetException
Obtain legal values for a single filter argument. Implementation of this method in a class that extends this class is only necessary if specific values should be accepted by the CS Advanced UI when creating or editing a flex filter instance. A null return indicates that any value is legal.
Specified by:
getArgumentLegalValues in interface IFilter
Parameters:
env - filter environment
filterIdentifier - filter id
argumentName - filter argument
Returns:
valid values for the argument
Throws:
com.openmarket.basic.interfaces.AssetException

replicateArguments

public FTValList replicateArguments(IFilterEnvironment env,
                                    java.lang.String filterIdentifier,
                                    FTValList filterArguments,
                                    IReplicate replicateObject)
                             throws com.openmarket.basic.interfaces.AssetException
Perform a copy of the arguments, using the mapping structure provided. This method is optional and is not required in a custom implementation unless special processing is necessary when a flex asset is duplicated.
Specified by:
replicateArguments in interface IFilter
Parameters:
env - filter environment
filterIdentifier - filter id
filterArguments - filter parameters
replicateObject - contains mapping structure
Returns:
new arguments after replication
Throws:
com.openmarket.basic.interfaces.AssetException

checkArguments

public void checkArguments(IFilterEnvironment env,
                           java.lang.String filterIdentifier,
                           FTValList filterArguments,
                           IReplicate replicateObject)
                    throws com.openmarket.basic.interfaces.AssetException
Check validity of arguments for share, using the mapping structure provided.
Specified by:
checkArguments in interface IFilter
Parameters:
env - filter environment
filterIdentifier - filter id
filterArguments - filter parameters
replicateObject - contains mapping structure
Throws:
com.openmarket.basic.interfaces.AssetException

getAttrID

public java.lang.String getAttrID(IFilterEnvironment ifilterenvironment,
                                  FTValList ftValList,
                                  java.lang.String argname)
                           throws com.openmarket.basic.interfaces.AssetException
This is a helper to return the attribute asset ID for a specific attribute that was passed to the filter as an attribute argument. The argname is used to fetch the proper value from the argument list.
Parameters:
ifilterenvironment -
ftValList -
argname -
Returns:
String containing attribute ID or null if not found.
Throws:
com.openmarket.basic.interfaces.AssetException

Skip navigation links


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