◆ loadAttribute()
void org.turro.elephant.impl.security.UserProfileMap.loadAttribute |
( |
String |
name, |
|
|
RoleValue |
values |
|
) |
| |
Definition at line 110 of file UserProfileMap.java.
111 if(!containsKey(name)) {
112 put(name,
new RoleValue(
new String[] {}));
void loadFrom(RoleAttribute attributes)
◆ loadFrom()
void org.turro.elephant.impl.security.UserProfileMap.loadFrom |
( |
RoleAttribute |
attributes | ) |
|
Definition at line 104 of file UserProfileMap.java.
105 for(String name : attributes.keySet()) {
void loadAttribute(String name, RoleValue values)
◆ loadFromContact()
static UserProfileMap org.turro.elephant.impl.security.UserProfileMap.loadFromContact |
( |
IContact |
contact | ) |
throws IOException |
|
static |
Definition at line 54 of file UserProfileMap.java.
55 ProfileMap pm = ProfileMap.loadProfiles();
56 UserProfileMap upm =
new UserProfileMap();
57 if(contact.isValid()) {
58 for(String role : contact.getRoles()) {
59 upm.loadFromProfile(pm, role);
60 upm.put(
"#" + role,
new RoleValue(
new String[] {
"on" }));
62 for(String syndication : contact.getSyndications()) {
63 upm.put(
"@" + syndication,
new RoleValue(
new String[] {
"on" }));
65 if(contact.isUser()) {
66 IProfile profile = contact.getProfile();
67 if(contact.isAdmin()) {
68 upm.put(
"@admin",
new RoleValue(
new String[] {
"is" }));
70 if(profile.isWorker()) {
71 upm.put(
"@worker",
new RoleValue(
new String[] {
"is" }));
73 if(profile.isStudent()) {
74 upm.put(
"@student",
new RoleValue(
new String[] {
"is" }));
76 if(profile.isResponsible()) {
77 upm.put(
"@responsible",
new RoleValue(
new String[] {
"is" }));
79 if(profile.isHHRR()) {
80 upm.put(
"@hhrr",
new RoleValue(
new String[] {
"is" }));
82 if(profile.isCompanyHHRR()) {
83 upm.put(
"@companyhhrr",
new RoleValue(
new String[] {
"is" }));
85 if(profile.isCenterHHRR()) {
86 upm.put(
"@centerhhrr",
new RoleValue(
new String[] {
"is" }));
88 if(profile.isCenterHHRR()) {
89 upm.put(
"@translator",
new RoleValue(
new String[] {
"is" }));
◆ loadFromProfile()
void org.turro.elephant.impl.security.UserProfileMap.loadFromProfile |
( |
ProfileMap |
profiles, |
|
|
String |
profile |
|
) |
| |
Definition at line 96 of file UserProfileMap.java.
97 if(profiles !=
null) {
98 if(profiles.containsKey(profile)) {
◆ loadFromUser()
static UserProfileMap org.turro.elephant.impl.security.UserProfileMap.loadFromUser |
( |
Element |
user | ) |
throws IOException |
|
static |
Definition at line 40 of file UserProfileMap.java.
41 ProfileMap pm = ProfileMap.loadProfiles();
42 UserProfileMap upm =
new UserProfileMap();
44 List<Element> roles = XPath.selectNodes(user,
"role");
45 for(Element el : roles) {
46 upm.loadFromProfile(pm, el.getAttributeValue(
"name"));
48 }
catch (JDOMException ex) {
49 Logger.getLogger(UserProfileMap.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
◆ USERS_CONFIGURATION
final String org.turro.elephant.impl.security.UserProfileMap.USERS_CONFIGURATION = "/WEB-INF/elephant/conf/xpusers.xml" |
|
static |
The documentation for this class was generated from the following file: