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