|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portal.service.http.RoleServiceSoap
public class RoleServiceSoap
This class provides a SOAP utility for the
RoleServiceUtil
service utility. The
static methods of this class calls the same methods of the service utility.
However, the signatures are different because it is difficult for SOAP to
support certain types.
ServiceBuilder follows certain rules in translating the methods. For example,
if the method in the service utility returns a List
, that
is translated to an array of RoleSoap
.
If the method in the service utility returns a
Role
, that is translated to a
RoleSoap
. Methods that SOAP cannot
safely wire are skipped.
The benefits of using the SOAP utility is that it is cross platform compatible. SOAP allows different languages like Java, .NET, C++, PHP, and even Perl, to call the generated services. One drawback of SOAP is that it is slow because it needs to serialize all calls into a text format (XML).
You can see a list of services at http://localhost:8080/api/secure/axis. Set the property axis.servlet.hosts.allowed in portal.properties to configure security.
The SOAP utility is only generated for remote services.
RoleServiceHttp
,
RoleSoap
,
RoleServiceUtil
Constructor Summary | |
---|---|
RoleServiceSoap()
|
Method Summary | |
---|---|
static RoleSoap |
addRole(String className,
long classPK,
String name,
String[] titleMapLanguageIds,
String[] titleMapValues,
String[] descriptionMapLanguageIds,
String[] descriptionMapValues,
int type,
String subType)
Adds a role. |
static RoleSoap |
addRole(String name,
String[] titleMapLanguageIds,
String[] titleMapValues,
String[] descriptionMapLanguageIds,
String[] descriptionMapValues,
int type)
Deprecated. #addRole(String, long, String, Map, Map, int, String) |
static void |
addUserRoles(long userId,
long[] roleIds)
Adds the roles to the user. |
static void |
deleteRole(long roleId)
Deletes the role with the primary key and its associated permissions. |
static RoleSoap[] |
getGroupRoles(long groupId)
Returns all the roles associated with the group. |
static RoleSoap |
getRole(long roleId)
Returns the role with the primary key. |
static RoleSoap |
getRole(long companyId,
String name)
Returns the role with the name in the company. |
static RoleSoap[] |
getUserGroupGroupRoles(long userId,
long groupId)
Returns all the user's roles within the user group. |
static RoleSoap[] |
getUserGroupRoles(long userId,
long groupId)
Returns all the user's roles within the user group. |
static RoleSoap[] |
getUserRelatedRoles(long userId,
GroupSoap[] groups)
Returns the union of all the user's roles within the groups. |
static RoleSoap[] |
getUserRoles(long userId)
Returns all the roles associated with the user. |
static boolean |
hasUserRole(long userId,
long companyId,
String name,
boolean inherited)
Returns true if the user is associated with the named
regular role. |
static boolean |
hasUserRoles(long userId,
long companyId,
String[] names,
boolean inherited)
Returns true if the user has any one of the named regular
roles. |
static void |
unsetUserRoles(long userId,
long[] roleIds)
Removes the matching roles associated with the user. |
static RoleSoap |
updateRole(long roleId,
String name,
String[] titleMapLanguageIds,
String[] titleMapValues,
String[] descriptionMapLanguageIds,
String[] descriptionMapValues,
String subtype)
Updates the role with the primary key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RoleServiceSoap()
Method Detail |
---|
public static RoleSoap addRole(String className, long classPK, String name, String[] titleMapLanguageIds, String[] titleMapValues, String[] descriptionMapLanguageIds, String[] descriptionMapValues, int type, String subType) throws RemoteException
className
- the name of the class for which the role is createdclassPK
- the primary key of the class for which the role is
created (optionally 0
)name
- the role's nametitleMap
- the role's localized titles (optionally
null
)descriptionMap
- the role's localized descriptions (optionally
null
)type
- the role's type (optionally 0
)subType
- the role's subtype (optionally null
)
PortalException
- if a user with the primary key could not be
found, if the user did not have permission to add roles, if the
class name or the role name were invalid, or if the role is a
duplicate
SystemException
- if a system exception occurred
RemoteException
public static RoleSoap addRole(String name, String[] titleMapLanguageIds, String[] titleMapValues, String[] descriptionMapLanguageIds, String[] descriptionMapValues, int type) throws RemoteException
#addRole(String, long, String, Map, Map, int, String)
name
- the role's nametitleMap
- the role's localized titles (optionally
null
)descriptionMap
- the role's localized descriptions (optionally
null
)type
- the role's type (optionally 0
)
PortalException
- if a user with the primary key could not be
found, if the user did not have permission to add roles, if
the class name or the role name were invalid, or if the role
is a duplicate
SystemException
- if a system exception occurred
RemoteException
public static void addUserRoles(long userId, long[] roleIds) throws RemoteException
userId
- the primary key of the userroleIds
- the primary keys of the roles
PortalException
- if a user with the primary key could not be found
or if the user did not have permission to assign members to one
of the roles
SystemException
- if a system exception occurred
RemoteException
public static void deleteRole(long roleId) throws RemoteException
roleId
- the primary key of the role
PortalException
- if the user did not have permission to delete the
role, if a role with the primary key could not be found, if the
role is a default system role, or if the role's resource could
not be found
SystemException
- if a system exception occurred
RemoteException
public static RoleSoap[] getGroupRoles(long groupId) throws RemoteException
groupId
- the primary key of the group
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurred
RemoteException
public static RoleSoap getRole(long roleId) throws RemoteException
roleId
- the primary key of the role
PortalException
- if a role with the primary key could not be found
or if the user did not have permission to view the role
SystemException
- if a system exception occurred
RemoteException
public static RoleSoap getRole(long companyId, String name) throws RemoteException
The method searches the system roles map first for default roles. If a role with the name is not found, then the method will query the database.
companyId
- the primary key of the companyname
- the role's name
PortalException
- if a role with the name could not be found in the
company or if the user did not have permission to view the role
SystemException
- if a system exception occurred
RemoteException
public static RoleSoap[] getUserGroupGroupRoles(long userId, long groupId) throws RemoteException
userId
- the primary key of the usergroupId
- the primary key of the group
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurred
RemoteException
public static RoleSoap[] getUserGroupRoles(long userId, long groupId) throws RemoteException
userId
- the primary key of the usergroupId
- the primary key of the group
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurred
RemoteException
public static RoleSoap[] getUserRelatedRoles(long userId, GroupSoap[] groups) throws RemoteException
userId
- the primary key of the usergroups
- the groups (optionally null
)
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurred
RemoteException
public static RoleSoap[] getUserRoles(long userId) throws RemoteException
userId
- the primary key of the user
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurred
RemoteException
public static boolean hasUserRole(long userId, long companyId, String name, boolean inherited) throws RemoteException
true
if the user is associated with the named
regular role.
userId
- the primary key of the usercompanyId
- the primary key of the companyname
- the name of the roleinherited
- whether to include the user's inherited roles in the
search
true
if the user is associated with the regular
role; false
otherwise
PortalException
- if a role with the name could not be found in the
company or if a default user for the company could not be found
SystemException
- if a system exception occurred
RemoteException
public static boolean hasUserRoles(long userId, long companyId, String[] names, boolean inherited) throws RemoteException
true
if the user has any one of the named regular
roles.
userId
- the primary key of the usercompanyId
- the primary key of the companynames
- the names of the rolesinherited
- whether to include the user's inherited roles in the
search
true
if the user has any one of the regular roles;
false
otherwise
PortalException
- if any one of the roles with the names could not
be found in the company or if the default user for the company
could not be found
SystemException
- if a system exception occurred
RemoteException
public static void unsetUserRoles(long userId, long[] roleIds) throws RemoteException
userId
- the primary key of the userroleIds
- the primary keys of the roles
PortalException
- if a user with the primary key could not be
found, if the user did not have permission to remove members from
a role, or if a role with any one of the primary keys could not
be found
SystemException
- if a system exception occurred
RemoteException
public static RoleSoap updateRole(long roleId, String name, String[] titleMapLanguageIds, String[] titleMapValues, String[] descriptionMapLanguageIds, String[] descriptionMapValues, String subtype) throws RemoteException
roleId
- the primary key of the rolename
- the role's new nametitleMap
- the new localized titles (optionally null
)
to replace those existing for the roledescriptionMap
- the new localized descriptions (optionally
null
) to replace those existing for the rolesubtype
- the role's new subtype (optionally null
)
PortalException
- if the user did not have permission to update the
role, if a role with the primary could not be found, or if the
role's name was invalid
SystemException
- if a system exception occurred
RemoteException
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |