Package ch.ivyteam.ivy.security.user
Interface IUserRepository
public interface IUserRepository
User repository to create, delete, find, query
users
of a security context (application)- Since:
- 8.0.3
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionlong
count()
Count all usersCreates a new userCreates a new userCreates a new uservoid
Deletes a well-known userFinds a user by its name.Find a user by its identifierfindWithExternalLookup
(String userName) Find a user by its name.paged()
Gets a paged result with all users of this security contextpaged
(int pageSize) Gets a paged result with all users of this security contextquery()
Creates a new user query for this security contextExecutor foruser queries
on this security context.system()
Gets the system user
-
Method Details
-
create
Creates a new user- Parameters:
userName
- name of the user- Returns:
- new created user
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
create
Creates a new user- Parameters:
userName
- name of the userpassword
- the password of the user- Returns:
- new created user
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
create
Creates a new user- Parameters:
newUser
- information about the new user- Returns:
- new created user
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS UserCreate PERMISSION OR OWNS UserCreate@SYSTEM PERMISSION
-
delete
Deletes a well-known user- Parameters:
userName
- The user name- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS UserDelete PERMISSION OR OWNS UserDelete@SYSTEM PERMISSION
-
findWithExternalLookup
Find a user by its name. Does lookup the user in the external security system (e.g Active Directory) if the user is not yet synchronized.- Parameters:
userName
- the name of the user to find- Returns:
- user or
null
if no user with the name exists (also in the external security system if configured) - Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS UserReadAll PERMISSION OR OWNS UserReadAll@SYSTEM PERMISSION
-
find
Finds a user by its name. Does not lookup the user in the external security system (e.g Active Directory) if the user is not synchronized yet.- Parameters:
userName
- the name of the user to find- Returns:
- user or
null
if no user with the name exists or the user was not yet synchronized from the external security system - Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
- Security:
- SESSION OWNS UserReadAll PERMISSION OR OWNS UserReadAll@SYSTEM PERMISSION
-
findById
Find a user by its identifier- Parameters:
securityMemberId
- the identifier of the user- Returns:
- the user or null if user is not found
- Throws:
PersistencyException
- if persistency access fails- Since:
- 9.4
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS UserReadAll PERMISSION OR OWNS UserReadAll@SYSTEM PERMISSION
-
system
IUser system()Gets the system user- Returns:
- system user
- Since:
- 9.3
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS UserReadAll PERMISSION OR OWNS UserReadAll@SYSTEM PERMISSION
-
paged
IPagedResult<IUser> paged()Gets a paged result with all users of this security context
This method uses a default, system defined page size (1000) which does not harm memory and provides still good performance.
- Returns:
- paged result with all users
- See Also:
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS UserReadAll PERMISSION OR OWNS UserReadAll@SYSTEM PERMISSION
-
paged
Gets a paged result with all users of this security context- Parameters:
pageSize
- the maximum number of users loaded at once into memory On paged UI tables the number of objects you display on a single page.- Returns:
- paged result with all users
- See Also:
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS UserReadAll PERMISSION OR OWNS UserReadAll@SYSTEM PERMISSION
-
query
UserQuery query()Creates a new user query for this security context- Returns:
- query
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
queryExecutor
IUserQueryExecutor queryExecutor()Executor for
user queries
on this security context.A user query normally works without using this method. It is only required to use it for special use cases
-
count
long count()Count all users- Returns:
- user count
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-