org.eclipse.stardust.engine.api.query
Class PreferenceQuery

java.lang.Object
  extended by org.eclipse.stardust.engine.api.query.Query
      extended by org.eclipse.stardust.engine.api.query.PreferenceQuery
All Implemented Interfaces:
Serializable

public class PreferenceQuery
extends Query

See Also:
Serialized Form

Field Summary
static FilterableAttribute MODULE_ID
          Allows to define a filter on the moduleId.
static FilterableAttribute PREFERENCES_ID
          Allows to define a filter on the preferencesId.
static FilterableAttribute REALM_ID
          Allows to define a filter on the user realm id.
static FilterableAttribute SCOPE
          Allows to define a filter on the preference scope.
static FilterableAttribute USER_ID
          Allows to define a filter on the user user id.
 
Method Summary
static PreferenceQuery findAll(PreferenceScope scope)
          Creates a query for finding all preferences existing.
static PreferenceQuery findPreferences(PreferenceScope scope, String moduleId, String preferencesId)
          Query for search of preferences.
static PreferenceQuery findPreferencesForRealms(String realmId, String moduleId, String preferencesId)
          Query for search of realm scoped preferences belonging to different realms.
Users having the Administrator role may use wildcards for realmId.
static PreferenceQuery findPreferencesForUsers(String realmId, String userId, String moduleId, String preferencesId)
          Query for search of user scoped preferences belonging to different users and user realms.
Users having the Administrator role may use wildcards for realmId and userId.
 
Methods inherited from class org.eclipse.stardust.engine.api.query.Query
getFilter, getOrderCriteria, getPolicy, orderBy, orderBy, orderBy, removePolicy, setPolicy, toString, where
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SCOPE

public static final FilterableAttribute SCOPE
Allows to define a filter on the preference scope.


MODULE_ID

public static final FilterableAttribute MODULE_ID
Allows to define a filter on the moduleId.


PREFERENCES_ID

public static final FilterableAttribute PREFERENCES_ID
Allows to define a filter on the preferencesId.


REALM_ID

public static final FilterableAttribute REALM_ID
Allows to define a filter on the user realm id. Administrator role is required for execution!


USER_ID

public static final FilterableAttribute USER_ID
Allows to define a filter on the user user id. Administrator role is required for execution!

Method Detail

findAll

public static PreferenceQuery findAll(PreferenceScope scope)
Creates a query for finding all preferences existing. The scope PreferenceScope.DEFAULT is not supported.

Returns:
The readily configured query.
Throws:
org.eclipse.stardust.common.error.InvalidArgumentException - if scope is null.
PublicException - if parameter scope is PreferenceScope.DEFAULT.

findPreferences

public static PreferenceQuery findPreferences(PreferenceScope scope,
                                              String moduleId,
                                              String preferencesId)
Query for search of preferences. The scope PreferenceScope.DEFAULT is not supported.

Parameters:
scope - the scope to search in
moduleId - the module id to search for (wildcard '*' is allowed)
preferencesId - the preferences id to search for (wildcard '*' is allowed)
Returns:
the readily configured query.
Throws:
org.eclipse.stardust.common.error.InvalidArgumentException - if scope is null.
org.eclipse.stardust.common.error.InvalidArgumentException - if moduleId is null.
org.eclipse.stardust.common.error.InvalidArgumentException - if preferencesId is null.
PublicException - if parameter scope is PreferenceScope.DEFAULT.

findPreferencesForUsers

public static PreferenceQuery findPreferencesForUsers(String realmId,
                                                      String userId,
                                                      String moduleId,
                                                      String preferencesId)
Query for search of user scoped preferences belonging to different users and user realms.
Users having the Administrator role may use wildcards for realmId and userId. For users without Administrator role the results of the query are restricted to preferences matching the own realmId and own userId.

Parameters:
realmId - the realmId to search for (wildcard '*' is allowed for administrators). Specifying null here is interpreted as '*'.
userId - the userId to search for (wildcard '*' is allowed for administrators). Specifying null here is interpreted as '*'.
moduleId - the module id to search for (wildcard '*' is allowed)
preferencesId - the preferences id to search for (wildcard '*' is allowed)
Returns:
the readily configured query.
Throws:
org.eclipse.stardust.common.error.InvalidArgumentException - if moduleId is null.
org.eclipse.stardust.common.error.InvalidArgumentException - if preferencesId is null.

findPreferencesForRealms

public static PreferenceQuery findPreferencesForRealms(String realmId,
                                                       String moduleId,
                                                       String preferencesId)
Query for search of realm scoped preferences belonging to different realms.
Users having the Administrator role may use wildcards for realmId. For users without Administrator role the results of the query are restricted to preferences matching the own realmId.

Parameters:
realmId - the realmId to search for (wildcard '*' is allowed for administrators). Specifying null here is interpreted as '*'.
moduleId - the module id to search for (wildcard '*' is allowed)
preferencesId - the preferences id to search for (wildcard '*' is allowed)
Returns:
the readily configured query.
Throws:
org.eclipse.stardust.common.error.InvalidArgumentException - if moduleId is null.
org.eclipse.stardust.common.error.InvalidArgumentException - if preferencesId is null.


Copyright © 2017 Eclipse Stardust. All Rights Reserved.