001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.util.Accessor;
020    
021    /**
022     * The extended model interface for the User service. Represents a row in the "User_" database table, with each column mapped to a property of this class.
023     *
024     * @author Brian Wing Shun Chan
025     * @see UserModel
026     * @see com.liferay.portal.model.impl.UserImpl
027     * @see com.liferay.portal.model.impl.UserModelImpl
028     * @generated
029     */
030    @ProviderType
031    public interface User extends UserModel, PersistedModel {
032            /*
033             * NOTE FOR DEVELOPERS:
034             *
035             * Never modify this interface directly. Add methods to {@link com.liferay.portal.model.impl.UserImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
036             */
037            public static final Accessor<User, Long> USER_ID_ACCESSOR = new Accessor<User, Long>() {
038                            @Override
039                            public Long get(User user) {
040                                    return user.getUserId();
041                            }
042    
043                            @Override
044                            public Class<Long> getAttributeClass() {
045                                    return Long.class;
046                            }
047    
048                            @Override
049                            public Class<User> getTypeClass() {
050                                    return User.class;
051                            }
052                    };
053    
054            public void addRemotePreference(
055                    com.liferay.portal.kernel.util.RemotePreference remotePreference);
056    
057            public com.liferay.portal.model.Contact fetchContact();
058    
059            /**
060            * Returns the user's addresses.
061            *
062            * @return the user's addresses
063            */
064            public java.util.List<com.liferay.portal.model.Address> getAddresses();
065    
066            /**
067            * Returns the user's birth date.
068            *
069            * @return the user's birth date
070            * @throws PortalException if a portal exception occurred
071            */
072            public java.util.Date getBirthday()
073                    throws com.liferay.portal.kernel.exception.PortalException;
074    
075            /**
076            * Returns the user's company's mail domain.
077            *
078            * @return the user's company's mail domain
079            * @throws PortalException if a portal exception occurred
080            */
081            public java.lang.String getCompanyMx()
082                    throws com.liferay.portal.kernel.exception.PortalException;
083    
084            /**
085            * Returns the user's associated contact.
086            *
087            * @return the user's associated contact
088            * @throws PortalException if a portal exception occurred
089            * @see Contact
090            */
091            public com.liferay.portal.model.Contact getContact()
092                    throws com.liferay.portal.kernel.exception.PortalException;
093    
094            /**
095            * Returns a digest for the user, incorporating the password.
096            *
097            * @param password a password to incorporate with the digest
098            * @return a digest for the user, incorporating the password
099            */
100            public java.lang.String getDigest(java.lang.String password);
101    
102            /**
103            * Returns the user's primary email address, or a blank string if the
104            * address is fake.
105            *
106            * @return the user's primary email address, or a blank string if the
107            address is fake
108            */
109            public java.lang.String getDisplayEmailAddress();
110    
111            /**
112            * Returns the user's display URL, discounting the URL of the user's default
113            * intranet site home page.
114            *
115            * <p>
116            * The logic for the display URL to return is as follows:
117            * </p>
118            *
119            * <ol>
120            * <li>
121            * If the user is the guest user, return an empty string.
122            * </li>
123            * <li>
124            * Else, if a friendly URL is available for the user's profile, return that
125            * friendly URL.
126            * </li>
127            * <li>
128            * Otherwise, return the URL of the user's default extranet site home page.
129            * </li>
130            * </ol>
131            *
132            * @param portalURL the portal's URL
133            * @param mainPath the main path
134            * @return the user's display URL
135            * @throws PortalException if a portal exception occurred
136            * @deprecated As of 7.0.0, replaced by {@link #getDisplayURL(ThemeDisplay)}
137            */
138            @java.lang.Deprecated()
139            public java.lang.String getDisplayURL(java.lang.String portalURL,
140                    java.lang.String mainPath)
141                    throws com.liferay.portal.kernel.exception.PortalException;
142    
143            /**
144            * Returns the user's display URL.
145            *
146            * <p>
147            * The logic for the display URL to return is as follows:
148            * </p>
149            *
150            * <ol>
151            * <li>
152            * If the user is the guest user, return an empty string.
153            * </li>
154            * <li>
155            * Else, if a friendly URL is available for the user's profile, return that
156            * friendly URL.
157            * </li>
158            * <li>
159            * Else, if <code>privateLayout</code> is <code>true</code>, return the URL
160            * of the user's default intranet site home page.
161            * </li>
162            * <li>
163            * Otherwise, return the URL of the user's default extranet site home page.
164            * </li>
165            * </ol>
166            *
167            * @param portalURL the portal's URL
168            * @param mainPath the main path
169            * @param privateLayout whether to use the URL of the user's default
170            intranet(versus extranet)  site home page, if no friendly URL
171            is available for the user's profile
172            * @return the user's display URL
173            * @throws PortalException if a portal exception occurred
174            * @deprecated As of 7.0.0, replaced by {@link #getDisplayURL(ThemeDisplay)}
175            */
176            @java.lang.Deprecated()
177            public java.lang.String getDisplayURL(java.lang.String portalURL,
178                    java.lang.String mainPath, boolean privateLayout)
179                    throws com.liferay.portal.kernel.exception.PortalException;
180    
181            /**
182            * Returns the user's display URL based on the theme display, discounting
183            * the URL of the user's default intranet site home page.
184            *
185            * <p>
186            * The logic for the display URL to return is as follows:
187            * </p>
188            *
189            * <ol>
190            * <li>
191            * If the user is the guest user, return an empty string.
192            * </li>
193            * <li>
194            * Else, if a friendly URL is available for the user's profile, return that
195            * friendly URL.
196            * </li>
197            * <li>
198            * Otherwise, return the URL of the user's default extranet site home page.
199            * </li>
200            * </ol>
201            *
202            * @param themeDisplay the theme display
203            * @return the user's display URL
204            * @throws PortalException if a portal exception occurred
205            */
206            public java.lang.String getDisplayURL(
207                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
208                    throws com.liferay.portal.kernel.exception.PortalException;
209    
210            /**
211            * Returns the user's display URL based on the theme display.
212            *
213            * <p>
214            * The logic for the display URL to return is as follows:
215            * </p>
216            *
217            * <ol>
218            * <li>
219            * If the user is the guest user, return an empty string.
220            * </li>
221            * <li>
222            * Else, if a friendly URL is available for the user's profile, return that
223            * friendly URL.
224            * </li>
225            * <li>
226            * Else, if <code>privateLayout</code> is <code>true</code>, return the URL
227            * of the user's default intranet site home page.
228            * </li>
229            * <li>
230            * Otherwise, return the URL of the user's default extranet site home page.
231            * </li>
232            * </ol>
233            *
234            * @param themeDisplay the theme display
235            * @param privateLayout whether to use the URL of the user's default
236            intranet (versus extranet) site home page, if no friendly URL is
237            available for the user's profile
238            * @return the user's display URL
239            * @throws PortalException if a portal exception occurred
240            */
241            public java.lang.String getDisplayURL(
242                    com.liferay.portal.theme.ThemeDisplay themeDisplay,
243                    boolean privateLayout)
244                    throws com.liferay.portal.kernel.exception.PortalException;
245    
246            /**
247            * Returns the user's email addresses.
248            *
249            * @return the user's email addresses
250            */
251            public java.util.List<com.liferay.portal.model.EmailAddress> getEmailAddresses();
252    
253            /**
254            * Returns <code>true</code> if the user is female.
255            *
256            * @return <code>true</code> if the user is female; <code>false</code>
257            otherwise
258            * @throws PortalException if a portal exception occurred
259            */
260            public boolean getFemale()
261                    throws com.liferay.portal.kernel.exception.PortalException;
262    
263            /**
264            * Returns the user's full name.
265            *
266            * @return the user's full name
267            */
268            @com.liferay.portal.kernel.bean.AutoEscape()
269            public java.lang.String getFullName();
270    
271            /**
272            * Returns the user's full name.
273            *
274            * @return the user's full name
275            */
276            @com.liferay.portal.kernel.bean.AutoEscape()
277            public java.lang.String getFullName(boolean usePrefix, boolean useSuffix);
278    
279            public com.liferay.portal.model.Group getGroup();
280    
281            public long getGroupId();
282    
283            public long[] getGroupIds();
284    
285            public java.util.List<com.liferay.portal.model.Group> getGroups();
286    
287            public java.util.Locale getLocale();
288    
289            public java.lang.String getLogin()
290                    throws com.liferay.portal.kernel.exception.PortalException;
291    
292            /**
293            * Returns <code>true</code> if the user is male.
294            *
295            * @return <code>true</code> if the user is male; <code>false</code>
296            otherwise
297            * @throws PortalException if a portal exception occurred
298            */
299            public boolean getMale()
300                    throws com.liferay.portal.kernel.exception.PortalException;
301    
302            public java.util.List<com.liferay.portal.model.Group> getMySiteGroups()
303                    throws com.liferay.portal.kernel.exception.PortalException;
304    
305            public java.util.List<com.liferay.portal.model.Group> getMySiteGroups(
306                    int max) throws com.liferay.portal.kernel.exception.PortalException;
307    
308            public java.util.List<com.liferay.portal.model.Group> getMySiteGroups(
309                    java.lang.String[] classNames, int max)
310                    throws com.liferay.portal.kernel.exception.PortalException;
311    
312            /**
313            * @deprecated As of 6.2.0, replaced by {@link #getMySiteGroups}
314            */
315            @java.lang.Deprecated()
316            public java.util.List<com.liferay.portal.model.Group> getMySites()
317                    throws com.liferay.portal.kernel.exception.PortalException;
318    
319            /**
320            * @deprecated As of 6.2.0, replaced by {@link User#getMySiteGroups(int)}
321            */
322            @java.lang.Deprecated()
323            public java.util.List<com.liferay.portal.model.Group> getMySites(
324                    boolean includeControlPanel, int max)
325                    throws com.liferay.portal.kernel.exception.PortalException;
326    
327            /**
328            * @deprecated As of 6.2.0, replaced by {@link #getMySiteGroups(int)}
329            */
330            @java.lang.Deprecated()
331            public java.util.List<com.liferay.portal.model.Group> getMySites(int max)
332                    throws com.liferay.portal.kernel.exception.PortalException;
333    
334            /**
335            * @deprecated As of 6.2.0, replaced by {@link #getMySiteGroups(String[],
336            int)}
337            */
338            @java.lang.Deprecated()
339            public java.util.List<com.liferay.portal.model.Group> getMySites(
340                    java.lang.String[] classNames, boolean includeControlPanel, int max)
341                    throws com.liferay.portal.kernel.exception.PortalException;
342    
343            /**
344            * @deprecated As of 6.2.0, replaced by {@link #getMySiteGroups(String[],
345            int)}
346            */
347            @java.lang.Deprecated()
348            public java.util.List<com.liferay.portal.model.Group> getMySites(
349                    java.lang.String[] classNames, int max)
350                    throws com.liferay.portal.kernel.exception.PortalException;
351    
352            public long[] getOrganizationIds()
353                    throws com.liferay.portal.kernel.exception.PortalException;
354    
355            public long[] getOrganizationIds(boolean includeAdministrative)
356                    throws com.liferay.portal.kernel.exception.PortalException;
357    
358            public java.util.List<com.liferay.portal.model.Organization> getOrganizations()
359                    throws com.liferay.portal.kernel.exception.PortalException;
360    
361            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
362                    boolean includeAdministrative)
363                    throws com.liferay.portal.kernel.exception.PortalException;
364    
365            public java.lang.String getOriginalEmailAddress();
366    
367            public boolean getPasswordModified();
368    
369            public com.liferay.portal.model.PasswordPolicy getPasswordPolicy()
370                    throws com.liferay.portal.kernel.exception.PortalException;
371    
372            public java.lang.String getPasswordUnencrypted();
373    
374            public java.util.List<com.liferay.portal.model.Phone> getPhones();
375    
376            public java.lang.String getPortraitURL(
377                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
378                    throws com.liferay.portal.kernel.exception.PortalException;
379    
380            public int getPrivateLayoutsPageCount()
381                    throws com.liferay.portal.kernel.exception.PortalException;
382    
383            public int getPublicLayoutsPageCount()
384                    throws com.liferay.portal.kernel.exception.PortalException;
385    
386            public java.util.Set<java.lang.String> getReminderQueryQuestions()
387                    throws com.liferay.portal.kernel.exception.PortalException;
388    
389            public com.liferay.portal.kernel.util.RemotePreference getRemotePreference(
390                    java.lang.String name);
391    
392            public java.lang.Iterable<com.liferay.portal.kernel.util.RemotePreference> getRemotePreferences();
393    
394            public long[] getRoleIds();
395    
396            public java.util.List<com.liferay.portal.model.Role> getRoles();
397    
398            public java.util.List<com.liferay.portal.model.Group> getSiteGroups()
399                    throws com.liferay.portal.kernel.exception.PortalException;
400    
401            public java.util.List<com.liferay.portal.model.Group> getSiteGroups(
402                    boolean includeAdministrative)
403                    throws com.liferay.portal.kernel.exception.PortalException;
404    
405            public long[] getTeamIds();
406    
407            public java.util.List<com.liferay.portal.model.Team> getTeams();
408    
409            public java.util.TimeZone getTimeZone();
410    
411            public java.util.Date getUnlockDate()
412                    throws com.liferay.portal.kernel.exception.PortalException;
413    
414            public java.util.Date getUnlockDate(
415                    com.liferay.portal.model.PasswordPolicy passwordPolicy);
416    
417            public long[] getUserGroupIds();
418    
419            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups();
420    
421            public java.util.List<com.liferay.portal.model.Website> getWebsites();
422    
423            public boolean hasCompanyMx()
424                    throws com.liferay.portal.kernel.exception.PortalException;
425    
426            public boolean hasCompanyMx(java.lang.String emailAddress)
427                    throws com.liferay.portal.kernel.exception.PortalException;
428    
429            public boolean hasMySites()
430                    throws com.liferay.portal.kernel.exception.PortalException;
431    
432            public boolean hasOrganization();
433    
434            public boolean hasPrivateLayouts()
435                    throws com.liferay.portal.kernel.exception.PortalException;
436    
437            public boolean hasPublicLayouts()
438                    throws com.liferay.portal.kernel.exception.PortalException;
439    
440            public boolean hasReminderQuery();
441    
442            public boolean isActive();
443    
444            public boolean isEmailAddressComplete();
445    
446            public boolean isEmailAddressVerificationComplete();
447    
448            public boolean isFemale()
449                    throws com.liferay.portal.kernel.exception.PortalException;
450    
451            public boolean isMale()
452                    throws com.liferay.portal.kernel.exception.PortalException;
453    
454            public boolean isPasswordModified();
455    
456            public boolean isReminderQueryComplete();
457    
458            public boolean isSetupComplete();
459    
460            public boolean isTermsOfUseComplete();
461    
462            public void setPasswordModified(boolean passwordModified);
463    
464            public void setPasswordUnencrypted(java.lang.String passwordUnencrypted);
465    }