public class SimpleUserSystemServiceHelper extends Object
and additionally facilitates the reading of user attributes like skills and affinities in a similar format. e.g. skills.properties: user1=skill1,skill2 user2=skill3
e.g. affinities.properties user1=affinity1,affinity2
When configured, the users skills will be loaded in the SKILLS_ATTRIBUTE_NAME. Following the example above user.getAttributes().get(SKILLS_ATTRIBUTE_NAME) will return the String "skill1,skill2");
When configured, the users affinities will be loaded in the AFFINITIES_ATTRIBUTE_NAME. Following the example above user1.getAttributes().get(AFFINITIES_ATTRIBUTE_NAME) will return the String "affinity1,affinity2"); and user2.getAttributes().get(AFFINITIES_ATTRIBUTE_NAME) will return null.
| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleUserSystemServiceHelper.UserGroupInfo |
| Modifier and Type | Field and Description |
|---|---|
static String |
AFFINITIES_ATTRIBUTE_NAME |
static String |
SKILLS_ATTRIBUTE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static SimpleUserSystemServiceHelper.UserGroupInfo |
buildInfo(InputStream usersIn,
InputStream skillsIn,
InputStream affinitiesIn)
Reads the users definitions for a file in the Wildfly roles.properties definition file format.
|
static SimpleUserSystemServiceHelper.UserGroupInfo |
buildInfo(Path users,
Path skills,
Path affinities)
Reads the users definitions from a file using the Wildfly roles.properties definition file format.
|
public static final String SKILLS_ATTRIBUTE_NAME
public static final String AFFINITIES_ATTRIBUTE_NAME
public static SimpleUserSystemServiceHelper.UserGroupInfo buildInfo(Path users, Path skills, Path affinities) throws IOException
users - a path to the user + roles file in the WF format.skills - an optional path to the users skills file.affinities - an optional path to the users affinities file.IOException - if an I/O error occurspublic static SimpleUserSystemServiceHelper.UserGroupInfo buildInfo(InputStream usersIn, InputStream skillsIn, InputStream affinitiesIn) throws IOException
usersIn - InputStream with the user + roles file in the WF format.skillsIn - InputStream with the users skills.affinitiesIn - InputStream with the users affinities.IOException - if an I/O error occursCopyright © 2001–2021 JBoss by Red Hat. All rights reserved.