streamEventBuilder() | StreamEventBeanBuilder | Used to create a StreamEventBean object |
checkValidPassword(String password, Profile profile) | boolean | Checks to see if the password is valid, ie complies with all password complexity policies attached to the profile |
checkValidPassword(String password, Profile profile, Narrative narrative) | boolean | Checks to see if the password is valid, ie complies with all password complexity policies attached to the profile |
isSecondFactorAuthentificationEnabled(Profile profile) | Boolean | |
temp2FACode(Profile profile) | Temp2FAData | |
save2FACode(Profile profile, String secretKey, String userCode2FA) | void | |
disable2FA(Profile profile) | void | |
blockEntity(BaseEntity blockedEntity, Date blockUntilDate) | AccessBlock | |
findActiveBlocksForEntity(BaseEntity block) | List<AccessBlock> | |
findBlocksForEntity(BaseEntity block) | List<AccessBlock> | |
findBlockById(long id) | AccessBlock | |
deleteBlock(AccessBlock ab) | void | |
findRole(String role) | Role | |
addRoleToGroupForOrg(Role foundRole, Group group, Organisation org) | GroupRole | |
addRoleToGroupForOwnOrg(Role foundRole, Group group) | GroupRole | |
newProfileBuilder() | ProfileBuilder | Creates an instance of a ProfileBuilder which is a convenient way to create new Profiles
<p>
Set properties on the ProfileBuilder and then call its build() method to create the profile |
removeLoginIds(Profile forUser, List<String> nonces) | int | |
deleteMembership(GroupMembership membership) | void | |
getMembership(Long id) | GroupMembership | |
isInHomeOrg(Profile profile) | boolean | Check to see if the given profile has the current account as its home admin org, or if its home admin org is within the current account |
verifyPassword(Profile user, String password) | boolean | Verify that the provided password matches that saved. <br>
Use this with login(Profile) to implement a custom login process |
login(Profile loginAsProfile) | void | Sets login cookies for the current request to login the given user |
loginToken(Website website, Branch branch, Profile loginAsProfile, String path) | WebUtils.ExtUrl | Returns a ExtUrl, where object1 is the URL including login tokens for the given website and branch, and object2 is the domain name used in the
URL and which the login tokens are valid for |
loginToken(Profile profile) | String | |
getCurrentLoginNonce() | LoginNonceBean | The login nonce for the current request, or null if there is no current request / nonce. Lets templates and JS tell whether the current session
is a (read-only) login-as session and who initiated it. |
isReadOnlyLoginAs() | boolean | Convenience for controllers: true if the current session is a read-only login-as session. The platform already strips WRITE/ACL priviledges for
such sessions; controllers should call this to also block mutating actions that are gated at READ_CONTENT (eg placing orders, spending points,
editing profile) and so are not covered by the WRITE strip. |
getLoginAsImpersonatedProfile() | Profile | For a login-as session, the participant being impersonated, otherwise null. |
getLoginAsInitiatingProfile() | Profile | For a login-as session, the manager/admin who initiated the login-as, otherwise null. |
findEntityById(Long id) | BaseEntity | |
membershipListForOrg(Organisation orgPart) | MembershipList | |
membershipList(List<ProfileBean> profileBeans) | MembershipList | |
membershipListForProfiles(List<Profile> profiles) | MembershipList | |
members(List<Profile> profiles) | List<GroupMembership> | Load the list of GroupMembership for the given profiles efficiently |
membershipList(Profile p) | MembershipList | Return a MembershipList with memberships for the given profile. This provides methods to allow filtering by group, organisation, etc <br>
This excludes expired memberships |
findProfileOrgsWithRoles(Profile p, String roles) | List<Organisation> | Return a list of organisations which the profile has specific roles on |
membershipListForGroup(Group group) | MembershipList | Get MembershipList from a group |
membershipListForGroup(String groupName) | MembershipList | Get MembershipList from a group code |
findAddresses(BaseEntity entity) | List<EntityAddress> | Find all addressess associated with the given entity (user or organisation) |
findAddressByType(BaseEntity entity, String addressType) | EntityAddress | Find all address associated with the given entity (user or organisation) and given address type |
findAllAddresses(BaseEntity entity) | Map<String,IReadableAddress> | Returns all addresses which are applicable for the given entity. This is broader then findAddresses because for users it will include the
addresses of their orgs, and it will include the address on the org itself plus any EntityAddress records associated with it |
findAllAddresses(BaseEntity entity, boolean includeRelated) | Map<String,IReadableAddress> | Returns all addresses which are applicable for the given entity. This is broader then findAddresses because for users it will include the
addresses of their orgs, and it will include the address on the org itself plus any EntityAddress records associated with it |
findAddress(Profile profile, Long entityAddressId) | EntityAddress | Find an address specified by the ID of the entity address (not the Address itself) for a given entity
<p>
Returns null if the EntityAddress does not exist, or is not associated with the given entity |
updateAddress(Profile profile, FormContext rc) | EntityAddress | Update or create profile address |
updateAddress(Profile profile, Long entityAddressId, FormContext rc, String type) | EntityAddress | |
findAllMembershipApplications(Profile profile) | List<GroupMembershipApplication> | |
findPendingMembershipApplications(Profile profile) | List<GroupMembershipApplication> | |
createUser(String email, String nickName) | Profile | |
removeMember(Profile profile) | void | Remove a profile |
extraFields(Profile p) | Map<ExtraField,String> | Returns a map where the key is ExtraField (so with meta data) and the value is the value of the extra field, for primary memberships only |
extraFields(Profile p, boolean primaryOnly) | Map<ExtraField,String> | Returns a map where the key is ExtraField (so with meta data) and the value is the value of the extra field |
updateProfile(Profile p, FormContext context) | Profile | update given profile with given form context |
updateProfileStatus(Profile profile, Boolean enable) | void | |
extraFieldValues(Profile p) | Map<String,String> | |
extraFields(MembershipBean bean) | Map<ExtraField,String> | |
extraFieldValue(MembershipBean bean, String fieldName) | String | |
updateUser(Profile p) | void | Just saves any updates to the profile object, and triggers a reindex of it |
addExtraField(Group group, String name, String value) | void | Add a new extra field definition to a given group |
removeExtraField(Group group, String name) | void | Remove a new extra field definition to a given group |
updateExtraFieldOrdering(Group group, String fieldName, int ordering) | void | Update extra fields ordering for a given group |
storeExtraFields(GroupMembership gm, Map<String,String> parameters) | void | Saves custom fields for a single membership.Assumes fields are in the params map with the same field as defined on the membership group |
storeExtraFields(GroupMembership gm, FormContext form) | void | Saves custom fields for a single membership.Assumes fields are in the parameters map or files map of the form context object with the same |
storeExtraFields(Profile p, Map<String,String> parameters) | void | Store profile extra fields from a map of parameters |
extraFieldDefinitions(Group group) | List<ExtraField> | Get the list of custom/extra field defiitions for the given group |
saveToFieldSet(List<ExtraField> extraFields, Map<String,String> parameters, Map<String,FileItem> files) | NvSet | Save the given values to a Name/Value field set.
<p>
Use extraFieldDefinitions(group) to get the list of field definitions |
uploadExtraFieldFile(FileItem fileItem, List<String> allowedMimeTypes) | String | Upload a file to ExtraField_Files folder |
group(String groupName) | Group | |
group(long id) | Group | |
getGroups() | List<Group> | All groups in this account |
findGroupPasswordPolicies(Group group) | List<PasswordPolicyBean> | |
findPasswordPolicyDescription(PasswordPolicyBean passwordPolicy) | String | |
findOrg(String orgId) | Organisation | |
findOrg(Long id) | Organisation | |
findOrgTypeByName(String sOrgType) | OrgType | |
findOrgTypeById(long id) | OrgType | |
findBaseEntity(Long id) | BaseEntity | |
findOrCreateMembership(Profile profile, Group group, Organisation org) | GroupMembership | Find a membership which matches the profile, org and group, and if none exist create it. Return either the found or created membership.
<p>
When this creates a membership it will also create a SignupLog and will fire events |
findOrCreateMembership(Profile profile, Group group, Organisation org, BiConsumer<GroupMembership,SignupLog> membershipCreatedCallback) | GroupMembership | This overload allows passing in a callback, which gets called with the GroupMembership and SignupLog. This is called prior to event processing,
so is a good place to store extra fields etc which might be used by event processing, eg sending emails etc |
updateMembership(GroupMembership membership, Group newGroup, Organisation newOrg) | void | Update membership |
newMembershipApplication(Profile profile, Group group, Organisation org, FormContext form) | GroupMembershipApplication | |
createOptinLog(Profile profile, Group group) | OptInLog | |
findByName(String name) | Profile | |
findByEmail(String email) | Profile | |
findByUsernameOrEmail(String userNameOrEmail) | Profile | Find a profile by username or email |
findById(Long id) | Profile | Lookup a Profile by its internal ID (not username). This will only return profiles which are enabled, and have the current org as their home
account |
findMatchingProfiles(UserDao.ProfileMatchRequest request) | List<Profile> | |
findMatching(UserDao.ProfileMatchRequest request) | List<ExtProfileBean> | Find any enabled profiles with either phone or email |
findMatching(UserDao.ProfileMatchRequest included, UserDao.ProfileMatchRequest excluded) | List<ExtProfileBean> | |
newProfileMatchRequest() | UserDao.ProfileMatchRequest | Create a new match request object. You can then set search values on that object, and use it to call the findMatching method |
numProfiles(String q, Organisation org, Group searchGroup) | Long | |
processOptIns(Profile profile, Group group, Map<String,String> parameters) | void | |
findOptins(Group group) | List<OptIn> | Get the list of configured list of OptIn for the given group |
findChildMembershipByField(String groupName, String fieldName, Object ovalue, boolean contains) | MembershipBean | |
mergeProfiles(ProfileBean mergeDestination, List<ProfileBean> mergeSources) | void | |
mergeProfiles(Profile mergeDest, List<Long> mergeSources) | int | |
groups() | List<Group> | Find all groups (not soft deleted) for the current admin domain |
orgTypes() | List<OrgType> | Return all org types for the current admin domain |
toProfileBean(Profile p) | ExtProfileBean | |
toOrgData(Organisation org) | OrgData | |
toOrg(OrgData od) | Organisation | |
toOrgList(List<OrgData> orgDatas) | List<Organisation> | |
findHighest(List<Organisation> orgs) | Organisation | Find the organisation highest in the org hierarchy, ie the one with the fewest parent orgs |
members(Group group, Organisation org) | List<Profile> | Find users (profiles) within a given gruop for a given organisation (ie team)
<p>
DEPRECATED: this doesnt evaluate dyamic groups, use findMembers |
findMembers(Group group) | List<Profile> | Uses GroupManager, so dynamic and normal groups are handled correctly |
numMembers(Group group) | Long | Find the number of members in the given group. This may be physical or a dynamic group |
members(Group group, SearchProperties props) | List<Profile> | |
memberships(Organisation org) | List<GroupMembership> | Find all members for given org |
memberships(Group group, Organisation org) | List<GroupMembership> | |
memberships(Profile profile, Organisation org) | List<GroupMembership> | |
memberships(Profile profile, Group group) | List<GroupMembership> | |
memberships(Profile profile, OrgType teamOrgType) | List<GroupMembership> | |
setMembershipField(MembershipBean membershipBean, String fieldName, String fieldValue) | void | |
findDuplicates(DuplicateProfileMatchMethod matchMethod, MergeDestMode mode) | List<DuplicateProfilesList> | |
findGroupByName(String groupName) | Group | |
findGroupById(Long id) | Group | |
findByOrg(Organisation team) | List<Profile> | |
findByOrgType(OrgType ot) | List<Profile> | |
hasAdminUserRole(Organisation memberOrg) | boolean | Helper method to determine if the current user has admin role |
processPending(GroupMembershipApplication gma, Boolean b) | void | Accept or reject a GroupMembershipApplication The latest related email verification request will be processed, if found. |
processPending(GroupMembershipApplication gma, EmailValidationRequest emailValidationRequest, Boolean b) | void | Accept or reject a GroupMembershipApplication if emailValidationRequest is provided, it will be marked as verified |
setPassword(Profile user, String newPassword) | void | |
generatePasswordReset(Profile user, Website website) | PasswordReset | Generate passwordReset object for generating password reset token |
findPasswordReset(String token, Website website) | PasswordReset | |
findPasswordReset(Profile profile, String token, Website website) | PasswordReset | |
updateProfilesForOrg(Organisation org) | void | Update profiles index for all profiles with memberships to the given org |
isPhoneUniqueEnabled() | boolean | Returns true if the account has unique phone number enabled |
getAllRoles() | List<Map<String,String>> | Returns a list of available roles for the current account |
isEmailVerificationEnabled() | boolean | Email verification is enabled or not in the UserApp setting. |
findEmailVerificationSubject(WebsiteRootFolder websiteRootFolder) | String | Get subject for email verification message UserApp setting. |
findLatestActiveRequest(Profile profile) | EmailValidationRequest | Find the latest {@code EmailValidationRequest} by the provided profile |
sendEmailVerification(GroupMembershipApplication groupMembershipApplication) | EmailValidationRequest | Create a {@code EmailValidationRequest} for a {@code GroupMembershipApplication} and send the email |
sendEmailVerification(Profile profile, String email, Website website) | EmailValidationRequest | Create a {@code EmailValidationRequest} for a profile and send the email |
findValidEmailVerificationRequestByToken(String token, Date currentDate, Narrative narrative) | EmailValidationRequest | Returns a {@code EmailValidationRequest} if the provided token exists and is not expired. The error detail will be passed to the narrative
parameter |
approveEmailVerificationRequest(EmailValidationRequest emailValidationRequest, Date approvedDate, boolean fireUserUpdateEvent) | EmailValidationRequest | Returns a approve a email verification request |
submitMembershipApplicationRequest(MembershipApplicationRequest mar) | GroupMembershipApplication | |
membershipOrgProperties(GroupMembershipApplication gma) | Map<String,Object> | |
findUnsubs(Profile p) | List<Unsubscribe> | Returns unsubscribes linked to the given profile OR its email address |
findUnsubs(String groupName, SearchProperties searchProperties) | List<Unsubscribe> | Returns unsubscribes within current tenant |
findUnsubs(SearchProperties searchProperties) | List<Unsubscribe> | Returns unsubscribes within current tenant |
countUnsubs() | long | count all unsubs of current tenant org |
countUnsubs(String groupName) | long | count all unsubs of current tenant org |
findUnsubGroupSummary() | List<GroupSignupStat> | find unsub group summary |
findUnsubProfileIdsByOrg() | List<Long> | Return a list of unsubscribed profile IDs associated with the current account from the cache |
findUnsubEmailsByOrg() | List<String> | Return a list of unsubscribed emails associated with the current account from the cache |
hasOrgType(Organisation org, OrgType expectedOrgType) | boolean | |
createRulesGroup(String name, String title, String json) | Group | |
createGroup(String name, String title, String groupType, String regoMode) | Group | Create a Group with the given name and properties
<p>
Throws an exception if a group with the given name already exists |
deleteGroup(Group group) | void | |
newConfigMessage(String level, String message) | ConfigMessage | |
findNonces(Profile profile, Date start, Date finish) | List<LoginNonce> | |
findAuditStats(Profile p) | Map<Date,Integer> | Returns the number of changes to the given item by Date |
findAuditItems(Profile p, Integer max) | List<AuditItem> | |
hasCredentials(Profile p) | boolean | Returns true if the user has a password or other credential |
isValidUserName(String value) | boolean | |
findPasswordReset(Profile profile, Website website, String shortCode) | PasswordReset | |
generatePasswordReset(Profile user, Website website, String shortCode) | PasswordReset | |
subscriptionAction(String action) | SubscriptionEvent.SubscriptionAction | Get enum SubscriptionAction from string value |
homeAdminOrgInfo(Profile p) | HomeOrgInfo | |
findPrimaryMemberships(Profile p) | MembershipList | |
findPrimaryMembershipsOrgs(Profile p) | OrgDataList | |
findPrimaryMembershipsOrgs(Profile p, boolean nonRoot) | OrgDataList | |
unsubscribe(Profile profile, Website website) | void | unsubscribe a profile |
invalidateNonce(String nonce) | void | invalidate login nonce |
addToGroupWithoutEvent(Profile profile, Group groupToJoin, Organisation orgToJoin) | GroupMembership | Create user membership without firing any events or re-indexing <br>
You MUST call updateUser(p) after this to ensure the profile index is updated |
addToGroup(Profile profile, Group groupToJoin, Organisation orgToJoin) | GroupMembership | Create user membership with firing any events and re-indexing <br>
If you are making multiple group modifications per profile it may be more efficient to use addToGroupWithoutEvent and then call updateUser once
all changes to a profile are done |
newLoginNonceSearchBuilder() | LoginNonceSearchBuilder | Create a new LoginNonceSearchBuilder to search for login nonces |