BrightSide Workbench Full Report + Source Code
org.turro.plugin.contacts.UserAsContact Class Reference
Inheritance diagram for org.turro.plugin.contacts.UserAsContact:
Collaboration diagram for org.turro.plugin.contacts.UserAsContact:

Public Member Functions

Object loadById (String id)
 
Object loadByLogin (String login)
 
Object loadLogged (Application app)
 
void setContact (Object contact)
 
Object getContact ()
 
String getId ()
 
String getGlobalId ()
 
String getLogin ()
 
String getName ()
 
String getConnector (String id)
 
List< IContactgetRelations (String id)
 
void setConnector (String id, String value)
 
void setApplication (Application app)
 
void setName (String value)
 
void setPassword (String newValue, String repeatValue)
 
void applyChanges ()
 
boolean isValid ()
 
boolean checkPassword (String password)
 
String getCommentValue (String key)
 
Object getObject (String key)
 
void setObject (String key, Serializable value)
 
boolean isWebUser ()
 
List< IContactloadByPartialName (String name)
 
IContact loadByName (String name)
 
void setAttribute (String key, Object value)
 
Object getAttribute (String key)
 
- Public Member Functions inherited from org.turro.plugin.contacts.IContact
String getGrouping ()
 
String getDeepGrouping ()
 
String getFriendly ()
 
String getFormal ()
 
String getFullName ()
 
String getTradeName ()
 
String getEmail ()
 
Locale getLocale ()
 
List< String > getConnectorList (String id)
 
IRelations getCompanyRelations ()
 
IRelations getStaffRelations ()
 
List< IContactgetRelations ()
 
IContact getBusiness ()
 
List< IContactgetBusinessList ()
 
List< IContactgetCoworkers ()
 
List< IContactgetCoworkers (IContact business)
 
boolean isInBusiness (IContact worker)
 
boolean isWebapp ()
 
boolean isUserMenu ()
 
boolean isDeactivated ()
 
List< String > getSyndications ()
 
FlatPermissions getPermissions ()
 
void resetPermissions ()
 
IUser getAsUser ()
 
boolean acceptsLang (String lang)
 
List< IContactloadByPartialName (String name, KeyValueMap kvm)
 
IContact loadByEmail (String email)
 
List< IContactgetBySyndication (String syndication)
 
List< IContactgetByRole (String role)
 
List< IContactgetByGrouping (String grouping)
 
List< IContactgetByGrouping (List< String > groupings)
 
List< IContactgetCompanies ()
 
List< IContactgetCenters ()
 
List< IContactgetHHRR ()
 
List< IContactgetStudents ()
 
void startContactFromValues (KeyValueMap values)
 
void syndicate (String syndicationName, boolean syndicate)
 
String getFace ()
 
Faces getFaces ()
 
IProfile getProfile ()
 
boolean isAdmin ()
 
boolean isUser ()
 
boolean isCompany ()
 
boolean isCenter ()
 
boolean isInternal ()
 
boolean isWorker ()
 
boolean isStudent ()
 
boolean isResponsible ()
 
boolean isHHRR ()
 
boolean isWorker (IContact business)
 
boolean isStudent (IContact business)
 
boolean isResponsible (IContact business)
 
boolean isHHRR (IContact business)
 
boolean isInNetworking ()
 
boolean isInPremiumNetworking ()
 
String getLangTranslator ()
 
IContact getLogged ()
 
boolean isOutsider ()
 
boolean accepts (Object object)
 
- Public Member Functions inherited from org.turro.elephant.security.IUser
boolean validate (String login, String password)
 
boolean validate2 (String password2)
 
boolean impersonate (String login)
 
boolean impersonateByEmail (String email)
 
void reload ()
 
boolean isThisUser (String id)
 
String getProperty (String key)
 
boolean isInRole (String role)
 
boolean hasAnyRoleKey (String role)
 
boolean equals (Object obj)
 

Additional Inherited Members

- Static Public Attributes inherited from org.turro.elephant.security.IUser
static final String CONNECTOR_EMAIL = "Email"
 
static final String CONNECTOR_TRADE = "TradeName"
 
static final String CONNECTOR_FISCAL = "FiscalName"
 
static final String CONNECTOR_EMAIL_LOGIN = "EmailLogin"
 
static final String ADDRESS_FISCAL = "Fiscal"
 
static final String LOGGED_USER = "xp_user"
 
static final String INTERNAL_SIGNIN = "InternalSignIn"
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 37 of file UserAsContact.java.

Member Function Documentation

◆ applyChanges()

void org.turro.plugin.contacts.UserAsContact.applyChanges ( )

Implements org.turro.plugin.contacts.IContact.

Definition at line 146 of file UserAsContact.java.

146  {
147 
148  }

◆ checkPassword()

boolean org.turro.plugin.contacts.UserAsContact.checkPassword ( String  password)

Implements org.turro.plugin.contacts.IContact.

Definition at line 156 of file UserAsContact.java.

156  {
157  return user.validate(user.getId(), password);
158  }
boolean validate(String login, String password)
Here is the call graph for this function:

◆ getAttribute()

Object org.turro.plugin.contacts.UserAsContact.getAttribute ( String  key)

Implements org.turro.plugin.contacts.IContact.

Definition at line 195 of file UserAsContact.java.

195  {
196  throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
197  }

◆ getCommentValue()

String org.turro.plugin.contacts.UserAsContact.getCommentValue ( String  key)

Implements org.turro.plugin.contacts.IContact.

Definition at line 161 of file UserAsContact.java.

161  {
162  return null;
163  }

◆ getConnector()

String org.turro.plugin.contacts.UserAsContact.getConnector ( String  id)

Implements org.turro.plugin.contacts.IContact.

Definition at line 95 of file UserAsContact.java.

95  {
96  return user.getProperty(id);
97  }
String getProperty(String key)
Here is the call graph for this function:

◆ getContact()

Object org.turro.plugin.contacts.UserAsContact.getContact ( )

Implements org.turro.plugin.contacts.IContact.

Definition at line 70 of file UserAsContact.java.

70  {
71  return user;
72  }

◆ getGlobalId()

String org.turro.plugin.contacts.UserAsContact.getGlobalId ( )

Implements org.turro.plugin.contacts.IContact.

Definition at line 80 of file UserAsContact.java.

80  {
81  return null;
82  }

◆ getId()

String org.turro.plugin.contacts.UserAsContact.getId ( )

Implements org.turro.plugin.contacts.IContact.

Definition at line 75 of file UserAsContact.java.

75  {
76  return user != null ? user.getId() : null;
77  }

◆ getLogin()

String org.turro.plugin.contacts.UserAsContact.getLogin ( )

Implements org.turro.plugin.contacts.IContact.

Definition at line 85 of file UserAsContact.java.

85  {
86  return user != null ? user.getId() : null;
87  }

◆ getName()

String org.turro.plugin.contacts.UserAsContact.getName ( )

Implements org.turro.plugin.contacts.IContact.

Definition at line 90 of file UserAsContact.java.

90  {
91  return user != null ? user.getName() : null;
92  }
Here is the caller graph for this function:

◆ getObject()

Object org.turro.plugin.contacts.UserAsContact.getObject ( String  key)

Implements org.turro.plugin.contacts.IContact.

Definition at line 166 of file UserAsContact.java.

166  {
167  return null;
168  }

◆ getRelations()

List<IContact> org.turro.plugin.contacts.UserAsContact.getRelations ( String  id)

Implements org.turro.plugin.contacts.IContact.

Definition at line 100 of file UserAsContact.java.

100  {
101  return new ArrayList<IContact>();
102  }

◆ isValid()

boolean org.turro.plugin.contacts.UserAsContact.isValid ( )

Implements org.turro.plugin.contacts.IContact.

Definition at line 151 of file UserAsContact.java.

151  {
152  return user != null && user.isValid();
153  }

◆ isWebUser()

boolean org.turro.plugin.contacts.UserAsContact.isWebUser ( )

Implements org.turro.plugin.contacts.IContact.

Definition at line 175 of file UserAsContact.java.

175  {
176  return true;
177  }

◆ loadById()

Object org.turro.plugin.contacts.UserAsContact.loadById ( String  id)

Implements org.turro.plugin.contacts.IContact.

Definition at line 43 of file UserAsContact.java.

43  {
44  user = ContextFactory.getUser(null);
45  user.impersonate(id);
46  return user;
47  }
boolean impersonate(String login)
Here is the call graph for this function:

◆ loadByLogin()

Object org.turro.plugin.contacts.UserAsContact.loadByLogin ( String  login)

Implements org.turro.plugin.contacts.IContact.

Definition at line 50 of file UserAsContact.java.

50  {
51  user = ContextFactory.getUser(null);
52  user.impersonate(login);
53  return user;
54  }
Here is the call graph for this function:

◆ loadByName()

IContact org.turro.plugin.contacts.UserAsContact.loadByName ( String  name)

Implements org.turro.plugin.contacts.IContact.

Definition at line 185 of file UserAsContact.java.

185  {
186  throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
187  }

◆ loadByPartialName()

List<IContact> org.turro.plugin.contacts.UserAsContact.loadByPartialName ( String  name)

Implements org.turro.plugin.contacts.IContact.

Definition at line 180 of file UserAsContact.java.

180  {
181  throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
182  }

◆ loadLogged()

Object org.turro.plugin.contacts.UserAsContact.loadLogged ( Application  app)

Implements org.turro.plugin.contacts.IContact.

Definition at line 57 of file UserAsContact.java.

57  {
58  user = app.getConstructor().getUser();
59  return user;
60  }
Here is the call graph for this function:

◆ setApplication()

void org.turro.plugin.contacts.UserAsContact.setApplication ( Application  app)

Implements org.turro.plugin.contacts.IContact.

Definition at line 117 of file UserAsContact.java.

117  {
118  this.app = app;
119  }

◆ setAttribute()

void org.turro.plugin.contacts.UserAsContact.setAttribute ( String  key,
Object  value 
)

Implements org.turro.plugin.contacts.IContact.

Definition at line 190 of file UserAsContact.java.

190  {
191  throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
192  }

◆ setConnector()

void org.turro.plugin.contacts.UserAsContact.setConnector ( String  id,
String  value 
)

Implements org.turro.plugin.contacts.IContact.

Definition at line 105 of file UserAsContact.java.

105  {
106  IUserAdmin uAdmin = ContextFactory.getUserAdmin(app.getConstructor());
107  if(id != null && value != null) {
108  try {
109  uAdmin.setProperty(user.getId(), id, value);
110  } catch (IOException ex) {
111  Logger.getLogger(UserAsContact.class.getName()).log(Level.SEVERE, null, ex);
112  }
113  }
114  }
Here is the call graph for this function:

◆ setContact()

void org.turro.plugin.contacts.UserAsContact.setContact ( Object  contact)

Implements org.turro.plugin.contacts.IContact.

Definition at line 63 of file UserAsContact.java.

63  {
64  if(contact instanceof IUser) {
65  user = (IUser) contact;
66  }
67  }

◆ setName()

void org.turro.plugin.contacts.UserAsContact.setName ( String  value)

Implements org.turro.plugin.contacts.IContact.

Definition at line 122 of file UserAsContact.java.

122  {
123  IUserAdmin uAdmin = ContextFactory.getUserAdmin(app.getConstructor());
124  if (value != null) {
125  try {
126  uAdmin.setName(user.getId(), value);
127  } catch (IOException ex) {
128  Logger.getLogger(UserAsContact.class.getName()).log(Level.SEVERE, null, ex);
129  }
130  }
131  }
Here is the call graph for this function:

◆ setObject()

void org.turro.plugin.contacts.UserAsContact.setObject ( String  key,
Serializable  value 
)

Implements org.turro.plugin.contacts.IContact.

Definition at line 171 of file UserAsContact.java.

171  {
172  }

◆ setPassword()

void org.turro.plugin.contacts.UserAsContact.setPassword ( String  newValue,
String  repeatValue 
)

Implements org.turro.plugin.contacts.IContact.

Definition at line 134 of file UserAsContact.java.

134  {
135  IUserAdmin uAdmin = ContextFactory.getUserAdmin(app.getConstructor());
136  if(newValue != null && newValue.trim().length() > 0 && newValue.equals(repeatValue)) {
137  try {
138  uAdmin.setPasswords(user.getId(), newValue, null);
139  } catch (IOException ex) {
140  Logger.getLogger(UserAsContact.class.getName()).log(Level.SEVERE, null, ex);
141  }
142  }
143  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: