001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portal.service.http;
022:
023: import com.liferay.portal.service.UserGroupRoleServiceUtil;
024:
025: /**
026: * <a href="UserGroupRoleServiceJSON.java.html"><b><i>View Source</i></b></a>
027: *
028: * <p>
029: * ServiceBuilder generated this class. Modifications in this class will be
030: * overwritten the next time is generated.
031: * </p>
032: *
033: * <p>
034: * This class provides a JSON utility for the
035: * <code>com.liferay.portal.service.UserGroupRoleServiceUtil</code>
036: * service utility. The static methods of this class calls the same methods of
037: * the service utility. However, the signatures are different because it is
038: * difficult for JSON to support certain types.
039: * </p>
040: *
041: * <p>
042: * ServiceBuilder follows certain rules in translating the methods. For example,
043: * if the method in the service utility returns a <code>java.util.List</code>,
044: * that is translated to a <code>org.json.JSONArray</code>. If the method in the
045: * service utility returns a <code>com.liferay.portal.model.UserGroupRole</code>,
046: * that is translated to a <code>org.json.JSONObject</code>. Methods that JSON
047: * cannot safely use are skipped. The logic for the translation is encapsulated
048: * in <code>com.liferay.portal.service.http.UserGroupRoleJSONSerializer</code>.
049: * </p>
050: *
051: * <p>
052: * This allows you to call the the backend services directly from JavaScript.
053: * See <code>portal-web/docroot/html/portlet/tags_admin/unpacked.js</code> for a
054: * reference of how that portlet uses the generated JavaScript in
055: * <code>portal-web/docroot/html/js/service.js</code> to call the backend
056: * services directly from JavaScript.
057: * </p>
058: *
059: * <p>
060: * The JSON utility is only generated for remote services.
061: * </p>
062: *
063: * @author Brian Wing Shun Chan
064: *
065: * @see com.liferay.portal.service.UserGroupRoleServiceUtil
066: * @see com.liferay.portal.service.http.UserGroupRoleJSONSerializer
067: *
068: */
069: public class UserGroupRoleServiceJSON {
070: public static void addUserGroupRoles(long userId, long groupId,
071: long[] roleIds) throws java.rmi.RemoteException,
072: com.liferay.portal.SystemException,
073: com.liferay.portal.PortalException {
074: UserGroupRoleServiceUtil.addUserGroupRoles(userId, groupId,
075: roleIds);
076: }
077:
078: public static void addUserGroupRoles(long[] userIds, long groupId,
079: long roleId) throws java.rmi.RemoteException,
080: com.liferay.portal.SystemException,
081: com.liferay.portal.PortalException {
082: UserGroupRoleServiceUtil.addUserGroupRoles(userIds, groupId,
083: roleId);
084: }
085:
086: public static void deleteUserGroupRoles(long userId, long groupId,
087: long[] roleIds) throws java.rmi.RemoteException,
088: com.liferay.portal.SystemException,
089: com.liferay.portal.PortalException {
090: UserGroupRoleServiceUtil.deleteUserGroupRoles(userId, groupId,
091: roleIds);
092: }
093:
094: public static void deleteUserGroupRoles(long[] userIds,
095: long groupId, long roleId) throws java.rmi.RemoteException,
096: com.liferay.portal.SystemException,
097: com.liferay.portal.PortalException {
098: UserGroupRoleServiceUtil.deleteUserGroupRoles(userIds, groupId,
099: roleId);
100: }
101: }
|