BrightSide Workbench Full Report + Source Code
elephant/src/main/java/org/turro/plugin/contacts/IContact.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2011 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 package org.turro.plugin.contacts;
19 
20 import java.io.Serializable;
21 import java.util.List;
22 import java.util.Locale;
23 import org.turro.collections.KeyValueMap;
24 import org.turro.elephant.context.Application;
25 import org.turro.elephant.security.IUser;
26 import org.turro.entities.Faces;
27 import org.turro.security.FlatPermissions;
28 
33 public interface IContact extends IUser {
34 
35  public void setContact(Object contact);
36  public Object getContact();
37  public String getId();
38  public String getGlobalId();
39  public String getGrouping();
40  public String getDeepGrouping();
41  public String getLogin();
42  public String getName();
43  public String getFriendly();
44  public String getFormal();
45  public String getFullName();
46  public String getTradeName();
47  public String getEmail();
48  public Locale getLocale();
49  public String getConnector(String id);
50  public void setConnector(String id, String value);
51  public List<String> getConnectorList(String id);
54  public List<IContact> getRelations(String id);
55  public List<IContact> getRelations();
57  public List<IContact> getBusinessList();
58  public List<IContact> getCoworkers();
59  public List<IContact> getCoworkers(IContact business);
60  public boolean isInBusiness(IContact worker);
61  public void setName(String value);
62  public void setPassword(String newValue, String repeatValue);
63  public void applyChanges();
64  public boolean isValid();
65  public boolean checkPassword(String password);
66  public String getCommentValue(String key);
67  public Object getObject(String key);
68  public void setObject(String key, Serializable value);
69  public boolean isWebUser();
70  public boolean isWebapp();
71  public boolean isUserMenu();
72  public boolean isDeactivated();
73  //public List<String> getRoles();
74  public List<String> getSyndications();
76  public void resetPermissions();
77  public IUser getAsUser();
78  public boolean acceptsLang(String lang);
79 
80  /* Loaders */
81  public Object loadById(String id);
82  public Object loadByLogin(String login);
83  public Object loadLogged(Application app);
84  public List<IContact> loadByPartialName(String name);
85  public List<IContact> loadByPartialName(String name, KeyValueMap kvm);
86  public IContact loadByName(String name);
87  public IContact loadByEmail(String email);
88 
89  /* Transient */
90  public void setAttribute(String key, Object value);
91  public Object getAttribute(String key);
92 
93  /* Lists */
94  public List<IContact> getBySyndication(String syndication);
95  public List<IContact> getByRole(String role);
96  public List<IContact> getByGrouping(String grouping);
97  public List<IContact> getByGrouping(List<String> groupings);
98  public List<IContact> getCompanies();
99  public List<IContact> getCenters();
100  public List<IContact> getHHRR();
101  public List<IContact> getStudents();
102 
103  /* New */
104  public void startContactFromValues(KeyValueMap values);
105 
106  /* Actions */
107  public void syndicate(String syndicationName, boolean syndicate);
108 
109  /* Images */
110  public String getFace();
111  public Faces getFaces();
112 
113  /* Profile */
115 
116  /* Roles */
117  public boolean isAdmin();
118 
119  /* Types */
120  public boolean isUser();
121  public boolean isCompany();
122  public boolean isCenter();
123  public boolean isInternal();
124 
125  /* Fuzzy types */
126  public boolean isWorker();
127  public boolean isStudent();
128  public boolean isResponsible();
129  public boolean isHHRR();
130  public boolean isWorker(IContact business);
131  public boolean isStudent(IContact business);
132  public boolean isResponsible(IContact business);
133  public boolean isHHRR(IContact business);
134 
135  /* Networking */
136  public boolean isInNetworking();
137  public boolean isInPremiumNetworking();
138 
139  /* Translator */
140  public String getLangTranslator();
141 
142  /* Authentication */
143  public IContact getLogged();
144 
145  /* Outsiders */
146  public boolean isOutsider();
147  public boolean accepts(Object object);
148 
149 }
boolean isHHRR(IContact business)
List< IContact > getBySyndication(String syndication)
boolean isInBusiness(IContact worker)
Object loadLogged(Application app)
IContact loadByName(String name)
List< IContact > loadByPartialName(String name, KeyValueMap kvm)
boolean acceptsLang(String lang)
List< IContact > getByRole(String role)
List< IContact > getBusinessList()
String getCommentValue(String key)
void setPassword(String newValue, String repeatValue)
void setAttribute(String key, Object value)
List< IContact > getByGrouping(List< String > groupings)
boolean accepts(Object object)
List< IContact > getByGrouping(String grouping)
IContact loadByEmail(String email)
void setContact(Object contact)
void setObject(String key, Serializable value)
boolean isResponsible(IContact business)
void syndicate(String syndicationName, boolean syndicate)
boolean isStudent(IContact business)
boolean checkPassword(String password)
List< IContact > loadByPartialName(String name)
boolean isWorker(IContact business)
List< IContact > getRelations(String id)
void startContactFromValues(KeyValueMap values)
List< IContact > getCoworkers(IContact business)
void setConnector(String id, String value)
Object loadByLogin(String login)
List< String > getConnectorList(String id)