com.webmethods.caf.faces.data.csp
Class CSPIndexDefinitionProvider

java.lang.Object
  extended by com.webmethods.caf.faces.bean.BaseFacesBean
      extended by com.webmethods.caf.faces.bean.BaseFacesSessionBean
          extended by com.webmethods.caf.faces.data.csp.CSPBaseProvider
              extended by com.webmethods.caf.faces.data.csp.CSPIndexDefinitionProvider
All Implemented Interfaces:
IPageFlowScopeAdapter, IContentProvider, Serializable

public class CSPIndexDefinitionProvider
extends CSPBaseProvider
implements IContentProvider, Serializable

This is a Content Provider used for retrieving meta-data from CSP.It can be used to retrieve CSPIndexes based on either content id or contentDefinitionId.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.webmethods.caf.faces.data.csp.CSPBaseProvider
fRetrievalModule, fSession
 
Fields inherited from class com.webmethods.caf.faces.bean.BaseFacesSessionBean
fExpireWithPageFlow
 
Fields inherited from class com.webmethods.caf.faces.bean.BaseFacesBean
DATA_BINDING_CLIENTS, OUTCOME_ERROR, OUTCOME_OK, resourcesProviders
 
Constructor Summary
CSPIndexDefinitionProvider()
           
 
Method Summary
 CSPIndex getDefinition(String indexId)
          Returns the index definition for a index id
 List getIndexes(String contentId)
          Returns indexes for a content id
 List getIndexesForContentDefinition(String contentDefinitionId)
          Returns all indexes for a content definition
 List getIndexesForContentDefinitions(List contentDefinitions)
          Returns indexes for specified content definitions and excludes the duplicates Example: Content definition id - ID1 Indexes for ID1 - index1, index2, indexID1 Content definition id - ID2 Indexes for ID2 - index1, indexID2 This method should return - index1, index2, indexID1, indexID2
 Object[] getPropertyKeys()
          Returns list of properties supported by this content provider.
 Class getType(Object contentDefinitionId)
          Returns java type of the given property
 Object getValue(Object contentDefinitionId)
          Returns value of the given property
 boolean hasProperty(Object contentDefinitionId)
          Checks if the given property is supported by this content provider
 
Methods inherited from class com.webmethods.caf.faces.data.csp.CSPBaseProvider
checkState, getSession, release, setSession
 
Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesSessionBean
getExpireWithPageFlow, setExpireWithPageFlow, valueBound, valueUnbound
 
Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesBean
createMethodBinding, createValueBinding, error, error, error, error, error, getBean, getFacesContext, getLocale, getResourceInputStream, getResources, getResourcesProvider, getRootCause, getStackTrace, getTreeAttribute, isUserInRole, log, log, log, putTreeAttribute, resetDataBindingClients, resolveDataBinding, resolveDataBinding, resolveExpression, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.webmethods.caf.faces.data.IContentProvider
toString
 

Constructor Detail

CSPIndexDefinitionProvider

public CSPIndexDefinitionProvider()
Method Detail

getDefinition

public CSPIndex getDefinition(String indexId)
                       throws Exception
Returns the index definition for a index id

Parameters:
indexId - whose definition should be returned
Returns:
Index definition for an index id
Throws:
Exception

getIndexes

public List getIndexes(String contentId)
                throws Exception
Returns indexes for a content id

Parameters:
contentId - whose indexes to be returned
Returns:
Indexes for a content id
Throws:
Exception

getIndexesForContentDefinition

public List getIndexesForContentDefinition(String contentDefinitionId)
                                    throws Exception
Returns all indexes for a content definition

Parameters:
contentDefinitionId - whose indexes to be retrieved
Returns:
All indexes for a content definition
Throws:
Exception

getIndexesForContentDefinitions

public List getIndexesForContentDefinitions(List contentDefinitions)
                                     throws Exception
Returns indexes for specified content definitions and excludes the duplicates Example: Content definition id - ID1 Indexes for ID1 - index1, index2, indexID1 Content definition id - ID2 Indexes for ID2 - index1, indexID2 This method should return - index1, index2, indexID1, indexID2

Parameters:
contentDefinitions - whose indexes should be returned
Returns:
Indexes for specified content definitions with excluded duplicates
Throws:
Exception

getPropertyKeys

public Object[] getPropertyKeys()
Description copied from interface: IContentProvider
Returns list of properties supported by this content provider. Can return Object[0], never null.

Specified by:
getPropertyKeys in interface IContentProvider
Returns:
array of property keys which is typically of type String or Integer

getType

public Class getType(Object contentDefinitionId)
              throws PropertyNotFoundException
Description copied from interface: IContentProvider
Returns java type of the given property

Specified by:
getType in interface IContentProvider
Parameters:
contentDefinitionId - the property key of type String or Integer
Returns:
property java Class
Throws:
PropertyNotFoundException - if property is not supported

getValue

public Object getValue(Object contentDefinitionId)
Description copied from interface: IContentProvider
Returns value of the given property

Specified by:
getValue in interface IContentProvider
Parameters:
contentDefinitionId - - the id of the Content Definition that keep information about selected node.
Returns:
CSPContentDefinition

hasProperty

public boolean hasProperty(Object contentDefinitionId)
Description copied from interface: IContentProvider
Checks if the given property is supported by this content provider

Specified by:
hasProperty in interface IContentProvider
Parameters:
contentDefinitionId - property key of type String or Integer
Returns:
true if property is supported