Dokumentation
Liferay stellt eine umfangreiche Sammlung von Ressourcen und Informationen zur Verfügung die unsere Community bei der Arbeit mit unserer Technolgie unterstützt.
Advanced Development
Liferay Services
Portlet applications may invoke the services provided by Liferay Portal by using the portal-client.jar client library.
User Service
The User service allows the management of the portal user and it's communities (aka Groups), Roles and UserGroups. It can be accessed through the static methods of UserServiceUtil. Following is a description of it's most important methods:
public static com.liferay.portal.model.User addUser(long companyId,
boolean autoPassword, java.lang.String password1,
java.lang.String password2, boolean autoScreenName,
java.lang.String screenName, java.lang.String emailAddress,
java.util.Locale locale, java.lang.String firstName,
java.lang.String middleName, java.lang.String lastName, int prefixId,
int suffixId, boolean male, int birthdayMonth, int birthdayDay,
int birthdayYear, java.lang.String jobTitle, long[] organizationIds,
boolean sendEmail)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException, java.rmi.RemoteException;
Add a new user inserting in its profile the provided information
public static com.liferay.portal.model.User updateUser(long userId,
java.lang.String oldPassword, java.lang.String newPassword1,
java.lang.String newPassword2, boolean passwordReset,
java.lang.String screenName, java.lang.String emailAddress,
java.lang.String languageId, java.lang.String timeZoneId,
java.lang.String greeting, java.lang.String comments,
java.lang.String firstName, java.lang.String middleName,
java.lang.String lastName, int prefixId, int suffixId, boolean male,
int birthdayMonth, int birthdayDay, int birthdayYear,
java.lang.String smsSn, java.lang.String aimSn, java.lang.String icqSn,
java.lang.String jabberSn, java.lang.String msnSn,
java.lang.String skypeSn, java.lang.String ymSn,
java.lang.String jobTitle, long[] organizationIds)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException, java.rmi.RemoteException;
Update a user's profile with the provided information.
public static void addGroupUsers(long groupId, long[] userIds)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException, java.rmi.RemoteException;
Add a set of users to a give community (aka Group) identified by the groupId.
public static void addRoleUsers(long roleId, long[] userIds)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException, java.rmi.RemoteException;
Add a set of users to a give Role identified by the roleId.
For more information check the Portal Javadocs.