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