com.day.cq.preferences.impl
Class JcrPreferencesService

java.lang.Object
  extended by com.day.cq.preferences.impl.JcrPreferencesService
All Implemented Interfaces:
PreferencesService

public class JcrPreferencesService
extends Object
implements PreferencesService

Service to access the Preferences of Authorizables


Method Summary
 Preferences get()
          Acces the Preferences of the User which session is given as argument
 Preferences get(String authorizableId)
          Acquire the Preferences fo a given authorizable.
If access rights are sufficent, implementations have to return a Preferences object.
 Collection<String> getEditableApplicationPath()
          Tool to acces all Applications that define a dialog for preferences.
 boolean remove()
          Remove all Preferences for the User of the given session.
 boolean remove(String authorizableId)
          Remove all Preferences of the Authorizable the given ID identifies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public Preferences get()
Acces the Preferences of the User which session is given as argument

Specified by:
get in interface PreferencesService
Returns:
Preferences of User

get

public Preferences get(String authorizableId)
                throws NoSuchAuthorizableException
Acquire the Preferences fo a given authorizable.
If access rights are sufficent, implementations have to return a Preferences object.

Specified by:
get in interface PreferencesService
Parameters:
authorizableId - the Id of the Authorizable to access the Preferences for
Returns:
Preferences
Throws:
NoSuchAuthorizableException - if there is no Authorizable with the given ID;

remove

public boolean remove()
Remove all Preferences for the User of the given session.

Specified by:
remove in interface PreferencesService
Returns:
if the Preferences existed and have been removed

remove

public boolean remove(String authorizableId)
               throws NoSuchAuthorizableException
Remove all Preferences of the Authorizable the given ID identifies. Take the Privileges of the session given for this operation

Specified by:
remove in interface PreferencesService
Parameters:
authorizableId - to remove the Preferences for
Returns:
true if the Preferences existed and have been removed
Throws:
NoSuchAuthorizableException - if the given ID does not point to an existing Authorizable

getEditableApplicationPath

public Collection<String> getEditableApplicationPath()
Tool to acces all Applications that define a dialog for preferences.

Returns:
absolute pathes to all applications dialog directroy.


Copyright © 2008 Day Management AG. All Rights Reserved.