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