public class UserHomes extends AbstractImpl
| Modifier and Type | Class and Description |
|---|---|
static class |
UserHomes.AlertState
AlertState
|
static class |
UserHomes.OpenCrxUserSettings
OpenCrxUserSettings
|
static class |
UserHomes.TimerState
TimerState
|
| Modifier and Type | Field and Description |
|---|---|
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 |
static String |
RESET_PASSWORD_PREFIX |
| Modifier | Constructor and Description |
|---|---|
protected |
UserHomes()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyUserSettings(UserHome userHome,
int currentPerspective,
Properties settings,
boolean doNotInitUserHome,
boolean storeSettings,
PrincipalGroup primaryGroup,
String settingTimezone,
String settingStoreSettingsOnLogoff,
String settingDefaultEmailAccount,
String settingSendmailSubjectPrefix,
String settingWebAccessUrl,
String settingTopNavigationShowMax,
Boolean settingHideWorkspaceDashboard,
List<String> settingRootObjects,
Map<String,String> settingSubscriptions)
Initializes a user's home and settings.
|
void |
applyUserSettings(UserHome userHome,
int currentPerspective,
Properties settings,
boolean storeSettings,
PrincipalGroup primaryGroup,
UserHomes.OpenCrxUserSettings newSettings,
boolean doNotInitUserHome)
Applies the newSettings to settings.
|
short |
changePassword(org.openmdx.security.authentication1.jmi1.Password passwordCredential,
String oldPassword,
String password)
Change password.
|
short |
changePassword(UserHome userHome,
String oldPassword,
String newPassword,
String newPasswordVerification)
Change password for given user.
|
org.openmdx.security.authentication1.jmi1.Password |
createPasswordCredential(org.openmdx.security.realm1.jmi1.Subject subject,
List<String> errors)
Create a password credential for given subject.
|
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,
String eMailAddress,
String timezone,
List<String> errors)
Create a new user home.
|
Properties |
getDefaultUserSettings(UserHome userHome)
Get default user settings for given user.
|
static UserHomes |
getInstance()
Get registered UserHomes backend.
|
protected Object |
getMessageValue(Object message,
String feature)
Extract value for given feature from message.
|
protected String |
getRequestPasswordResetNotificationTemplate(UserHome userHome)
Get template for the request password reset notification alert.
|
UserHome |
getUserHome(org.openmdx.base.naming.Path from,
javax.jdo.PersistenceManager pm)
Get user home.
|
UserHome |
getUserHome(org.openmdx.base.naming.Path from,
javax.jdo.PersistenceManager pm,
boolean useRunAsPrincipal)
Get user home.
|
UserHome |
getUserHome(String user,
org.openmdx.base.naming.Path from,
javax.jdo.PersistenceManager pm)
Get user home.
|
UserHome |
getUserHome(String user,
org.openmdx.base.naming.Path from,
javax.jdo.PersistenceManager pm,
boolean useRunAsPrincipal)
Get user home.
|
Segment |
getUserHomeSegment(javax.jdo.PersistenceManager pm,
String providerName,
String segmentName)
Returns the user home segment.
|
Properties |
getUserSettings(UserHome userHome)
Get settings of given user.
|
String |
getUserTimezone(Properties settings)
Get timezone property.
|
String |
getWebAccessUrl(UserHome userHome)
Get web access url.
|
String |
importUsers(Segment homeSegment,
byte[] item)
Import users from given stream (as byte[]).
|
void |
initUserHome(UserHome userHome)
Initializes user home.
|
void |
markAsAccepted(Alert alert)
Set alert state to ACCEPTED.
|
void |
markAsNew(Alert alert)
Set alert state to NEW.
|
void |
markAsRead(Alert alert)
Set alert state to READ.
|
void |
preDelete(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object,
boolean preDelete)
Pre-delete callback.
|
void |
preStore(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object)
Pre-store callback.
|
void |
refreshItems(UserHome userHome)
Refresh items on given user home.
|
static void |
register()
Register this backend.
|
void |
requestPasswordReset(UserHome userHome)
Request password reset.
|
ObjectFinder |
searchAdvanced(UserHome userHome,
String allWords,
String atLeastOneOfTheWords,
String withoutWords)
Create object finder according to given advanced search criteria.
|
ObjectFinder |
searchBasic(UserHome userHome,
String searchExpression)
Create object finder according to given basic search criteria.
|
protected boolean |
subscriptionEventTypeMatches(Subscription subscription,
org.openmdx.base.jmi1.ContextCapable message)
Test whether subscription accepts given event type.
|
protected boolean |
subscriptionFilterMatches(Subscription subscription,
Object message,
String filterName,
Set<String> filterValues)
Test if message matches the given subscription filter.
|
boolean |
subscriptionMatches(Subscription subscription,
org.openmdx.base.jmi1.ContextCapable message)
Return true if subscription matches message.
|
boolean |
subscriptionTopicMatches(Subscription subscription,
org.openmdx.base.jmi1.ContextCapable message)
Return true if the topic XRI pattern matches the message XRI.
|
boolean |
testPasswordPolicy(String password)
Default implementation does not enforce a password policy.
|
void |
updateTimer(Timer timer)
Update derived attributes of given timer.
|
getInstance, getUidAsString, registerImplpublic static final short CHANGE_PASSWORD_OK
public static final short MISSING_NEW_PASSWORD
public static final short MISSING_NEW_PASSWORD_VERIFICATION
public static final short PASSWORD_VERIFICATION_MISMATCH
public static final short CAN_NOT_RETRIEVE_REQUESTED_PRINCIPAL
public static final short CAN_NOT_CHANGE_PASSWORD
public static final short MISSING_OLD_PASSWORD
public static final short OLD_PASSWORD_VERIFICATION_MISMATCH
public static final short PASSWORD_POLICY_VIOLATION
public static final String RESET_PASSWORD_PREFIX
public static void register()
public static UserHomes getInstance() throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceExceptionpublic void markAsAccepted(Alert alert) throws org.openmdx.base.exception.ServiceException
alert - org.openmdx.base.exception.ServiceExceptionpublic void markAsRead(Alert alert) throws org.openmdx.base.exception.ServiceException
alert - org.openmdx.base.exception.ServiceExceptionpublic void markAsNew(Alert alert) throws org.openmdx.base.exception.ServiceException
alert - org.openmdx.base.exception.ServiceExceptionpublic Segment getUserHomeSegment(javax.jdo.PersistenceManager pm, String providerName, String segmentName)
pm - providerName - segmentName - public void refreshItems(UserHome userHome) throws org.openmdx.base.exception.ServiceException
userHome - org.openmdx.base.exception.ServiceExceptionprotected String getRequestPasswordResetNotificationTemplate(UserHome userHome) throws org.openmdx.base.exception.ServiceException
userHome - org.openmdx.base.exception.ServiceExceptionpublic void requestPasswordReset(UserHome userHome) throws org.openmdx.base.exception.ServiceException
userHome - org.openmdx.base.exception.ServiceExceptionpublic UserHome getUserHome(org.openmdx.base.naming.Path from, javax.jdo.PersistenceManager pm) throws org.openmdx.base.exception.ServiceException
from - pm - org.openmdx.base.exception.ServiceExceptionpublic UserHome getUserHome(org.openmdx.base.naming.Path from, javax.jdo.PersistenceManager pm, boolean useRunAsPrincipal) throws org.openmdx.base.exception.ServiceException
from - pm - useRunAsPrincipal - org.openmdx.base.exception.ServiceExceptionpublic UserHome getUserHome(String user, org.openmdx.base.naming.Path from, javax.jdo.PersistenceManager pm) throws org.openmdx.base.exception.ServiceException
user - from - pm - org.openmdx.base.exception.ServiceExceptionpublic UserHome getUserHome(String user, org.openmdx.base.naming.Path from, javax.jdo.PersistenceManager pm, boolean useRunAsPrincipal) throws org.openmdx.base.exception.ServiceException
user - from - pm - useRunAsPrincipal - org.openmdx.base.exception.ServiceExceptionpublic org.openmdx.security.authentication1.jmi1.Password createPasswordCredential(org.openmdx.security.realm1.jmi1.Subject subject,
List<String> errors)
subject - errors - public short changePassword(org.openmdx.security.authentication1.jmi1.Password passwordCredential,
String oldPassword,
String password)
passwordCredential - oldPassword - password - public boolean testPasswordPolicy(String password)
password - public short changePassword(UserHome userHome, String oldPassword, String newPassword, String newPasswordVerification)
userHome - oldPassword - newPassword - newPasswordVerification - 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, String eMailAddress, String timezone, List<String> errors) throws org.openmdx.base.exception.ServiceException
realm - contact - primaryGroup - principalName - requiredGroups - isAdministrator - initialPassword - initialPasswordVerification - eMailAddress - timezone - errors - org.openmdx.base.exception.ServiceExceptionpublic String importUsers(Segment homeSegment, byte[] item) throws org.openmdx.base.exception.ServiceException
homeSegment - item - org.openmdx.base.exception.ServiceExceptionpublic ObjectFinder searchBasic(UserHome userHome, String searchExpression) throws org.openmdx.base.exception.ServiceException
userHome - searchExpression - org.openmdx.base.exception.ServiceExceptionpublic ObjectFinder searchAdvanced(UserHome userHome, String allWords, String atLeastOneOfTheWords, String withoutWords) throws org.openmdx.base.exception.ServiceException
userHome - allWords - atLeastOneOfTheWords - withoutWords - org.openmdx.base.exception.ServiceExceptionpublic String getWebAccessUrl(UserHome userHome)
userHome - public void applyUserSettings(UserHome userHome, int currentPerspective, Properties settings, boolean doNotInitUserHome, boolean storeSettings, PrincipalGroup primaryGroup, String settingTimezone, String settingStoreSettingsOnLogoff, String settingDefaultEmailAccount, String settingSendmailSubjectPrefix, String settingWebAccessUrl, String settingTopNavigationShowMax, Boolean settingHideWorkspaceDashboard, List<String> settingRootObjects, Map<String,String> settingSubscriptions) throws org.openmdx.base.exception.ServiceException
userHome - currentPerspective - settings - doNotInitUserHome - storeSettings - primaryGroup - settingTimezone - settingStoreSettingsOnLogoff - settingDefaultEmailAccount - settingSendmailSubjectPrefix - settingWebAccessUrl - settingTopNavigationShowMax - settingHideWorkspaceDashboard - settingRootObjects - settingSubscriptions - org.openmdx.base.exception.ServiceExceptionpublic void applyUserSettings(UserHome userHome, int currentPerspective, Properties settings, boolean storeSettings, PrincipalGroup primaryGroup, UserHomes.OpenCrxUserSettings newSettings, boolean doNotInitUserHome) throws org.openmdx.base.exception.ServiceException
initUserHome(UserHome)
is called. The settings are stored on userHome if storeSettings is true.userHome - currentPerspective - settings - storeSettings - primaryGroup - newSettings - doNotInitUserHome - org.openmdx.base.exception.ServiceExceptionpublic void initUserHome(UserHome userHome) throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceExceptionpublic Properties getUserSettings(UserHome userHome) throws org.openmdx.base.exception.ServiceException
userHome - org.openmdx.base.exception.ServiceExceptionpublic Properties getDefaultUserSettings(UserHome userHome) throws org.openmdx.base.exception.ServiceException
userHome - org.openmdx.base.exception.ServiceExceptionpublic String getUserTimezone(Properties settings) throws org.openmdx.base.exception.ServiceException
settings - org.openmdx.base.exception.ServiceExceptionpublic void updateTimer(Timer timer) throws org.openmdx.base.exception.ServiceException
timer - org.openmdx.base.exception.ServiceExceptionprotected Object getMessageValue(Object message, String feature)
message - feature - protected boolean subscriptionEventTypeMatches(Subscription subscription, org.openmdx.base.jmi1.ContextCapable message)
subscription - eventType - protected boolean subscriptionFilterMatches(Subscription subscription, Object message, String filterName, Set<String> filterValues)
filterName - filterValue - message - public boolean subscriptionTopicMatches(Subscription subscription, org.openmdx.base.jmi1.ContextCapable message)
subscription - message - public boolean subscriptionMatches(Subscription subscription, org.openmdx.base.jmi1.ContextCapable message) throws org.openmdx.base.exception.ServiceException
subscription - message - org.openmdx.base.exception.ServiceExceptionpublic void preDelete(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object,
boolean preDelete)
throws org.openmdx.base.exception.ServiceException
AbstractImplpreDelete in class AbstractImplorg.openmdx.base.exception.ServiceExceptionpublic void preStore(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object)
throws org.openmdx.base.exception.ServiceException
AbstractImplpreStore in class AbstractImplorg.openmdx.base.exception.ServiceExceptionThis software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.