public class JahiaPreferencesJCRProviders<T extends JCRNodeWrapper> extends Object implements JahiaPreferencesProvider<T>
| Constructor and Description |
|---|
JahiaPreferencesJCRProviders() |
| Modifier and Type | Method and Description |
|---|---|
JahiaPreference |
createJahiaPreferenceNode(Principal principal)
Create a new JahiaPreference Node
|
void |
deleteAllPreferencesByPrincipal(Principal principal)
Delete all preferences by node
|
void |
deleteJahiaPreference(JahiaPreference jahiaPreference)
Delete Jahia Prefernce
|
void |
deleteJahiaPreference(Principal principal,
String sqlConstraint)
Delete Jahia Preference
|
List<JahiaPreference<T>> |
findJahiaPreferences(Principal principal,
String sqlConstraint)
Find all preferences for a user matching certain sqlConstraint
|
List<JahiaPreference<T>> |
getJahiaAllPreferences(Principal principal)
Get all preferences of a user.
|
JahiaPreference |
getJahiaPreference(Principal principal,
String sqlConstraint)
Get the existing JahiaPreference associated to this path
|
JahiaPreference |
getJahiaPreference(Principal principal,
String sqlConstraint,
boolean notNull)
Get or create the requested preference at the path
|
JCRSessionFactory |
getJCRStoreService() |
String |
getNodeType() |
String |
getType()
Get the type of the provider.
|
void |
setJahiaPreference(JahiaPreference jahiaPreference)
Set Jahia preference
|
void |
setJahiaPreferenceByMaps(Map<String,String> jahiaPreferenceAttributes)
Set jahia preference by properties Map
|
void |
setJCRSessionFactory(JCRSessionFactory jcrStoreService) |
void |
setNodeType(String nodeType) |
void |
setType(String type) |
boolean |
validate(JahiaPreference jahiaPreference)
Validate the preference
|
public String getNodeType()
public void setNodeType(String nodeType)
public void setType(String type)
public String getType()
JahiaPreferencesProvidergetType in interface JahiaPreferencesProvider<T extends JCRNodeWrapper>public JCRSessionFactory getJCRStoreService()
public void setJCRSessionFactory(JCRSessionFactory jcrStoreService)
public JahiaPreference createJahiaPreferenceNode(Principal principal)
createJahiaPreferenceNode in interface JahiaPreferencesProvider<T extends JCRNodeWrapper>principal - the user creating this preferencepublic boolean validate(JahiaPreference jahiaPreference) throws JahiaPreferencesNotValidException
validate in interface JahiaPreferencesProvider<T extends JCRNodeWrapper>jahiaPreference - to validateJahiaPreferencesNotValidExceptionpublic JahiaPreference getJahiaPreference(Principal principal, String sqlConstraint)
getJahiaPreference in interface JahiaPreferencesProvider<T extends JCRNodeWrapper>principal - the user for searching the preferencesqlConstraint - the sql constraint of the preferencepublic JahiaPreference getJahiaPreference(Principal principal, String sqlConstraint, boolean notNull)
getJahiaPreference in interface JahiaPreferencesProvider<T extends JCRNodeWrapper>principal - the user for searching the preferencesqlConstraint - the sql constraint of the preferencenotNull - if true create the preference if not foundpublic List<JahiaPreference<T>> getJahiaAllPreferences(Principal principal)
getJahiaAllPreferences in interface JahiaPreferencesProvider<T extends JCRNodeWrapper>principal - the user for whom we want the preferencespublic List<JahiaPreference<T>> findJahiaPreferences(Principal principal, String sqlConstraint)
findJahiaPreferences in interface JahiaPreferencesProvider<T extends JCRNodeWrapper>principal - the user for whom we want the preferencessqlConstraint - the sql constraint of the preferencepublic void deleteJahiaPreference(Principal principal, String sqlConstraint) throws JahiaPreferenceNotDefinedAttributeException
deleteJahiaPreference in interface JahiaPreferencesProvider<T extends JCRNodeWrapper>principal - the user for whom we want the preferencessqlConstraint - the sql constraint of the preferenceJahiaPreferenceNotDefinedAttributeExceptionpublic void deleteJahiaPreference(JahiaPreference jahiaPreference)
deleteJahiaPreference in interface JahiaPreferencesProvider<T extends JCRNodeWrapper>jahiaPreference - the preference to deletepublic void setJahiaPreference(JahiaPreference jahiaPreference)
setJahiaPreference in interface JahiaPreferencesProvider<T extends JCRNodeWrapper>jahiaPreference - the preference to setpublic void setJahiaPreferenceByMaps(Map<String,String> jahiaPreferenceAttributes) throws JahiaPreferenceNotDefinedAttributeException, JahiaPreferenceNotDefinedPropertyException, JahiaPreferencesNotValidException
setJahiaPreferenceByMaps in interface JahiaPreferencesProvider<T extends JCRNodeWrapper>jahiaPreferenceAttributes - JahiaPreferenceNotDefinedAttributeExceptionJahiaPreferenceNotDefinedPropertyExceptionJahiaPreferencesNotValidExceptionpublic void deleteAllPreferencesByPrincipal(Principal principal)
deleteAllPreferencesByPrincipal in interface JahiaPreferencesProvider<T extends JCRNodeWrapper>principal - Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.