org.opencrx.kernel.backend
Class UserHomes

java.lang.Object
  extended by org.opencrx.kernel.backend.AbstractImpl
      extended by org.opencrx.kernel.backend.UserHomes

public class UserHomes
extends AbstractImpl


Nested Class Summary
static class UserHomes.AlertState
           
static class UserHomes.OpenCrxUserSettings
           
 
Field Summary
static short CAN_NOT_CHANGE_PASSWORD
           
static short CAN_NOT_RETRIEVE_REQUESTED_PRINCIPAL
           
static short CHANGE_PASSWORD_OK
           
static short MISSING_NEW_PASSWORD
           
static short MISSING_NEW_PASSWORD_VERIFICATION
           
static short MISSING_OLD_PASSWORD
           
static short OLD_PASSWORD_VERIFICATION_MISMATCH
           
static short PASSWORD_POLICY_VIOLATION
           
static short PASSWORD_VERIFICATION_MISMATCH
           
 
Constructor Summary
protected UserHomes()
           
 
Method Summary
 void applyUserSettings(UserHome userHome, int currentPerspective, Properties currentSettings, boolean doNotInitUserHome, boolean storeSettings, PrincipalGroup primaryGroup, String settingTimezone, String settingStoreSettingsOnLogoff, String settingDefaultEmailAccount, String settingSendmailSubjectPrefix, String settingWebAccessUrl, String settingTopNavigationShowMax, Boolean settingShowTopNavigationSublevel, Boolean settingGridDefaultAlignmentIsWide, Boolean settingHideWorkspaceDashboard, List<String> settingRootObjects, Map<String,String> settingSubscriptions)
          Initializes a user's home and settings.
 void applyUserSettings(UserHome userHome, int currentPerspective, Properties currentSettings, boolean storeSettings, PrincipalGroup primaryGroup, UserHomes.OpenCrxUserSettings newSettings, boolean doNotInitUserHome)
          Applies the new settings to the user home.
 short changePassword(org.openmdx.security.authentication1.jmi1.Password passwordCredential, String oldPassword, String password)
           
 short changePassword(UserHome userHome, String oldPassword, String newPassword, String newPasswordVerification)
           
 org.openmdx.security.authentication1.jmi1.Password createPasswordCredential(org.openmdx.security.realm1.jmi1.Subject subject, List<String> errors)
           
 UserHome createUserHome(org.openmdx.security.realm1.jmi1.Realm realm, Contact contact, PrincipalGroup primaryGroup, String principalName, List<org.openmdx.security.realm1.jmi1.Group> requiredGroups, boolean isAdministrator, String initialPassword, String initialPasswordVerification, List<String> errors)
           
static UserHomes getInstance()
           
 Properties getSettings(UserHome userHome)
           
 UserHome getUserHome(Path from, javax.jdo.PersistenceManager pm)
           
 UserHome getUserHome(Path from, javax.jdo.PersistenceManager pm, boolean useRunAsPrincipal)
           
 UserHome getUserHome(String user, Path from, javax.jdo.PersistenceManager pm)
           
 UserHome getUserHome(String user, Path from, javax.jdo.PersistenceManager pm, boolean useRunAsPrincipal)
           
 Segment getUserHomeSegment(javax.jdo.PersistenceManager pm, String providerName, String segmentName)
           
 String getUserTimezone(Properties settings)
           
 String getWebAccessUrl(UserHome userHome)
           
 String importUsers(Segment homeSegment, byte[] item)
           
 void initUserHome(UserHome userHome)
          Initializes user home.
 void markAsAccepted(Alert alert)
           
 void markAsNew(Alert alert)
           
 void markAsRead(Alert alert)
           
 void refreshItems(UserHome userHome)
           
static void register()
           
 ObjectFinder searchAdvanced(UserHome userHome, String allWords, String atLeastOneOfTheWords, String withoutWords)
           
 ObjectFinder searchBasic(UserHome userHome, String searchExpression)
           
 boolean testPasswordPolicy(String password)
          Default implementation does not enforce a password policy.
 void updateReminder(Reminder reminder)
           
 
Methods inherited from class org.opencrx.kernel.backend.AbstractImpl
getInstance, getUidAsString, registerImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHANGE_PASSWORD_OK

public static final short CHANGE_PASSWORD_OK
See Also:
Constant Field Values

MISSING_NEW_PASSWORD

public static final short MISSING_NEW_PASSWORD
See Also:
Constant Field Values

MISSING_NEW_PASSWORD_VERIFICATION

public static final short MISSING_NEW_PASSWORD_VERIFICATION
See Also:
Constant Field Values

PASSWORD_VERIFICATION_MISMATCH

public static final short PASSWORD_VERIFICATION_MISMATCH
See Also:
Constant Field Values

CAN_NOT_RETRIEVE_REQUESTED_PRINCIPAL

public static final short CAN_NOT_RETRIEVE_REQUESTED_PRINCIPAL
See Also:
Constant Field Values

CAN_NOT_CHANGE_PASSWORD

public static final short CAN_NOT_CHANGE_PASSWORD
See Also:
Constant Field Values

MISSING_OLD_PASSWORD

public static final short MISSING_OLD_PASSWORD
See Also:
Constant Field Values

OLD_PASSWORD_VERIFICATION_MISMATCH

public static final short OLD_PASSWORD_VERIFICATION_MISMATCH
See Also:
Constant Field Values

PASSWORD_POLICY_VIOLATION

public static final short PASSWORD_POLICY_VIOLATION
See Also:
Constant Field Values
Constructor Detail

UserHomes

protected UserHomes()
Method Detail

register

public static void register()

getInstance

public static UserHomes getInstance()
                             throws ServiceException
Throws:
ServiceException

markAsAccepted

public void markAsAccepted(Alert alert)
                    throws ServiceException
Throws:
ServiceException

markAsRead

public void markAsRead(Alert alert)
                throws ServiceException
Throws:
ServiceException

markAsNew

public void markAsNew(Alert alert)
               throws ServiceException
Throws:
ServiceException

getUserHomeSegment

public Segment getUserHomeSegment(javax.jdo.PersistenceManager pm,
                                  String providerName,
                                  String segmentName)
Returns:
Returns the user home segment.

refreshItems

public void refreshItems(UserHome userHome)
                  throws ServiceException
Throws:
ServiceException

getUserHome

public UserHome getUserHome(Path from,
                            javax.jdo.PersistenceManager pm)
                     throws ServiceException
Throws:
ServiceException

getUserHome

public UserHome getUserHome(Path from,
                            javax.jdo.PersistenceManager pm,
                            boolean useRunAsPrincipal)
                     throws ServiceException
Throws:
ServiceException

getUserHome

public UserHome getUserHome(String user,
                            Path from,
                            javax.jdo.PersistenceManager pm)
                     throws ServiceException
Throws:
ServiceException

getUserHome

public UserHome getUserHome(String user,
                            Path from,
                            javax.jdo.PersistenceManager pm,
                            boolean useRunAsPrincipal)
                     throws ServiceException
Throws:
ServiceException

createPasswordCredential

public org.openmdx.security.authentication1.jmi1.Password createPasswordCredential(org.openmdx.security.realm1.jmi1.Subject subject,
                                                                                   List<String> errors)

changePassword

public short changePassword(org.openmdx.security.authentication1.jmi1.Password passwordCredential,
                            String oldPassword,
                            String password)

testPasswordPolicy

public boolean testPasswordPolicy(String password)
Default implementation does not enforce a password policy.


changePassword

public short changePassword(UserHome userHome,
                            String oldPassword,
                            String newPassword,
                            String newPasswordVerification)

createUserHome

public UserHome createUserHome(org.openmdx.security.realm1.jmi1.Realm realm,
                               Contact contact,
                               PrincipalGroup primaryGroup,
                               String principalName,
                               List<org.openmdx.security.realm1.jmi1.Group> requiredGroups,
                               boolean isAdministrator,
                               String initialPassword,
                               String initialPasswordVerification,
                               List<String> errors)
                        throws ServiceException
Throws:
ServiceException

importUsers

public String importUsers(Segment homeSegment,
                          byte[] item)
                   throws ServiceException
Throws:
ServiceException

searchBasic

public ObjectFinder searchBasic(UserHome userHome,
                                String searchExpression)
                         throws ServiceException
Throws:
ServiceException

searchAdvanced

public ObjectFinder searchAdvanced(UserHome userHome,
                                   String allWords,
                                   String atLeastOneOfTheWords,
                                   String withoutWords)
                            throws ServiceException
Throws:
ServiceException

getWebAccessUrl

public String getWebAccessUrl(UserHome userHome)

applyUserSettings

public void applyUserSettings(UserHome userHome,
                              int currentPerspective,
                              Properties currentSettings,
                              boolean doNotInitUserHome,
                              boolean storeSettings,
                              PrincipalGroup primaryGroup,
                              String settingTimezone,
                              String settingStoreSettingsOnLogoff,
                              String settingDefaultEmailAccount,
                              String settingSendmailSubjectPrefix,
                              String settingWebAccessUrl,
                              String settingTopNavigationShowMax,
                              Boolean settingShowTopNavigationSublevel,
                              Boolean settingGridDefaultAlignmentIsWide,
                              Boolean settingHideWorkspaceDashboard,
                              List<String> settingRootObjects,
                              Map<String,String> settingSubscriptions)
                       throws ServiceException
Initializes a user's home and settings.

Throws:
ServiceException

applyUserSettings

public void applyUserSettings(UserHome userHome,
                              int currentPerspective,
                              Properties currentSettings,
                              boolean storeSettings,
                              PrincipalGroup primaryGroup,
                              UserHomes.OpenCrxUserSettings newSettings,
                              boolean doNotInitUserHome)
                       throws ServiceException
Applies the new settings to the user home. If !noInitUserHome is set then the user home first is initialized, i.e. method initUserHome(UserHome) is called before the new settings are applied.

Throws:
ServiceException

initUserHome

public void initUserHome(UserHome userHome)
                  throws ServiceException
Initializes user home. It creates

Throws:
ServiceException

getSettings

public Properties getSettings(UserHome userHome)
                       throws ServiceException
Throws:
ServiceException

getUserTimezone

public String getUserTimezone(Properties settings)
                       throws ServiceException
Throws:
ServiceException

updateReminder

public void updateReminder(Reminder reminder)
                    throws ServiceException
Throws:
ServiceException


This software is published under the BSD license. Copyright © 2003-2012, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.