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;
022:
023: /**
024: * <a href="RoleService.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This interface defines the service. The default implementation is
033: * <code>com.liferay.portal.service.impl.RoleServiceImpl</code>.
034: * Modify methods in that class and rerun ServiceBuilder to populate this class
035: * and all other generated classes.
036: * </p>
037: *
038: * <p>
039: * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
040: * </p>
041: *
042: * @author Brian Wing Shun Chan
043: *
044: * @see com.liferay.portal.service.RoleServiceFactory
045: * @see com.liferay.portal.service.RoleServiceUtil
046: *
047: */
048: public interface RoleService {
049: public com.liferay.portal.model.Role addRole(java.lang.String name,
050: java.lang.String description, int type)
051: throws java.rmi.RemoteException,
052: com.liferay.portal.SystemException,
053: com.liferay.portal.PortalException;
054:
055: public void addUserRoles(long userId, long[] roleIds)
056: throws java.rmi.RemoteException,
057: com.liferay.portal.SystemException,
058: com.liferay.portal.PortalException;
059:
060: public void deleteRole(long roleId)
061: throws java.rmi.RemoteException,
062: com.liferay.portal.SystemException,
063: com.liferay.portal.PortalException;
064:
065: public com.liferay.portal.model.Role getGroupRole(long companyId,
066: long groupId) throws java.rmi.RemoteException,
067: com.liferay.portal.SystemException,
068: com.liferay.portal.PortalException;
069:
070: public java.util.List getGroupRoles(long groupId)
071: throws java.rmi.RemoteException,
072: com.liferay.portal.SystemException,
073: com.liferay.portal.PortalException;
074:
075: public com.liferay.portal.model.Role getRole(long roleId)
076: throws java.rmi.RemoteException,
077: com.liferay.portal.SystemException,
078: com.liferay.portal.PortalException;
079:
080: public com.liferay.portal.model.Role getRole(long companyId,
081: java.lang.String name) throws java.rmi.RemoteException,
082: com.liferay.portal.SystemException,
083: com.liferay.portal.PortalException;
084:
085: public java.util.List getUserGroupRoles(long userId, long groupId)
086: throws java.rmi.RemoteException,
087: com.liferay.portal.SystemException,
088: com.liferay.portal.PortalException;
089:
090: public java.util.List getUserRelatedRoles(long userId,
091: java.util.List groups) throws java.rmi.RemoteException,
092: com.liferay.portal.SystemException,
093: com.liferay.portal.PortalException;
094:
095: public java.util.List getUserRoles(long userId)
096: throws java.rmi.RemoteException,
097: com.liferay.portal.SystemException,
098: com.liferay.portal.PortalException;
099:
100: public boolean hasUserRole(long userId, long companyId,
101: java.lang.String name, boolean inherited)
102: throws java.rmi.RemoteException,
103: com.liferay.portal.SystemException,
104: com.liferay.portal.PortalException;
105:
106: public boolean hasUserRoles(long userId, long companyId,
107: java.lang.String[] names, boolean inherited)
108: throws java.rmi.RemoteException,
109: com.liferay.portal.SystemException,
110: com.liferay.portal.PortalException;
111:
112: public void unsetUserRoles(long userId, long[] roleIds)
113: throws java.rmi.RemoteException,
114: com.liferay.portal.SystemException,
115: com.liferay.portal.PortalException;
116:
117: public com.liferay.portal.model.Role updateRole(long roleId,
118: java.lang.String name, java.lang.String description)
119: throws java.rmi.RemoteException,
120: com.liferay.portal.SystemException,
121: com.liferay.portal.PortalException;
122: }
|