|
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.PermissionServiceSoap
public class PermissionServiceSoap
This class provides a SOAP utility for the
PermissionServiceUtil
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 PermissionSoap
.
If the method in the service utility returns a
Permission
, that is translated to a
PermissionSoap
. 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.
PermissionServiceHttp
,
PermissionSoap
,
PermissionServiceUtil
Constructor Summary | |
---|---|
PermissionServiceSoap()
|
Method Summary | |
---|---|
static void |
checkPermission(long groupId,
long resourceId)
Checks to see if the group has permission to the resource. |
static void |
checkPermission(long groupId,
String name,
long primKey)
Checks to see if the group has permission to the service. |
static void |
checkPermission(long groupId,
String name,
String primKey)
Checks to see if the group has permission to the service. |
static boolean |
hasGroupPermission(long groupId,
String actionId,
long resourceId)
Returns true if the group has permission to perform the
action on the resource. |
static boolean |
hasUserPermission(long userId,
String actionId,
long resourceId)
Returns true if the user has permission to perform the
action on the resource. |
static boolean |
hasUserPermissions(long userId,
long groupId,
ResourceSoap[] resources,
String actionId,
PermissionCheckerBag permissionCheckerBag)
Returns true if the user has permission to perform the
action on the resources. |
static void |
setGroupPermissions(long groupId,
String[] actionIds,
long resourceId)
Sets the group's permissions to perform the actions on the resource, replacing the group's existing permissions on the resource. |
static void |
setGroupPermissions(String className,
String classPK,
long groupId,
String[] actionIds,
long resourceId)
Sets the entity's group permissions to perform the actions on the resource, replacing the entity's existing group permissions on the resource. |
static void |
setOrgGroupPermissions(long organizationId,
long groupId,
String[] actionIds,
long resourceId)
Sets the organization permission to perform the actions on the resource for a particular group, replacing the organization's existing permissions on the resource. |
static void |
setRolePermission(long roleId,
long groupId,
String name,
int scope,
String primKey,
String actionId)
Sets the role's permissions to perform the action on the named resource, replacing the role's existing permissions on the resource. |
static void |
setRolePermissions(long roleId,
long groupId,
String[] actionIds,
long resourceId)
Sets the role's permissions to perform the actions on the resource, replacing the role's existing permissions on the resource. |
static void |
setUserPermissions(long userId,
long groupId,
String[] actionIds,
long resourceId)
Sets the user's permissions to perform the actions on the resource, replacing the user's existing permissions on the resource. |
static void |
unsetRolePermission(long roleId,
long groupId,
long permissionId)
Removes the permission from the role. |
static void |
unsetRolePermission(long roleId,
long groupId,
String name,
int scope,
String primKey,
String actionId)
Removes the role's permissions to perform the action on the named resource with the scope and primKey. |
static void |
unsetRolePermissions(long roleId,
long groupId,
String name,
int scope,
String actionId)
Removes the role's permissions to perform the action on the named resource. |
static void |
unsetUserPermissions(long userId,
long groupId,
String[] actionIds,
long resourceId)
Removes the user's permissions to perform the actions on the resource. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PermissionServiceSoap()
Method Detail |
---|
public static void checkPermission(long groupId, long resourceId) throws RemoteException
groupId
- the primary key of the groupresourceId
- the primary key of the resource
PortalException
- if the group did not have permission to the
resource, or if a group or resource with the primary key could
not be found or was invalid
SystemException
- if a system exception occurred
RemoteException
public static void checkPermission(long groupId, String name, long primKey) throws RemoteException
groupId
- the primary key of the groupname
- the service nameprimKey
- the primary key of the service
PortalException
- if the group did not have permission to the
service, if a group with the primary key could not be found or if
the permission information was invalid
SystemException
- if a system exception occurred
RemoteException
public static void checkPermission(long groupId, String name, String primKey) throws RemoteException
groupId
- the primary key of the groupname
- the service nameprimKey
- the primary key of the service
PortalException
- if the group did not have permission to the
service, if a group with the primary key could not be found or if
the permission information was invalid
SystemException
- if a system exception occurred
RemoteException
public static boolean hasGroupPermission(long groupId, String actionId, long resourceId) throws RemoteException
true
if the group has permission to perform the
action on the resource.
groupId
- the primary key of the groupactionId
- the action's IDresourceId
- the primary key of the resource
true
if the group has permission to perform the
action on the resource; false
otherwise
SystemException
- if a system exception occurred
RemoteException
public static boolean hasUserPermission(long userId, String actionId, long resourceId) throws RemoteException
true
if the user has permission to perform the
action on the resource.
userId
- the primary key of the useractionId
- the action's IDresourceId
- the primary key of the resource
true
if the user has permission to perform the
action on the resource; false
otherwise
SystemException
- if a system exception occurred
RemoteException
public static boolean hasUserPermissions(long userId, long groupId, ResourceSoap[] resources, String actionId, PermissionCheckerBag permissionCheckerBag) throws RemoteException
true
if the user has permission to perform the
action on the resources.
This method does not support resources managed by the resource block system.
userId
- the primary key of the usergroupId
- the primary key of the group containing the resourceresources
- representations of the resource at each scope level
returned by AdvancedPermissionChecker.getResources(
long, long, String, String, String)
actionId
- the action's IDpermissionCheckerBag
- the permission checker bag
true
if the user has permission to perform the
action on the resources; false
otherwise
PortalException
- if a resource action based on any one of the
resources and the action ID could not be found
SystemException
- if a system exception occurred
RemoteException
public static void setGroupPermissions(long groupId, String[] actionIds, long resourceId) throws RemoteException
groupId
- the primary key of the groupactionIds
- the primary keys of the actionsresourceId
- the primary key of the resource
PortalException
- if a group with the primary key could not be
found or if the group did not have permission to the resource
SystemException
- if a system exception occurred
RemoteException
public static void setGroupPermissions(String className, String classPK, long groupId, String[] actionIds, long resourceId) throws RemoteException
Organization
and UserGroup
class entities are supported.
className
- the class name of an organization or user groupclassPK
- the primary key of the classgroupId
- the primary key of the groupactionIds
- the primary keys of the actionsresourceId
- the primary key of the resource
PortalException
- if the group did not have permission to the
resource, if an entity with the class name and primary key could
not be found, or if the entity's associated group could not be
found
SystemException
- if a system exception occurred
RemoteException
public static void setOrgGroupPermissions(long organizationId, long groupId, String[] actionIds, long resourceId) throws RemoteException
organizationId
- the primary key of the organizationgroupId
- the primary key of the group in which to scope the
permissionsactionIds
- the primary keys of the actionsresourceId
- the primary key of the resource
PortalException
- if the group did not have permission to the
resource or if an organization with the primary key could not be
found
SystemException
- if a system exception occurred
RemoteException
public static void setRolePermission(long roleId, long groupId, String name, int scope, String primKey, String actionId) throws RemoteException
roleId
- the primary key of the rolegroupId
- the primary key of the groupname
- the resource namescope
- the resource scopeprimKey
- the resource primKeyactionId
- the action's ID
PortalException
- if the group did not have permission to the role
or if the scope was ResourceConstants.SCOPE_INDIVIDUAL
SystemException
- if a system exception occurred
RemoteException
public static void setRolePermissions(long roleId, long groupId, String[] actionIds, long resourceId) throws RemoteException
roleId
- the primary key of the rolegroupId
- the primary key of the groupactionIds
- the primary keys of the actionsresourceId
- the primary key of the resource
PortalException
- if the group did not have permission to the
resource or if a role with the primary key could not be found
SystemException
- if a system exception occurred
RemoteException
public static void setUserPermissions(long userId, long groupId, String[] actionIds, long resourceId) throws RemoteException
userId
- the primary key of the usergroupId
- the primary key of the groupactionIds
- the primary keys of the actionsresourceId
- the primary key of the resource
PortalException
- if the group did not have permission to the
resource or if a user with the primary key could not be found
SystemException
- if a system exception occurred
RemoteException
public static void unsetRolePermission(long roleId, long groupId, long permissionId) throws RemoteException
roleId
- the primary key of the rolegroupId
- the primary key of the grouppermissionId
- the primary key of the permission
PortalException
- if the group did not have permission to the role
SystemException
- if a system exception occurred
RemoteException
public static void unsetRolePermission(long roleId, long groupId, String name, int scope, String primKey, String actionId) throws RemoteException
roleId
- the primary key of the rolegroupId
- the primary key of the groupname
- the resource namescope
- the resource scopeprimKey
- the resource primKeyactionId
- the action's ID
PortalException
- if the group did not have permission to the role
SystemException
- if a system exception occurred
RemoteException
public static void unsetRolePermissions(long roleId, long groupId, String name, int scope, String actionId) throws RemoteException
roleId
- the primary key of the rolegroupId
- the primary key of the groupname
- the resource namescope
- the resource scopeactionId
- the action's ID
PortalException
- if the group did not have permission to the role
SystemException
- if a system exception occurred
RemoteException
public static void unsetUserPermissions(long userId, long groupId, String[] actionIds, long resourceId) throws RemoteException
userId
- the primary key of the usergroupId
- the primary key of the groupactionIds
- the primary keys of the actionsresourceId
- the primary key of the resource
PortalException
- if the group did not have permission to the
resource
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 |