|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.entitybroker.entityprovider.extension.CustomAction
public class CustomAction
This defines a custom entity action, this will be used to define which custom actions are allowed to be performed on entities or collections of entities
| Field Summary | |
|---|---|
String |
action
The action key which will be used to trigger the action (e.g. promote), will be triggered by a URL like so: /user/aaronz/promote |
Class<?>[] |
methodArgTypes
These are the argument types found in the custom action method in order, this should not be populated manually as any value in this will be overwritten |
String |
methodName
This will be non-null if there is a custom action method which was found or identified by the annotation EntityCustomAction or if the developer has defined this
explicitly |
String |
viewKey
(optional) Must match one of the VIEW constants from EntityViewThe view type which this action goes with, this roughly translates to the GET/POST/PUT/DELETE in http e.g. |
| Constructor Summary | |
|---|---|
CustomAction(String action,
String viewKey)
Construct a custom action for entities |
|
CustomAction(String action,
String viewKey,
String methodName)
Adds the methodName arg, use this version when using this with ActionsDefineable |
|
| Method Summary | |
|---|---|
CustomAction |
copy()
|
static CustomAction |
copy(CustomAction ca)
|
Method |
getMethod()
INTERNAL USE ONLY |
void |
setMethod(Method m)
INTERNAL USE ONLY |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final String action
public final String viewKey
EntityViewEntityView.VIEW_LIST
while POST /user/aaronz/action would be EntityView.VIEW_NEW,
can be null to match all viewkeys (i.e. to allow this action
from any http method type and on collections and entities)
public final String methodName
EntityCustomAction or if the developer has defined this
explicitly
public Class<?>[] methodArgTypes
| Constructor Detail |
|---|
public CustomAction(String action,
String viewKey)
action - key which will be used to trigger the action (e.g. promote),
will be triggered by a URL like so: /user/aaronz/promote, viewKey - (optional) this is the view type which this action goes with, this
roughly translates to the GET/POST/PUT/DELETE in httpEntityView.VIEW_LIST
while POST /user/aaronz/action would be EntityView.VIEW_SHOWEntityView,
null indicates that this action can be run on entities and collections
using any http method (POST, GET)for details about what the method should return, what arguments are allowed, and what exceptions mean
public CustomAction(String action,
String viewKey,
String methodName)
ActionsDefineable
action - the action keyviewKey - the view key OR nullmethodName - the name of the method in your entity provider to
execute when the custom action is requestedfor details about what the method should return, what arguments are allowed, and what exceptions mean,
for more details| Method Detail |
|---|
public Method getMethod()
public void setMethod(Method m)
public CustomAction copy()
public static CustomAction copy(CustomAction ca)
ca -
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||