| org.sakaiproject.content.api.CustomToolAction
CustomToolAction | public interface CustomToolAction extends ResourceToolAction(Code) | | CustomToolAction must be implemented by every ResourceToolAction whose ActionType is
ResourceToolAction.ActionType.CUSTOM_TOOL_ACTION. The interface defines a method
to allow the Resources tool to query a helper to determine permissions for the action.
If the permissions are determined entirely by content permissions corresponding to
those defined for a common action in the Resources tool (such as create, revise,
delete, duplicate, ...), it is better to define the action as an InteractiveAction
or ServiceLevelAction with ActionType defined to match the action whose permissions
it mimics. If custom permissions are required, the ResourceToolAction must be ot type
CUSTOM_TOOL_ACTION, and its definition must implement this interface.
|
Method Summary | |
public boolean | isAllowed(String entityId, List<String> contentPermissions, boolean isCreator) Determine whether the current user can perform this action on the resource. |
isAllowed | public boolean isAllowed(String entityId, List<String> contentPermissions, boolean isCreator)(Code) | | Determine whether the current user can perform this action on the resource.
Parameters: entityId - The id of the resource. Parameters: contentPermissions - A list of the "content.*" permissions the current user has in the context of the resource. Parameters: isCreator - A flag indicating whether the user is the creator of the resource. true if the user can perform the action and false otherwise. |
|
|