18 package org.turro.plugin.contacts;
20 import java.io.IOException;
21 import java.io.Serializable;
22 import java.util.ArrayList;
23 import java.util.List;
24 import java.util.logging.Level;
25 import java.util.logging.Logger;
26 import org.turro.annotation.ElephantContact;
27 import org.turro.elephant.context.Application;
28 import org.turro.elephant.impl.context.ContextFactory;
29 import org.turro.elephant.security.IUser;
30 import org.turro.elephant.security.IUserAdmin;
36 @ElephantContact(priority=2)
64 if(contact instanceof
IUser) {
65 user = (
IUser) contact;
76 return user !=
null ? user.getId() :
null;
86 return user !=
null ? user.getId() :
null;
91 return user !=
null ? user.getName() :
null;
101 return new ArrayList<IContact>();
107 if(
id !=
null && value !=
null) {
110 }
catch (IOException ex) {
126 uAdmin.
setName(user.getId(), value);
127 }
catch (IOException ex) {
136 if(newValue !=
null && newValue.trim().length() > 0 && newValue.equals(repeatValue)) {
139 }
catch (IOException ex) {
152 return user !=
null && user.isValid();
157 return user.
validate(user.getId(), password);
181 throw new UnsupportedOperationException(
"Not supported yet.");
186 throw new UnsupportedOperationException(
"Not supported yet.");
191 throw new UnsupportedOperationException(
"Not supported yet.");
196 throw new UnsupportedOperationException(
"Not supported yet.");
IConstructor getConstructor()
void setPasswords(String id, String pass1, String pass2)
void setProperty(String id, String name, String value)
void setName(String id, String name)
boolean impersonate(String login)
String getProperty(String key)
boolean validate(String login, String password)