Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.9.0)
E15995-08


oracle.wcps.property
Interface IPreferenceLocator


public interface IPreferenceLocator

A locator used for managing preferencesets. The implementation classes are required to implement loadPreferences(IContext, IPreferenceSet, IPropertySetDefinition, java.util.List) method. All the unsupported methods should throw UnsupportedOperationException exception. They are also responsible for maintaining createdOn ITimestamped.setCreatedOn(java.sql.Timestamp) and updatedOn ITimestamped.setUpdatedOn(java.sql.Timestamp) for all the entities. The property service will use an implementation instance found based on the following precedence order.

  1. IPreferenceMapping.getPreferenceLocatorClassName()
  2. IPropertySetDefinition.getPreferenceLocatorClassName()
  3. default preference locator

Please refer to the deployment guide for how to deploy locators onto the property service server.


Method Summary
 int count(IContext context, INamespaceName namespaceName, IPropertySetDefinitionName setDefinitionName, IPropertySetName propertySetName, PreferenceSetExpression expression)
          Returns the number of preferencesets that satisfy the given expression.
 IPagedList<IPreferenceSet> filter(IContext context, INamespaceName namespaceName, IPropertySetDefinitionName setDefinitionName, IPropertySetName propertySetName, PreferenceSetFilterContext filterContext)
          Filters preferencesets based on the given filterContext.
 void loadPreferences(IContext context, IPreferenceSet preferenceSet, IPropertySetDefinition propertySetDefinition, java.util.List<IPreferenceName> preferenceNames)
          Adds preferences to the given preferenceSet for the preference names in the given preferenceNames list.
 void removePreferences(IContext context, INamespaceName namespaceName, IPropertySetDefinitionName propertySetDefinitionName, IPropertySetName propertySetName)
          Remove all the preferences of all the preferencesets in the given propertySetName.
 void removePreferences(IContext context, IPreferenceSet preferenceSet, java.util.List<IPreferenceName> preferenceNames)
          Removes the preferences identified by the preference names in the given preferenceNames list.
 void storePreferences(IContext context, IPreferenceSet preferenceSet, IPropertySetDefinition propertySetDefinition, java.util.List<IPreferenceName> preferenceNames)
          Stores the preferences present in the given preferenceSet.

 

Method Detail

loadPreferences

void loadPreferences(IContext context,
                     IPreferenceSet preferenceSet,
                     IPropertySetDefinition propertySetDefinition,
                     java.util.List<IPreferenceName> preferenceNames)
                     throws OperationFailedException
Adds preferences to the given preferenceSet for the preference names in the given preferenceNames list. The propertySetDefinition to which the given preferenceSet belongs to is also passed to access preference mappings.
Parameters:
context - a property service context.
preferenceSet - a preferenceSet instance to which preferences are added.
propertySetDefinition - the associated propertysetdefinition.
preferenceNames - a list of preference names of preferences to be loaded.
Throws:
OperationFailedException - if the process of loading fails.

storePreferences

void storePreferences(IContext context,
                      IPreferenceSet preferenceSet,
                      IPropertySetDefinition propertySetDefinition,
                      java.util.List<IPreferenceName> preferenceNames)
                      throws OperationFailedException
Stores the preferences present in the given preferenceSet. The list of preferences that this locator is responsible to store are in the preferenceNames list.
Parameters:
context - a property service context.
preferenceSet - a preferenceset that contains preferences to store.
propertySetDefinition - the propertysetdefinition that the given preferenceSet belongs to.
preferenceNames - a list of preference names of the preferences to store.
Throws:
OperationFailedException - if the process of storing fails.
java.lang.UnsupportedOperationException - if this operation is not supported.

removePreferences

void removePreferences(IContext context,
                       IPreferenceSet preferenceSet,
                       java.util.List<IPreferenceName> preferenceNames)
                       throws OperationFailedException
Removes the preferences identified by the preference names in the given preferenceNames list. The given preferenceSet contains preferenceset name, propertysetdefinition name, namespace name and preferences.
Parameters:
context - a property service context.
preferenceSet - a preferenceset whose preferences need to be removed.
preferenceNames - a list of preference names of the preferences to remove.
Throws:
OperationFailedException - if the process of removing fails.
java.lang.UnsupportedOperationException - if this operation is not supported.

removePreferences

void removePreferences(IContext context,
                       INamespaceName namespaceName,
                       IPropertySetDefinitionName propertySetDefinitionName,
                       IPropertySetName propertySetName)
                       throws OperationFailedException
Remove all the preferences of all the preferencesets in the given propertySetName.
Parameters:
context - a property service context.
namespaceName - a namespace name.
propertySetDefinitionName - a propertysetdefinition name.
propertySetName - a propertyset name.
Throws:
OperationFailedException - if the process of removing fails.
java.lang.UnsupportedOperationException - if this operation is not supported.

filter

IPagedList<IPreferenceSet> filter(IContext context,
                                  INamespaceName namespaceName,
                                  IPropertySetDefinitionName setDefinitionName,
                                  IPropertySetName propertySetName,
                                  PreferenceSetFilterContext filterContext)
                                  throws OperationFailedException
Filters preferencesets based on the given filterContext.
Parameters:
context - a property service context.
namespaceName - a namespace name.
setDefinitionName - a propertysetdefinition name.
propertySetName - a property set name.
filterContext - a filter context that contains search expression and pagination context.
Returns:
A paged list of preferencesets that satisfies the given filter context.
Throws:
OperationFailedException - if the process of filtering fails.
java.lang.UnsupportedOperationException - if this operation is not supported.

count

int count(IContext context,
          INamespaceName namespaceName,
          IPropertySetDefinitionName setDefinitionName,
          IPropertySetName propertySetName,
          PreferenceSetExpression expression)
          throws OperationFailedException
Returns the number of preferencesets that satisfy the given expression.
Parameters:
context - a property service context.
namespaceName - a namespace name.
setDefinitionName - a propertysetdefinition name.
propertySetName - a propertyset name.
expression - a preferenceset expression.
Returns:
an integer indicating the number of the preferencesets that satisfy the given expression.
Throws:
OperationFailedException - if the process of counting fails.
java.lang.UnsupportedOperationException - if this operation is not supported.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.9.0)
E15995-08


Copyright © 2009, 2014, Oracle and/or its affiliates. All rights reserved.